@nextcloud/vue
Version:
Nextcloud vue components
61 lines (60 loc) • 1.89 kB
JavaScript
import '../assets/NcActionButtonGroup-Bt8kRk79.css';
import { defineComponent, createElementBlock, openBlock, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
import { r as register, a as t } from "./_l10n-DrTiip5c.mjs";
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-CiGWxAJE.mjs";
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
register();
const _sfc_main = defineComponent({
name: "NcActionButtonGroup",
inject: {
isInSemanticMenu: {
from: NC_ACTIONS_IS_SEMANTIC_MENU,
default: false
}
},
props: {
/**
* Optional text shown below the button group
*/
name: {
required: false,
default: void 0,
type: String
}
},
setup() {
return {
labelId: createElementId()
};
},
methods: {
t
}
});
const _hoisted_1 = ["role"];
const _hoisted_2 = ["id"];
const _hoisted_3 = ["aria-labelledby"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("li", {
class: "nc-button-group-base",
role: _ctx.isInSemanticMenu && "presentation"
}, [
_ctx.name ? (openBlock(), createElementBlock("div", {
key: 0,
id: _ctx.labelId
}, toDisplayString(_ctx.name), 9, _hoisted_2)) : createCommentVNode("", true),
createElementVNode("ul", {
class: "nc-button-group-content",
role: "group",
"aria-labelledby": _ctx.name ? _ctx.labelId : void 0
}, [
renderSlot(_ctx.$slots, "default")
], 8, _hoisted_3)
], 8, _hoisted_1);
}
const NcActionButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6a2b8de0"]]);
export {
NcActionButtonGroup as N
};
//# sourceMappingURL=NcActionButtonGroup-D1cYCNRq.mjs.map