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.51 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/id-jt.vue?vue&type=script&setup=true&lang.ts
var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "922d2d78-76b8-4670-8027-ef9836a8cfa6" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), d = { mask: "url(#922d2d78-76b8-4670-8027-ef9836a8cfa6)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#ffda44\" d=\"M0 0h512v512H0Z\"></path><path fill=\"#d80027\" d=\"m256 114-6 2-95 78c-4 3-4 9-1 13l102-33 102 33c3-4 3-10-1-13l-95-78-6-2z\"></path><path fill=\"#eee\" d=\"M278 231h-1zm-43 0z\"></path><path fill=\"#6da544\" d=\"m256 134-99 72 6 22 51-32 42 25 42-25 51 32 6-22z\"></path><path fill=\"#333\" d=\"m256 191-28 60-9-21-10 21-7-16-10 21-7-16-13 27 14 23h140l14-23-12-27-8 16-10-21-7 16-10-21-9 21zm-62 134zm124 0z\"></path><path fill=\"#338af3\" d=\"m183 290 11 32h124l11-32h-73z\"></path><path fill=\"#eee\" d=\"M256 129a4 4 0 0 0-2 1l-100 73a4 4 0 0 0-2 4l38 117a4 4 0 0 0 4 3h124a4 4 0 0 0 4-3l38-117a4 4 0 0 0-2-4l-100-73a4 4 0 0 0-2-1zm0 9 95 70-36 111H197l-36-111 95-70z\"></path><rect width=\"9\" height=\"142\" x=\"252\" y=\"170\" fill=\"#ff9811\" rx=\"4.5\" ry=\"4.5\"></rect><rect width=\"128\" height=\"24\" x=\"192\" y=\"338\" fill=\"#d80027\" rx=\"12\" ry=\"12\"></rect><rect width=\"160\" height=\"24\" x=\"176\" y=\"350\" fill=\"#eee\" rx=\"12\" ry=\"12\"></rect><path fill=\"#ffda44\" d=\"m242 191 14-42 14 42-36-26h44z\"></path>", 11), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({
__name: "id-jt",
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=id-jt-SgVGTYcE.js.map