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

@opentiny/vue-dropdown-menu

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-dropdown-menu - npm Package Compare versions

Comparing version 3.1.0-alpha.0 to 3.5.0-alpha.0

index.d.ts

16

lib/index.js

@@ -64,3 +64,3 @@ import { $prefix, $props, $setup } from '@opentiny/vue-common';

type: Boolean,
default: true
default: false
},

@@ -101,3 +101,13 @@ arrowOffset: {

},
zIndex: [Number, String]
zIndex: [Number, String],
options: {
type: Array,
default: function _default() {
return [];
}
},
textField: {
type: String,
default: 'label'
}
}),

@@ -116,4 +126,4 @@ setup: function setup(props, context) {

};
DropdownMenu.version = '3.1.0-alpha.0';
DropdownMenu.version = '3.5.0-alpha.0';
export { DropdownMenu as default };
import { renderless, api } from '@opentiny/vue-renderless/dropdown-menu/vue';
import { setup, props } from '@opentiny/vue-common';
import '@opentiny/vue-theme/dropdown-menu/index.css';
import { openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, renderSlot, vShow } from 'vue';
import DropdownItem from '@opentiny/vue-dropdown-item';
import { resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, renderSlot, createElementBlock, Fragment, renderList, vShow } from 'vue';

@@ -32,4 +32,42 @@ function _toConsumableArray(arr) {

function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z = ".tiny-dropdown-menu{--ti-dropdown-menu-box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.2);--ti-dropdown-menu-margin-vertical:0;--ti-dropdown-menu-padding-vertical:4px;--ti-dropdown-menu-padding-horizontal:0;position:absolute;padding:var(--ti-dropdown-menu-padding-vertical) var(--ti-dropdown-menu-padding-horizontal);background-color:var(--ti-common-color-bg-white-normal);border-radius:var(--ti-common-border-radius-normal);-webkit-box-shadow:var(--ti-dropdown-menu-box-shadow);box-shadow:var(--ti-dropdown-menu-box-shadow);width:-webkit-max-content;width:-moz-max-content;width:max-content}.tiny-dropdown-menu .tiny-dropdown-menu{padding:var(--ti-dropdown-menu-padding-vertical) var(--ti-dropdown-menu-padding-horizontal)}.tiny-dropdown-menu.tiny-popper .popper__arrow,.tiny-dropdown-menu.tiny-popper .popper__arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.tiny-dropdown-menu.tiny-popper .popper__arrow{border-width:6px;-webkit-filter:drop-shadow(0 2px 12px rgba(0, 0, 0, .03));filter:drop-shadow(0 2px 12px rgba(0, 0, 0, .03))}.tiny-dropdown-menu.tiny-popper .popper__arrow::after{content:' ';border-width:6px}.tiny-dropdown-menu.tiny-popper[x-placement^=top]{margin-bottom:var(--ti-dropdown-menu-margin-vertical)}.tiny-dropdown-menu.tiny-popper[x-placement^=top] .popper__arrow{bottom:-6px;left:50%;margin-right:3px;border-top-color:#d9d9d9;border-bottom-width:0}.tiny-dropdown-menu.tiny-popper[x-placement^=top] .popper__arrow:after{bottom:1px;margin-left:-6px;border-top-color:#fff;border-bottom-width:0}.tiny-dropdown-menu.tiny-popper[x-placement^=bottom]{margin-top:var(--ti-dropdown-menu-margin-vertical)}.tiny-dropdown-menu.tiny-popper[x-placement^=bottom] .popper__arrow{top:-6px;left:50%;margin-right:3px;border-top-width:0;border-bottom-color:#d9d9d9}.tiny-dropdown-menu.tiny-popper[x-placement^=bottom] .popper__arrow:after{top:1px;margin-left:-6px;border-top-width:0;border-bottom-color:#fff}.tiny-dropdown-menu.tiny-popper[x-placement^=right]{margin-left:12px}.tiny-dropdown-menu.tiny-popper[x-placement^=right] .popper__arrow{top:50%;left:-6px;margin-bottom:3px;border-right-color:#d9d9d9;border-left-width:0}.tiny-dropdown-menu.tiny-popper[x-placement^=right] .popper__arrow:after{bottom:-6px;left:1px;border-right-color:#fff;border-left-width:0}.tiny-dropdown-menu.tiny-popper[x-placement^=left]{margin-right:12px}.tiny-dropdown-menu.tiny-popper[x-placement^=left] .popper__arrow{top:50%;right:-6px;margin-bottom:3px;border-right-width:0;border-left-color:#d9d9d9}.tiny-dropdown-menu.tiny-popper[x-placement^=left] .popper__arrow:after{right:1px;bottom:-6px;margin-left:-6px;border-right-width:0;border-left-color:#fff}.tiny-dropdown-menu--medium{padding:6px 0}.tiny-dropdown-menu--medium .tiny-dropdown-menu__item{line-height:30px;padding:0 17px;font-size:var(--ti-common-font-size-1)}.tiny-dropdown-menu--medium .tiny-dropdown-menu__item.tiny-dropdown-menu__item--divided{margin-top:6px}.tiny-dropdown-menu--medium .tiny-dropdown-menu__item.tiny-dropdown-menu__item--divided:before{height:6px;margin:0 -17px}.tiny-dropdown-menu--small{padding:6px 0}.tiny-dropdown-menu--small .tiny-dropdown-menu__item{line-height:27px;padding:0 15px;font-size:13px}.tiny-dropdown-menu--small .tiny-dropdown-menu__item.tiny-dropdown-menu__item--divided{margin-top:var(--ti-dropdown-menu-item-divided-margin-top)}.tiny-dropdown-menu--small .tiny-dropdown-menu__item.tiny-dropdown-menu__item--divided:before{height:4px;margin:0 -15px}.tiny-dropdown-menu--mini{padding:3px 0}.tiny-dropdown-menu--mini .tiny-dropdown-menu__item{line-height:24px;padding:0 10px;font-size:var(--ti-common-font-size-base)}.tiny-dropdown-menu--mini .tiny-dropdown-menu__item.tiny-dropdown-menu__item--divided{margin-top:3px}.tiny-dropdown-menu--mini .tiny-dropdown-menu__item.tiny-dropdown-menu__item--divided:before{height:3px;margin:0 -10px}";
styleInject(css_248z);
var script = {
props: [].concat(_toConsumableArray(props), ['visibleArrow', 'arrowOffset', 'placement', 'popperClass', 'popperAppendToBody']),
components: {
TinyDropdownItem: DropdownItem
},
props: [].concat(_toConsumableArray(props), ['visibleArrow', 'arrowOffset', 'placement', 'popperClass', 'popperAppendToBody', 'textField', 'options']),
provide: function provide() {
return {
dropdownMenu: this
};
},
setup: function setup$1(props, context) {

@@ -46,2 +84,3 @@ return setup({

function render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
return openBlock(), createBlock(Transition, {

@@ -54,3 +93,14 @@ name: "tiny-zoom-in-top",

class: normalizeClass(["tiny-dropdown-menu tiny-popper", [_ctx.state.size && "tiny-dropdown-menu--".concat(_ctx.state.size), $props.popperClass]])
}, [renderSlot(_ctx.$slots, "default")], 2), [[vShow, _ctx.state.showPopper]])];
}, [renderSlot(_ctx.$slots, "default", {}, function () {
return [(openBlock(true), createElementBlock(Fragment, null, renderList($props.options, function (item, index) {
return openBlock(), createBlock(_component_tiny_dropdown_item, {
itemData: item,
label: item[$props.textField],
key: index,
icon: item.icon,
disabled: item.disabled,
divided: item.divided
}, null, 8, ["itemData", "label", "icon", "disabled", "divided"]);
}), 128))];
})], 2), [[vShow, _ctx.state.showPopper]])];
}),

@@ -57,0 +107,0 @@ _: 3

13

package.json
{
"name": "@opentiny/vue-dropdown-menu",
"version": "3.1.0-alpha.0",
"version": "3.5.0-alpha.0",
"description": "",

@@ -12,10 +12,11 @@ "main": "lib/index.js",

"dependencies": {
"@opentiny/vue-renderless": "~3.1.0-alpha.0",
"@opentiny/vue-common": "~3.1.0-alpha.0",
"@opentiny/vue-icon": "~3.1.0-alpha.0",
"@opentiny/vue-theme": "~3.1.0-alpha.0",
"@opentiny/vue-theme-mobile": "~3.1.0-alpha.0"
"@opentiny/vue-renderless": "~3.5.0",
"@opentiny/vue-common": "~3.5.0-alpha.0",
"@opentiny/vue-icon": "~3.5.0-alpha.0",
"@opentiny/vue-theme": "~3.5.0",
"@opentiny/vue-theme-mobile": "~3.5.0"
},
"license": "MIT",
"types": "index.d.ts",
"sideEffects": false
}
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