UNPKG

@dialpad/dialtone-vue

Version:

Vue component library for Dialpad's design system Dialtone

43 lines (42 loc) 1.24 kB
import { DtIconClose as n } from "@dialpad/dialtone-icons/vue2"; import { DialtoneLocalization as s } from "../localization/index.js"; import { n as r } from "../_plugin-vue2_normalizer-DSLOjnn3.js"; import l from "../lib/button/button.js"; const i = { name: "SrOnlyCloseButton", components: { DtIconClose: n, DtButton: l }, emits: ["close"], data() { return { i18n: new s() }; }, computed: { closeButtonTitle() { return this.i18n.$t("DIALTONE_CLOSE_BUTTON"); } }, methods: { close() { this.$emit("close"); } } }; var a = function() { var t = this, e = t._self._c; return e("dt-button", { staticClass: "d-vi-visible-sr", attrs: { id: "sr-only-close-button", "data-qa": "dt-sr-only-close-button", "aria-label": t.closeButtonTitle, title: t.closeButtonTitle }, on: { click: t.close, keydown: function(o) { return !o.type.indexOf("key") && t._k(o.keyCode, "space", 32, o.key, [" ", "Spacebar"]) ? null : (o.preventDefault(), o.stopPropagation(), t.close.apply(null, arguments)); } } }, [e("dt-icon-close")], 1); }, c = [], u = /* @__PURE__ */ r( i, a, c ); const y = u.exports; export { y as default }; //# sourceMappingURL=sr_only_close_button.js.map