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.13 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/np.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "44fd6754-6fc4-4b98-ab46-0b2db6876a5b" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#44fd6754-6fc4-4b98-ab46-0b2db6876a5b)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#eee", d: "M228.4 0H512v512h-27.4L159.4 258.5z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#0052b4", d: "M510.5 283.8 228.5 0h-39.3l-70.9 253.8L445.2 512h39.4L256.4 283.8h254z" }, null, -1), m = /*#__PURE__*/ r("path", { fill: "#d80027", d: "M445.2 256 189.2 0H0v512h445.2l-256-256z" }, null, -1), h = /*#__PURE__*/ r("path", { fill: "#eee", d: "m243.5 378-31.3-14.7L229 333l-34 6.5-4.3-34.3-23.6 25.2-23.7-25.2-4.3 34.3-34-6.5 16.7 30.3L90.4 378l31.3 14.7-16.6 30.3 34-6.5 4.2 34.3 23.7-25.2 23.6 25.2 4.3-34.3 34 6.5-16.7-30.3zM149.8 89l-3.2 25-24.7-4.7 12.1 22-22.7 10.7h-11.1a66.8 66.8 0 0 0 133.5 0h-11.1L200 131.3l12-22-24.6 4.7-3.1-25-17.2 18.4z" }, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({ __name: "np", 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=np-DKDlrfc7.js.map