primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue)
1 lines • 3.8 kB
JavaScript
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["tristatecheckbox"]=t():e["tristatecheckbox"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({f6fd:function(e,t){(function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(r){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})})(document)},fb15:function(e,t,n){"use strict";var r;(n.r(t),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"p-checkbox p-component",on:{click:function(t){return e.onClick(t)}}},[n("div",{staticClass:"p-hidden-accessible"},[n("input",e._b({ref:"input",attrs:{type:"checkbox","aria-labelledby":e.ariaLabelledBy},domProps:{checked:!0===e.value},on:{focus:function(t){return e.onFocus()},blur:function(t){return e.onBlur()}}},"input",e.$attrs,!1))]),n("div",{ref:"box",class:["p-checkbox-box",{"p-highlight":null!=e.value,"p-disabled":e.$attrs.disabled,"p-focus":e.focused}],attrs:{role:"checkbox","aria-checked":!0===e.value}},[n("span",{class:["p-checkbox-icon",e.icon]})])])},i=[],c={inheritAttrs:!1,props:{value:null,ariaLabelledBy:String},data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.$attrs.disabled){var t;switch(this.value){case!0:t=!1;break;case!1:t=null;break;case null:t=!0;break}this.$emit("click",e),this.$emit("input",t),this.$emit("change",e),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{icon:function(){var e;switch(this.value){case!0:e="pi pi-check";break;case!1:e="pi pi-times";break;case null:e=null;break}return e}}},u=c;function s(e,t,n,r,o,i,c,u){var s,a="function"===typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),i&&(a._scopeId="data-v-"+i),c?(s=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(c)},a._ssrRegister=s):o&&(s=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(a.functional){a._injectStyles=s;var l=a.render;a.render=function(e,t){return s.call(t),l(e,t)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,s):[s]}return{exports:e,options:a}}var a=s(u,o,i,!1,null,null,null),l=a.exports;t["default"]=l}})["default"]}));