Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@featherds/menu

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@featherds/menu - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

9

dist/app.es.js

@@ -9,9 +9,10 @@ import { getSafeId } from "@featherds/utils/id";

var _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
sfc[key] = val;
target[key] = val;
}
return sfc;
return target;
};
const _sfc_main = {
emits: ["outside-click", "trigger-click"],
emits: ["outside-click", "trigger-click", "close"],
props: {

@@ -187,3 +188,3 @@ open: {

}
var FeatherMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6a69cac4"]]);
var FeatherMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0e29b938"]]);
var MenuFocusLoop = {

@@ -190,0 +191,0 @@ mounted(el, binding) {

{
"name": "@featherds/menu",
"version": "0.9.2",
"version": "0.9.3",
"publishConfig": {

@@ -12,6 +12,6 @@ "access": "public"

"dependencies": {
"@featherds/composables": "^0.9.2",
"@featherds/ripple": "^0.9.2",
"@featherds/styles": "^0.9.2",
"@featherds/utils": "^0.9.2",
"@featherds/composables": "^0.9.3",
"@featherds/ripple": "^0.9.3",
"@featherds/styles": "^0.9.3",
"@featherds/utils": "^0.9.3",
"vue": "^3.1.0-0"

@@ -24,3 +24,3 @@ },

"types": "./src/index.d.ts",
"gitHead": "c5b9a591688579921f59e070325aa141c23315f7"
"gitHead": "aebb5c7fe38504ab6719aff7007fe42ba940c63e"
}

@@ -94,6 +94,3 @@ import { nextTick } from "vue";

const wrapper = await getWrapper({ slots });
const documentRemove = spyOn(
document,
"removeEventListener"
).and.callThrough();
const documentRemove = jest.spyOn(document, "removeEventListener");
wrapper.unmount();

@@ -120,15 +117,23 @@ expect(documentRemove).toHaveBeenCalled();

const wrapper = await getWrapper({ slots, props: { right: true } });
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height: 100,
width: 100,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: 50,
bottom: 60,
left: 50,
right: 120,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height: 100,
width: 100,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 120,
};
});
wrapper.vm.calculatePosition();

@@ -147,15 +152,23 @@ await nextTick();

const windowHeight = window.innerHeight;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 120,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 120,
};
});
wrapper.vm.calculatePosition();

@@ -173,15 +186,23 @@ await nextTick();

const width = 100;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: 50,
bottom: 60,
left: 10,
right: 30,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 10,
right: 30,
};
});
wrapper.vm.calculatePosition();

@@ -201,15 +222,23 @@ await nextTick();

const windowHeight = window.innerHeight;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
};
});
wrapper.vm.calculatePosition();

@@ -229,15 +258,23 @@ await nextTick();

const windowHeight = window.innerHeight;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 10,
right: 30,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 10,
right: 30,
};
});
wrapper.vm.calculatePosition();

@@ -255,15 +292,23 @@ await nextTick();

const wrapper = await getWrapper({ slots });
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height: 100,
width: 100,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: 50,
bottom: 60,
left: 50,
right: 80,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height: 100,
width: 100,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: 50,
right: 80,
};
});
wrapper.vm.calculatePosition();

@@ -282,15 +327,23 @@ await nextTick();

const windowHeight = window.innerHeight;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 80,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: 50,
right: 80,
};
});
wrapper.vm.calculatePosition();

@@ -309,15 +362,23 @@ await nextTick();

const windowWidth = window.innerWidth;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: 50,
bottom: 60,
left: windowWidth - 30,
right: windowWidth,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: 50,
bottom: 60,
left: windowWidth - 30,
right: windowWidth,
};
});
wrapper.vm.calculatePosition();

@@ -337,15 +398,23 @@ await nextTick();

const windowHeight = window.innerHeight;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: 50,
bottom: windowHeight - 50,
left: 50,
right: windowWidth - 50,
};
});
wrapper.vm.calculatePosition();

@@ -365,15 +434,23 @@ await nextTick();

const windowHeight = window.innerHeight;
spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect").and.returnValue({
height,
width,
});
spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
).and.returnValue({
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: windowWidth - 30,
right: windowWidth,
});
jest
.spyOn(wrapper.vm.$refs.menu, "getBoundingClientRect")
.mockImplementation(() => {
return {
height,
width,
};
});
jest
.spyOn(
wrapper.find("[menu-trigger]").element,
"getBoundingClientRect"
)
.mockImplementation(() => {
return {
top: windowHeight - height,
bottom: windowHeight - height + 10,
left: windowWidth - 30,
right: windowWidth,
};
});
wrapper.vm.calculatePosition();

@@ -380,0 +457,0 @@ await nextTick();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc