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.6.0 to 3.6.1-alpha.0

LICENSE

1

index.d.ts

@@ -13,3 +13,2 @@ /**

import Tag from './src/index';
import '@opentiny/vue-theme/tag/index.css';
export default Tag;

@@ -1,60 +0,27 @@

import { $prefix, $props, $setup } from '@opentiny/vue-common';
import PCTemplate from './pc';
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}
return keys;
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
return target;
}
function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
var template = function template() {
return PCTemplate;
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
import PcTemplate from "./pc.js";
import "@opentiny/vue-theme/tag/index.css";
var template = function template2(mode) {
if ("mobile" === (process.env.TINY_MODE || mode))
return MobileTemplate;
else
return PcTemplate;
};
var Tag = {
name: $prefix + 'Tag',
props: _objectSpread2(_objectSpread2({}, $props), {}, {
var Tag = defineComponent({
name: $prefix + "Tag",
props: _extends({}, $props, {
hit: Boolean,

@@ -68,5 +35,5 @@ text: String,

type: String,
default: 'light',
default: "light",
validator: function validator(value) {
return ~['dark', 'light', 'plain'].indexOf(value);
return Boolean(~["dark", "light", "plain"].indexOf(value));
}

@@ -78,44 +45,15 @@ },

return $setup({
props: props,
context: context,
template: template
props,
context,
template
});
}
};
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-tag{--ti-tag-height:22px;--ti-tag-medium-height:var(--ti-common-size-6x);--ti-tag-small-height:var(--ti-common-size-5x);--ti-tag-mini-height:var(--ti-common-size-4x);--ti-tag-border-color:var(--ti-base-color-border);--ti-tag-border-radius:var(--ti-base-radius-medium);--ti-tag-font-size:var(--ti-base-font-size);--ti-tag-close-font-size:var(--ti-common-font-size-1);--ti-tag-primary-text-color:var(--ti-base-color-common-5);--ti-tag-primary-border-color:var(--ti-base-color-bg-6);--ti-tag-primary-background-color:var(--ti-base-color-bg-6);--ti-tag-warning-text-color:var(--ti-common-color-warn-text);--ti-tag-warning-border-color:var(--ti-common-color-warn-border);--ti-tag-warning-background-color:var(--ti-common-color-warn-bg);--ti-tag-danger-text-color:var(--ti-common-color-error-text);--ti-tag-danger-border-color:var(--ti-common-color-error-border-secondary);--ti-tag-danger-background-color:var(--ti-common-color-error-bg);--ti-tag-success-text-color:var(--ti-common-color-text-success);--ti-tag-success-border-color:var(--ti-common-color-success-border);--ti-tag-success-background-color:var(--ti-common-color-success-bg);--ti-tag-info-text-color:var(--ti-common-color-info-text);--ti-tag-info-border-color:var(--ti-common-color-info-border);--ti-tag-info-background-color:var(--ti-common-color-info-bg);--ti-tag-dark-text-color:var(--ti-base-color-light);--ti-tag-dark-bg-color:var(--ti-common-color-prompt);--ti-tag-dark-success-bg-color:var(--ti-common-color-success);--ti-tag-dark-warning-bg-color:var(--ti-common-color-warn);--ti-tag-dark-danger-bg-color:var(--ti-common-color-error);--ti-tag-dark-info-bg-color:var(--ti-common-color-info);--ti-tag-plain-text-color:var(--ti-common-color-prompt);--ti-tag-plain-border-color:var(--ti-common-color-prompt-border);--ti-tag-plain-background-color:var(--ti-base-color-light);--ti-tag-plain-info-text-color:var(--ti-common-color-info);--ti-tag-plain-info-border-color:var(--ti-common-color-info-border);--ti-tag-plain-success-text-color:var(--ti-common-color-success);--ti-tag-plain-success-border-color:var(--ti-common-color-success-border);--ti-tag-plain-warning-text-color:var(--ti-common-color-warn);--ti-tag-plain-warning-border-color:var(--ti-common-color-warn-border);--ti-tag-plain-danger-text-color:var(--ti-common-color-error);--ti-tag-plain-danger-border-color:var(--ti-common-color-error-border-secondary);height:var(--ti-tag-height);line-height:var(--ti-tag-height);padding:0 8px;font-size:var(--ti-tag-font-size);border-width:1px;border-radius:var(--ti-tag-border-radius);border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--ti-tag-primary-text-color);border-color:var(--ti-tag-primary-border-color);background-color:var(--ti-tag-primary-background-color)}.tiny-tag.is-hit{border-color:var(--ti-tag-primary-text-color)}.tiny-tag .tiny-tag__close{fill:var(--ti-tag-primary-text-color);opacity:.5}.tiny-tag .tiny-tag__close:hover{opacity:1}.tiny-tag .tiny-tag__text:hover{cursor:pointer;color:#526ecc}.tiny-tag .tiny-tag__close{font-size:var(--ti-tag-close-font-size);margin-left:6px}.tiny-tag .tiny-tag__close:hover{cursor:pointer;fill:#5e7ce0}.tiny-tag.tiny-tag--info{color:var(--ti-tag-info-text-color);border-color:var(--ti-tag-info-border-color);background-color:var(--ti-tag-info-background-color)}.tiny-tag.tiny-tag--info.is-hit{border-color:var(--ti-tag-info-text-color)}.tiny-tag.tiny-tag--info .tiny-tag__close{fill:var(--ti-tag-info-text-color);opacity:.5}.tiny-tag.tiny-tag--info .tiny-tag__close:hover{opacity:1}.tiny-tag.tiny-tag--success{color:var(--ti-tag-success-text-color);border-color:var(--ti-tag-success-border-color);background-color:var(--ti-tag-success-background-color)}.tiny-tag.tiny-tag--success.is-hit{border-color:var(--ti-tag-success-text-color)}.tiny-tag.tiny-tag--success .tiny-tag__close{fill:var(--ti-tag-success-text-color);opacity:.5}.tiny-tag.tiny-tag--success .tiny-tag__close:hover{opacity:1}.tiny-tag.tiny-tag--warning{color:var(--ti-tag-warning-text-color);border-color:var(--ti-tag-warning-border-color);background-color:var(--ti-tag-warning-background-color)}.tiny-tag.tiny-tag--warning.is-hit{border-color:var(--ti-tag-warning-text-color)}.tiny-tag.tiny-tag--warning .tiny-tag__close{fill:var(--ti-tag-warning-text-color);opacity:.5}.tiny-tag.tiny-tag--warning .tiny-tag__close:hover{opacity:1}.tiny-tag.tiny-tag--danger{color:var(--ti-tag-danger-text-color);border-color:var(--ti-tag-danger-border-color);background-color:var(--ti-tag-danger-background-color)}.tiny-tag.tiny-tag--danger.is-hit{border-color:var(--ti-tag-danger-text-color)}.tiny-tag.tiny-tag--danger .tiny-tag__close{fill:var(--ti-tag-danger-text-color);opacity:.5}.tiny-tag.tiny-tag--danger .tiny-tag__close:hover{opacity:1}.tiny-tag--dark{color:var(--ti-tag-dark-text-color);border-color:var(--ti-tag-dark-bg-color);background-color:var(--ti-tag-dark-bg-color)}.tiny-tag--dark.is-hit{border-color:var(--ti-tag-dark-bg-color)}.tiny-tag--dark .tiny-tag__close{fill:var(--ti-tag-dark-text-color);opacity:.5}.tiny-tag--dark .tiny-tag__close:hover{opacity:1}.tiny-tag--dark.tiny-tag--info{color:var(--ti-tag-dark-text-color);border-color:var(--ti-tag-dark-info-bg-color);background-color:var(--ti-tag-dark-info-bg-color)}.tiny-tag--dark.tiny-tag--info.is-hit{border-color:var(--ti-tag-dark-info-bg-color)}.tiny-tag--dark.tiny-tag--info .tiny-tag__close{fill:var(--ti-tag-dark-text-color);opacity:.5}.tiny-tag--dark.tiny-tag--info .tiny-tag__close:hover{opacity:1}.tiny-tag--dark.tiny-tag--success{color:var(--ti-tag-dark-text-color);border-color:var(--ti-tag-dark-success-bg-color);background-color:var(--ti-tag-dark-success-bg-color)}.tiny-tag--dark.tiny-tag--success.is-hit{border-color:var(--ti-tag-dark-success-bg-color)}.tiny-tag--dark.tiny-tag--success .tiny-tag__close{fill:var(--ti-tag-dark-text-color);opacity:.5}.tiny-tag--dark.tiny-tag--success .tiny-tag__close:hover{opacity:1}.tiny-tag--dark.tiny-tag--warning{color:var(--ti-tag-dark-text-color);border-color:var(--ti-tag-dark-warning-bg-color);background-color:var(--ti-tag-dark-warning-bg-color)}.tiny-tag--dark.tiny-tag--warning.is-hit{border-color:var(--ti-tag-dark-warning-bg-color)}.tiny-tag--dark.tiny-tag--warning .tiny-tag__close{fill:var(--ti-tag-dark-text-color);opacity:.5}.tiny-tag--dark.tiny-tag--warning .tiny-tag__close:hover{opacity:1}.tiny-tag--dark.tiny-tag--danger{color:var(--ti-tag-dark-text-color);border-color:var(--ti-tag-dark-danger-bg-color);background-color:var(--ti-tag-dark-danger-bg-color)}.tiny-tag--dark.tiny-tag--danger.is-hit{border-color:var(--ti-tag-dark-danger-bg-color)}.tiny-tag--dark.tiny-tag--danger .tiny-tag__close{fill:var(--ti-tag-dark-text-color);opacity:.5}.tiny-tag--dark.tiny-tag--danger .tiny-tag__close:hover{opacity:1}.tiny-tag--plain{color:var(--ti-tag-plain-text-color);border-color:var(--ti-tag-plain-border-color);background-color:var(--ti-tag-plain-background-color)}.tiny-tag--plain.is-hit{border-color:var(--ti-tag-plain-text-color)}.tiny-tag--plain .tiny-tag__close{fill:var(--ti-tag-plain-text-color);opacity:.5}.tiny-tag--plain .tiny-tag__close:hover{opacity:1}.tiny-tag--plain.tiny-tag--info{color:var(--ti-tag-plain-info-text-color);border-color:var(--ti-tag-plain-info-border-color);background-color:var(--ti-tag-plain-background-color)}.tiny-tag--plain.tiny-tag--info.is-hit{border-color:var(--ti-tag-plain-info-text-color)}.tiny-tag--plain.tiny-tag--info .tiny-tag__close{fill:var(--ti-tag-plain-info-text-color);opacity:.5}.tiny-tag--plain.tiny-tag--info .tiny-tag__close:hover{opacity:1}.tiny-tag--plain.tiny-tag--success{color:var(--ti-tag-plain-success-text-color);border-color:var(--ti-tag-plain-success-border-color);background-color:var(--ti-tag-plain-background-color)}.tiny-tag--plain.tiny-tag--success.is-hit{border-color:var(--ti-tag-plain-success-text-color)}.tiny-tag--plain.tiny-tag--success .tiny-tag__close{fill:var(--ti-tag-plain-success-text-color);opacity:.5}.tiny-tag--plain.tiny-tag--success .tiny-tag__close:hover{opacity:1}.tiny-tag--plain.tiny-tag--warning{color:var(--ti-tag-plain-warning-text-color);border-color:var(--ti-tag-plain-warning-border-color);background-color:var(--ti-tag-plain-background-color)}.tiny-tag--plain.tiny-tag--warning.is-hit{border-color:var(--ti-tag-plain-warning-text-color)}.tiny-tag--plain.tiny-tag--warning .tiny-tag__close{fill:var(--ti-tag-plain-warning-text-color);opacity:.5}.tiny-tag--plain.tiny-tag--warning .tiny-tag__close:hover{opacity:1}.tiny-tag--plain.tiny-tag--danger{color:var(--ti-tag-plain-danger-text-color);border-color:var(--ti-tag-plain-danger-border-color);background-color:var(--ti-tag-plain-background-color)}.tiny-tag--plain.tiny-tag--danger.is-hit{border-color:var(--ti-tag-plain-danger-text-color)}.tiny-tag--plain.tiny-tag--danger .tiny-tag__close{fill:var(--ti-tag-plain-danger-text-color);opacity:.5}.tiny-tag--plain.tiny-tag--danger .tiny-tag__close:hover{opacity:1}.tiny-tag--medium{height:var(--ti-tag-medium-height);line-height:calc(var(--ti-tag-medium-height) - 2px)}.tiny-tag--small{height:var(--ti-tag-small-height);line-height:calc(var(--ti-tag-small-height) - 2px)}.tiny-tag--mini{height:var(--ti-tag-mini-height);line-height:calc(var(--ti-tag-mini-height) - 2px)}";
styleInject(css_248z);
Tag.install = function (Vue) {
});
var version = "3.7.0";
Tag.install = function(Vue) {
Vue.component(Tag.name, Tag);
};
Tag.version = '3.6.0';
export { Tag as default };
Tag.version = version;
export {
Tag as default
};

@@ -1,58 +0,23 @@

import { createVNode, resolveComponent } from 'vue';
import { renderless, api } from '@opentiny/vue-renderless/tag/vue';
import { setup, h, props } from '@opentiny/vue-common';
import { iconClose } from '@opentiny/vue-icon';
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var script = {
import { createVNode, resolveComponent } from "vue";
import { renderless, api } from "@opentiny/vue-renderless/tag/vue";
import { defineComponent, props, setup as _setup, h } from "@opentiny/vue-common";
import { iconClose } from "@opentiny/vue-icon";
var _sfc_main = /* @__PURE__ */ defineComponent({
components: {
IconClose: iconClose()
},
emits: ['click', 'close'],
props: [].concat(_toConsumableArray(props), ['text', 'closable', 'type', 'hit', 'disabled', 'color', 'size', 'effect', 'beforeDelete']),
setup: function setup$1(props, context) {
return setup({
props: props,
context: context,
renderless: renderless,
api: api,
h: h
emits: ["click", "close"],
props: [].concat(props, ["text", "closable", "type", "hit", "disabled", "color", "size", "effect", "beforeDelete"]),
setup: function setup(props2, context) {
return _setup({
props: props2,
context,
renderless,
api,
h
});
},
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;
var classes = ['tiny-tag', type ? "tiny-tag--".concat(type) : '', size ? "tiny-tag--".concat(size) : '', effect ? "tiny-tag--".concat(effect) : '', hit && 'is-hit'];
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;
var classes = ["tiny-tag", type ? "tiny-tag--" + type : "", size ? "tiny-tag--" + size : "", effect ? "tiny-tag--" + effect : "", hit && "is-hit"];
var tagElement = createVNode("span", {

@@ -70,4 +35,5 @@ "class": classes,

}
});
export {
_sfc_main as default
};
export { script as default };
{
"name": "@opentiny/vue-tag",
"version": "3.6.0",
"version": "3.6.1-alpha.0",
"description": "",
"main": "lib/index.js",
"scripts": {
"lint": "eslint src/**/*{.js,.html,.vue} --quiet",
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js",
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js"
},
"main": "./lib/index.js",
"dependencies": {
"@opentiny/vue-renderless": "~3.6.0",
"@opentiny/vue-common": "~3.6.0",
"@opentiny/vue-icon": "~3.6.0",
"@opentiny/vue-theme": "~3.6.0",
"@opentiny/vue-theme-mobile": "~3.6.0"
"@opentiny/vue-renderless": "~3.6.1-alpha.0",
"@opentiny/vue-common": "~3.6.1-alpha.0",
"@opentiny/vue-icon": "~3.6.1-alpha.0"
},
"license": "MIT",
"types": "index.d.ts",
"sideEffects": false
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
}
}

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

declare const _default: import("vue").DefineComponent<{
declare const _default: import("@vue/runtime-core").DefineComponent<{
hit: BooleanConstructor;

@@ -11,4 +11,8 @@ text: StringConstructor;

default: string;
validator: (value: string) => boolean;
};
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close")[], "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
beforeDelete: FunctionConstructor;
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").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<{
hit: BooleanConstructor;

@@ -23,11 +27,10 @@ text: StringConstructor;

default: string;
validator: (value: string) => boolean;
};
}>> & {
onClick?: ((...args: any[]) => any) | undefined;
onClose?: ((...args: any[]) => any) | undefined;
}, {
beforeDelete: FunctionConstructor;
}>>, {
closable: boolean;
effect: string;
closable: boolean;
hit: boolean;
}>;
export default _default;

@@ -1,17 +0,18 @@

declare const _default: {
components: {
IconClose: any;
};
emits: string[];
props: string[];
setup(props: any, context: any): {
t: any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
};
render(): JSX.Element;
};
export default _default;
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{
[x: string]: any;
}>, {
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close")[], "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
[x: string]: any;
}>>> & {
onClose?: ((...args: any[]) => any) | undefined;
onClick?: ((...args: any[]) => any) | undefined;
}, {
[x: string]: any;
}>;
export default _sfc_main;
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