@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
48 lines (47 loc) • 1.31 kB
JavaScript
import { t as e } from "../_plugin-vue_export-helper-BTgDAbhb.js";
import { DialtoneLocalization as t } from "../localization/index.js";
import n from "../lib/button/button.js";
import { createBlock as r, createVNode as i, openBlock as a, resolveComponent as o, withCtx as s, withKeys as c, withModifiers as l } from "vue";
import { DtIconClose as u } from "@dialpad/dialtone-icons/vue3";
//#region common/sr_only_close_button.vue
var d = {
name: "SrOnlyCloseButton",
components: {
DtIconClose: u,
DtButton: n
},
emits: ["close"],
data() {
return { i18n: new t() };
},
computed: { closeButtonTitle() {
return this.i18n.$t("DIALTONE_CLOSE_BUTTON");
} },
methods: { close() {
this.$emit("close");
} }
};
function f(e, t, n, u, d, f) {
let p = o("dt-icon-close"), m = o("dt-button");
return a(), r(m, {
id: "sr-only-close-button",
"data-qa": "dt-sr-only-close-button",
class: "d-vi-visible-sr",
"aria-label": f.closeButtonTitle,
title: f.closeButtonTitle,
onClick: f.close,
onKeydown: c(l(f.close, ["prevent", "stop"]), ["space"])
}, {
default: s(() => [i(p)]),
_: 1
}, 8, [
"aria-label",
"title",
"onClick",
"onKeydown"
]);
}
var p = /* @__PURE__ */ e(d, [["render", f]]);
//#endregion
export { p as default };
//# sourceMappingURL=sr_only_close_button.js.map