Socket
Socket
Sign inDemoInstall

@opentiny/vue-dropdown-item

Package Overview
Dependencies
13
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.9.0 to 3.10.0

48

lib/index.js

@@ -49,4 +49,12 @@ function _extends() {

divided: Boolean,
command: {},
itemData: {
type: [String, Object],
default: ""
},
title: String,
label: {
type: String,
default: ""
},
level: String,
titleClass: String,

@@ -63,20 +71,2 @@ options: {

},
label: {
type: String,
default: ""
},
itemData: {
type: Object,
default: function _default3() {
return {};
}
},
appendToBody: {
type: Boolean,
default: true
},
textField: {
type: String,
default: "label"
},
selected: {

@@ -96,5 +86,21 @@ type: Boolean,

type: Number,
default: function _default4() {
default: function _default3() {
return -1;
}
},
appendToBody: {
type: Boolean,
default: true
},
textField: {
type: String,
default: "label"
},
tip: {
type: [String, Function],
default: ""
},
tipPosition: {
type: String,
default: "right"
}

@@ -110,3 +116,3 @@ }),

});
var version = "3.9.0";
var version = "3.10.0";
DropdownItem.model = {

@@ -113,0 +119,0 @@ prop: "modelValue",

@@ -69,11 +69,7 @@ import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";

}),
class: normalizeClass(["list-none leading-10 sm:leading-8 m-0 cursor-pointer outline-0 min-w-[4.5rem] max-w-[13.5rem] w-full [&_svg]:sm:w-3.5 [&_svg]:sm:h-3.5 [&_svg]:sm:mr-1.5 [&_svg]:mr-2 [&_svg]:align-text-bottom", {
"text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-4 focus:bg-color-bg-4": !_ctx.disabled
}, {
"cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled": _ctx.disabled
}, {
class: normalizeClass(_ctx.m("list-none leading-10 sm:leading-8 m-0 outline-0 min-w-[theme(spacing.18)] max-w-[theme(spacing.52)] w-full [&_svg]:sm:w-3.5 [&_svg]:sm:h-3.5 [&_svg]:sm:mr-1.5 [&_svg]:mr-2 [&_svg]:align-text-bottom", _ctx.disabled ? "cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled" : "text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-4 focus:bg-color-bg-4 cursor-pointer", {
"text-color-brand-focus": _ctx.dataStore.checkedStatus && _ctx.selected
}, {
"!px-0 sm:!px-0": _ctx.dataStore.multiStage
}]),
"!px-0": _ctx.dataStore.multiStage
})),
onClick: _cache[2] || (_cache[2] = withModifiers(function() {

@@ -80,0 +76,0 @@ return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);

import { defineComponent, $prefix, props, setup as _setup } from "@opentiny/vue-common";
import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
import { iconDeltaLeft } from "@opentiny/vue-icon";
import Tooltip from "@opentiny/vue-tooltip";
import "@opentiny/vue-theme/dropdown-item/index.css";
import { resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList, withCtx } from "vue";
import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList } from "vue";
function _createForOfIteratorHelperLoose(o, allowArrayLike) {

@@ -55,5 +56,6 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

emits: ["item-click"],
props: [].concat(props, ["command", "disabled", "divided", "icon", "label", "itemData", "appendToBody", "textField"]),
props: [].concat(props, ["disabled", "divided", "icon", "itemData", "title", "titleClass", "options", "type", "label", "appendToBody", "textField", "selected", "selectedField", "multiStage", "currentIndex", "tip", "tipPosition"]),
components: {
IconDeltaLeft: iconDeltaLeft()
IconDeltaLeft: iconDeltaLeft(),
TinyTooltip: Tooltip
},

@@ -82,62 +84,74 @@ setup: function setup(props2, context) {

var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
return openBlock(), createElementBlock("li", {
class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
"is-disabled": _ctx.disabled,
"tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
"has-children": _ctx.itemData.children && _ctx.itemData.children.length
}]),
ref: "dropdownItem",
onClick: _cache[0] || (_cache[0] = function() {
return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
return openBlock(), createBlock(_component_tiny_tooltip, {
content: _ctx.getTip,
placement: _ctx.tipPosition
}, {
default: withCtx(function() {
return [createElementVNode("li", {
class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
"is-disabled": _ctx.disabled,
"tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
"has-children": _ctx.itemData.children && _ctx.itemData.children.length
}]),
ref: "dropdownItem",
onClick: _cache[0] || (_cache[0] = withModifiers(function() {
return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
}, ["stop"])),
onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
}, ["stop"])),
"aria-disabled": _ctx.disabled,
tabindex: _ctx.disabled ? null : -1
}, [createElementVNode("div", _hoisted_2, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon)))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
key: 0,
class: "tiny-svg-size"
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {
itemData: _ctx.itemData
}, function() {
return [createElementVNode(
"span",
null,
toDisplayString(_ctx.label),
1
/* TEXT */
)];
})]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
"ul",
{
key: 1,
class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
},
[(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.itemData.children, function(item, index) {
return openBlock(), createBlock(_component_tiny_dropdown_item, {
key: index,
label: item[_ctx.state.textField],
"item-data": item,
icon: item.icon,
disabled: item.disabled,
divided: item.divided,
tip: item.tip,
"tip-position": item.tipPosition
}, {
default: withCtx(function() {
return [renderSlot(_ctx.$slots, "default", {
itemData: item
})];
}),
_: 2
/* DYNAMIC */
}, 1032, ["label", "item-data", "icon", "disabled", "divided", "tip", "tip-position"]);
}),
128
/* KEYED_FRAGMENT */
))],
2
/* CLASS */
)) : createCommentVNode("v-if", true)])], 42, _hoisted_1)];
}),
onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
}, ["stop"])),
"aria-disabled": _ctx.disabled,
tabindex: _ctx.disabled ? null : -1
}, [createElementVNode("div", _hoisted_2, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon)))])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
key: 0,
class: "tiny-svg-size"
})) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {
itemData: _ctx.itemData
}, function() {
return [createElementVNode(
"span",
null,
toDisplayString(_ctx.label),
1
/* TEXT */
)];
})]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
"ul",
{
key: 1,
class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
},
[(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.itemData.children, function(item, index) {
return openBlock(), createBlock(_component_tiny_dropdown_item, {
key: index,
label: item[_ctx.state.textField],
"item-data": item,
icon: item.icon,
disabled: item.disabled,
divided: item.divided
}, {
default: withCtx(function() {
return [renderSlot(_ctx.$slots, "default", {
itemData: item
})];
}),
_: 2
/* DYNAMIC */
}, 1032, ["label", "item-data", "icon", "disabled", "divided"]);
}),
128
/* KEYED_FRAGMENT */
))],
2
/* CLASS */
)) : createCommentVNode("v-if", true)])], 42, _hoisted_1);
_: 3
/* FORWARDED */
}, 8, ["content", "placement"]);
}

@@ -144,0 +158,0 @@ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);

{
"name": "@opentiny/vue-dropdown-item",
"version": "3.9.0",
"version": "3.10.0",
"description": "",

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

"sideEffects": false,
"type": "module",
"dependencies": {
"@opentiny/vue-common": "~3.9.0",
"@opentiny/vue-icon": "~3.9.0",
"@opentiny/vue-renderless": "~3.9.0",
"@opentiny/vue-popup": "~3.9.0",
"@opentiny/vue-button": "~3.9.0"
"@opentiny/vue-common": "~3.10.0",
"@opentiny/vue-icon": "~3.10.0",
"@opentiny/vue-renderless": "~3.10.0",
"@opentiny/vue-popup": "~3.10.0",
"@opentiny/vue-button": "~3.10.0",
"@opentiny/vue-tooltip": "~3.10.0"
},

@@ -16,0 +18,0 @@ "license": "MIT",

@@ -0,1 +1,12 @@

/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
declare const _default: import("@vue/runtime-core").DefineComponent<{

@@ -13,4 +24,12 @@ _constants: {

divided: BooleanConstructor;
command: {};
itemData: {
type: (ObjectConstructor | StringConstructor)[];
default: string;
};
title: StringConstructor;
label: {
type: StringConstructor;
default: string;
};
level: StringConstructor;
titleClass: StringConstructor;

@@ -25,10 +44,18 @@ options: {

};
label: {
selected: {
type: BooleanConstructor;
default: boolean;
};
selectedField: {
type: StringConstructor;
default: string;
};
itemData: {
type: ObjectConstructor;
default: () => {};
multiStage: {
type: BooleanConstructor;
default: boolean;
};
currentIndex: {
type: NumberConstructor;
default: () => number;
};
appendToBody: {

@@ -42,18 +69,10 @@ type: BooleanConstructor;

};
selected: {
type: BooleanConstructor;
default: boolean;
tip: {
type: (StringConstructor | FunctionConstructor)[];
default: string;
};
selectedField: {
tipPosition: {
type: StringConstructor;
default: string;
};
multiStage: {
type: BooleanConstructor;
default: boolean;
};
currentIndex: {
type: NumberConstructor;
default: () => number;
};
tiny_mode: StringConstructor;

@@ -65,5 +84,5 @@ tiny_mode_root: BooleanConstructor;

tiny_chart_theme: ObjectConstructor;
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
_constants: {

@@ -80,4 +99,12 @@ type: ObjectConstructor;

divided: BooleanConstructor;
command: {};
itemData: {
type: (ObjectConstructor | StringConstructor)[];
default: string;
};
title: StringConstructor;
label: {
type: StringConstructor;
default: string;
};
level: StringConstructor;
titleClass: StringConstructor;

@@ -92,10 +119,18 @@ options: {

};
label: {
selected: {
type: BooleanConstructor;
default: boolean;
};
selectedField: {
type: StringConstructor;
default: string;
};
itemData: {
type: ObjectConstructor;
default: () => {};
multiStage: {
type: BooleanConstructor;
default: boolean;
};
currentIndex: {
type: NumberConstructor;
default: () => number;
};
appendToBody: {

@@ -109,18 +144,10 @@ type: BooleanConstructor;

};
selected: {
type: BooleanConstructor;
default: boolean;
tip: {
type: (StringConstructor | FunctionConstructor)[];
default: string;
};
selectedField: {
tipPosition: {
type: StringConstructor;
default: string;
};
multiStage: {
type: BooleanConstructor;
default: boolean;
};
currentIndex: {
type: NumberConstructor;
default: () => number;
};
tiny_mode: StringConstructor;

@@ -133,17 +160,19 @@ tiny_mode_root: BooleanConstructor;

}>>, {
type: string;
label: string;
selected: boolean;
disabled: boolean;
tiny_mode_root: boolean;
_constants: Record<string, any>;
options: unknown[];
textField: string;
type: string;
tiny_mode_root: boolean;
_constants: Record<string, any>;
disabled: boolean;
appendToBody: boolean;
selected: boolean;
tip: string | Function;
multiStage: boolean;
divided: boolean;
itemData: Record<string, any>;
itemData: string | Record<string, any>;
selectedField: string;
multiStage: boolean;
currentIndex: number;
}>;
tipPosition: string;
}, {}>;
export default _default;

@@ -1,8 +0,8 @@

declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
[x: string]: any;
}>, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
}>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
[x: string]: any;
}>>>, {
[x: string]: any;
}>;
export default _sfc_main;
}, {}>;
export default _default;

@@ -1,2 +0,2 @@

declare const _sfc_main: import("@vue/runtime-core").DefineComponent<unknown, object, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<unknown>, {}>;
export default _sfc_main;
declare const _default: (props: Record<string, any> & {}) => any;
export default _default;

@@ -1,2 +0,2 @@

declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
[x: string]: any;

@@ -12,3 +12,3 @@ }>, {

m: (...cssClasses: any[]) => string;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "item-click"[], "item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "item-click"[], "item-click", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
[x: string]: any;

@@ -19,3 +19,3 @@ }>>> & {

[x: string]: any;
}>;
export default _sfc_main;
}, {}>;
export default _default;
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc