vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
51 lines (50 loc) • 1.69 kB
JavaScript
import { defineComponent as a, computed as o, openBlock as c, createElementBlock as r, createElementVNode as t, toDisplayString as d, createCommentVNode as _, normalizeStyle as f } from "vue";
const h = ["viewBox"], u = /* @__PURE__ */ t("mask", { id: "969960cf-4714-4258-b369-cf2b92b85483" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), m = { mask: "url(#969960cf-4714-4258-b369-cf2b92b85483)" }, k = { key: 0 }, p = /* @__PURE__ */ t("path", {
fill: "#eee",
d: "M0 256 256 28l256 228v256H0Z"
}, null, -1), v = /* @__PURE__ */ t("path", {
fill: "#0052b4",
d: "m114 256 142 228 142-228-142 57ZM0 0h512v256H398L256 28 114 256H0Z"
}, null, -1), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ a({
__name: "aq-true_south",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), n = o(() => 256 + e.strokeWidth / 2);
return (b, w) => (c(), r("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
u,
t("g", m, [
e.flagName ? (c(), r("title", k, d(e.flagName), 1)) : _("", !0),
p,
v
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: n.value,
fill: "none",
style: f({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, h));
}
});
export {
W as default
};
//# sourceMappingURL=aq-true_south-50e31a94.js.map