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.03 kB
JavaScript
import { defineComponent as a, computed as l, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as f, createCommentVNode as h, normalizeStyle as d } from "vue";
const _ = ["viewBox"], v = /* @__PURE__ */ e("mask", { id: "fdb68cf1-e404-4fef-bf55-a32f01a2e1c3" }, [
/* @__PURE__ */ e("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), u = { mask: "url(#fdb68cf1-e404-4fef-bf55-a32f01a2e1c3)" }, m = { key: 0 }, p = /* @__PURE__ */ e("path", {
fill: "#0052b4",
d: "M0 0h144.7l108.4 41.2L367.3 0H512v512H367.3l-110.2-41.4L144.7 512H0z"
}, null, -1), k = /* @__PURE__ */ e("path", {
fill: "#ffda44",
d: "M144.7 0h222.6v512H144.7z"
}, null, -1), g = /* @__PURE__ */ e("path", {
fill: "#d80027",
d: "m328.4 278.3 16.7 22.2v-89l-16.7 22.2h-50v-50l22.2-16.7h-89l22.2 16.7v50h-50l-16.7-22.2v89l16.7-22.2h50v50L211.6 345h89l-22.2-16.7v-50z"
}, null, -1), x = /* @__PURE__ */ e("path", {
fill: "#eee",
d: "M323 244.9h-56v-55.7h-22V245h-55.7v22H245v55.7h22V267h55.7z"
}, null, -1), w = { fill: "none" }, y = ["r"], B = /* @__PURE__ */ a({
__name: "pt-30",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(n) {
const t = n, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), r = l(() => 256 + t.strokeWidth / 2);
return (z, W) => (i(), c("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${o.value} ${o.value}`
}, [
v,
e("g", u, [
t.flagName ? (i(), c("title", m, f(t.flagName), 1)) : h("", !0),
p,
k,
g,
x
]),
e("g", w, [
e("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: d({ stroke: t.strokeColor, strokeWidth: t.strokeWidth })
}, null, 12, y)
])
], 8, _));
}
});
export {
B as default
};
//# sourceMappingURL=pt-30-d4502822.js.map