@featherds/composables
Advanced tools
Comparing version 0.10.8 to 0.10.9
import { Ref, ComponentPublicInstance } from "vue"; | ||
declare type IRefElement = Ref<HTMLElement | IFocusTrap | ComponentPublicInstance>; | ||
declare type IRefElement = Ref<HTMLElement | IFocusTrap | ComponentPublicInstance> | HTMLElement; | ||
interface IFocusTrap { | ||
@@ -4,0 +4,0 @@ trapFocus: boolean; |
@@ -1,4 +0,7 @@ | ||
import { ref, computed } from "vue"; | ||
import { ref, computed, isRef } from "vue"; | ||
const layers = ref([]); | ||
const getElement = (refElement) => { | ||
if (!isRef(refElement)) { | ||
return refElement; | ||
} | ||
const value = refElement.value; | ||
@@ -5,0 +8,0 @@ if (value.trapFocus) { |
@@ -1,5 +0,7 @@ | ||
import { ref, computed, Ref, ComponentPublicInstance } from "vue"; | ||
import { ref, computed, Ref, ComponentPublicInstance, isRef } from "vue"; | ||
const layers: Ref<ILayer[]> = ref([]); | ||
type IRefElement = Ref<HTMLElement | IFocusTrap | ComponentPublicInstance>; | ||
type IRefElement = | ||
| Ref<HTMLElement | IFocusTrap | ComponentPublicInstance> | ||
| HTMLElement; | ||
interface IFocusTrap { | ||
@@ -14,2 +16,5 @@ trapFocus: boolean; | ||
const getElement = (refElement: IRefElement) => { | ||
if (!isRef(refElement)) { | ||
return refElement as HTMLElement; | ||
} | ||
const value = refElement.value; | ||
@@ -16,0 +21,0 @@ if ((value as IFocusTrap).trapFocus) { |
{ | ||
"name": "@featherds/composables", | ||
"version": "0.10.8", | ||
"version": "0.10.9", | ||
"publishConfig": { | ||
@@ -12,3 +12,3 @@ "access": "public" | ||
"dependencies": { | ||
"@featherds/utils": "^0.10.8", | ||
"@featherds/utils": "^0.10.9", | ||
"vue": "^3.1.0-0" | ||
@@ -20,3 +20,3 @@ }, | ||
], | ||
"gitHead": "f58926ce6d043036bdbe973d085c76492aec35af" | ||
"gitHead": "b1ad79847ac55cfa9a12fc4ab470944a0e397e26" | ||
} |
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
72373
2084
Updated@featherds/utils@^0.10.9