@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
49 lines (48 loc) • 1.29 kB
JavaScript
import { DtIconClose as l } from "@dialpad/dialtone-icons/vue3";
import { resolveComponent as e, openBlock as c, createBlock as r, withKeys as i, withModifiers as a, withCtx as d, createVNode as m } from "vue";
import { _ as p } from "../_plugin-vue_export-helper-CHgC5LLL.js";
import _ from "../lib/button/button.js";
const u = {
name: "SrOnlyCloseButton",
components: {
DtIconClose: l,
DtButton: _
},
props: {
/**
* Label for the visually hidden close button
* Required if visuallyHiddenClose is set to `true`
*/
visuallyHiddenCloseLabel: {
type: String,
default: null
}
},
emits: ["close"],
methods: {
close() {
this.$emit("close");
}
}
};
function f(y, b, t, C, h, o) {
const n = e("dt-icon-close"), s = e("dt-button");
return c(), r(s, {
id: "sr-only-close-button",
"data-qa": "dt-sr-only-close-button",
class: "d-vi-visible-sr",
"aria-label": t.visuallyHiddenCloseLabel,
onClick: o.close,
onKeydown: i(a(o.close, ["prevent", "stop"]), ["space"])
}, {
default: d(() => [
m(n)
]),
_: 1
}, 8, ["aria-label", "onClick", "onKeydown"]);
}
const x = /* @__PURE__ */ p(u, [["render", f]]);
export {
x as default
};
//# sourceMappingURL=sr_only_close_button.js.map