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.01 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/us-ga.vue?vue&type=script&setup=true&lang.ts
var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "c3a490d0-3dcd-494d-b6c4-bd00ed9168c7" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), d = { mask: "url(#c3a490d0-3dcd-494d-b6c4-bd00ed9168c7)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#d80027\" d=\"M512 0v171l-64 85 64 85v171H0V341L341 0Z\"></path><path fill=\"#eee\" d=\"M341 171h171v170H341l-64-85z\"></path><path fill=\"#0052b4\" d=\"M0 0h341v341H0Z\"></path><path fill=\"#ffda44\" d=\"M184 133a40 40 0 0 0-40 40v60h80v-60a40 40 0 0 0-40-40z\"></path><path fill=\"#eee\" d=\"m167 105 52-37h-64l52 37-20-61zm101 62 37 52v-64l-37 52 61-20zm-62 101-52 37h64l-52-37 20 61zm-101-61-37-52v64l37-52-61 20zm125-92 63 10-45-45 10 63 29-57zm28 115-10 63 45-45-63 10 57 29zm-115 28-63-10 45 45-10-63-29 57Zm-28-115 10-63-45 45 63-10-57-29Z\"></path>", 5), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({
__name: "us-ga",
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=us-ga-Phwgbgds.js.map