@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
69 lines (68 loc) • 2.09 kB
JavaScript
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const common_utils = require("../../common/utils.cjs");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
const _sfc_main = {
compatConfig: { MODE: 3 },
name: "DtListItemGroup",
props: {
/**
* Id of the List Item Group
*/
id: {
type: String,
default() {
return common_utils.getUniqueString();
}
},
/**
* List's heading.
*/
heading: {
type: String,
default: ""
},
/**
* Additional class to style the heading
*/
headingClass: {
type: [String, Array, Object],
default: ""
},
/**
* Additional class for the wrapper list element.
*/
listClass: {
type: [String, Array, Object],
default: ""
}
}
};
const _hoisted_1 = ["id", "aria-labelledby"];
const _hoisted_2 = ["id"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("ul", {
id: $props.id,
class: vue.normalizeClass(["d-list-item-group", $props.listClass]),
role: "group",
"data-qa": "dt-dropdown-list-wrapper",
"aria-labelledby": `${$props.id}-heading`
}, [
$props.heading ? (vue.openBlock(), vue.createElementBlock("li", {
key: 0,
id: `${$props.id}-heading`,
role: "presentation",
"data-qa": "dt-dropdown-list-heading",
class: vue.normalizeClass(["dt-dropdown-list--header", $props.headingClass])
}, [
vue.renderSlot(_ctx.$slots, "headingSlot", {}, () => [
vue.createTextVNode(vue.toDisplayString($props.heading), 1)
])
], 10, _hoisted_2)) : vue.createCommentVNode("", true),
vue.renderSlot(_ctx.$slots, "default")
], 10, _hoisted_1);
}
const list_item_group = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
exports.default = list_item_group;
//# sourceMappingURL=list_item_group.vue.cjs.map