Comparing version 0.4.22 to 0.4.23
export declare const FocusTrap: import("vue").DefineComponent<{ | ||
disabled: BooleanConstructor; | ||
active: BooleanConstructor; | ||
@@ -11,10 +12,13 @@ focusFirstDescendant: BooleanConstructor; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
disabled?: unknown; | ||
active?: unknown; | ||
focusFirstDescendant?: unknown; | ||
} & { | ||
disabled: boolean; | ||
active: boolean; | ||
focusFirstDescendant: boolean; | ||
} & {}>, { | ||
disabled: boolean; | ||
active: boolean; | ||
focusFirstDescendant: boolean; | ||
}>; |
@@ -8,2 +8,3 @@ import { h, defineComponent, watchEffect, ref, Fragment, onMounted, onBeforeUnmount } from 'vue'; | ||
props: { | ||
disabled: Boolean, | ||
active: Boolean, | ||
@@ -67,2 +68,4 @@ focusFirstDescendant: Boolean | ||
function activate() { | ||
if (props.disabled) | ||
return; | ||
stack.push(id); | ||
@@ -74,2 +77,4 @@ resetFocusTo('first'); | ||
function deactivate() { | ||
if (props.disabled) | ||
return; | ||
document.removeEventListener('focus', handleDocumentFocus, true); | ||
@@ -152,2 +157,4 @@ stack = stack.filter((idInStack) => idInStack !== id); | ||
return null; | ||
if (this.disabled) | ||
return defaultSlot(); | ||
const { active, focusableStyle } = this; | ||
@@ -154,0 +161,0 @@ return h(Fragment, null, [ |
export declare const FocusTrap: import("vue").DefineComponent<{ | ||
disabled: BooleanConstructor; | ||
active: BooleanConstructor; | ||
@@ -11,10 +12,13 @@ focusFirstDescendant: BooleanConstructor; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
disabled?: unknown; | ||
active?: unknown; | ||
focusFirstDescendant?: unknown; | ||
} & { | ||
disabled: boolean; | ||
active: boolean; | ||
focusFirstDescendant: boolean; | ||
} & {}>, { | ||
disabled: boolean; | ||
active: boolean; | ||
focusFirstDescendant: boolean; | ||
}>; |
@@ -11,2 +11,3 @@ "use strict"; | ||
props: { | ||
disabled: Boolean, | ||
active: Boolean, | ||
@@ -70,2 +71,4 @@ focusFirstDescendant: Boolean | ||
function activate() { | ||
if (props.disabled) | ||
return; | ||
stack.push(id); | ||
@@ -77,2 +80,4 @@ resetFocusTo('first'); | ||
function deactivate() { | ||
if (props.disabled) | ||
return; | ||
document.removeEventListener('focus', handleDocumentFocus, true); | ||
@@ -155,2 +160,4 @@ stack = stack.filter((idInStack) => idInStack !== id); | ||
return null; | ||
if (this.disabled) | ||
return defaultSlot(); | ||
const { active, focusableStyle } = this; | ||
@@ -157,0 +164,0 @@ return (0, vue_1.h)(vue_1.Fragment, null, [ |
{ | ||
"name": "vueuc", | ||
"version": "0.4.22", | ||
"version": "0.4.23", | ||
"description": "Util Components for Vue", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
207236
5403