@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
86 lines (85 loc) • 2.05 kB
JavaScript
import { getUniqueString as e } from "../../common/utils/index.js";
import { t } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
import n from "../button/button.js";
import { SPLIT_BUTTON_ICON_SIZES as r } from "./split-button-constants.js";
import { createBlock as i, createVNode as a, normalizeClass as o, openBlock as s, renderSlot as c, resolveComponent as l, resolveDirective as u, withCtx as d, withDirectives as f } from "vue";
import { DtIconChevronDown as p } from "@dialpad/dialtone-icons/vue3";
//#region components/split_button/split_button-omega.vue
var m = {
compatConfig: { MODE: 3 },
name: "SplitButtonOmega",
components: {
DtButton: n,
DtIconChevronDown: p
},
props: {
active: {
type: Boolean,
default: !1
},
ariaLabel: {
type: String,
default: null
},
disabled: {
type: Boolean,
default: !1
},
id: {
type: String,
default: e()
},
importance: {
type: String,
default: "primary"
},
kind: {
type: String,
default: "default"
},
size: {
type: String,
default: "md"
},
tooltipText: {
type: String,
default: ""
}
},
data() {
return { SPLIT_BUTTON_ICON_SIZES: r };
}
};
function h(e, t, n, r, p, m) {
let h = l("dt-icon-chevron-down"), g = l("dt-button"), _ = u("dt-tooltip");
return f((s(), i(g, {
id: n.id,
"data-qa": "dt-split-button-omega",
active: n.active,
"aria-label": n.ariaLabel,
class: o(`d-split-btn__omega d-split-btn__omega--${n.size}`),
disabled: n.disabled,
importance: n.importance,
kind: n.kind,
size: n.size
}, {
icon: d(() => [c(e.$slots, "icon", { size: p.SPLIT_BUTTON_ICON_SIZES[n.size] }, () => [a(h, { size: p.SPLIT_BUTTON_ICON_SIZES[n.size] }, null, 8, ["size"])])]),
_: 3
}, 8, [
"id",
"active",
"aria-label",
"class",
"disabled",
"importance",
"kind",
"size"
])), [[_, {
message: n.tooltipText,
inverted: n.kind === "inverted"
}]]);
}
var g = /* @__PURE__ */ t(m, [["render", h]]);
//#endregion
export { g as default };
//# sourceMappingURL=split-button-omega.js.map