@opentiny/vue-dropdown-menu
Advanced tools
Comparing version 3.1.0-alpha.0 to 3.5.0-alpha.0
@@ -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 |
{ | ||
"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 | ||
} |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
23466
9
555
2
80
4
+ Added@babel/runtime@7.18.3(transitive)
+ Added@opentiny/vue-common@3.5.0(transitive)
+ Added@opentiny/vue-icon@3.5.2(transitive)
+ Added@opentiny/vue-locale@3.5.0(transitive)
+ Added@opentiny/vue-renderless@3.5.0(transitive)
+ Added@opentiny/vue-theme@3.5.0(transitive)
+ Added@opentiny/vue-theme-mobile@3.5.0(transitive)
+ Addedregenerator-runtime@0.13.11(transitive)
- Removed@babel/runtime@7.26.0(transitive)
- Removed@opentiny/vue-common@3.1.0-alpha.0(transitive)
- Removed@opentiny/vue-icon@3.1.0-alpha.0(transitive)
- Removed@opentiny/vue-locale@3.1.0-alpha.0(transitive)
- Removed@opentiny/vue-renderless@3.1.0-alpha.0(transitive)
- Removed@opentiny/vue-theme@3.1.0-alpha.1(transitive)
- Removed@opentiny/vue-theme-mobile@3.1.0-alpha.0(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
Updated@opentiny/vue-theme@~3.5.0