vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
60 lines (59 loc) • 2.27 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/kg.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "2ff88a24-f172-4d38-a402-9e6e2ffea2df" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#2ff88a24-f172-4d38-a402-9e6e2ffea2df)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#d80027",
d: "M0 0h512v512H0z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#ffda44",
d: "M381.2 256 330 280l27.3 49.6-55.6-10.6-7 56.1-38.7-41.3-38.7 41.3-7-56.1-55.6 10.6 27.3-49.5-51.2-24.1 51.2-24-27.3-49.6 55.6 10.6 7-56.1 38.7 41.3 38.7-41.3 7 56.1 55.6-10.6-27.3 49.5z"
}, null, -1), m = /*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "77.9",
fill: "#d80027"
}, null, -1), h = /*#__PURE__*/ r("path", {
fill: "#ffda44",
d: "M217 256c-1.8 0-3.7.1-5.5.3a44.3 44.3 0 0 0 10.4 28.3 78 78 0 0 1 15-24.9A55.4 55.4 0 0 0 217 256zm24 42a44.4 44.4 0 0 0 30 0c-2.6-10-7.8-19-15-26-7.2 7-12.4 16-15 26zm53.6-64.3a44.5 44.5 0 0 0-77.2 0 77.4 77.4 0 0 1 38.6 10.5 77.4 77.4 0 0 1 38.6-10.5zm-19.6 26a78 78 0 0 1 15.1 25 44.3 44.3 0 0 0 10.4-28.4 55.8 55.8 0 0 0-5.5-.3 55.3 55.3 0 0 0-20 3.7z"
}, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({
__name: "kg",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
let v = i, y = e(() => 512 + 2 * v.strokeWidth), b = e(() => -v.strokeWidth), x = e(() => 256 + v.strokeWidth / 2);
return (e, i) => (o(), n("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${b.value} ${b.value} ${y.value} ${y.value}`
}, [
l,
r("g", u, [
v.flagName ? (o(), n("title", d, s(v.flagName), 1)) : t("", !0),
f,
p,
m,
h
]),
r("g", g, [r("circle", {
cx: "256",
cy: "256",
r: x.value,
fill: "none",
style: a({
stroke: v.strokeColor,
strokeWidth: v.strokeWidth
})
}, null, 12, _)])
], 8, c));
}
});
//#endregion
export { v as default };
//# sourceMappingURL=kg-B0g0dUsd.js.map