vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
58 lines (57 loc) • 2.34 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/nato.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "c277d026-11b1-4fde-a6fa-19ff192e9d99" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#c277d026-11b1-4fde-a6fa-19ff192e9d99)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#0052b4",
d: "M0 0h512v512H0z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "m365.9 273.9 46-17.9-46-17.9-25.3-9.8-41-16-16-41a89.4 89.4 0 0 1 57 57l25.3 9.8a112 112 0 0 0-92-92l-17.9-46-17.9 46a112 112 0 0 0-92 92l-46 17.9 46 17.9a112 112 0 0 0 92 92l17.9 46 17.9-46a112 112 0 0 0 92-92zm-83.5-44.3L256 256h94.4l-68 26.4L256 256v94.4l-26.4-68L256 256h-94.4l68-26.4L256 256v-94.4zm-54-58.2-16 41-41 16a89.4 89.4 0 0 1 57-57zm-57 112.3 41 16 16 41a89.4 89.4 0 0 1-57-57zm112.3 57 16-41 41-16a89.4 89.4 0 0 1-57 57z"
}, null, -1), m = /*#__PURE__*/ r("path", {
fill: "#0052b4",
d: "M350.4 256H256l26.4 26.4zm-188.8 0H256l-26.4-26.4zm94.4 94.4V256l-26.4 26.4zm0-94.4 26.4-26.4-26.4-68z"
}, null, -1), h = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "M244.9 33.4H267v44.5h-22zM33.4 244.9h44.5V267H33.4zM244.9 434H267v44.5h-22zM434 244.9h44.5V267H434z"
}, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({
__name: "nato",
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=nato-Ddkt4EFL.js.map