UNPKG

vue-circle-flags

Version:

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

59 lines (58 loc) 2.18 kB
import { defineComponent as a, computed as l, openBlock as i, createElementBlock as n, createElementVNode as e, toDisplayString as d, createCommentVNode as h, normalizeStyle as f } from "vue"; const m = ["viewBox"], _ = /* @__PURE__ */ e("mask", { id: "f1f3e6b8-ffa0-4b59-9553-5efd4188b450" }, [ /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) ], -1), v = { mask: "url(#f1f3e6b8-ffa0-4b59-9553-5efd4188b450)" }, u = { key: 0 }, p = /* @__PURE__ */ e("path", { fill: "#eee", d: "M256 0h256v64l-32 32 32 32v64l-32 32 32 32v64l-32 32 32 32v64l-256 32L0 448v-64l32-32-32-32v-64z" }, null, -1), k = /* @__PURE__ */ e("path", { fill: "#d80027", d: "M224 64h288v64H224Zm0 128h288v64H256ZM0 320h512v64H0Zm0 128h512v64H0Z" }, null, -1), g = /* @__PURE__ */ e("path", { fill: "#0052b4", d: "M0 0h256v256H0Z" }, null, -1), H = /* @__PURE__ */ e("path", { fill: "#eee", d: "m187 243 57-41h-70l57 41-22-67zm-81 0 57-41H93l57 41-22-67zm-81 0 57-41H12l57 41-22-67zm162-81 57-41h-70l57 41-22-67zm-81 0 57-41H93l57 41-22-67zm-81 0 57-41H12l57 41-22-67Zm162-82 57-41h-70l57 41-22-67Zm-81 0 57-41H93l57 41-22-67zm-81 0 57-41H12l57 41-22-67Z" }, null, -1), z = { fill: "none" }, x = ["r"], y = /* @__PURE__ */ a({ __name: "us", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(r) { const t = r, o = l(() => 512 + 2 * t.strokeWidth), s = l(() => -t.strokeWidth), c = l(() => 256 + t.strokeWidth / 2); return (Z, b) => (i(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${s.value} ${s.value} ${o.value} ${o.value}` }, [ _, e("g", v, [ t.flagName ? (i(), n("title", u, d(t.flagName), 1)) : h("", !0), p, k, g, H ]), e("g", z, [ e("circle", { cx: "256", cy: "256", r: c.value, fill: "none", style: f({ stroke: t.strokeColor, strokeWidth: t.strokeWidth }) }, null, 12, x) ]) ], 8, m)); } }); export { y as default }; //# sourceMappingURL=us-cf4985c6.js.map