@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
39 lines (38 loc) • 1.18 kB
JavaScript
import { DtIconClose as n } from "@dialpad/dialtone-icons/vue2";
import { n as s } from "../_plugin-vue2_normalizer-DSLOjnn3.js";
import r from "../lib/button/button.js";
import l from "../common/mixins/localization.js";
const i = {
name: "SrOnlyCloseButton",
components: {
DtIconClose: n,
DtButton: r
},
mixins: [l],
emits: ["close"],
computed: {
closeButtonTitle() {
return this.i18n.$t("DIALTONE_CLOSE_BUTTON");
}
},
methods: {
close() {
this.$emit("close");
}
}
};
var c = 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);
}, a = [], m = /* @__PURE__ */ s(
i,
c,
a
);
const y = m.exports;
export {
y as default
};
//# sourceMappingURL=sr_only_close_button.js.map