@vaadin/a11y-base
Advanced tools
Comparing version 24.1.0 to 24.1.1
@@ -15,2 +15,3 @@ export { announce } from './src/announce.js'; | ||
export { FocusTrapController } from './src/focus-trap-controller.js'; | ||
export { FocusRestorationController } from './src/focus-restoration-controller.js'; | ||
export { KeyboardDirectionMixin } from './src/keyboard-direction-mixin.js'; | ||
@@ -17,0 +18,0 @@ export { KeyboardMixin } from './src/keyboard-mixin.js'; |
@@ -8,2 +8,3 @@ export { announce } from './src/announce.js'; | ||
export { FocusTrapController } from './src/focus-trap-controller.js'; | ||
export { FocusRestorationController } from './src/focus-restoration-controller.js'; | ||
export { | ||
@@ -10,0 +11,0 @@ getFocusableElements, |
{ | ||
"name": "@vaadin/a11y-base", | ||
"version": "24.1.0", | ||
"version": "24.1.1", | ||
"publishConfig": { | ||
@@ -35,3 +35,3 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "~24.1.0", | ||
"@vaadin/component-base": "~24.1.1", | ||
"lit": "^2.0.0" | ||
@@ -41,6 +41,6 @@ }, | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/testing-helpers": "^0.4.0", | ||
"@vaadin/testing-helpers": "^0.4.2", | ||
"sinon": "^13.0.2" | ||
}, | ||
"gitHead": "7fdfe7d5ceb4c305a894f8e9dc11e5b7d04cf1f2" | ||
"gitHead": "c3a3d904885bd37ebb07a84b09617a340b4fab7e" | ||
} |
@@ -18,2 +18,8 @@ /** | ||
/** | ||
* The callback used to detect which element | ||
* to use as a target. Defaults to the host. | ||
*/ | ||
callback: () => HTMLElement | HTMLElement[]; | ||
constructor(node: HTMLElement); | ||
@@ -20,0 +26,0 @@ |
@@ -19,3 +19,3 @@ /** | ||
*/ | ||
constructor(host) { | ||
constructor(host, callback) { | ||
/** | ||
@@ -27,2 +27,10 @@ * The controller host element. | ||
this.host = host; | ||
/** | ||
* The callback used to detect which element | ||
* to use as a target. Defaults to the host. | ||
* | ||
* @type {Function} | ||
*/ | ||
this.callback = typeof callback === 'function' ? callback : () => host; | ||
} | ||
@@ -38,3 +46,4 @@ | ||
showModal() { | ||
this.__showOthers = hideOthers(this.host); | ||
const targets = this.callback(); | ||
this.__showOthers = hideOthers(targets); | ||
} | ||
@@ -41,0 +50,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101855
37
2687