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

75 lines (69 loc) • 1.89 kB
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue'; import BaseComponent from '@primevue/core/basecomponent'; import SidebarMainStyle from 'primevue/sidebarmain/style'; var script$1 = { name: 'BaseSidebarMain', "extends": BaseComponent, props: { as: { type: [String, Object], "default": 'MAIN' }, asChild: { type: Boolean, "default": false } }, style: SidebarMainStyle, provide: function provide() { return { $pcSidebarMain: this, $parentInstance: this }; } }; var script = { name: 'SidebarMain', "extends": script$1, inheritAttrs: false, inject: { $pcSidebarLayout: { "default": null } }, methods: { onClick: function onClick(event) { var _this$$pcSidebarLayou; (_this$$pcSidebarLayou = this.$pcSidebarLayout) === null || _this$$pcSidebarLayou === void 0 || _this$$pcSidebarLayou.onMainClick(event); } }, computed: { a11yAttrs: function a11yAttrs() { return { 'data-pc-name': 'sidebarmain', 'data-pc-section': 'root' }; }, attrs: function attrs() { return mergeProps(this.a11yAttrs, this.ptmi('root')); } } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, "class": _ctx.cx('root'), onClick: $options.onClick }, $options.attrs), { "default": withCtx(function () { return [renderSlot(_ctx.$slots, "default")]; }), _: 3 }, 16, ["class", "onClick"])) : renderSlot(_ctx.$slots, "default", { a11yAttrs: $options.a11yAttrs, "class": normalizeClass(_ctx.cx('root')), onClick: $options.onClick }, undefined, undefined, 1); } script.render = render; export { script as default };