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.78 kB
JavaScript
import { defineComponent as n, computed as o, openBlock as c, createElementBlock as a, createElementVNode as t, toDisplayString as d, createCommentVNode as _, normalizeStyle as h } from "vue";
const m = ["viewBox"], f = /* @__PURE__ */ t("mask", { id: "4c60289c-4e5d-41d9-ac6c-57f29e36aaea" }, [
/* @__PURE__ */ t("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})
], -1), v = { mask: "url(#4c60289c-4e5d-41d9-ac6c-57f29e36aaea)" }, u = { key: 0 }, k = /* @__PURE__ */ t("path", {
fill: "#eee",
d: "M0 0h512v186l-64 48 64 48v57l-64 48 64 48v77H0v-77l64-48-64-48v-57l64-48-64-48Z"
}, null, -1), p = /* @__PURE__ */ t("path", {
fill: "#d80027",
d: "M0 186h512v96H0zm0 153h512v96H0zm224-181 83-60H205l83 60-32-98Zm118 0 83-60H323l83 60-32-98Zm-236 0 83-60H87l83 60-32-98Z"
}, null, -1), g = { fill: "none" }, x = ["r"], W = /* @__PURE__ */ n({
__name: "us-dc",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
const e = i, l = o(() => 512 + 2 * e.strokeWidth), s = o(() => -e.strokeWidth), r = o(() => 256 + e.strokeWidth / 2);
return (w, y) => (c(), a("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${s.value} ${s.value} ${l.value} ${l.value}`
}, [
f,
t("g", v, [
e.flagName ? (c(), a("title", u, d(e.flagName), 1)) : _("", !0),
k,
p
]),
t("g", g, [
t("circle", {
cx: "256",
cy: "256",
r: r.value,
fill: "none",
style: h({ stroke: e.strokeColor, strokeWidth: e.strokeWidth })
}, null, 12, x)
])
], 8, m));
}
});
export {
W as default
};
//# sourceMappingURL=us-dc-99207ff8.js.map