UNPKG

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.45 kB
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/tk.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "20aa2ba3-cee0-4a99-9225-c9e34570f29c" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#20aa2ba3-cee0-4a99-9225-c9e34570f29c)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#0052b4", d: "M0 0h512v512H0z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#eee", d: "m188 133.6 5.6 17h17.9L197 161l5.5 17-14.4-10.5-14.5 10.5 5.5-17-14.4-10.5h17.8zM115.5 256l7 21.3h22.3l-18 13 6.8 21.4-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zm0-178 7 21.2h22.3l-18 13.1 6.8 21.3-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zM59.8 178l6.9 21.3H89l-18 13.2 6.9 21.2-18.1-13.1-18.1 13.1 7-21.2-18.2-13.2H53z" }, null, -1), m = /*#__PURE__*/ r("path", { fill: "#eee", d: "m188 133.6 5.6 17h17.9L197 161l5.5 17-14.4-10.5-14.5 10.5 5.5-17-14.4-10.5h17.8zM115.5 256l7 21.3h22.3l-18 13 6.8 21.4-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zm0-178 7 21.2h22.3l-18 13.1 6.8 21.3-18-13.2-18.1 13.2 6.9-21.3-18.1-13.1h22.3zM59.8 178l6.9 21.3H89l-18 13.2 6.9 21.2-18.1-13.1-18.1 13.1 7-21.2-18.2-13.2H53z" }, null, -1), h = /*#__PURE__*/ r("path", { fill: "#ffda44", d: "M411.8 122.4 144.7 345h361.7v-35.8a167.4 167.4 0 0 1-97.9-152.3c0-11.7 1-23.5 3.3-34.5zm94.6 244.9H144.7v33.4h361.7z" }, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({ __name: "tk", 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=tk-D15O7GQ6.js.map