Socket
Socket
Sign inDemoInstall

@opentiny/vue-dropdown-item

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 3.1.0-alpha.0 to 3.4.7

index.d.ts

20

lib/index.js

@@ -77,2 +77,20 @@ import { $prefix, $props, $setup } from '@opentiny/vue-common';

default: 'selection'
},
label: {
type: String,
default: ''
},
itemData: {
type: Object,
default: function _default() {
return {};
}
},
appendToBody: {
type: Boolean,
default: true
},
textField: {
type: String,
default: 'label'
}

@@ -96,4 +114,4 @@ }),

};
DropdownItem.version = '3.1.0-alpha.0';
DropdownItem.version = '3.4.7';
export { DropdownItem as default };

68

lib/pc.js

@@ -1,4 +0,6 @@

import { setup, props } from '@opentiny/vue-common';
import { $prefix, setup, props } from '@opentiny/vue-common';
import { renderless, api } from '@opentiny/vue-renderless/dropdown-item/vue';
import { iconDeltaLeft } from '@opentiny/vue-icon';
import '@opentiny/vue-theme/dropdown-item/index.css';
import { openBlock, createElementBlock, normalizeClass, withModifiers, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
import { resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createVNode, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, renderSlot, toDisplayString, Fragment, renderList, withCtx } from 'vue';

@@ -32,3 +34,9 @@ function _toConsumableArray(arr) {

var script = {
props: [].concat(_toConsumableArray(props), ['command', 'disabled', 'divided', 'icon']),
name: $prefix + 'DropdownItem',
componentName: $prefix + 'DropdownItem',
emits: ['item-click'],
props: [].concat(_toConsumableArray(props), ['command', 'disabled', 'divided', 'icon', 'label', 'itemData', 'appendToBody', 'textField']),
components: {
iconDeltaLeft: iconDeltaLeft()
},
setup: function setup$1(props, context) {

@@ -38,12 +46,4 @@ return setup({

context: context,
renderless: function renderless(props, hooks, _ref) {
var dispatch = _ref.dispatch,
vm = _ref.vm;
return {
handleClick: function handleClick() {
dispatch('TinyDropdown', 'menu-item-click', [props.itemData, vm]);
}
};
},
api: ['handleClick']
renderless: renderless,
api: api
});

@@ -54,3 +54,12 @@ }

var _hoisted_1 = ["aria-disabled", "tabindex"];
var _hoisted_2 = {
key: 0,
class: "tiny-dropdown-menu__item-expand"
};
var _hoisted_3 = {
class: "tiny-dropdown-menu__item-content"
};
function render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_icon_delta_left = resolveComponent("icon-delta-left");
var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
return openBlock(), createElementBlock("li", {

@@ -61,11 +70,36 @@ class: normalizeClass(["tiny-dropdown-menu__item", {

}]),
onClick: _cache[0] || (_cache[0] = withModifiers(function () {
ref: "dropdownItem",
onClick: _cache[0] || (_cache[0] = function () {
return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
}, ["stop"])),
}),
onMousedown: _cache[1] || (_cache[1] = withModifiers(function () {}, ["stop"])),
"aria-disabled": $props.disabled,
tabindex: $props.disabled ? null : -1
}, [$props.icon ? (openBlock(), createBlock(resolveDynamicComponent($props.icon), {
}, [$props.itemData.children && $props.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_2, [createVNode(_component_icon_delta_left)])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3, [$props.icon ? (openBlock(), createBlock(resolveDynamicComponent($props.icon), {
key: 0,
class: "tiny-svg-size"
})) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 10, _hoisted_1);
})) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default", {
itemData: $props.itemData
}, function () {
return [createElementVNode("span", null, toDisplayString($props.label), 1)];
})]), $props.itemData.children && $props.itemData.children.length ? (openBlock(), createElementBlock("ul", {
key: 1,
class: normalizeClass(['tiny-dropdown-menu', 'tiny-dropdown-menu__item--child', _ctx.state.popperClass])
}, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.itemData.children, function (item, index) {
return openBlock(), createBlock(_component_tiny_dropdown_item, {
key: index,
label: item[_ctx.state.textField],
itemData: item,
icon: item.icon,
disabled: item.disabled,
divided: item.divided
}, {
default: withCtx(function () {
return [renderSlot(_ctx.$slots, "default", {
itemData: item
})];
}),
_: 2
}, 1032, ["label", "itemData", "icon", "disabled", "divided"]);
}), 128))], 2)) : createCommentVNode("", true)], 42, _hoisted_1);
}

@@ -72,0 +106,0 @@

{
"name": "@opentiny/vue-dropdown-item",
"version": "3.1.0-alpha.0",
"version": "3.4.7",
"description": "",

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

"dependencies": {
"@opentiny/vue-common": "~3.1.0-alpha.0",
"@opentiny/vue-icon": "~3.1.0-alpha.0",
"@opentiny/vue-renderless": "~3.1.0-alpha.0",
"@opentiny/vue-popup": "~3.1.0-alpha.0",
"@opentiny/vue-button": "~3.1.0-alpha.0",
"@opentiny/vue-theme": "~3.1.0-alpha.0",
"@opentiny/vue-theme-mobile": "~3.1.0-alpha.0"
"@opentiny/vue-common": "~3.4.7",
"@opentiny/vue-icon": "~3.4.7",
"@opentiny/vue-renderless": "~3.4.0",
"@opentiny/vue-popup": "~3.4.7",
"@opentiny/vue-button": "~3.4.7",
"@opentiny/vue-theme": "~3.4.0",
"@opentiny/vue-theme-mobile": "~3.4.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