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) 1.85 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/pa.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "576147fe-1fc0-4eae-9cb2-e749c0624e4f" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#576147fe-1fc0-4eae-9cb2-e749c0624e4f)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#eee\" d=\"M0 0h256l256 256v256H256L0 256z\"></path><path fill=\"#0052b4\" d=\"M0 256v256h256V256z\"></path><path fill=\"#d80027\" d=\"M256 0h256v256H256z\"></path><path fill=\"#0052b4\" d=\"m152.4 89 16.6 51h53.6l-43.4 31.6 16.6 51-43.4-31.5-43.4 31.5 16.6-51L82.2 140h53.6z\"></path><path fill=\"#d80027\" d=\"m359.6 289.4 16.6 51h53.6L386.4 372l16.6 51-43.4-31.5-43.4 31.6 16.6-51-43.4-31.6H343z\"></path>", 5), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "pa", 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=pa-CMuW2S2Q.js.map