@vuesimple/vs-tag 1.3.39 → 1.4.1

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/README.md CHANGED
@@ -74,7 +74,7 @@ yarn add @vuesimple/vs-tag
74
74
  <br />
75
75
 
76
76
  <h3>
77
- <img src="https://nuxtjs.org/favicon.ico" width="20px"> Nuxt.js
77
+ <img src="https://i.imgur.com/MWynQNa.png" width="20px"> Nuxt.js
78
78
  </h3>
79
79
 
80
80
  Nuxt Code Snippet
@@ -1,8 +1,7 @@
1
- // rollup.config.js
2
- import vue from 'rollup-plugin-vue';
3
- import buble from 'rollup-plugin-buble';
4
- import image from '@rollup/plugin-image';
5
1
  import { terser } from 'rollup-plugin-terser';
2
+ import buble from '@rollup/plugin-buble';
3
+ import image from '@rollup/plugin-image';
4
+ import vue from 'rollup-plugin-vue';
6
5
  import minimist from 'minimist';
7
6
 
8
7
  const argv = minimist(process.argv.slice(2));
@@ -222,45 +222,43 @@ var __vue_render__ = function() {
222
222
  _c("span", [_vm._t("default")], 2),
223
223
  _vm._v(" "),
224
224
  _vm.isClose
225
- ? _vm._t("close", function() {
226
- return [
227
- _c(
228
- "button",
229
- {
230
- staticClass: "vs-tag__button",
231
- on: {
232
- click: function($event) {
233
- return _vm.$emit("click", true)
234
- }
225
+ ? _vm._t("close", [
226
+ _c(
227
+ "button",
228
+ {
229
+ staticClass: "vs-tag__button",
230
+ on: {
231
+ click: function($event) {
232
+ return _vm.$emit("click", true)
235
233
  }
236
- },
237
- [
238
- _c(
239
- "svg",
240
- {
234
+ }
235
+ },
236
+ [
237
+ _c(
238
+ "svg",
239
+ {
240
+ attrs: {
241
+ xmlns: "http://www.w3.org/2000/svg",
242
+ width: "12",
243
+ height: "12",
244
+ viewBox: "0 0 12 12",
245
+ focusable: "false",
246
+ role: "presentation"
247
+ }
248
+ },
249
+ [
250
+ _c("path", {
241
251
  attrs: {
242
- xmlns: "http://www.w3.org/2000/svg",
243
- width: "12",
244
- height: "12",
245
- viewBox: "0 0 12 12",
246
- focusable: "false",
247
- role: "presentation"
252
+ stroke: "currentColor",
253
+ "stroke-linecap": "round",
254
+ d: "M3 9l6-6m0 6L3 3"
248
255
  }
249
- },
250
- [
251
- _c("path", {
252
- attrs: {
253
- stroke: "currentColor",
254
- "stroke-linecap": "round",
255
- d: "M3 9l6-6m0 6L3 3"
256
- }
257
- })
258
- ]
259
- )
260
- ]
261
- )
262
- ]
263
- })
256
+ })
257
+ ]
258
+ )
259
+ ]
260
+ )
261
+ ])
264
262
  : _vm._e()
265
263
  ],
266
264
  2
@@ -1 +1 @@
1
- var VsTag=function(n){"use strict";var e={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:function(){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:function(){return{"--vs-tag-bg-color":this.bgColor,"--vs-tag-text-color":this.textColor}},isCssVars:function(){return this.bgColor||this.textColor?this.cssVars:""}}};function t(n,e,t,s,a,o,r,i,l,d){"boolean"!=typeof r&&(l=i,i=r,r=!1);var c,g="function"==typeof t?t.options:t;if(n&&n.render&&(g.render=n.render,g.staticRenderFns=n.staticRenderFns,g._compiled=!0,a&&(g.functional=!0)),s&&(g._scopeId=s),o?(c=function(n){(n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),e&&e.call(this,l(n)),n&&n._registeredComponents&&n._registeredComponents.add(o)},g._ssrRegister=c):e&&(c=r?function(n){e.call(this,d(n,this.$root.$options.shadowRoot))}:function(n){e.call(this,i(n))}),c)if(g.functional){var u=g.render;g.render=function(n,e){return c.call(e),u(n,e)}}else{var f=g.beforeCreate;g.beforeCreate=f?[].concat(f,c):[c]}return t}var s,a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function o(n){return function(n,e){return function(n,e){var t=a?e.media||"default":n,o=r[t]||(r[t]={ids:new Set,styles:[]});if(!o.ids.has(n)){o.ids.add(n);var i=e.source;if(e.map&&(i+="\n/*# sourceURL="+e.map.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),o.element||(o.element=document.createElement("style"),o.element.type="text/css",e.media&&o.element.setAttribute("media",e.media),void 0===s&&(s=document.head||document.getElementsByTagName("head")[0]),s.appendChild(o.element)),"styleSheet"in o.element)o.styles.push(i),o.element.styleSheet.cssText=o.styles.filter(Boolean).join("\n");else{var l=o.ids.size-1,d=document.createTextNode(i),c=o.element.childNodes;c[l]&&o.element.removeChild(c[l]),c.length?o.element.insertBefore(d,c[l]):o.element.appendChild(d)}}}(n,e)}}var r={};var i=e,l=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("span",{class:["vs-tag",n.classList],style:n.isCssVars},[t("span",[n._t("default")],2),n._v(" "),n.isClose?n._t("close",(function(){return[t("button",{staticClass:"vs-tag__button",on:{click:function(e){return n.$emit("click",!0)}}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",focusable:"false",role:"presentation"}},[t("path",{attrs:{stroke:"currentColor","stroke-linecap":"round",d:"M3 9l6-6m0 6L3 3"}})])])]})):n._e()],2)};l._withStripped=!0;var d=t({render:l,staticRenderFns:[]},(function(n){n&&n("data-v-414ebb6f_0",{source:".vs-tag {\n --vs-tag-bg-color: #e9ebed;\n --vs-tag-text-color: #49545c;\n --vs-tag-primary: #1f73b7;\n --vs-tag-success: #186146;\n --vs-tag-danger: #cc3340;\n --vs-tag-warning: #ffb057;\n --vs-tag-secondary: #3a3a3a;\n --vs-tag-font-bold: 600;\n background-color: var(--vs-tag-bg-color);\n color: var(--vs-tag-text-color);\n max-width: 100%;\n display: inline-flex;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n align-items: center;\n justify-content: center;\n line-height: 19px;\n}\n.vs-tag__button {\n display: inline-flex;\n margin-left: 5px;\n border: none;\n padding: 0;\n cursor: pointer;\n color: inherit;\n background: transparent;\n opacity: 0.85;\n margin-right: -3px;\n}\n.vs-tag__button:focus-visible {\n box-shadow: 0 0 0 2px rgba(31, 115, 183, 0.35);\n outline: none;\n}\n.vs-tag__primary {\n background: var(--vs-tag-primary);\n color: #ffffff;\n}\n.vs-tag__success {\n background: var(--vs-tag-success);\n color: #ffffff;\n}\n.vs-tag__danger {\n background: var(--vs-tag-danger);\n color: #ffffff;\n}\n.vs-tag__warning {\n background: var(--vs-tag-warning);\n color: #703815;\n}\n.vs-tag__secondary {\n background: var(--vs-tag-secondary);\n color: #ffffff;\n}\n.vs-tag__size-small {\n padding: 2px 5px;\n font-size: 10px;\n border-radius: 2px;\n}\n.vs-tag__size-medium {\n font-size: 12px;\n min-width: calc(16px + 1ch);\n padding: 4px 8px;\n border-radius: 2px;\n}\n.vs-tag__size-large {\n font-size: 12px;\n min-width: calc(24px + 1ch);\n padding: 8px 13px;\n border-radius: 4px;\n}\n.vs-tag--bold {\n font-weight: var(--vs-tag-font-bold);\n}\n.vs-tag--pill {\n border-radius: 100px;\n min-width: 20px;\n text-align: center;\n}\n.vs-tag--round {\n border-radius: 50%;\n min-width: 9px;\n text-align: center;\n}",map:void 0,media:void 0})}),i,void 0,!1,void 0,!1,o,void 0,void 0);function c(n){c.installed||(c.installed=!0,n.component("VsTag",d))}var g={install:c},u=null;return"undefined"!=typeof window?u=window.Vue:"undefined"!=typeof global&&(u=global.Vue),u&&u.use(g),n.default=d,n.install=c,n}({});
1
+ var VsTag=function(n){"use strict";var e={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:function(){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:function(){return{"--vs-tag-bg-color":this.bgColor,"--vs-tag-text-color":this.textColor}},isCssVars:function(){return this.bgColor||this.textColor?this.cssVars:""}}};function t(n,e,t,s,a,o,i,r,l,d){"boolean"!=typeof i&&(l=r,r=i,i=!1);var c,g="function"==typeof t?t.options:t;if(n&&n.render&&(g.render=n.render,g.staticRenderFns=n.staticRenderFns,g._compiled=!0,a&&(g.functional=!0)),s&&(g._scopeId=s),o?(c=function(n){(n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),e&&e.call(this,l(n)),n&&n._registeredComponents&&n._registeredComponents.add(o)},g._ssrRegister=c):e&&(c=i?function(n){e.call(this,d(n,this.$root.$options.shadowRoot))}:function(n){e.call(this,r(n))}),c)if(g.functional){var u=g.render;g.render=function(n,e){return c.call(e),u(n,e)}}else{var f=g.beforeCreate;g.beforeCreate=f?[].concat(f,c):[c]}return t}var s,a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function o(n){return function(n,e){return function(n,e){var t=a?e.media||"default":n,o=i[t]||(i[t]={ids:new Set,styles:[]});if(!o.ids.has(n)){o.ids.add(n);var r=e.source;if(e.map&&(r+="\n/*# sourceURL="+e.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),o.element||(o.element=document.createElement("style"),o.element.type="text/css",e.media&&o.element.setAttribute("media",e.media),void 0===s&&(s=document.head||document.getElementsByTagName("head")[0]),s.appendChild(o.element)),"styleSheet"in o.element)o.styles.push(r),o.element.styleSheet.cssText=o.styles.filter(Boolean).join("\n");else{var l=o.ids.size-1,d=document.createTextNode(r),c=o.element.childNodes;c[l]&&o.element.removeChild(c[l]),c.length?o.element.insertBefore(d,c[l]):o.element.appendChild(d)}}}(n,e)}}var i={};var r=e,l=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("span",{class:["vs-tag",n.classList],style:n.isCssVars},[t("span",[n._t("default")],2),n._v(" "),n.isClose?n._t("close",[t("button",{staticClass:"vs-tag__button",on:{click:function(e){return n.$emit("click",!0)}}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",focusable:"false",role:"presentation"}},[t("path",{attrs:{stroke:"currentColor","stroke-linecap":"round",d:"M3 9l6-6m0 6L3 3"}})])])]):n._e()],2)};l._withStripped=!0;var d=t({render:l,staticRenderFns:[]},(function(n){n&&n("data-v-414ebb6f_0",{source:".vs-tag {\n --vs-tag-bg-color: #e9ebed;\n --vs-tag-text-color: #49545c;\n --vs-tag-primary: #1f73b7;\n --vs-tag-success: #186146;\n --vs-tag-danger: #cc3340;\n --vs-tag-warning: #ffb057;\n --vs-tag-secondary: #3a3a3a;\n --vs-tag-font-bold: 600;\n background-color: var(--vs-tag-bg-color);\n color: var(--vs-tag-text-color);\n max-width: 100%;\n display: inline-flex;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n align-items: center;\n justify-content: center;\n line-height: 19px;\n}\n.vs-tag__button {\n display: inline-flex;\n margin-left: 5px;\n border: none;\n padding: 0;\n cursor: pointer;\n color: inherit;\n background: transparent;\n opacity: 0.85;\n margin-right: -3px;\n}\n.vs-tag__button:focus-visible {\n box-shadow: 0 0 0 2px rgba(31, 115, 183, 0.35);\n outline: none;\n}\n.vs-tag__primary {\n background: var(--vs-tag-primary);\n color: #ffffff;\n}\n.vs-tag__success {\n background: var(--vs-tag-success);\n color: #ffffff;\n}\n.vs-tag__danger {\n background: var(--vs-tag-danger);\n color: #ffffff;\n}\n.vs-tag__warning {\n background: var(--vs-tag-warning);\n color: #703815;\n}\n.vs-tag__secondary {\n background: var(--vs-tag-secondary);\n color: #ffffff;\n}\n.vs-tag__size-small {\n padding: 2px 5px;\n font-size: 10px;\n border-radius: 2px;\n}\n.vs-tag__size-medium {\n font-size: 12px;\n min-width: calc(16px + 1ch);\n padding: 4px 8px;\n border-radius: 2px;\n}\n.vs-tag__size-large {\n font-size: 12px;\n min-width: calc(24px + 1ch);\n padding: 8px 13px;\n border-radius: 4px;\n}\n.vs-tag--bold {\n font-weight: var(--vs-tag-font-bold);\n}\n.vs-tag--pill {\n border-radius: 100px;\n min-width: 20px;\n text-align: center;\n}\n.vs-tag--round {\n border-radius: 50%;\n min-width: 9px;\n text-align: center;\n}",map:void 0,media:void 0})}),r,void 0,!1,void 0,!1,o,void 0,void 0);function c(n){c.installed||(c.installed=!0,n.component("VsTag",d))}var g={install:c},u=null;return"undefined"!=typeof window?u=window.Vue:"undefined"!=typeof global&&(u=global.Vue),u&&u.use(g),n.default=d,n.install=c,n}({});
@@ -228,45 +228,43 @@
228
228
  _c("span", [_vm._t("default")], 2),
229
229
  _vm._v(" "),
230
230
  _vm.isClose
231
- ? _vm._t("close", function() {
232
- return [
233
- _c(
234
- "button",
235
- {
236
- staticClass: "vs-tag__button",
237
- on: {
238
- click: function($event) {
239
- return _vm.$emit("click", true)
240
- }
231
+ ? _vm._t("close", [
232
+ _c(
233
+ "button",
234
+ {
235
+ staticClass: "vs-tag__button",
236
+ on: {
237
+ click: function($event) {
238
+ return _vm.$emit("click", true)
241
239
  }
242
- },
243
- [
244
- _c(
245
- "svg",
246
- {
240
+ }
241
+ },
242
+ [
243
+ _c(
244
+ "svg",
245
+ {
246
+ attrs: {
247
+ xmlns: "http://www.w3.org/2000/svg",
248
+ width: "12",
249
+ height: "12",
250
+ viewBox: "0 0 12 12",
251
+ focusable: "false",
252
+ role: "presentation"
253
+ }
254
+ },
255
+ [
256
+ _c("path", {
247
257
  attrs: {
248
- xmlns: "http://www.w3.org/2000/svg",
249
- width: "12",
250
- height: "12",
251
- viewBox: "0 0 12 12",
252
- focusable: "false",
253
- role: "presentation"
258
+ stroke: "currentColor",
259
+ "stroke-linecap": "round",
260
+ d: "M3 9l6-6m0 6L3 3"
254
261
  }
255
- },
256
- [
257
- _c("path", {
258
- attrs: {
259
- stroke: "currentColor",
260
- "stroke-linecap": "round",
261
- d: "M3 9l6-6m0 6L3 3"
262
- }
263
- })
264
- ]
265
- )
266
- ]
267
- )
268
- ]
269
- })
262
+ })
263
+ ]
264
+ )
265
+ ]
266
+ )
267
+ ])
270
268
  : _vm._e()
271
269
  ],
272
270
  2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuesimple/vs-tag",
3
- "version": "1.3.39",
3
+ "version": "1.4.1",
4
4
  "description": "A simple vue tag. Perfect for all your tag scenarios.",
5
5
  "main": "dist/vs-tag.umd.js",
6
6
  "module": "dist/vs-tag.esm.js",
@@ -15,14 +15,14 @@
15
15
  "build:unpkg": "rollup --config build/rollup.config.js --format iife --file dist/vs-tag.min.js"
16
16
  },
17
17
  "devDependencies": {
18
+ "@rollup/plugin-buble": "0.21.3",
18
19
  "@rollup/plugin-image": "2.0.5",
19
- "minimist": "^1.2.0",
20
- "rollup": "^1.32.0",
21
- "rollup-plugin-buble": "^0.19.8",
22
- "rollup-plugin-terser": "^6.1.0",
23
- "rollup-plugin-vue": "^5.1.9",
24
- "vue": "^2.6.10",
25
- "vue-template-compiler": "^2.6.10"
20
+ "minimist": "1.2.5",
21
+ "rollup": "1.32.0",
22
+ "rollup-plugin-terser": "6.1.0",
23
+ "rollup-plugin-vue": "5.1.9",
24
+ "vue": "2.6.10",
25
+ "vue-template-compiler": "2.6.10"
26
26
  },
27
27
  "private": false,
28
28
  "repository": {
@@ -52,5 +52,5 @@
52
52
  "url": "https://github.com/ashwinkshenoy/vue-simple/issues"
53
53
  },
54
54
  "homepage": "https://github.com/ashwinkshenoy/vue-simple/tree/master/packages/vs-tag",
55
- "gitHead": "9c5fdc68803a938a74d3987f658e02ded5eea18d"
55
+ "gitHead": "4a6fbd8716221364e5fc2710645a6c5882746929"
56
56
  }