Socket
Socket
Sign inDemoInstall

pretty-checkbox-vue

Package Overview
Dependencies
11
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

check.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PrettyCheck",[],t):"object"==typeof exports?exports.PrettyCheck=t():e.PrettyCheck=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var i=r(1)(r(2),null,null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,r,i){var n,o=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(n=e,o=e["default"]);var a="function"==typeof o?o.options:o;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),i){var u=Object.create(a.computed||null);Object.keys(i).forEach(function(e){var t=i[e];u[e]=function(){return t}}),a.computed=u}return{esModule:n,exports:o,options:a}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),n={name:"pretty-checkbox",input_type:"checkbox",model:i.model,props:i.props,data:i.data,computed:i.computed,watch:i.watch,mounted:i.mounted,methods:i.methods,render:i.render};t["default"]=n},function(e,t,r){var i=r(1)(r(4),r(5),null,null);e.exports=i.exports},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.indeterminate=!1,this.$emit("update:indeterminate",this.indeterminate);var t=e.target.checked;if(this.modelValue instanceof Array){var i=[].concat(r(this.modelValue));t?i.push(this.value):i.splice(i.indexOf(this.value),1),this.$emit("change",i)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PrettyCheck",[],t):"object"==typeof exports?exports.PrettyCheck=t():e.PrettyCheck=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var i=r(1)(r(2),null,null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,r,i){var n,o=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(n=e,o=e["default"]);var a="function"==typeof o?o.options:o;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),i){var u=Object.create(a.computed||null);Object.keys(i).forEach(function(e){var t=i[e];u[e]=function(){return t}}),a.computed=u}return{esModule:n,exports:o,options:a}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),n={name:"pretty-checkbox",input_type:"checkbox",model:i.model,props:i.props,data:i.data,computed:i.computed,watch:i.watch,mounted:i.mounted,methods:i.methods,render:i.render};t["default"]=n},function(e,t,r){var i=r(1)(r(4),r(5),null,null);e.exports=i.exports},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.$emit("update:indeterminate",!1);var t=e.target.checked;if(this.modelValue instanceof Array){var i=[].concat(r(this.modelValue));t?i.push(this.value):i.splice(i.indexOf(this.value),1),this.$emit("change",i)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}}])});

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pretty-checkbox-vue",[],t):"object"==typeof exports?exports["pretty-checkbox-vue"]=t():e["pretty-checkbox-vue"]=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=r(1),i=n(o),s=r(5),a=n(s),u=r(7),l=n(u);e.exports={install:function(e,t){e.component("p-input",i["default"]),e.component("p-check",a["default"]),e.component("p-radio",l["default"])}}},function(e,t,r){var n=r(2)(r(3),r(4),null,null);e.exports=n.exports},function(e,t){e.exports=function(e,t,r,n){var o,i=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(o=e,i=e["default"]);var a="function"==typeof i?i.options:i;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),n){var u=Object.create(a.computed||null);Object.keys(n).forEach(function(e){var t=n[e];u[e]=function(){return t}}),a.computed=u}return{esModule:o,exports:i,options:a}}},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.indeterminate=!1,this.$emit("update:indeterminate",this.indeterminate);var t=e.target.checked;if(this.modelValue instanceof Array){var n=[].concat(r(this.modelValue));t?n.push(this.value):n.splice(n.indexOf(this.value),1),this.$emit("change",n)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}},function(e,t,r){var n=r(2)(r(6),null,null,null);e.exports=n.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o={name:"pretty-checkbox",input_type:"checkbox",model:n.model,props:n.props,data:n.data,computed:n.computed,watch:n.watch,mounted:n.mounted,methods:n.methods,render:n.render};t["default"]=o},function(e,t,r){var n=r(2)(r(8),null,null,null);e.exports=n.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o={name:"pretty-radio",input_type:"radio",model:n.model,props:n.props,data:n.data,computed:n.computed,watch:n.watch,mounted:n.mounted,methods:n.methods,render:n.render};t["default"]=o}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pretty-checkbox-vue",[],t):"object"==typeof exports?exports["pretty-checkbox-vue"]=t():e["pretty-checkbox-vue"]=t()}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var n=r(1),i=o(n),s=r(5),u=o(s),a=r(7),l=o(a);e.exports={install:function(e,t){e.component("p-input",i["default"]),e.component("p-check",u["default"]),e.component("p-radio",l["default"])}}},function(e,t,r){var o=r(2)(r(3),r(4),null,null);e.exports=o.exports},function(e,t){e.exports=function(e,t,r,o){var n,i=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(n=e,i=e["default"]);var u="function"==typeof i?i.options:i;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),r&&(u._scopeId=r),o){var a=Object.create(u.computed||null);Object.keys(o).forEach(function(e){var t=o[e];a[e]=function(){return t}}),u.computed=a}return{esModule:n,exports:i,options:u}}},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.$emit("update:indeterminate",!1);var t=e.target.checked;if(this.modelValue instanceof Array){var o=[].concat(r(this.modelValue));t?o.push(this.value):o.splice(o.indexOf(this.value),1),this.$emit("change",o)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}},function(e,t,r){var o=r(2)(r(6),null,null,null);e.exports=o.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n={name:"pretty-checkbox",input_type:"checkbox",model:o.model,props:o.props,data:o.data,computed:o.computed,watch:o.watch,mounted:o.mounted,methods:o.methods,render:o.render};t["default"]=n},function(e,t,r){var o=r(2)(r(8),null,null,null);e.exports=o.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n={name:"pretty-radio",input_type:"radio",model:o.model,props:o.props,data:o.data,computed:o.computed,watch:o.watch,mounted:o.mounted,methods:o.methods,render:o.render};t["default"]=n}])});

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

window.PrettyCheckbox=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=r(1),o=n(i),s=r(5),a=n(s),u=r(7),l=n(u);e.exports={install:function(e,t){e.component("p-input",o["default"]),e.component("p-check",a["default"]),e.component("p-radio",l["default"])}}},function(e,t,r){var n=r(2)(r(3),r(4),null,null);e.exports=n.exports},function(e,t){e.exports=function(e,t,r,n){var i,o=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(i=e,o=e["default"]);var a="function"==typeof o?o.options:o;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),n){var u=Object.create(a.computed||null);Object.keys(n).forEach(function(e){var t=n[e];u[e]=function(){return t}}),a.computed=u}return{esModule:i,exports:o,options:a}}},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.indeterminate=!1,this.$emit("update:indeterminate",this.indeterminate);var t=e.target.checked;if(this.modelValue instanceof Array){var n=[].concat(r(this.modelValue));t?n.push(this.value):n.splice(n.indexOf(this.value),1),this.$emit("change",n)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}},function(e,t,r){var n=r(2)(r(6),null,null,null);e.exports=n.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i={name:"pretty-checkbox",input_type:"checkbox",model:n.model,props:n.props,data:n.data,computed:n.computed,watch:n.watch,mounted:n.mounted,methods:n.methods,render:n.render};t["default"]=i},function(e,t,r){var n=r(2)(r(8),null,null,null);e.exports=n.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i={name:"pretty-radio",input_type:"radio",model:n.model,props:n.props,data:n.data,computed:n.computed,watch:n.watch,mounted:n.mounted,methods:n.methods,render:n.render};t["default"]=i}]);
window.PrettyCheckbox=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=r(1),i=n(o),s=r(5),a=n(s),u=r(7),l=n(u);e.exports={install:function(e,t){e.component("p-input",i["default"]),e.component("p-check",a["default"]),e.component("p-radio",l["default"])}}},function(e,t,r){var n=r(2)(r(3),r(4),null,null);e.exports=n.exports},function(e,t){e.exports=function(e,t,r,n){var o,i=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(o=e,i=e["default"]);var a="function"==typeof i?i.options:i;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),n){var u=Object.create(a.computed||null);Object.keys(n).forEach(function(e){var t=n[e];u[e]=function(){return t}}),a.computed=u}return{esModule:o,exports:i,options:a}}},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.$emit("update:indeterminate",!1);var t=e.target.checked;if(this.modelValue instanceof Array){var n=[].concat(r(this.modelValue));t?n.push(this.value):n.splice(n.indexOf(this.value),1),this.$emit("change",n)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}},function(e,t,r){var n=r(2)(r(6),null,null,null);e.exports=n.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o={name:"pretty-checkbox",input_type:"checkbox",model:n.model,props:n.props,data:n.data,computed:n.computed,watch:n.watch,mounted:n.mounted,methods:n.methods,render:n.render};t["default"]=o},function(e,t,r){var n=r(2)(r(8),null,null,null);e.exports=n.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o={name:"pretty-radio",input_type:"radio",model:n.model,props:n.props,data:n.data,computed:n.computed,watch:n.watch,mounted:n.mounted,methods:n.methods,render:n.render};t["default"]=o}]);

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PrettyInput",[],t):"object"==typeof exports?exports.PrettyInput=t():e.PrettyInput=t()}(this,function(){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var r=i(1)(i(2),i(3),null,null);e.exports=r.exports},function(e,t){e.exports=function(e,t,i,r){var n,s=e=e||{},o=typeof e["default"];"object"!==o&&"function"!==o||(n=e,s=e["default"]);var a="function"==typeof s?s.options:s;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),i&&(a._scopeId=i),r){var u=Object.create(a.computed||null);Object.keys(r).forEach(function(e){var t=r[e];u[e]=function(){return t}}),a.computed=u}return{esModule:n,exports:s,options:a}}},function(e,t){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.indeterminate=!1,this.$emit("update:indeterminate",this.indeterminate);var t=e.target.checked;if(this.modelValue instanceof Array){var r=[].concat(i(this.modelValue));t?r.push(this.value):r.splice(r.indexOf(this.value),1),this.$emit("change",r)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{"class":e.classes},[i("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),i("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),i("label",[e._t("default")],2)],2),e._v(" "),e._toggle?i("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?i("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?i("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PrettyInput",[],t):"object"==typeof exports?exports.PrettyInput=t():e.PrettyInput=t()}(this,function(){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var r=i(1)(i(2),i(3),null,null);e.exports=r.exports},function(e,t){e.exports=function(e,t,i,r){var n,s=e=e||{},o=typeof e["default"];"object"!==o&&"function"!==o||(n=e,s=e["default"]);var a="function"==typeof s?s.options:s;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),i&&(a._scopeId=i),r){var u=Object.create(a.computed||null);Object.keys(r).forEach(function(e){var t=r[e];u[e]=function(){return t}}),a.computed=u}return{esModule:n,exports:s,options:a}}},function(e,t){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.$emit("update:indeterminate",!1);var t=e.target.checked;if(this.modelValue instanceof Array){var r=[].concat(i(this.modelValue));t?r.push(this.value):r.splice(r.indexOf(this.value),1),this.$emit("change",r)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{"class":e.classes},[i("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),i("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),i("label",[e._t("default")],2)],2),e._v(" "),e._toggle?i("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?i("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?i("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}}])});
{
"name": "pretty-checkbox-vue",
"version": "1.1.0",
"version": "1.1.1",
"description": "Quickly integrate pretty checkbox Components with Vue.js",

@@ -5,0 +5,0 @@ "keywords": [

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PrettyRadio",[],t):"object"==typeof exports?exports.PrettyRadio=t():e.PrettyRadio=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var i=r(1)(r(2),null,null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,r,i){var n,o=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(n=e,o=e["default"]);var a="function"==typeof o?o.options:o;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),i){var u=Object.create(a.computed||null);Object.keys(i).forEach(function(e){var t=i[e];u[e]=function(){return t}}),a.computed=u}return{esModule:n,exports:o,options:a}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),n={name:"pretty-radio",input_type:"radio",model:i.model,props:i.props,data:i.data,computed:i.computed,watch:i.watch,mounted:i.mounted,methods:i.methods,render:i.render};t["default"]=n},function(e,t,r){var i=r(1)(r(4),r(5),null,null);e.exports=i.exports},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.indeterminate=!1,this.$emit("update:indeterminate",this.indeterminate);var t=e.target.checked;if(this.modelValue instanceof Array){var i=[].concat(r(this.modelValue));t?i.push(this.value):i.splice(i.indexOf(this.value),1),this.$emit("change",i)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("PrettyRadio",[],t):"object"==typeof exports?exports.PrettyRadio=t():e.PrettyRadio=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var i=r(1)(r(2),null,null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,r,i){var n,o=e=e||{},s=typeof e["default"];"object"!==s&&"function"!==s||(n=e,o=e["default"]);var a="function"==typeof o?o.options:o;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),r&&(a._scopeId=r),i){var u=Object.create(a.computed||null);Object.keys(i).forEach(function(e){var t=i[e];u[e]=function(){return t}}),a.computed=u}return{esModule:n,exports:o,options:a}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),n={name:"pretty-radio",input_type:"radio",model:i.model,props:i.props,data:i.data,computed:i.computed,watch:i.watch,mounted:i.mounted,methods:i.methods,render:i.render};t["default"]=n},function(e,t,r){var i=r(1)(r(4),r(5),null,null);e.exports=i.exports},function(e,t){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"pretty-input",model:{prop:"modelValue",event:"change"},props:{type:String,name:String,value:String,modelValue:{},trueValue:{},falseValue:{},checked:{},disabled:{},required:{},indeterminate:{},color:String,offColor:String,hoverColor:String,indeterminateColor:String,toggle:{},hover:{},focus:{}},data:function(){return{default_mode:!1}},computed:{_type:function(){return this.$options.input_type?this.$options.input_type:this.type?this.type:"checkbox"},shouldBeChecked:function(){return void 0!==this.modelValue?"radio"===this._type?this.modelValue===this.value:this.modelValue instanceof Array?this.modelValue.includes(this.value):this._trueValue?this.modelValue===this.trueValue:"string"==typeof this.modelValue||!!this.modelValue:"string"==typeof this.checked||!!this.checked},_disabled:function(){return"string"==typeof this.disabled||!!this.disabled},_required:function(){return"string"==typeof this.required||!!this.required},_trueValue:function(){return"string"==typeof this.trueValue?this.trueValue:!!this.trueValue},_falseValue:function(){return"string"==typeof this.falseValue?this.falseValue:!!this.falseValue},_toggle:function(){return"string"==typeof this.toggle||!!this.toggle},_hover:function(){return"string"==typeof this.hover||!!this.hover},_focus:function(){return"string"==typeof this.focus||!!this.focus},classes:function(){return{pretty:!0,"p-default":this.default_mode,"p-toggle":this._toggle,"p-has-hover":this._hover,"p-has-focus":this._focus,"p-has-indeterminate":this.indeterminate}},onClasses:function(){var e={state:!0,"p-on":this._toggle};return this.color&&(e["p-"+this.color]=!0),e},offClasses:function(){var e={state:!0,"p-off":!0};return this.offColor&&(e["p-"+this.offColor]=!0),e},hoverClasses:function(){var e={state:!0,"p-is-hover":!0};return this.hoverColor&&(e["p-"+this.hoverColor]=!0),e},indeterminateClasses:function(){var e={state:!0,"p-is-indeterminate":!0};return this.indeterminateColor&&(e["p-"+this.indeterminateColor]=!0),e}},watch:{indeterminate:function(e){this.$refs.input.indeterminate=e}},mounted:function(){this.$vnode.data&&!this.$vnode.data.staticClass&&(this.default_mode=!0)},methods:{updateInput:function(e){if("radio"===this._type)return void this.$emit("change",this.value);this.$emit("update:indeterminate",!1);var t=e.target.checked;if(this.modelValue instanceof Array){var i=[].concat(r(this.modelValue));t?i.push(this.value):i.splice(i.indexOf(this.value),1),this.$emit("change",i)}else this.$emit("change",t?!this._trueValue||this.trueValue:!!this._falseValue&&this.falseValue)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{"class":e.classes},[r("input",{ref:"input",attrs:{type:e._type,name:e.name,disabled:e._disabled,required:e._required},domProps:{checked:e.shouldBeChecked,value:e.value},on:{change:e.updateInput}}),e._v(" "),r("div",{"class":e.onClasses},[e._t("extra"),e._v(" "),r("label",[e._t("default")],2)],2),e._v(" "),e._toggle?r("div",{"class":e.offClasses},[e._t("off-extra"),e._v(" "),e._t("off-label")],2):e._e(),e._v(" "),e._hover?r("div",{"class":e.hoverClasses},[e._t("hover-extra"),e._v(" "),e._t("hover-label")],2):e._e(),e._v(" "),e.indeterminate?r("div",{"class":e.indeterminateClasses},[e._t("indeterminate-extra"),e._v(" "),e._t("indeterminate-label")],2):e._e()])},staticRenderFns:[]}}])});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc