UNPKG

@dialpad/dialtone-vue

Version:

Vue component library for Dialpad's design system Dialtone

94 lines (93 loc) 2.43 kB
import { SPLIT_BUTTON_ICON_SIZES as i } from "./split-button-constants.js"; import { DtIconChevronDown as n } from "@dialpad/dialtone-icons/vue2"; import { getUniqueString as o } from "../../common/utils/index.js"; import { n as a } from "../../_plugin-vue2_normalizer-DSLOjnn3.js"; import r from "../button/button.js"; const l = { name: "SplitButtonOmega", components: { DtButton: r, DtIconChevronDown: n }, props: { /** * Determines whether the button should have active styling */ active: { type: Boolean, default: !1 }, /** * Descriptive label for the button */ ariaLabel: { type: String, default: null }, /** * HTML button disabled attribute */ disabled: { type: Boolean, default: !1 }, /** * Element ID, useful in case you need to reference the button * as an external anchor for popover */ id: { type: String, default: o() }, /** * The fill and outline of the button associated with its visual importance. */ importance: { type: String, default: "primary" }, /** * The color of the button. */ kind: { type: String, default: "default" }, /** * The size of the button. */ size: { type: String, default: "md" }, /** * Text shown in tooltip when you hover the button */ tooltipText: { type: String, default: "" } }, data() { return { SPLIT_BUTTON_ICON_SIZES: i }; } }; var s = function() { var t = this, e = t._self._c; return e("dt-button", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip", value: t.tooltipText, expression: "tooltipText" }], class: `d-split-btn__omega d-split-btn__omega--${t.size}`, attrs: { id: t.id, "data-qa": "dt-split-button-omega", active: t.active, "aria-label": t.ariaLabel, disabled: t.disabled, importance: t.importance, kind: t.kind, size: t.size }, scopedSlots: t._u([{ key: "icon", fn: function() { return [t._t("icon", function() { return [e("dt-icon-chevron-down", { attrs: { size: t.SPLIT_BUTTON_ICON_SIZES[t.size] } })]; }, { size: t.SPLIT_BUTTON_ICON_SIZES[t.size] })]; }, proxy: !0 }], null, !0) }); }, d = [], p = /* @__PURE__ */ a( l, s, d ); const g = p.exports; export { g as default }; //# sourceMappingURL=split-button-omega.js.map