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.49 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/gd.vue?vue&type=script&setup=true&lang.ts
var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "9218091b-d25c-4e78-9fc8-af41b4d2f058" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), d = { mask: "url(#9218091b-d25c-4e78-9fc8-af41b4d2f058)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#ffda44\" d=\"M23.6 23.7h464.8v464.7H23.6z\"></path><path fill=\"#496e2d\" d=\"M0 75.1 38 38l436.3 436.4 37.7-37.5V75l-39.6-35.5L40.2 471.8 0 436.8z\"></path><circle cx=\"256\" cy=\"256.1\" r=\"89\" fill=\"#a2001d\"></circle><path fill=\"#ffda44\" d=\"m256 167 20 61.5h64.6l-52.3 38 20 61.3-52.3-38-52.3 38 20-61.3-52.3-38H236zM256 .2z\"></path><path fill=\"#a2001d\" d=\"M0 0h512v75.1H0zm0 436.8h512v75.1H0z\"></path><path fill=\"#ffda44\" d=\"m256 28 4.1 12.7h13.5l-10.9 8 4.2 12.6-10.9-7.9-10.8 8 4.1-12.8-10.9-8H252zm-62 0 4 12.7h13.5l-10.9 8 4.2 12.6-10.9-7.9-10.8 8 4.1-12.8-10.8-8h13.4zm124 0 4.2 12.7h13.4l-10.8 8 4.1 12.6-10.8-7.9-10.9 8 4.2-12.8-10.9-8H314zm-62 422.8 4.1 12.7h13.5l-10.9 8 4.2 12.7-10.9-8-10.8 8 4.1-12.8-10.9-7.9H252zm-62 0 4 12.7h13.5l-10.9 8 4.2 12.7-10.9-8-10.8 8 4.1-12.8-10.8-7.9h13.4zm124 0 4.2 12.7h13.4l-10.8 8 4.1 12.7-10.8-8-10.9 8 4.2-12.8-10.9-7.9H314zm-240-199a22.3 22.3 0 0 1-37.6 23.9c-12-18.8-5-49.5-5-49.5S66 233 78 251.9z\"></path><circle cx=\"65.1\" cy=\"273.2\" r=\"11.1\" fill=\"#a2001d\"></circle>", 7), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({
__name: "gd",
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=gd-B39GGHg8.js.map