UNPKG

vue-circle-flags

Version:

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

55 lines (54 loc) 1.97 kB
import { defineComponent as n, computed as l, openBlock as i, createElementBlock as c, createElementVNode as e, toDisplayString as h, createCommentVNode as v, normalizeStyle as d } from "vue"; const _ = ["viewBox"], f = /* @__PURE__ */ e("mask", { id: "a42f27b8-ae28-45c7-93c2-321829eae7b4" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), m = { mask: "url(#a42f27b8-ae28-45c7-93c2-321829eae7b4)" }, u = { key: 0 }, k = /* @__PURE__ */ e("path", { fill: "#eee", d: "M0 256V96l32-32L0 32V0h32l32 32L96 0h416v64l-32 64 32 64v64l-32 64 32 64v64l-256 32L0 448v-64l32-64z" }, null, -1), p = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "m173 128 83 83v-19h256v-64L384 96l-128 32Zm-45 45v83h83zM0 320v64h512v-64l-256-32Z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M32 0v32H0v64h32v160H0v64h512v-64H96V96h160v32h256V64H256V32H96V0H32zm224 256v-31l-97-97h-31l128 128zM0 448v64h512v-64H0z" }, null, -1), x = { fill: "none" }, V = ["r"], y = /* @__PURE__ */ n({ __name: "us-hi", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const t = r, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), a = l(() => 256 + t.strokeWidth / 2); return (w, z) => (i(), c("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ f, e("g", m, [ t.flagName ? (i(), c("title", u, h(t.flagName), 1)) : v("", !0), k, p, g ]), e("g", x, [ e("circle", { cx: "256", cy: "256", r: a.value, fill: "none", style: d({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, V) ]) ], 8, _)); } }); export { y as default }; //# sourceMappingURL=us-hi-5ec9e738.js.map