UNPKG

vue-circle-flags

Version:

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

40 lines (39 loc) 1.91 kB
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createStaticVNode as i, defineComponent as a, normalizeStyle as o, openBlock as s, toDisplayString as c } from "vue"; //#region src/components/flags/as.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "8d661d08-f298-4c0d-a8bf-4982148c14fb" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#8d661d08-f298-4c0d-a8bf-4982148c14fb)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#eee\" d=\"M512 20.4V490L23.8 255.8z\"></path><path fill=\"#a2001d\" d=\"M445.2 246.5h-30.5c8-9.6 7.5-23.7-1.5-32.7a24.2 24.2 0 0 0 0-34.2l-.5.5a25 25 0 0 0 .5-34.8l-137 137a23.9 23.9 0 0 0 34 0l2.6-2.5 65.6-6v28.3h22.3v-30.2l33.4-3z\"></path><path fill=\"#ffda44\" d=\"M278.3 311.7 256 300.5l22.3-11.1H423v22.3z\"></path><path fill=\"#0052b4\" d=\"M0 0v512h512L28.7 256.2 512 0z\"></path><path fill=\"#d80027\" d=\"M512 0 0 256l512 256v-22L43.8 256 512 20.4z\"></path>", 5), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "as", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { let a = i, g = e(() => 512 + 2 * a.strokeWidth), _ = e(() => -a.strokeWidth), v = e(() => 256 + a.strokeWidth / 2); return (e, i) => (s(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${_.value} ${_.value} ${g.value} ${g.value}` }, [ u, r("g", d, [a.flagName ? (s(), n("title", f, c(a.flagName), 1)) : t("", !0), p]), r("g", m, [r("circle", { cx: "256", cy: "256", r: v.value, fill: "none", style: o({ stroke: a.strokeColor, strokeWidth: a.strokeWidth }) }, null, 12, h)]) ], 8, l)); } }); //#endregion export { g as default }; //# sourceMappingURL=as-ClJWyuw0.js.map