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/pm.vue?vue&type=script&setup=true&lang.ts
var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "d0417b1c-0e5a-4d93-894d-4f70edf8252b" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), d = { mask: "url(#d0417b1c-0e5a-4d93-894d-4f70edf8252b)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#338af3\" d=\"M160 0h352v512H160l-32-256z\"></path><path fill=\"#eee\" d=\"m0 160 80-32 80 32v192l-80 32-80-32z\"></path><rect width=\"160\" height=\"160\" fill=\"#d80027\" ry=\"0\"></rect><path fill=\"#6da544\" d=\"M160 21V0h-20L0 139v21h20z\"></path><path fill=\"#6da544\" d=\"M0 21V0h20l140 139v21h-20z\"></path><path fill=\"#eee\" d=\"M0 64h160v32H0z\"></path><path fill=\"#eee\" d=\"M64 0h32v160H64z\"></path><path fill=\"#d80027\" d=\"M0 512h160V352H0z\"></path><path fill=\"#ffda44\" d=\"M340 146v158h-40c-24 0-24-32-24-32h-96v32h20l147 32 145-32v-24h-80s0 24-24 24h-32V146z\"></path><path fill=\"#ffda44\" d=\"M356 138v32c-31-11-61 8-80-32 33 23 51-10 80 0zm-72 46s-24 24-16 72h-72s32-56 88-72zm16 104h95c-31-48 0-104 0-104h-95s-40 56 0 104zm101-24a96 96 0 0 1 4-64h63s-16 32-1 64zm-101 40h192s-8 0-16 24-16 48-56 48H276c-39 0-52-50-76-72z\"></path><rect width=\"96\" height=\"32\" x=\"32\" y=\"384\" fill=\"#ffda44\" rx=\"16\" ry=\"16\"></rect><rect width=\"96\" height=\"32\" x=\"32\" y=\"448\" fill=\"#ffda44\" rx=\"16\" ry=\"16\"></rect>", 12), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({
__name: "pm",
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=pm-F6GYcVyG.js.map