UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

1 lines 4.71 kB
{"version":3,"file":"index.mjs","sources":["../../src/imagecompare/BaseImageCompare.vue","../../src/imagecompare/ImageCompare.vue","../../src/imagecompare/ImageCompare.vue?vue&type=template&id=664855ce&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ImageCompareStyle from 'primevue/imagecompare/style';\n\nexport default {\n name: 'BaseImageCompare',\n extends: BaseComponent,\n props: {\n tabindex: {\n type: Number,\n default: 0\n },\n ariaLabelledby: {\n type: String,\n default: null\n },\n ariaLabel: {\n type: String,\n default: null\n }\n },\n style: ImageCompareStyle,\n provide() {\n return {\n $pcImageCompare: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" :aria-labelledby=\"ariaLabelledby\" :aria-label=\"ariaLabel\" v-bind=\"ptmi('root')\">\n <slot name=\"left\"></slot>\n <slot name=\"right\"></slot>\n <input type=\"range\" min=\"0\" max=\"100\" value=\"50\" @input=\"onSlide\" :class=\"cx('slider')\" v-bind=\"ptm('slider')\" />\n </div>\n</template>\n\n<script>\nimport { $dt } from '@primeuix/styled';\nimport { setCSSProperty } from '@primeuix/utils/dom';\nimport BaseImageCompare from './BaseImageCompare.vue';\n\nexport default {\n name: 'ImageCompare',\n extends: BaseImageCompare,\n methods: {\n onSlide(event) {\n const value = event.target.value;\n const image = event.target.previousElementSibling;\n\n setCSSProperty(image, $dt('imagecompare.scope.x').name, `${value}%`);\n }\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" :aria-labelledby=\"ariaLabelledby\" :aria-label=\"ariaLabel\" v-bind=\"ptmi('root')\">\n <slot name=\"left\"></slot>\n <slot name=\"right\"></slot>\n <input type=\"range\" min=\"0\" max=\"100\" value=\"50\" @input=\"onSlide\" :class=\"cx('slider')\" v-bind=\"ptm('slider')\" />\n </div>\n</template>\n\n<script>\nimport { $dt } from '@primeuix/styled';\nimport { setCSSProperty } from '@primeuix/utils/dom';\nimport BaseImageCompare from './BaseImageCompare.vue';\n\nexport default {\n name: 'ImageCompare',\n extends: BaseImageCompare,\n methods: {\n onSlide(event) {\n const value = event.target.value;\n const image = event.target.previousElementSibling;\n\n setCSSProperty(image, $dt('imagecompare.scope.x').name, `${value}%`);\n }\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","tabindex","type","Number","ariaLabelledby","String","ariaLabel","style","ImageCompareStyle","provide","$pcImageCompare","$parentInstance","BaseImageCompare","methods","onSlide","event","value","target","image","previousElementSibling","setCSSProperty","$dt","concat","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","ptmi","_renderSlot","$slots","_createElementVNode","min","max","onInput","$options","apply","arguments","ptm"],"mappings":";;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,kBAAkB;AACxB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,QAAQ,EAAE;AACNC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,cAAc,EAAE;AACZF,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,SAAS,EAAE;AACPJ,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;AACb;GACH;AACDE,EAAAA,KAAK,EAAEC,iBAAiB;EACxBC,OAAO,EAAA,SAAPA,OAAOA,GAAG;IACN,OAAO;AACHC,MAAAA,eAAe,EAAE,IAAI;AACrBC,MAAAA,eAAe,EAAE;KACpB;AACL;AACJ,CAAC;;ACfD,aAAe;AACXb,EAAAA,IAAI,EAAE,cAAc;AACpB,EAAA,SAAA,EAASc,QAAgB;AACzBC,EAAAA,OAAO,EAAE;AACLC,IAAAA,OAAO,EAAPA,SAAAA,OAAOA,CAACC,KAAK,EAAE;AACX,MAAA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