UNPKG

@nextcloud/vue

Version:
65 lines (64 loc) 2.59 kB
import '../assets/NcActionText-D9InmayH.css'; import { A as ActionTextMixin } from "./actionText-DYzDdbVe.mjs"; import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-CiGWxAJE.mjs"; import { createElementBlock, openBlock, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs"; const _sfc_main = { name: "NcActionText", mixins: [ActionTextMixin], inject: { isInSemanticMenu: { from: NC_ACTIONS_IS_SEMANTIC_MENU, default: false } } }; const _hoisted_1 = ["role"]; const _hoisted_2 = { key: 0, class: "action-text__longtext-wrapper" }; const _hoisted_3 = { class: "action-text__name" }; const _hoisted_4 = ["textContent"]; const _hoisted_5 = ["textContent"]; const _hoisted_6 = { key: 2, class: "action-text__text" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("li", { class: "action", role: $options.isInSemanticMenu && "presentation" }, [ createElementVNode("span", { class: "action-text", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)) }, [ renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon !== "" ? (openBlock(), createElementBlock("span", { key: 0, "aria-hidden": "true", class: normalizeClass(["action-text__icon", [_ctx.isIconUrl ? "action-text__icon--url" : _ctx.icon]]), style: normalizeStyle({ backgroundImage: _ctx.isIconUrl ? `url(${_ctx.icon})` : null }) }, null, 6)) : createCommentVNode("", true) ], true), _ctx.name ? (openBlock(), createElementBlock("span", _hoisted_2, [ createElementVNode("strong", _hoisted_3, toDisplayString(_ctx.name), 1), createElementVNode("span", { class: "action-text__longtext", textContent: toDisplayString(_ctx.text) }, null, 8, _hoisted_4) ])) : _ctx.isLongText ? (openBlock(), createElementBlock("span", { key: 1, class: "action-text__longtext", textContent: toDisplayString(_ctx.text) }, null, 8, _hoisted_5)) : (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.text), 1)), createCommentVNode("", true) ]) ], 8, _hoisted_1); } const NcActionText = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fa684b48"]]); export { NcActionText as N }; //# sourceMappingURL=NcActionText-uKvLcEY6.mjs.map