@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
107 lines (106 loc) • 2.26 kB
JavaScript
import { t as e } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
import { BUTTON_ICON_SIZES as t } from "../button/button-constants.js";
import n from "../button/button.js";
import { createBlock as r, normalizeClass as i, openBlock as a, renderSlot as o, resolveComponent as s, resolveDirective as c, withCtx as l, withDirectives as u } from "vue";
//#region components/split_button/split_button-alpha.vue
var d = {
compatConfig: { MODE: 3 },
name: "SplitButtonAlpha",
components: { DtButton: n },
props: {
active: {
type: Boolean,
default: !1
},
ariaLabel: {
type: String,
default: null
},
iconPosition: {
type: String,
default: "left"
},
labelClass: {
type: [
String,
Array,
Object
],
default: ""
},
loading: {
type: Boolean,
default: !1
},
tooltipText: {
type: String,
default: ""
},
assertiveOnFocus: {
type: Boolean,
default: !1
},
disabled: {
type: Boolean,
default: !1
},
importance: {
type: String,
default: "primary"
},
kind: {
type: String,
default: "default"
},
size: {
type: String,
default: "md"
}
},
data() {
return { BUTTON_ICON_SIZES: t };
},
computed: { tooltipConfig() {
return {
message: this.tooltipText,
inverted: this.kind === "inverted"
};
} }
};
function f(e, t, n, d, f, p) {
let m = s("dt-button"), h = c("dt-tooltip");
return u((a(), r(m, {
"data-qa": "dt-split-button-alpha",
active: n.active,
"aria-label": n.ariaLabel,
"assertive-on-focus": n.assertiveOnFocus,
class: i(`d-split-btn__alpha d-split-btn__alpha--${n.size}`),
disabled: n.disabled,
"icon-position": n.iconPosition,
importance: n.importance,
kind: n.kind,
"label-class": n.labelClass,
loading: n.loading,
size: n.size
}, {
icon: l(() => [o(e.$slots, "icon", { size: f.BUTTON_ICON_SIZES[n.size] })]),
default: l(() => [o(e.$slots, "default")]),
_: 3
}, 8, [
"active",
"aria-label",
"assertive-on-focus",
"class",
"disabled",
"icon-position",
"importance",
"kind",
"label-class",
"loading",
"size"
])), [[h, p.tooltipConfig]]);
}
var p = /* @__PURE__ */ e(d, [["render", f]]);
//#endregion
export { p as default };
//# sourceMappingURL=split-button-alpha.js.map