UNPKG

@progress/kendo-vue-layout

Version:
94 lines (93 loc) 2.56 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 e, h as s, createVNode as t } from "vue"; import { getTemplate as o, Icon as n } from "@progress/kendo-vue-common"; const c = /* @__PURE__ */ e({ name: "KendoActionSheetItem", emits: { click: null }, props: { id: Number, description: String, disabled: Boolean, group: { type: String, validator: function(i) { return ["top", "bottom", void 0].includes(i); } }, item: Object, icon: String, svgIcon: Object, iconColor: String, iconSize: String, content: [String, Function, Object], title: String, tabIndex: { type: [String, Number], default: 0 } }, computed: { wrapperClass() { return { "k-actionsheet-item": !0, "k-cursor-pointer": !0, "k-disabled": this.$props.disabled }; } }, render() { const i = o.call(this, { h: s, template: this.$props.content, defaultRendering: null, additionalProps: { item: this.$props.item } }); return t("span", { tabindex: this.$props.tabIndex, class: this.wrapperClass, role: "button", "aria-disabled": this.$props.disabled, onClick: this.onClick }, [t("span", { class: "k-actionsheet-action" }, [this.$props.content ? i : [(this.$props.icon || this.$props.svgIcon) && t("span", { class: "k-icon-wrap" }, [t(n, { name: this.$props.icon, icon: this.$props.svgIcon, class: "k-actionsheet-item-icon", size: this.iconSize, style: { color: this.iconColor } }, null)]), (this.$props.title || this.$props.description) && t("span", { class: "k-actionsheet-item-text" }, [this.$props.title && t("span", { class: "k-actionsheet-item-title" }, [this.$props.title]), this.$props.description && t("span", { class: "k-actionsheet-item-description" }, [this.$props.description])])]])]); }, methods: { onClick(i) { this.$emit("click", { syntheticEvent: i, item: this.$props.item, title: this.$props.title }); } } }); export { c as ActionSheetItem };