UNPKG

vue-circle-flags

Version:

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

60 lines (59 loc) 1.9 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/us-co.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "fbe03ab5-bd7d-43df-a4bb-a1d7e5df84e2" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#fbe03ab5-bd7d-43df-a4bb-a1d7e5df84e2)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#0052b4", d: "M0 0h512v167l-64 89 64 89v167H0V345l64-89-64-89Z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#eee", d: "M0 167h512v178H0z" }, null, -1), m = /*#__PURE__*/ r("path", { fill: "#d80027", d: "M344.3 299.8A128 128 0 0 1 201.8 382 128 128 0 0 1 96 256a128 128 0 0 1 105.8-126 128 128 0 0 1 142.5 82.2L224 256z" }, null, -1), h = /*#__PURE__*/ r("circle", { cx: "224", cy: "256", r: "64", fill: "#ffda44" }, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({ __name: "us-co", 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=us-co-D6VS-yUv.js.map