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.82 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/si.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "f966ebf5-836b-41cc-a7e9-d189e83aa08e" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#f966ebf5-836b-41cc-a7e9-d189e83aa08e)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#0052b4\" d=\"m0 167 253.8-19.3L512 167v178l-254.9 32.3L0 345z\"></path><path fill=\"#eee\" d=\"M0 0h512v167H0z\"></path><path fill=\"#d80027\" d=\"M0 345h512v167H0z\"></path><path fill=\"#0052b4\" d=\"M222.7 167v-66.8H89V167l67 82.6z\"></path><path fill=\"#eee\" d=\"M89 167v22.2c0 51.1 66.8 66.8 66.8 66.8s66.8-15.7 66.8-66.8V167l-22.3 22.2-44.5-33.4-44.5 33.4z\"></path>", 5), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "si", 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=si-BJCpkEcA.js.map