vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
40 lines (39 loc) • 2.43 kB
JavaScript
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createStaticVNode as i, defineComponent as a, normalizeStyle as o, openBlock as s, toDisplayString as c } from "vue";
//#region src/components/flags/cc.vue?vue&type=script&setup=true&lang.ts
var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "51e6a377-be57-4d21-b78d-7b421a629dbf" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), d = { mask: "url(#51e6a377-be57-4d21-b78d-7b421a629dbf)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#6da544\" d=\"M0 0h512v512H0z\"></path><g fill=\"#ffda44\"><path d=\"m393 367.3 7 14.7 15.9-3.7-7.1 14.7 12.7 10-15.9 3.7V423L393 412.8 380.3 423v-16.3l-15.9-3.6 12.8-10.1-7.1-14.7L386 382zm-65.4-155.8 7 14.7 16-3.7-7.2 14.7 12.8 10-16 3.6.1 16.3-12.7-10.2-12.7 10.2v-16.3l-15.8-3.5 12.7-10.1-7-14.7 15.8 3.7zm65.4-89 7 14.6 15.9-3.6-7.1 14.6 12.7 10.1-15.9 3.6v16.3L393 167.9l-12.7 10.2v-16.3l-15.9-3.6 12.8-10-7.1-14.7L386 137zm57 66.7 7 14.7 16-3.7-7.1 14.7 12.7 10.1-15.9 3.6v16.3l-12.6-10.2-12.7 10.2v-16.3l-15.9-3.6 12.8-10.1-7.1-14.7L443 204zm-40.8 78 5.6 17h17.9l-14.5 10.4 5.5 17-14.5-10.5-14.4 10.6 5.5-17-14.5-10.6h18z\"></path><path d=\"M283.8 328.3a72.3 72.3 0 1 1 34.4-136 89 89 0 1 0 0 127.3 72 72 0 0 1-34.4 8.7zM161 100.2a44.5 44.5 0 0 0-77.1 0h77zm.1.2-38.7 38.7-38.7-38.7a44.3 44.3 0 0 0-5.8 22 44.5 44.5 0 1 0 89 0 44.3 44.3 0 0 0-5.8-22z\"></path></g><path fill=\"#a2001d\" d=\"M111.3 128v37.6a44.6 44.6 0 0 0 11.1 1.4c3.9 0 7.6-.5 11.2-1.4V128h-22.3z\"></path>", 3), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({
__name: "cc",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
let a = i, g = e(() => 512 + 2 * a.strokeWidth), _ = e(() => -a.strokeWidth), v = e(() => 256 + a.strokeWidth / 2);
return (e, i) => (s(), n("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${_.value} ${_.value} ${g.value} ${g.value}`
}, [
u,
r("g", d, [a.flagName ? (s(), n("title", f, c(a.flagName), 1)) : t("", !0), p]),
r("g", m, [r("circle", {
cx: "256",
cy: "256",
r: v.value,
fill: "none",
style: o({
stroke: a.strokeColor,
strokeWidth: a.strokeWidth
})
}, null, 12, h)])
], 8, l));
}
});
//#endregion
export { g as default };
//# sourceMappingURL=cc-Cn7aa-TB.js.map