@vuesimple/vs-tag 3.1.2 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/vite.config.js +3 -3
- package/dist/index.esm.js +4 -1
- package/dist/index.min.js +3 -1
- package/dist/index.umd.js +3 -1
- package/package.json +4 -5
package/build/vite.config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import vue from '@vitejs/plugin-vue';
|
|
2
|
-
import
|
|
2
|
+
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
plugins: [vue(),
|
|
5
|
+
plugins: [vue(), cssInjectedByJsPlugin()],
|
|
6
6
|
build: {
|
|
7
7
|
// separate css file or not
|
|
8
|
-
cssCodeSplit:
|
|
8
|
+
cssCodeSplit: true,
|
|
9
9
|
lib: {
|
|
10
10
|
entry: './src/index.js',
|
|
11
11
|
formats: ['es', 'umd', 'iife'],
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
(function(){ try {var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode("[data-theme=dark] .vs-tag,.dark .vs-tag{--vs-tag-bg-color: #39434b;--vs-tag-text-color: #d8dcde}.vs-tag{--vs-tag-bg-color: #e9ebed;--vs-tag-text-color: #49545c;--vs-tag-primary: #1f73b7;--vs-tag-success: #186146;--vs-tag-danger: #cc3340;--vs-tag-warning: #ffb057;--vs-tag-secondary: #3a3a3a;--vs-tag-font-bold: 600;background-color:var(--vs-tag-bg-color);color:var(--vs-tag-text-color);max-width:100%;display:inline-flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center;justify-content:center;line-height:19px}.vs-tag__button{display:inline-flex;margin-left:5px;border:none;padding:0;cursor:pointer;color:inherit;background:transparent;opacity:.85;margin-right:-3px}.vs-tag__button:focus-visible{box-shadow:0 0 0 2px #1f73b759;outline:none}.vs-tag__primary{background:var(--vs-tag-primary);color:#fff}.vs-tag__success{background:var(--vs-tag-success);color:#fff}.vs-tag__danger{background:var(--vs-tag-danger);color:#fff}.vs-tag__warning{background:var(--vs-tag-warning);color:#703815}.vs-tag__secondary{background:var(--vs-tag-secondary);color:#fff}.vs-tag__size-small{padding:2px 5px;font-size:10px;border-radius:2px}.vs-tag__size-medium{font-size:12px;min-width:calc(16px + 1ch);padding:4px 8px;border-radius:2px}.vs-tag__size-large{font-size:12px;min-width:calc(24px + 1ch);padding:8px 13px;border-radius:4px}.vs-tag--bold{font-weight:var(--vs-tag-font-bold)}.vs-tag--pill{border-radius:100px;min-width:20px;text-align:center}.vs-tag--round{border-radius:50%;min-width:9px;text-align:center}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { openBlock as i, createElementBlock as c, normalizeClass as u, normalizeStyle as d, createElementVNode as o, renderSlot as n, withModifiers as g, createCommentVNode as p } from "vue";
|
|
2
3
|
const _ = (t, s) => {
|
|
3
4
|
const e = t.__vccOpts || t;
|
|
4
5
|
for (const [l, a] of s)
|
|
@@ -7,9 +8,11 @@ const _ = (t, s) => {
|
|
|
7
8
|
}, v = {
|
|
8
9
|
name: "VsTag",
|
|
9
10
|
props: {
|
|
11
|
+
// `primary`, `secondary`, `warning`, `danger`
|
|
10
12
|
variant: {
|
|
11
13
|
type: String
|
|
12
14
|
},
|
|
15
|
+
// `small`. `medium`, `large`
|
|
13
16
|
size: {
|
|
14
17
|
type: String,
|
|
15
18
|
default: "medium"
|
package/dist/index.min.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
(function(){ try {var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode("[data-theme=dark] .vs-tag,.dark .vs-tag{--vs-tag-bg-color: #39434b;--vs-tag-text-color: #d8dcde}.vs-tag{--vs-tag-bg-color: #e9ebed;--vs-tag-text-color: #49545c;--vs-tag-primary: #1f73b7;--vs-tag-success: #186146;--vs-tag-danger: #cc3340;--vs-tag-warning: #ffb057;--vs-tag-secondary: #3a3a3a;--vs-tag-font-bold: 600;background-color:var(--vs-tag-bg-color);color:var(--vs-tag-text-color);max-width:100%;display:inline-flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center;justify-content:center;line-height:19px}.vs-tag__button{display:inline-flex;margin-left:5px;border:none;padding:0;cursor:pointer;color:inherit;background:transparent;opacity:.85;margin-right:-3px}.vs-tag__button:focus-visible{box-shadow:0 0 0 2px #1f73b759;outline:none}.vs-tag__primary{background:var(--vs-tag-primary);color:#fff}.vs-tag__success{background:var(--vs-tag-success);color:#fff}.vs-tag__danger{background:var(--vs-tag-danger);color:#fff}.vs-tag__warning{background:var(--vs-tag-warning);color:#703815}.vs-tag__secondary{background:var(--vs-tag-secondary);color:#fff}.vs-tag__size-small{padding:2px 5px;font-size:10px;border-radius:2px}.vs-tag__size-medium{font-size:12px;min-width:calc(16px + 1ch);padding:4px 8px;border-radius:2px}.vs-tag__size-large{font-size:12px;min-width:calc(24px + 1ch);padding:8px 13px;border-radius:4px}.vs-tag--bold{font-weight:var(--vs-tag-font-bold)}.vs-tag--pill{border-radius:100px;min-width:20px;text-align:center}.vs-tag--round{border-radius:50%;min-width:9px;text-align:center}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
var VsTag=function(s,t){"use strict";var r=document.createElement("style");r.textContent=`[data-theme=dark] .vs-tag,.dark .vs-tag{--vs-tag-bg-color: #39434b;--vs-tag-text-color: #d8dcde}.vs-tag{--vs-tag-bg-color: #e9ebed;--vs-tag-text-color: #49545c;--vs-tag-primary: #1f73b7;--vs-tag-success: #186146;--vs-tag-danger: #cc3340;--vs-tag-warning: #ffb057;--vs-tag-secondary: #3a3a3a;--vs-tag-font-bold: 600;background-color:var(--vs-tag-bg-color);color:var(--vs-tag-text-color);max-width:100%;display:inline-flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center;justify-content:center;line-height:19px}.vs-tag__button{display:inline-flex;margin-left:5px;border:none;padding:0;cursor:pointer;color:inherit;background:transparent;opacity:.85;margin-right:-3px}.vs-tag__button:focus-visible{box-shadow:0 0 0 2px #1f73b759;outline:none}.vs-tag__primary{background:var(--vs-tag-primary);color:#fff}.vs-tag__success{background:var(--vs-tag-success);color:#fff}.vs-tag__danger{background:var(--vs-tag-danger);color:#fff}.vs-tag__warning{background:var(--vs-tag-warning);color:#703815}.vs-tag__secondary{background:var(--vs-tag-secondary);color:#fff}.vs-tag__size-small{padding:2px 5px;font-size:10px;border-radius:2px}.vs-tag__size-medium{font-size:12px;min-width:calc(16px + 1ch);padding:4px 8px;border-radius:2px}.vs-tag__size-large{font-size:12px;min-width:calc(24px + 1ch);padding:8px 13px;border-radius:4px}.vs-tag--bold{font-weight:var(--vs-tag-font-bold)}.vs-tag--pill{border-radius:100px;min-width:20px;text-align:center}.vs-tag--round{border-radius:50%;min-width:9px;text-align:center}
|
|
3
|
+
`,document.head.appendChild(r);const _="",g=(e,a)=>{const o=e.__vccOpts||e;for(const[i,l]of a)o[i]=l;return o},c={name:"VsTag",props:{variant:{type:String},size:{type:String,default:"medium"},isBold:{type:Boolean,default:!0},isPill:{type:Boolean,default:!1},isRound:{type:Boolean,default:!1},bgColor:{type:String},textColor:{type:String},isClose:{type:Boolean,default:!1}},computed:{classList(){return[this.variant?`vs-tag__${this.variant}`:"",`vs-tag__size-${this.size}`,{"vs-tag--bold":this.isBold},{"vs-tag--pill":this.isPill},{"vs-tag--round":this.isRound}]},cssVars(){return{"--vs-tag-bg-color":this.bgColor,"--vs-tag-text-color":this.textColor}},isCssVars(){return this.bgColor||this.textColor?this.cssVars:""}}},p=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",focusable:"false",role:"presentation"},[t.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round",d:"M3 9l6-6m0 6L3 3"})],-1)];function v(e,a,o,i,l,d){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["vs-tag",d.classList]),style:t.normalizeStyle(d.isCssVars)},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"default")]),o.isClose?t.renderSlot(e.$slots,"close",{key:0},()=>[t.createElementVNode("button",{class:"vs-tag__button",onClick:a[0]||(a[0]=t.withModifiers(b=>e.$emit("click",!0),["stop"]))},p)]):t.createCommentVNode("",!0)],6)}const n=g(c,[["render",v]]),u={install(e){e.component("VsTag",n)}};return s.default=n,s.plugin=u,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),s}({},Vue);
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
(function(){ try {var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode("[data-theme=dark] .vs-tag,.dark .vs-tag{--vs-tag-bg-color: #39434b;--vs-tag-text-color: #d8dcde}.vs-tag{--vs-tag-bg-color: #e9ebed;--vs-tag-text-color: #49545c;--vs-tag-primary: #1f73b7;--vs-tag-success: #186146;--vs-tag-danger: #cc3340;--vs-tag-warning: #ffb057;--vs-tag-secondary: #3a3a3a;--vs-tag-font-bold: 600;background-color:var(--vs-tag-bg-color);color:var(--vs-tag-text-color);max-width:100%;display:inline-flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center;justify-content:center;line-height:19px}.vs-tag__button{display:inline-flex;margin-left:5px;border:none;padding:0;cursor:pointer;color:inherit;background:transparent;opacity:.85;margin-right:-3px}.vs-tag__button:focus-visible{box-shadow:0 0 0 2px #1f73b759;outline:none}.vs-tag__primary{background:var(--vs-tag-primary);color:#fff}.vs-tag__success{background:var(--vs-tag-success);color:#fff}.vs-tag__danger{background:var(--vs-tag-danger);color:#fff}.vs-tag__warning{background:var(--vs-tag-warning);color:#703815}.vs-tag__secondary{background:var(--vs-tag-secondary);color:#fff}.vs-tag__size-small{padding:2px 5px;font-size:10px;border-radius:2px}.vs-tag__size-medium{font-size:12px;min-width:calc(16px + 1ch);padding:4px 8px;border-radius:2px}.vs-tag__size-large{font-size:12px;min-width:calc(24px + 1ch);padding:8px 13px;border-radius:4px}.vs-tag--bold{font-weight:var(--vs-tag-font-bold)}.vs-tag--pill{border-radius:100px;min-width:20px;text-align:center}.vs-tag--round{border-radius:50%;min-width:9px;text-align:center}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.VsTag={},e.Vue))})(this,function(e,t){"use strict";var r=document.createElement("style");r.textContent=`[data-theme=dark] .vs-tag,.dark .vs-tag{--vs-tag-bg-color: #39434b;--vs-tag-text-color: #d8dcde}.vs-tag{--vs-tag-bg-color: #e9ebed;--vs-tag-text-color: #49545c;--vs-tag-primary: #1f73b7;--vs-tag-success: #186146;--vs-tag-danger: #cc3340;--vs-tag-warning: #ffb057;--vs-tag-secondary: #3a3a3a;--vs-tag-font-bold: 600;background-color:var(--vs-tag-bg-color);color:var(--vs-tag-text-color);max-width:100%;display:inline-flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center;justify-content:center;line-height:19px}.vs-tag__button{display:inline-flex;margin-left:5px;border:none;padding:0;cursor:pointer;color:inherit;background:transparent;opacity:.85;margin-right:-3px}.vs-tag__button:focus-visible{box-shadow:0 0 0 2px #1f73b759;outline:none}.vs-tag__primary{background:var(--vs-tag-primary);color:#fff}.vs-tag__success{background:var(--vs-tag-success);color:#fff}.vs-tag__danger{background:var(--vs-tag-danger);color:#fff}.vs-tag__warning{background:var(--vs-tag-warning);color:#703815}.vs-tag__secondary{background:var(--vs-tag-secondary);color:#fff}.vs-tag__size-small{padding:2px 5px;font-size:10px;border-radius:2px}.vs-tag__size-medium{font-size:12px;min-width:calc(16px + 1ch);padding:4px 8px;border-radius:2px}.vs-tag__size-large{font-size:12px;min-width:calc(24px + 1ch);padding:8px 13px;border-radius:4px}.vs-tag--bold{font-weight:var(--vs-tag-font-bold)}.vs-tag--pill{border-radius:100px;min-width:20px;text-align:center}.vs-tag--round{border-radius:50%;min-width:9px;text-align:center}
|
|
3
|
+
`,document.head.appendChild(r);const f="",g=(s,o)=>{const a=s.__vccOpts||s;for(const[i,l]of o)a[i]=l;return a},c={name:"VsTag",props:{variant:{type:String},size:{type:String,default:"medium"},isBold:{type:Boolean,default:!0},isPill:{type:Boolean,default:!1},isRound:{type:Boolean,default:!1},bgColor:{type:String},textColor:{type:String},isClose:{type:Boolean,default:!1}},computed:{classList(){return[this.variant?`vs-tag__${this.variant}`:"",`vs-tag__size-${this.size}`,{"vs-tag--bold":this.isBold},{"vs-tag--pill":this.isPill},{"vs-tag--round":this.isRound}]},cssVars(){return{"--vs-tag-bg-color":this.bgColor,"--vs-tag-text-color":this.textColor}},isCssVars(){return this.bgColor||this.textColor?this.cssVars:""}}},p=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",focusable:"false",role:"presentation"},[t.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round",d:"M3 9l6-6m0 6L3 3"})],-1)];function u(s,o,a,i,l,d){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["vs-tag",d.classList]),style:t.normalizeStyle(d.isCssVars)},[t.createElementVNode("span",null,[t.renderSlot(s.$slots,"default")]),a.isClose?t.renderSlot(s.$slots,"close",{key:0},()=>[t.createElementVNode("button",{class:"vs-tag__button",onClick:o[0]||(o[0]=t.withModifiers(h=>s.$emit("click",!0),["stop"]))},p)]):t.createCommentVNode("",!0)],6)}const n=g(c,[["render",u]]),v={install(s){s.component("VsTag",n)}};e.default=n,e.plugin=v,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuesimple/vs-tag",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "A simple vue tag. Perfect for all your tag scenarios.",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
"build": "rm -rfv dist && vite build --config build/vite.config.js"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@vitejs/plugin-vue": "^
|
|
13
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
14
14
|
"sass": "^1.54.4",
|
|
15
|
-
"vite": "^
|
|
16
|
-
"vite-plugin-style-inject": "0.0.1",
|
|
15
|
+
"vite": "^4.4.5",
|
|
17
16
|
"vue": "^3.2.37"
|
|
18
17
|
},
|
|
19
18
|
"private": false,
|
|
@@ -44,5 +43,5 @@
|
|
|
44
43
|
"url": "https://github.com/ashwinkshenoy/vue-simple/issues"
|
|
45
44
|
},
|
|
46
45
|
"homepage": "https://github.com/ashwinkshenoy/vue-simple",
|
|
47
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "fdc31874be9139110b07ddf6966b348a3db785a8"
|
|
48
47
|
}
|