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

vlider

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vlider - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/vlider.css

186

dist/vlider.esm.js

@@ -1,3 +0,1 @@

import 'sass/vlider.scss';
//

@@ -34,2 +32,3 @@ //

//
//

@@ -156,87 +155,77 @@ var script = {

function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
/* server only */
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
} // Vue.extend constructor export interop.
var options = typeof script === 'function' ? script.options : script; // render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true; // functional template
if (isFunctionalTemplate) {
options.functional = true;
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
}
} // scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function hook(context) {
// 2.3 injection
context = context || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
} // inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
} // register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
}; // used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
} else if (style) {
hook = shadowMode ? function () {
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
} : function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
// Vue.extend constructor export interop.
var options = typeof script === 'function' ? script.options : script;
// render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true;
// functional template
if (isFunctionalTemplate) {
options.functional = true;
}
}
}
return script;
// scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
}
// inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
}
// register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
};
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
}
else if (style) {
hook = shadowMode
? function (context) {
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
}
: function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
}
else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
}
var normalizeComponent_1 = normalizeComponent;
/* script */

@@ -246,3 +235,3 @@ var __vue_script__ = script;

/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vlider-container",class:[_vm.theme ].concat( _vm.classes),attrs:{"id":_vm.id}},[_c('ul',{staticClass:"vlider-labels"},[_vm._l((_vm.vliderData),function(data,index){return [_c('li',{class:[_vm.createName(data.label), {'active' : index+1 == _vm.inputRange}],style:({color: data.color}),on:{"click":function($event){return _vm.selectThumb(index+1)}}},[_vm._t("bullet",null,{"data":data})],2)]})],2),_vm._v(" "),_c('div',{staticClass:"vlider-range"},[_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.inputRange),expression:"inputRange",modifiers:{"number":true}}],attrs:{"type":"range","min":"1","max":_vm.rangeSteps,"steps":"1"},domProps:{"value":(_vm.inputRange)},on:{"__r":function($event){_vm.inputRange=_vm._n($event.target.value);},"blur":function($event){return _vm.$forceUpdate()}}})])])};
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vlider-container",class:[_vm.theme ].concat( _vm.classes),attrs:{"id":_vm.id}},[_c('ul',{staticClass:"vlider-labels"},[_vm._l((_vm.vliderData),function(data,index){return [_c('li',{key:index,class:[_vm.createName(data.label), {'active' : index+1 == _vm.inputRange}],style:({color: data.color}),on:{"click":function($event){return _vm.selectThumb(index+1)}}},[_vm._t("bullet",null,{"data":data})],2)]})],2),_vm._v(" "),_c('div',{staticClass:"vlider-range"},[_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.inputRange),expression:"inputRange",modifiers:{"number":true}}],attrs:{"type":"range","min":"1","max":_vm.rangeSteps,"steps":"1"},domProps:{"value":(_vm.inputRange)},on:{"__r":function($event){_vm.inputRange=_vm._n($event.target.value);},"blur":function($event){return _vm.$forceUpdate()}}})])])};
var __vue_staticRenderFns__ = [];

@@ -262,5 +251,7 @@

/* style inject shadow dom */
var Vlider = normalizeComponent_1(
var __vue_component__ = /*#__PURE__*/normalizeComponent(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },

@@ -272,3 +263,5 @@ __vue_inject_styles__,

__vue_module_identifier__,
false,
undefined,
undefined,
undefined

@@ -278,23 +271,24 @@ );

function install(Vue) {
if (install.installed) { return; }
install.installed = true;
Vue.component('vlider', Vlider);
if (install.installed) { return; }
install.installed = true;
Vue.component("vlider", __vue_component__);
}
var plugin = {
install: install,
install: install,
};
var GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
GlobalVue.use(plugin);
}
Vlider.install = install;
__vue_component__.install = install;
export default Vlider;
export default __vue_component__;
//# sourceMappingURL=vlider.esm.js.map

@@ -1,1 +0,295 @@

var vlider=function(e){"use strict";function t(e,t,n,r,a,i,s,o,l,c){"boolean"!=typeof s&&(l=o,o=s,s=!1);var d="function"==typeof n?n.options:n;e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,a&&(d.functional=!0)),r&&(d._scopeId=r);var u;if(i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):t&&(u=s?function(){t.call(this,c(this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),u)if(d.functional){var f=d.render;d.render=function(e,t){return u.call(t),f(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,u):[u]}return n}function n(e){n.installed||(n.installed=!0,e.component("vlider",r))}var r=t({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vlider-container",class:[e.theme].concat(e.classes),attrs:{id:e.id}},[n("ul",{staticClass:"vlider-labels"},[e._l(e.vliderData,function(t,r){return[n("li",{class:[e.createName(t.label),{active:r+1==e.inputRange}],style:{color:t.color},on:{click:function(t){return e.selectThumb(r+1)}}},[e._t("bullet",null,{data:t})],2)]})],2),e._v(" "),n("div",{staticClass:"vlider-range"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputRange,expression:"inputRange",modifiers:{number:!0}}],attrs:{type:"range",min:"1",max:e.rangeSteps,steps:"1"},domProps:{value:e.inputRange},on:{__r:function(t){e.inputRange=e._n(t.target.value)},blur:function(t){return e.$forceUpdate()}}})])])},staticRenderFns:[]},void 0,{props:{vliderData:{type:[Array,Object],default:function(){return[{label:"Data 1",color:"#ffc300",extras:{first:"test",second:"test2"}},{label:"Data 3",color:"#ffb0fe",extras:{first:"test",second:"test2"}},{label:"Data 3",color:"#ff6bd6",extras:{first:"test",second:"test2"}}]}},theme:{type:String,default:"theme-light"},id:{type:String,default:"vlider-1"},classes:{type:[Array,Object,String],default:"extra-classes"}},data:function(){return{inputRange:null,rangeStyle:""}},mounted:function(){console.log(this.classes)},computed:{rangeSteps:function(){return this.vliderData.length}},watch:{vliderData:function(){this.createCss(),this.inputRange=null},inputRange:function(){this.$emit("input",this.inputRange)}},mounted:function(){this.createCss()},methods:{selectThumb:function(e){this.inputRange=e,this.$emit("click",this.inputRange),console.log(this.classes)},createCss:function(){var e=document.getElementById("rangeStyle"+this.id);e&&e.remove();var t=document.head||document.getElementByTagName("head")[0],n=document.createElement("style");n.setAttribute("id","rangeStyle"+this.id),n.type="text/css";var r="",a=this.vliderData.map(function(e){return e.color}).join(","),i="#"+this.id+" .vlider-range input[type=range]",s="\n background: "+this.vliderData[0].color+";\n background: -moz-linear-gradient(left, "+a+");\n background: -webkit-linear-gradient(left,"+a+");\n background: linear-gradient(to right, "+a+");\n filter: progid:DXprogid:DXImageTransform.Microsoft.gradient(startColorstr='"+this.vliderData[0].color+"', endColorstr='"+this.vliderData[this.rangeSteps-1].color+"',GradientType=1);\n ";r+="\n "+i+"::-webkit-slider-runnable-track{"+s+"}\n "+i+":focus::-webkit-slider-runnable-track {"+s+"}\n "+i+"::-moz-range-track {"+s+"}\n "+i+"::-ms-track {background: transparent;}\n "+i+"::-ms-fill-lower {"+s+"}\n "+i+":focus::-ms-fill-lower {"+s+"}\n "+i+"::-ms-fill-upper {"+s+"}\n "+i+":focus::-ms-fill-upper {"+s+"}\n ",n.appendChild(document.createTextNode(r)),t.appendChild(n)},sluggify:function(e){e=(e=e.replace(/^\s+|\s+$/g,"")).toLowerCase();for(var t="àáãäâèéëêìíïîòóöôùúüûñç·/_,:;",n=0,r=t.length;n<r;n++)e=e.replace(new RegExp(t.charAt(n),"g"),"aaaaaeeeeiiiioooouuuunc------".charAt(n));return e=e.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},createName:function(e){return"rangeBullet"+this.sluggify(e)}}},void 0,!1,void 0,void 0,void 0),a={install:n},i=null;return"undefined"!=typeof window?i=window.Vue:"undefined"!=typeof global&&(i=global.Vue),i&&i.use(a),r.install=n,e.default=r,e}({});
var Vlider = (function (exports) {
'use strict';
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var script = {
props: {
vliderData: {
type: [Array, Object],
default: function default$1() {
return [
{
label: "Data 1",
color: "#ffc300",
extras: {
first: 'test',
second: 'test2'
}
},
{
label: "Data 3",
color: "#ffb0fe",
extras: {
first: 'test',
second: 'test2'
}
},
{
label: "Data 3",
color: "#ff6bd6",
extras: {
first: 'test',
second: 'test2'
}
}
]
}
},
theme: {
type: String,
default: "theme-light"
},
id: {
type: String,
default: "vlider-1"
},
classes: {
type: [Array, Object, String],
default: "extra-classes"
}
},
data: function data() {
return {
inputRange: null,
rangeStyle: ""
};
},
mounted: function mounted() {
console.log(this.classes);
},
computed: {
rangeSteps: function rangeSteps() {
return this.vliderData.length
}
},
watch: {
vliderData: function vliderData() {
this.createCss();
this.inputRange = null;
},
inputRange: function inputRange() {
this.$emit('input', this.inputRange);
}
},
mounted: function mounted() {
this.createCss();
},
methods: {
selectThumb: function selectThumb(numbers) {
this.inputRange = numbers;
this.$emit('click', this.inputRange);
console.log(this.classes);
},
createCss: function createCss() {
var prevelem = document.getElementById(("rangeStyle" + (this.id)));
if (prevelem) {
prevelem.remove();
}
var head = document.head || document.getElementByTagName("head")[0];
var css = document.createElement("style");
css.setAttribute("id", ("rangeStyle" + (this.id)));
css.type = "text/css";
var styles = "";
var color_stops = this.vliderData.map(function (val) { return val.color; }).join(",");
var prefix = "#" + (this.id) + " .vlider-range input[type=range]";
var gradient = "\n background: " + (this.vliderData[0].color) + ";\n background: -moz-linear-gradient(left, " + color_stops + ");\n background: -webkit-linear-gradient(left," + color_stops + ");\n background: linear-gradient(to right, " + color_stops + ");\n filter: progid:DXprogid:DXImageTransform.Microsoft.gradient(startColorstr='" + (this.vliderData[0].color) + "', endColorstr='" + (this.vliderData[this.rangeSteps - 1].color) + "',GradientType=1);\n ";
styles += "\n " + prefix + "::-webkit-slider-runnable-track{" + gradient + "}\n " + prefix + ":focus::-webkit-slider-runnable-track {" + gradient + "}\n " + prefix + "::-moz-range-track {" + gradient + "}\n " + prefix + "::-ms-track {background: transparent;}\n " + prefix + "::-ms-fill-lower {" + gradient + "}\n " + prefix + ":focus::-ms-fill-lower {" + gradient + "}\n " + prefix + "::-ms-fill-upper {" + gradient + "}\n " + prefix + ":focus::-ms-fill-upper {" + gradient + "}\n ";
css.appendChild(document.createTextNode(styles));
head.appendChild(css);
},
sluggify: function sluggify(str) {
str = str.replace(/^\s+|\s+$/g, ""); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáãäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaaeeeeiiiioooouuuunc------";
for (var i = 0, l = from.length; i < l; i++) {
str = str.replace(new RegExp(from.charAt(i), "g"), to.charAt(i));
}
str = str
.replace(/[^a-z0-9 -]/g, "") // remove invalid chars
.replace(/\s+/g, "-") // collapse whitespace and replace by -
.replace(/-+/g, "-"); // collapse dashes
return str;
},
createName: function createName(name) {
return "rangeBullet" + this.sluggify(name);
}
}
};
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
}
// Vue.extend constructor export interop.
var options = typeof script === 'function' ? script.options : script;
// render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true;
// functional template
if (isFunctionalTemplate) {
options.functional = true;
}
}
// scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
}
// inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
}
// register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
};
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
}
else if (style) {
hook = shadowMode
? function (context) {
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
}
: function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
}
else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
}
/* script */
var __vue_script__ = script;
/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vlider-container",class:[_vm.theme ].concat( _vm.classes),attrs:{"id":_vm.id}},[_c('ul',{staticClass:"vlider-labels"},[_vm._l((_vm.vliderData),function(data,index){return [_c('li',{key:index,class:[_vm.createName(data.label), {'active' : index+1 == _vm.inputRange}],style:({color: data.color}),on:{"click":function($event){return _vm.selectThumb(index+1)}}},[_vm._t("bullet",null,{"data":data})],2)]})],2),_vm._v(" "),_c('div',{staticClass:"vlider-range"},[_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.inputRange),expression:"inputRange",modifiers:{"number":true}}],attrs:{"type":"range","min":"1","max":_vm.rangeSteps,"steps":"1"},domProps:{"value":(_vm.inputRange)},on:{"__r":function($event){_vm.inputRange=_vm._n($event.target.value);},"blur":function($event){return _vm.$forceUpdate()}}})])])};
var __vue_staticRenderFns__ = [];
/* style */
var __vue_inject_styles__ = undefined;
/* scoped */
var __vue_scope_id__ = undefined;
/* module identifier */
var __vue_module_identifier__ = undefined;
/* functional template */
var __vue_is_functional_template__ = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
var __vue_component__ = /*#__PURE__*/normalizeComponent(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
__vue_inject_styles__,
__vue_script__,
__vue_scope_id__,
__vue_is_functional_template__,
__vue_module_identifier__,
false,
undefined,
undefined,
undefined
);
function install(Vue) {
if (install.installed) { return; }
install.installed = true;
Vue.component("vlider", __vue_component__);
}
var plugin = {
install: install,
};
var GlobalVue = null;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}
__vue_component__.install = install;
exports.default = __vue_component__;
return exports;
}({}));
//# sourceMappingURL=vlider.min.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sass/vlider.scss')) :
typeof define === 'function' && define.amd ? define(['exports', 'sass/vlider.scss'], factory) :
(global = global || self, factory(global.vlider = {}));
}(this, function (exports) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Vlider = {}));
}(this, (function (exports) { 'use strict';

@@ -38,2 +38,3 @@ //

//
//

@@ -160,87 +161,77 @@ var script = {

function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
/* server only */
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
} // Vue.extend constructor export interop.
var options = typeof script === 'function' ? script.options : script; // render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true; // functional template
if (isFunctionalTemplate) {
options.functional = true;
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
}
} // scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function hook(context) {
// 2.3 injection
context = context || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
} // inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
} // register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
}; // used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
} else if (style) {
hook = shadowMode ? function () {
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
} : function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
// Vue.extend constructor export interop.
var options = typeof script === 'function' ? script.options : script;
// render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true;
// functional template
if (isFunctionalTemplate) {
options.functional = true;
}
}
}
return script;
// scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
}
// inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
}
// register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
};
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
}
else if (style) {
hook = shadowMode
? function (context) {
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
}
: function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
}
else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
}
var normalizeComponent_1 = normalizeComponent;
/* script */

@@ -250,3 +241,3 @@ var __vue_script__ = script;

/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vlider-container",class:[_vm.theme ].concat( _vm.classes),attrs:{"id":_vm.id}},[_c('ul',{staticClass:"vlider-labels"},[_vm._l((_vm.vliderData),function(data,index){return [_c('li',{class:[_vm.createName(data.label), {'active' : index+1 == _vm.inputRange}],style:({color: data.color}),on:{"click":function($event){return _vm.selectThumb(index+1)}}},[_vm._t("bullet",null,{"data":data})],2)]})],2),_vm._v(" "),_c('div',{staticClass:"vlider-range"},[_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.inputRange),expression:"inputRange",modifiers:{"number":true}}],attrs:{"type":"range","min":"1","max":_vm.rangeSteps,"steps":"1"},domProps:{"value":(_vm.inputRange)},on:{"__r":function($event){_vm.inputRange=_vm._n($event.target.value);},"blur":function($event){return _vm.$forceUpdate()}}})])])};
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vlider-container",class:[_vm.theme ].concat( _vm.classes),attrs:{"id":_vm.id}},[_c('ul',{staticClass:"vlider-labels"},[_vm._l((_vm.vliderData),function(data,index){return [_c('li',{key:index,class:[_vm.createName(data.label), {'active' : index+1 == _vm.inputRange}],style:({color: data.color}),on:{"click":function($event){return _vm.selectThumb(index+1)}}},[_vm._t("bullet",null,{"data":data})],2)]})],2),_vm._v(" "),_c('div',{staticClass:"vlider-range"},[_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.inputRange),expression:"inputRange",modifiers:{"number":true}}],attrs:{"type":"range","min":"1","max":_vm.rangeSteps,"steps":"1"},domProps:{"value":(_vm.inputRange)},on:{"__r":function($event){_vm.inputRange=_vm._n($event.target.value);},"blur":function($event){return _vm.$forceUpdate()}}})])])};
var __vue_staticRenderFns__ = [];

@@ -266,5 +257,7 @@

/* style inject shadow dom */
var Vlider = normalizeComponent_1(
var __vue_component__ = /*#__PURE__*/normalizeComponent(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },

@@ -276,3 +269,5 @@ __vue_inject_styles__,

__vue_module_identifier__,
false,
undefined,
undefined,
undefined

@@ -282,27 +277,28 @@ );

function install(Vue) {
if (install.installed) { return; }
install.installed = true;
Vue.component('vlider', Vlider);
if (install.installed) { return; }
install.installed = true;
Vue.component("vlider", __vue_component__);
}
var plugin = {
install: install,
install: install,
};
var GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
GlobalVue.use(plugin);
}
Vlider.install = install;
__vue_component__.install = install;
exports.default = Vlider;
exports.default = __vue_component__;
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));
//# sourceMappingURL=vlider.umd.js.map
{
"name": "vlider",
"version": "1.0.1",
"description": "Simple to use, highly customizable, and pretty vue js range slider",
"main": "dist/vlider.umd.js",
"module": "dist/vlider.esm.js",
"unpkg": "dist/vlider.min.js",
"browser": "src/Vlider.vue",
"files": [
"dist/*",
"src/*"
],
"scripts": {
"build": "npm run build:unpkg & npm run build:es & npm run build:umd",
"build:umd": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format umd --file dist/vlider.umd.js",
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es --file dist/vlider.esm.js",
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife --file dist/vlider.min.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kawisphoenix/vlider.git"
},
"keywords": [
"vlider",
"range slider",
"input range",
"vue input range"
],
"author": "Kawish Behzad (http://kawisphoenix.me)",
"license": "MIT",
"bugs": {
"url": "https://github.com/kawisphoenix/vlider/issues"
},
"homepage": "https://github.com/kawisphoenix/vlider#readme",
"devDependencies": {
"autoprefixer": "^9.4.7",
"cross-env": "^5.2.0",
"minimist": "^1.2.0",
"node-sass": "^4.11.0",
"rollup": "*",
"rollup-plugin-buble": "*",
"rollup-plugin-commonjs": "*",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-replace": "*",
"rollup-plugin-uglify-es": "*",
"rollup-plugin-vue": "*",
"vue-loader": "^15.6.2",
"vue-template-compiler": "^2.6.6"
},
"dependencies": {}
"name": "vlider",
"version": "1.0.2",
"description": "Simple to use, highly customizable, and pretty vue js range slider",
"main": "dist/vlider.umd.js",
"module": "dist/vlider.esm.js",
"unpkg": "dist/vlider.min.js",
"browser": "src/Vlider.vue",
"files": [
"dist/*",
"src/*"
],
"scripts": {
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kawisphoenix/vlider.git"
},
"keywords": [
"vlider",
"range slider",
"input range",
"vue input range"
],
"author": "Kawish Behzad (http://kawisphoenix.me)",
"license": "MIT",
"bugs": {
"url": "https://github.com/kawisphoenix/vlider/issues"
},
"homepage": "https://kawisphoenix.github.io/vlider",
"devDependencies": {
"autoprefixer": "^9.4.7",
"cross-env": "^5.2.0",
"minimist": "^1.2.0",
"node-sass": "^4.11.0",
"rollup": "*",
"rollup-plugin-buble": "*",
"rollup-plugin-commonjs": "*",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-replace": "*",
"rollup-plugin-scss": "^2.6.0",
"rollup-plugin-uglify-es": "*",
"rollup-plugin-vue": "*",
"vue-loader": "^15.6.2",
"vue-template-compiler": "^2.6.6"
}
}
# Vlider
Input range component based on vue and custom CSS3. Highly customizable, pretty, and easy to use. (Demo: vlider.github.io)
Input range component based on vue and custom CSS3. Highly customizable, pretty, and easy to use.
(Demo: https://kawisphoenix.github.io/vlider/)
![Demo](https://github.com/kawisphoenix/vlider/blob/master/vlider.gif "Demo")

@@ -46,3 +48,3 @@

>
<template> slot="bullet" slot-scope="bullet"
<template slot="bullet" slot-scope="bullet">
<label>{{ bullet.data.label }}</label>

@@ -49,0 +51,0 @@ <i

@@ -1,22 +0,22 @@

import 'sass/vlider.scss'
import Vlider from './Vlider.vue'
import "./sass/vlider.scss";
import Vlider from "./Vlider.vue";
function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('vlider', Vlider);
if (install.installed) return;
install.installed = true;
Vue.component("vlider", Vlider);
}
const plugin = {
install,
install,
};
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
GlobalVue.use(plugin);
}

@@ -27,2 +27,2 @@

// Export component by default
export default Vlider
export default Vlider;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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