vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
50 lines (49 loc) • 2.45 kB
JavaScript
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeStyle as a, openBlock as o, toDisplayString as s } from "vue";
//#region src/components/flags/us-in.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "d35b468f-f353-4372-a23c-c916b02a5667" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#d35b468f-f353-4372-a23c-c916b02a5667)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#0052b4",
d: "M0 0h512v512H0z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#ffda44",
d: "M224 361h64l-52 37.5 20-61 20 61zm-79.2-32.8h64l-52 37.5 20-61 20 61zM112 249h64l-52 37.5 20-61 20 61zm144 145-12 8.6V451l12 21 12-21v-48.4zm6.7-207.7c-14.3 5.2-18.9 17.4-17.5 30.5a20.7 20.7 0 0 1-6.3-11.5 26 26 0 0 0-6 15.9 27.8 27.8 0 0 0 8.3 19.8H216v16h16l12 31h-12v16h12v44.4l12-36.6 12 36.6V304h12v-16h-12l12-31h16v-16h-23.3c7.6-8.5 8.6-23.3 1.9-34-.3 6.4-3.5 11.2-5.6 14.8-.9-11.8-11.2-18.8-6.3-35.5ZM224 63.5h64L236 101l20-61 20 61zm92.1 29.9h64l-52 37.5 20-61 20 61zm63.5 63.5h64l-52 37.5 20-61 20 61zm29.9 92.1h64l-52 37.5 20-61 20 61zm-29.9 92.1h64l-52 37.5 20-61 20 61zm-63.5 63.5h64l-52 37.5 20-61 20 61zm-184.2 0h64l-52 37.5 20-61 20 61zm-63.5-63.5h64l-52 37.5 20-61 20 61zM38.5 249h64l-52 37.5 20-61 20 61zm29.9-92.1h64l-52 37.5 20-61 20 61zm63.5-63.5h64l-52 37.5 20-61 20 61zM224 137h64l-52 37.5 20-61 20 61zm112 112h64l-52 37.5 20-61 20 61zm-32.8 79.2h64l-52 37.5 20-61 20 61z"
}, null, -1), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ i({
__name: "us-in",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
let g = i, _ = e(() => 512 + 2 * g.strokeWidth), v = e(() => -g.strokeWidth), y = e(() => 256 + g.strokeWidth / 2);
return (e, i) => (o(), n("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${v.value} ${v.value} ${_.value} ${_.value}`
}, [
l,
r("g", u, [
g.flagName ? (o(), n("title", d, s(g.flagName), 1)) : t("", !0),
f,
p
]),
r("g", m, [r("circle", {
cx: "256",
cy: "256",
r: y.value,
fill: "none",
style: a({
stroke: g.strokeColor,
strokeWidth: g.strokeWidth
})
}, null, 12, h)])
], 8, c));
}
});
//#endregion
export { g as default };
//# sourceMappingURL=us-in-BsB9Ogs0.js.map