UNPKG

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.29 kB
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/sz.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "d104ca52-b829-4a6a-be94-18103f1fd858" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#d104ca52-b829-4a6a-be94-18103f1fd858)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#ffda44\" d=\"m0 144.7 256-20.5 256 20.5V178l-37.4 79 37.4 77v33.3l-256 24.1L0 367.3V334l37.7-77.3L0 178z\"></path><path fill=\"#333\" d=\"M0 0h512v144.7H0z\"></path><path fill=\"#0052b4\" d=\"M0 367.3h512V512H0z\"></path><path fill=\"#a2001d\" d=\"M0 178h512v156H0z\"></path><path fill=\"#ffda44\" d=\"M89.2 244.9h334V267h-334zm44.6-44.6h244.8v22.3H133.8z\"></path><path fill=\"#eee\" d=\"m256.2 189.2-18 65.2 18 68.4c66.8 0 124-66.8 124-66.8s-57.2-66.8-124-66.8z\"></path><path fill=\"#333\" d=\"M256.2 322.8c-66.8 0-124-66.8-124-66.8s57.2-66.8 124-66.8\"></path><path fill=\"#eee\" d=\"M211.7 233.7h22.2v44.6h-22.2z\"></path><path fill=\"#333\" d=\"M278.5 233.7h22.2v44.6h-22.2z\"></path><g fill=\"#0052b4\" transform=\"translate(.2)\"><circle cx=\"89\" cy=\"256\" r=\"22.3\"></circle><circle cx=\"423\" cy=\"256\" r=\"22.3\"></circle></g>", 10), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "sz", 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=sz-nVuZiIg6.js.map