UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

59 lines (58 loc) 2.39 kB
import { defineComponent as r, computed as l, openBlock as a, createElementBlock as i, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as f } from "vue"; const _ = ["viewBox"], m = /* @__PURE__ */ e("mask", { id: "c277d026-11b1-4fde-a6fa-19ff192e9d99" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), u = { mask: "url(#c277d026-11b1-4fde-a6fa-19ff192e9d99)" }, v = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 0h512v512H0z" }, null, -1), z = /* @__PURE__ */ e("path", { fill: "#eee", d: "m365.9 273.9 46-17.9-46-17.9-25.3-9.8-41-16-16-41a89.4 89.4 0 0 1 57 57l25.3 9.8a112 112 0 0 0-92-92l-17.9-46-17.9 46a112 112 0 0 0-92 92l-46 17.9 46 17.9a112 112 0 0 0 92 92l17.9 46 17.9-46a112 112 0 0 0 92-92zm-83.5-44.3L256 256h94.4l-68 26.4L256 256v94.4l-26.4-68L256 256h-94.4l68-26.4L256 256v-94.4zm-54-58.2-16 41-41 16a89.4 89.4 0 0 1 57-57zm-57 112.3 41 16 16 41a89.4 89.4 0 0 1-57-57zm112.3 57 16-41 41-16a89.4 89.4 0 0 1-57 57z" }, null, -1), k = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M350.4 256H256l26.4 26.4zm-188.8 0H256l-26.4-26.4zm94.4 94.4V256l-26.4 26.4zm0-94.4 26.4-26.4-26.4-68z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#eee", d: "M244.9 33.4H267v44.5h-22zM33.4 244.9h44.5V267H33.4zM244.9 434H267v44.5h-22zM434 244.9h44.5V267H434z" }, null, -1), x = { fill: "none" }, w = ["r"], W = /* @__PURE__ */ r({ __name: "nato", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(c) { const t = c, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), n = l(() => 256 + t.strokeWidth / 2); return (H, y) => (a(), i("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ m, e("g", u, [ t.flagName ? (a(), i("title", v, d(t.flagName), 1)) : h("", !0), p, z, k, g ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: n.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, w) ]) ], 8, _)); } }); export { W as default }; //# sourceMappingURL=nato-8f14ac35.js.map