UNPKG

@progress/kendo-vue-layout

Version:
87 lines (86 loc) 1.94 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as a, h as o, createVNode as l } from "vue"; import { getTemplate as d } from "@progress/kendo-vue-common"; const c = /* @__PURE__ */ a({ name: "KendoTabStripNavigationItem", emits: { select: null }, props: { active: Boolean, disabled: Boolean, index: Number, title: { type: String, default: "Untitled" }, id: { type: String }, titleRender: [String, Function, Object], first: { type: Boolean, default: void 0 }, last: { type: Boolean, default: void 0 } }, computed: { itemClasses() { const { active: e, disabled: t, first: i, last: s } = this.$props; return { "k-first": i, "k-last": s, "k-item": !0, "k-disabled": t, "k-active": e }; } }, methods: { onClick() { this.$props.disabled || this.$emit("select", this.$props.index); } }, render() { const { active: e, title: t = "Untitled", id: i } = this.$props, s = this.$props.titleRender; let n = d.call(this, { h: o, template: s, defaultRendering: t, additionalProps: this.$props, additionalListeners: { select: this.onClick } }); return l("li", { "aria-selected": e, role: "tab", id: i, onClick: this.onClick, class: this.itemClasses }, [l("span", { class: "k-link" }, [n])]); } }); export { c as TabStripNavigationItem };