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.26 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/gb-nir.vue?vue&type=script&setup=true&lang.ts
var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "adf5254f-68c9-4837-bbe5-fdc3dcb7af01" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), d = { mask: "url(#adf5254f-68c9-4837-bbe5-fdc3dcb7af01)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#eee\" d=\"M0 0h224l32 32 32-32h224v224l-32 32 32 32v224H288l-32-32-32 32H0V288l32-32-32-32Z\"></path><path fill=\"#d80027\" d=\"M224 0v224H0v64h224v224h64V288h224v-64H288V0Z\"></path><path fill=\"#acabb1\" d=\"m256 104-44 76h-87l43 76-43 76h87l44 76 44-76h87l-43-76 43-76h-87z\"></path><path fill=\"#eee\" d=\"m256 131-36 62h-73l37 63-37 63h73l36 63 36-63h73l-37-63 37-63h-73l-36-62z\"></path><path fill=\"#d80027\" d=\"M259 195c-5 0-5 5-5 5v39h-3v-33s0-6-5-6c-6 0-6 6-6 6v35l-3 1v-25s0-6-5-6c-6 0-6 6-6 6v43c0 10 5 20 12 26v21h36v-17c9-5 16-14 18-25 0-6 2-11 4-16l4-14s1-5-4-7-7 3-7 3l-8 19h-3v-47s0-5-5-5c-6 0-6 5-6 5v36h-2v-39s0-5-6-5z\"></path><path fill=\"#ffda44\" d=\"M245 38v11h-11v22h11v21c-6-6-14-9-22-9a33 33 0 0 0-23 57v20h112v-20c6-7 10-15 10-24a33 33 0 0 0-55-24V71h11V49h-11V38Z\"></path>", 6), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({
__name: "gb-nir",
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=gb-nir-CakhjjSO.js.map