UNPKG

@dialpad/dialtone-icons

Version:
68 lines (67 loc) 2.69 kB
import { I as l } from "../../constants-DeVuDy8J.js"; import { openBlock as i, createElementBlock as d, normalizeClass as n, createElementVNode as c } from "vue"; import { _ as o } from "../../_plugin-vue_export-helper-CHgC5LLL.js"; const s = { name: "DtIconFlag", props: { /** * The size of the icon. * @values 100, 200, 300, 400, 500, 600, 700, 800 */ size: { type: String, default: "500", validator: (e) => Object.keys(l).includes(e) }, /** * The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational */ ariaLabel: { type: String, default: void 0 } }, /** * @TODO: Remove this emit once the icons migration is complete, * they will no longer need this event. * */ emits: ["loaded"], computed: { iconSizeClass() { return l[this.size]; }, ariaHidden() { return this.ariaLabel ? "false" : "true"; }, dataQA() { return this.$attrs["data-qa"] ?? "dt-icon"; } }, created() { this.$emit("loaded"); } }, m = ["aria-label", "data-qa", "aria-hidden"]; function u(e, t, r, _, f, a) { return i(), d("svg", { "aria-label": r.ariaLabel, class: n([a.iconSizeClass, "d-icon d-icon--flag"]), "data-qa": a.dataQA, "aria-hidden": a.ariaHidden, role: "img", "data-name": "Flag", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12" }, [...t[0] || (t[0] = [ c("path", { fill: "currentColor", "fill-rule": "evenodd", d: "M2.252.786C2.63.635 3.194.5 4 .5c.847 0 1.548.28 2.158.525l.028.01C6.82 1.29 7.36 1.5 8 1.5c.694 0 1.13-.115 1.377-.214a1.341 1.341 0 0 0 .28-.15.5.5 0 0 1 .843.364v6a.5.5 0 0 1-.146.354L10 7.5l.354.354h-.002v.002l-.003.002-.005.005-.014.013c-.01.009-.022.02-.037.031a1.271 1.271 0 0 1-.117.087c-.1.066-.24.145-.428.22C9.37 8.365 8.806 8.5 8 8.5c-.847 0-1.548-.28-2.158-.525l-.028-.01C5.18 7.71 4.64 7.5 4 7.5c-.694 0-1.13.115-1.377.214a1.688 1.688 0 0 0-.123.055V11a.5.5 0 0 1-1 0V1.5a.5.5 0 0 1 .146-.354L2 1.5l-.354-.354h.002v-.002l.003-.002.005-.005.014-.013c.01-.009.022-.02.037-.031.029-.025.068-.054.117-.087a2.33 2.33 0 0 1 .428-.22Zm.248.983v4.93c.364-.113.854-.199 1.5-.199.847 0 1.548.28 2.158.525l.028.01C6.82 7.29 7.36 7.5 8 7.5c.694 0 1.13-.115 1.377-.214a2.79 2.79 0 0 0 .123-.055v-4.93c-.364.113-.854.199-1.5.199-.847 0-1.548-.28-2.158-.525l-.028-.01C5.18 1.71 4.64 1.5 4 1.5c-.694 0-1.13.115-1.377.214a1.688 1.688 0 0 0-.123.055Z", "clip-rule": "evenodd" }, null, -1) ])], 10, m); } const g = /* @__PURE__ */ o(s, [["render", u]]); export { g as default }; //# sourceMappingURL=flag.js.map