UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

54 lines (53 loc) 1.87 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/cw.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "3fb7f967-d0b4-4923-9d25-03e8fcd2c7ea" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#3fb7f967-d0b4-4923-9d25-03e8fcd2c7ea)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#0052b4", d: "M0 0h512v342.3l-22 34.2 22 32.5v103H0V409l25.4-31L0 342.2z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#eee", d: "m175.2 164.2 13.8 42.5h44.7L197.6 233l13.8 42.5-36.2-26.3-36.1 26.3 13.8-42.5-36.2-26.3h44.7zm-76.7-44.5 8.2 25.5h26.9L111.9 161l8.3 25.5-21.7-15.7-21.7 15.7L85 161l-21.7-15.7h26.9z" }, null, -1), m = /*#__PURE__*/ r("path", { fill: "#ffda44", d: "M0 342.3h512V409H0z" }, null, -1), h = { fill: "none" }, g = ["r"], _ = /* @__PURE__ */ i({ __name: "cw", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { let _ = i, v = e(() => 512 + 2 * _.strokeWidth), y = e(() => -_.strokeWidth), b = e(() => 256 + _.strokeWidth / 2); return (e, i) => (o(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${y.value} ${y.value} ${v.value} ${v.value}` }, [ l, r("g", u, [ _.flagName ? (o(), n("title", d, s(_.flagName), 1)) : t("", !0), f, p, m ]), r("g", h, [r("circle", { cx: "256", cy: "256", r: b.value, fill: "none", style: a({ stroke: _.strokeColor, strokeWidth: _.strokeWidth }) }, null, 12, g)]) ], 8, c)); } }); //#endregion export { _ as default }; //# sourceMappingURL=cw-BFKHUv0A.js.map