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

@opentiny/vue-tag

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-tag - npm Package Compare versions

Comparing version 3.9.0 to 3.10.0

__tests__/tag.test.d.ts

54

lib/index.js

@@ -15,3 +15,3 @@ function _extends() {

}
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
import { defineComponent, $prefix, $setup, $props } from "@opentiny/vue-common";
import PcTemplate from "./pc.js";

@@ -29,28 +29,30 @@ import MobileFirstTemplate from "./mobile-first.js";

};
var tagProps = _extends({}, $props, {
hit: Boolean,
text: String,
type: String,
theme: String,
size: String,
color: String,
closable: Boolean,
operable: Boolean,
disabled: Boolean,
selectable: Boolean,
customClass: {
type: String,
default: ""
},
effect: {
type: String,
default: "light",
validator: function validator(value) {
return Boolean(~["dark", "light", "plain"].indexOf(value));
}
},
beforeDelete: Function,
value: [Number, String]
});
var Tag = defineComponent({
name: $prefix + "Tag",
props: _extends({}, $props, {
hit: Boolean,
text: String,
type: String,
theme: String,
size: String,
color: String,
closable: Boolean,
operable: Boolean,
disabled: Boolean,
selectable: Boolean,
customClass: {
type: String,
default: ""
},
effect: {
type: String,
default: "light",
validator: function validator(value) {
return Boolean(~["dark", "light", "plain"].indexOf(value));
}
},
beforeDelete: Function
}),
props: tagProps,
setup: function setup(props, context) {

@@ -64,3 +66,3 @@ return $setup({

});
var version = "3.9.0";
var version = "3.10.0";
Tag.install = function(Vue) {

@@ -67,0 +69,0 @@ Vue.component(Tag.name, Tag);

@@ -6,11 +6,11 @@ import { createVNode, resolveComponent } from "vue";

var classes = {
"dark-success": "text-white bg-color-success",
"dark-alerting": "text-white bg-color-alert",
"dark-warning": "text-white bg-color-warning",
"dark-error": "text-white bg-color-error",
"dark-default": "text-white bg-color-info-primary",
"dark-info": "text-white bg-color-text-placeholder",
"dark-pink": "text-white bg-color-chart-17",
"dark-purple": "text-white bg-color-chart-11",
"dark-cyan": "text-white bg-color-chart-5",
"dark-success": "text-color-text-inverse bg-color-success",
"dark-alerting": "text-color-text-inverse bg-color-alert",
"dark-warning": "text-color-text-inverse bg-color-warning",
"dark-error": "text-color-text-inverse bg-color-error",
"dark-default": "text-color-text-inverse bg-color-info-primary",
"dark-info": "text-color-text-inverse bg-color-text-placeholder",
"dark-pink": "text-color-text-inverse bg-color-chart-17",
"dark-purple": "text-color-text-inverse bg-color-chart-11",
"dark-cyan": "text-color-text-inverse bg-color-chart-5",
"light-success": "text-color-success bg-color-success-subtler",

@@ -25,11 +25,11 @@ "light-alerting": "text-color-alert bg-color-alert-subtler",

"light-cyan": "text-color-chart-5 bg-color-chart-5-subtler",
"plain-success": "text-color-success bg-white",
"plain-alerting": "text-color-alert bg-white",
"plain-warning": "text-color-warning-hover bg-white",
"plain-error": "text-color-error bg-white",
"plain-default": "text-color-info-primary bg-white",
"plain-info": "text-color-text-primary bg-white",
"plain-pink": "text-color-chart-17 bg-white",
"plain-purple": "text-color-chart-11 bg-white",
"plain-cyan": "text-color-chart-5 bg-white",
"plain-success": "text-color-success bg-color-bg-1",
"plain-alerting": "text-color-alert bg-color-bg-1",
"plain-warning": "text-color-warning-hover bg-color-bg-1",
"plain-error": "text-color-error bg-color-bg-1",
"plain-default": "text-color-info-primary bg-color-bg-1",
"plain-info": "text-color-text-primary bg-color-bg-1",
"plain-pink": "text-color-chart-17 bg-color-bg-1",
"plain-purple": "text-color-chart-11 bg-color-bg-1",
"plain-cyan": "text-color-chart-5 bg-color-bg-1",
"success-border": "border-color-success-subtle",

@@ -44,3 +44,3 @@ "alerting-border": "border-color-alert-subtle",

"cyan-border": "border-color-chart-5-subtle",
"fill-dark": "fill-color-bg-6 hover:fill-white",
"fill-dark": "fill-color-bg-6 hover:fill-color-icon-inverse",
"fill-light-success": "fill-color-success-subtle hover:fill-color-success",

@@ -55,9 +55,9 @@ "fill-light-alerting": "fill-color-alert-subtle hover:fill-color-alert",

"fill-light-cyan": "fill-color-chart-5-subtle hover:fill-color-chart-5",
"selectable-unselect": "leading-[1.875rem] sm:leading-[1.625rem] text-color-text-primary bg-color-bg-4 cursor-pointer hover:bg-color-bg-3",
"selectable-selected": "leading-[1.875rem] sm:leading-[1.625rem] text-color-brand border-current bg-color-info-secondary-subtle cursor-pointer hover:text-color-brand-hover",
"tag-disabled": "leading-[1.875rem] sm:leading-[1.625rem] text-color-text-disabled bg-color-bg-4 border-transparent cursor-not-allowed hover:text-color-text-disabled hover:bg-color-bg-4",
"tag-operable": "leading-[1.625rem] sm:leading-[1.375rem] cursor-pointer",
"medium": "leading-[1.625rem] px-3",
"small": "leading-[1.375rem] px-2",
"mini": "leading-[1.125rem] px-1"
"selectable-unselect": "h-9 sm:h-7 text-color-text-primary bg-color-bg-4 cursor-pointer hover:bg-color-bg-3",
"selectable-selected": "h-9 sm:h-7 text-color-brand border-current bg-color-info-secondary-subtle cursor-pointer hover:text-color-brand-hover",
"tag-disabled": "h-9 sm:h-7 text-color-text-disabled bg-color-bg-4 border-transparent cursor-not-allowed hover:text-color-text-disabled hover:bg-color-bg-4",
"tag-operable": "h-7 sm:h-6 cursor-pointer",
"medium": "h-7 px-3",
"small": "h-6 px-2",
"mini": "h-5 px-1"
};

@@ -69,3 +69,3 @@ var _sfc_main = /* @__PURE__ */ defineComponent({

emits: ["click", "close"],
props: [].concat(props, ["text", "closable", "operable", "selectable", "type", "theme", "hit", "disabled", "color", "size", "effect", "customClass"]),
props: [].concat(props, ["text", "closable", "operable", "selectable", "type", "theme", "hit", "disabled", "color", "size", "effect", "customClass", "value"]),
setup: function setup(props2, context) {

@@ -82,4 +82,4 @@ return _setup({

render: function render() {
var slots = this.slots, selectable = this.selectable, disabled = this.disabled, color = this.color, handleClose = this.handleClose, handleClick = this.handleClick, customClass = this.customClass, hit = this.hit, m = this.m, gcls = this.gcls, state = this.state;
var size = selectable ? "medium" : this.size || "medium";
var slots = this.slots, selectable = this.selectable, disabled = this.disabled, color = this.color, handleClose = this.handleClose, handleClick = this.handleClick, customClass = this.customClass, hit = this.hit, m = this.m, gcls = this.gcls, state = this.state, value = this.value;
var size = selectable ? "medium" : this.size || "small";
var type = selectable ? "info" : state.type || "info";

@@ -89,3 +89,3 @@ var effect = selectable ? "light" : this.effect || "light";

var operable = selectable ? false : this.operable;
var classes2 = m("inline-flex items-center rounded-sm box-border border-0.5 sm:border mr-2", effect === "plain" || hit ? gcls(type + "-border") : "border-transparent", gcls(effect + "-" + type), gcls(size), {
var classes2 = m("text-xs inline-flex items-center rounded-sm box-border border-0.5 sm:border mr-2", effect === "plain" || hit ? gcls(type + "-border") : "border-transparent", gcls(effect + "-" + type), gcls(size), {
hidden: !state.show

@@ -100,3 +100,3 @@ }, selectable ? state.selected ? gcls("selectable-selected") : gcls("selectable-unselect") : "", selectable && disabled ? gcls("tag-disabled") : "", operable ? gcls("tag-operable") : "", customClass);

"onClick": handleClick
}, [slots.default(), closable && createVNode(resolveComponent("icon-close"), {
}, [value ? createVNode("span", null, [value]) : slots.default && slots.default(), closable && createVNode(resolveComponent("icon-close"), {
"class": ["w-3 h-3 ml-1 cursor-pointer", effect === "dark" ? gcls("fill-dark") : gcls("fill-light-" + type)],

@@ -103,0 +103,0 @@ "onClick": handleClose

@@ -10,3 +10,3 @@ import { createVNode, resolveComponent } from "vue";

emits: ["click", "close"],
props: [].concat(props, ["text", "closable", "type", "hit", "disabled", "color", "size", "effect", "beforeDelete"]),
props: [].concat(props, ["text", "closable", "type", "hit", "disabled", "color", "size", "effect", "value", "beforeDelete"]),
setup: function setup(props2, context) {

@@ -22,3 +22,3 @@ return _setup({

render: function render() {
var type = this.type, size = this.size, hit = this.hit, effect = this.effect, slots = this.slots, closable = this.closable, color = this.color, handleClose = this.handleClose, handleClick = this.handleClick, disabled = this.disabled;
var type = this.type, size = this.size, hit = this.hit, effect = this.effect, slots = this.slots, closable = this.closable, color = this.color, handleClose = this.handleClose, handleClick = this.handleClick, disabled = this.disabled, state = this.state, value = this.value;
var classes = ["tiny-tag", type ? "tiny-tag--" + type : "", size ? "tiny-tag--" + size : "", effect ? "tiny-tag--" + effect : "", hit && "is-hit", disabled ? "is-disabled" : ""];

@@ -28,6 +28,7 @@ var tagElement = createVNode("span", {

"style": {
backgroundColor: color
backgroundColor: color,
display: state.show ? null : "none"
},
"onClick": handleClick
}, [slots.default(), closable && createVNode(resolveComponent("icon-close"), {
}, [value ? createVNode("span", null, [value]) : slots.default && slots.default(), closable && createVNode(resolveComponent("icon-close"), {
"class": "tiny-svg-size tiny-tag__close ",

@@ -34,0 +35,0 @@ "onClick": handleClose

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

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

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

@@ -14,0 +17,0 @@ "license": "MIT",

@@ -0,1 +1,30 @@

export declare const tagProps: {
hit: BooleanConstructor;
text: StringConstructor;
type: StringConstructor;
theme: StringConstructor;
size: StringConstructor;
color: StringConstructor;
closable: BooleanConstructor;
operable: BooleanConstructor;
disabled: BooleanConstructor;
selectable: BooleanConstructor;
customClass: {
type: StringConstructor;
default: string;
};
effect: {
type: StringConstructor;
default: string;
validator: (value: string) => boolean;
};
beforeDelete: FunctionConstructor;
value: (StringConstructor | NumberConstructor)[];
tiny_mode: StringConstructor;
tiny_mode_root: BooleanConstructor;
tiny_template: (ObjectConstructor | FunctionConstructor)[];
tiny_renderless: FunctionConstructor;
tiny_theme: StringConstructor;
tiny_chart_theme: ObjectConstructor;
};
declare const _default: import("@vue/runtime-core").DefineComponent<{

@@ -22,2 +51,3 @@ hit: BooleanConstructor;

beforeDelete: FunctionConstructor;
value: (StringConstructor | NumberConstructor)[];
tiny_mode: StringConstructor;

@@ -29,5 +59,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<{
hit: BooleanConstructor;

@@ -53,2 +83,3 @@ text: StringConstructor;

beforeDelete: FunctionConstructor;
value: (StringConstructor | NumberConstructor)[];
tiny_mode: StringConstructor;

@@ -61,11 +92,11 @@ tiny_mode_root: BooleanConstructor;

}>>, {
disabled: boolean;
tiny_mode_root: boolean;
effect: string;
customClass: string;
tiny_mode_root: boolean;
closable: boolean;
disabled: boolean;
hit: boolean;
operable: boolean;
selectable: boolean;
effect: string;
}>;
}, {}>;
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,10 +12,10 @@ }>, {

m: (...cssClasses: any[]) => string;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "click")[], "close" | "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, ("close" | "click")[], "close" | "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;
}>>> & {
onClick?: ((...args: any[]) => any) | undefined;
onClose?: ((...args: any[]) => any) | undefined;
onClick?: ((...args: any[]) => any) | undefined;
}, {
[x: string]: any;
}>;
export default _sfc_main;
}, {}>;
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,10 +12,10 @@ }>, {

m: (...cssClasses: any[]) => string;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "click")[], "close" | "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, ("close" | "click")[], "close" | "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;
}>>> & {
onClick?: ((...args: any[]) => any) | undefined;
onClose?: ((...args: any[]) => any) | undefined;
onClick?: ((...args: any[]) => any) | undefined;
}, {
[x: string]: any;
}>;
export default _sfc_main;
}, {}>;
export default _default;
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