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.05 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/va.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "9efe0c19-7ac3-43cc-8127-4b12347e78f0" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#9efe0c19-7ac3-43cc-8127-4b12347e78f0)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#ffda44", d: "M0 0h256l51.7 254.7L256 512H0z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#eee", d: "M256 0h256v512H256z" }, null, -1), m = /*#__PURE__*/ r("path", { fill: "#acabb1", d: "m354 222.8 48.1 63.6A33.4 33.4 0 1 0 420 273l-75-99.2-17.7 13.4-26.7 20.2 26.9 35.5 26.6-20.1zm69.3 73.1a11.1 11.1 0 1 1 13.4 17.8 11.1 11.1 0 0 1-13.4-17.8z" }, null, -1), h = /*#__PURE__*/ r("path", { fill: "#ffda44", d: "m436.6 242.9 26.8-35.5-26.6-20.2-17.8-13.4-75 99.2a33.4 33.4 0 1 0 17.8 13.4l48-63.6 26.8 20zm-93.8 68.6a11.1 11.1 0 1 1-17.8-13.4 11.1 11.1 0 0 1 17.8 13.4z" }, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({ __name: "va", 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=va-CMDkLdMF.js.map