UNPKG

primevue

Version:

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

71 lines (65 loc) • 1.93 kB
import InputColorSwatchBackground from 'primevue/inputcolorswatchbackground'; import InputColorTransparencyGrid from 'primevue/inputcolortransparencygrid'; import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue'; import BaseComponent from '@primevue/core/basecomponent'; import InputColorSwatchStyle from 'primevue/inputcolorswatch/style'; var script$1 = { name: 'BaseInputColorSwatch', "extends": BaseComponent, props: { as: { type: [String, Object, Function], "default": 'DIV' }, asChild: { type: Boolean, "default": false } }, style: InputColorSwatchStyle, provide: function provide() { return { $pcInputColorSwatch: this, $parentInstance: this }; } }; var script = { name: 'InputColorSwatch', "extends": script$1, inheritAttrs: false, inject: ['$pcInputColor'], computed: { swatchStyles: function swatchStyles() { return this.$pcInputColor.swatchStyles; }, attrs: function attrs() { return mergeProps(this.a11yAttrs, this.ptmi('root')); }, a11yAttrs: function a11yAttrs() { return { style: this.swatchStyles }; } }, components: { InputColorTransparencyGrid: InputColorTransparencyGrid, InputColorSwatchBackground: InputColorSwatchBackground } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, "class": _ctx.cx('root') }, $options.attrs), { "default": withCtx(function () { return [renderSlot(_ctx.$slots, "default")]; }), _: 3 }, 16, ["class"])) : renderSlot(_ctx.$slots, "default", { a11yAttrs: $options.a11yAttrs, "class": normalizeClass(_ctx.cx('root')) }, undefined, undefined, 1); } script.render = render; export { script as default };