@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
62 lines (61 loc) • 1.59 kB
JavaScript
import { DtIconBell as n, DtIconAlertCircle as r, DtIconAlertTriangle as c, DtIconCheckCircle as a, DtIconInfo as s } from "@dialpad/dialtone-icons/vue3";
import { NOTICE_KINDS as l } from "./notice-constants.js";
import { hasSlotContent as d } from "../../common/utils/index.js";
import { createElementBlock as m, createCommentVNode as f, openBlock as o, renderSlot as p, createBlock as u, resolveDynamicComponent as I } from "vue";
import { _ } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
const D = /* @__PURE__ */ new Map([
["info", s],
["success", a],
["warning", c],
["error", r],
["base", n]
]), C = {
compatConfig: { MODE: 3 },
name: "DtNoticeIcon",
components: {
DtIconInfo: s,
DtIconCheckCircle: a,
DtIconAlertTriangle: c,
DtIconAlertCircle: r,
DtIconBell: n
},
props: {
/**
* Kind of icon
* @values base, error, info, success, warning
*/
kind: {
type: String,
default: "base",
validate(e) {
return l.includes(e);
}
}
},
data() {
return {
hasSlotContent: d
};
},
computed: {
defaultIcon() {
return D.get(this.kind);
}
}
}, k = {
key: 0,
"aria-hidden": "true",
class: "d-notice__icon"
};
function h(e, g, N, S, i, t) {
return t.defaultIcon || i.hasSlotContent(e.$slots.default) ? (o(), m("div", k, [
p(e.$slots, "default", {}, () => [
(o(), u(I(t.defaultIcon), { size: "400" }))
])
])) : f("", !0);
}
const $ = /* @__PURE__ */ _(C, [["render", h]]);
export {
$ as default
};
//# sourceMappingURL=notice-icon.js.map