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

66 lines (60 loc) 1.76 kB
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue'; import BaseComponent from '@primevue/core/basecomponent'; import SidebarMenuStyle from 'primevue/sidebarmenu/style'; var script$1 = { name: 'BaseSidebarMenu', "extends": BaseComponent, props: { as: { type: [String, Object], "default": 'UL' }, asChild: { type: Boolean, "default": false } }, style: SidebarMenuStyle, provide: function provide() { return { $pcSidebarMenu: this, $parentInstance: this }; } }; var script = { name: 'SidebarMenu', "extends": script$1, inheritAttrs: false, inject: { $pcSidebar: { "default": null } }, computed: { a11yAttrs: function a11yAttrs() { var _this$$pcSidebar$getS, _this$$pcSidebar; return (_this$$pcSidebar$getS = (_this$$pcSidebar = this.$pcSidebar) === null || _this$$pcSidebar === void 0 ? void 0 : _this$$pcSidebar.getSectionAttrs('menu')) !== null && _this$$pcSidebar$getS !== void 0 ? _this$$pcSidebar$getS : {}; }, 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') }, $options.attrs), { "default": withCtx(function () { return [renderSlot(_ctx.$slots, "default")]; }), _: 3 }, 16, ["class"])) : renderSlot(_ctx.$slots, "default", { key: 1, a11yAttrs: $options.a11yAttrs, "class": normalizeClass(_ctx.cx('root')) }); } script.render = render; export { script as default };