diff --git a/package-lock.json b/package-lock.json index d0f9923f3e..14b3a764b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@nextcloud/capabilities": "^1.0.4", "@nextcloud/dialogs": "^3.1.4", "@nextcloud/event-bus": "^3.0.0", + "@nextcloud/focus-trap": "^0.1.0-beta", "@nextcloud/initial-state": "^2.0.0", "@nextcloud/l10n": "^1.6.0", "@nextcloud/logger": "^2.2.1", @@ -24,7 +25,6 @@ "emoji-mart-vue-fast": "^11.1.1", "escape-html": "^1.0.3", "floating-vue": "^1.0.0-beta.18", - "focus-trap": "^7.0.0", "hammerjs": "^2.0.8", "linkify-string": "^3.0.4", "md5": "^2.3.0", @@ -4990,6 +4990,18 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/@nextcloud/focus-trap": { + "version": "0.1.0-beta", + "resolved": "https://registry.npmjs.org/@nextcloud/focus-trap/-/focus-trap-0.1.0-beta.tgz", + "integrity": "sha512-c6mrUrvDGRVkYfUGAJl7o2lxA/iIMF46XgBdCGCnCJFISFqHoWYGQoG6adc6w2IL7uhGka+lzy38szz+WUYpkA==", + "dependencies": { + "focus-trap": "^7.0.0" + }, + "engines": { + "node": "^16.0.0", + "npm": "^7.0.0 || ^8.0.0" + } + }, "node_modules/@nextcloud/initial-state": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-2.0.0.tgz", @@ -33326,6 +33338,14 @@ } } }, + "@nextcloud/focus-trap": { + "version": "0.1.0-beta", + "resolved": "https://registry.npmjs.org/@nextcloud/focus-trap/-/focus-trap-0.1.0-beta.tgz", + "integrity": "sha512-c6mrUrvDGRVkYfUGAJl7o2lxA/iIMF46XgBdCGCnCJFISFqHoWYGQoG6adc6w2IL7uhGka+lzy38szz+WUYpkA==", + "requires": { + "focus-trap": "^7.0.0" + } + }, "@nextcloud/initial-state": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-2.0.0.tgz", diff --git a/package.json b/package.json index 52ad47c147..0308e0968d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@nextcloud/capabilities": "^1.0.4", "@nextcloud/dialogs": "^3.1.4", "@nextcloud/event-bus": "^3.0.0", + "@nextcloud/focus-trap": "^0.1.0-beta", "@nextcloud/initial-state": "^2.0.0", "@nextcloud/l10n": "^1.6.0", "@nextcloud/logger": "^2.2.1", @@ -52,7 +53,6 @@ "emoji-mart-vue-fast": "^11.1.1", "escape-html": "^1.0.3", "floating-vue": "^1.0.0-beta.18", - "focus-trap": "^7.0.0", "hammerjs": "^2.0.8", "linkify-string": "^3.0.4", "md5": "^2.3.0", diff --git a/src/components/NcModal/NcModal.vue b/src/components/NcModal/NcModal.vue index ddf6eae4bc..5095dbfe1b 100644 --- a/src/components/NcModal/NcModal.vue +++ b/src/components/NcModal/NcModal.vue @@ -325,7 +325,7 @@ import Pause from 'vue-material-design-icons/Pause.vue' import Play from 'vue-material-design-icons/Play.vue' import Hammer from 'hammerjs' -import { createFocusTrap } from 'focus-trap' +import { createFocusTrap } from '@nextcloud/focus-trap' export default { name: 'NcModal', diff --git a/src/components/NcPopover/NcPopover.vue b/src/components/NcPopover/NcPopover.vue index d2160d4346..ce6ca4068c 100644 --- a/src/components/NcPopover/NcPopover.vue +++ b/src/components/NcPopover/NcPopover.vue @@ -102,7 +102,7 @@ The prop `:focus-trap="false"` help to prevent it when the default behavior is n