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.99 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/otomi.vue?vue&type=script&setup=true&lang.ts var l = ["viewBox"], u = /*#__PURE__*/ r("mask", { id: "73b9345a-e41c-478a-842c-bd1f706a3e9b" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), d = { mask: "url(#73b9345a-e41c-478a-842c-bd1f706a3e9b)" }, f = { key: 0 }, p = /*#__PURE__*/ i("<path fill=\"#ff9811\" d=\"m0 160 256-32 256 32v192l-256 32L0 352Z\"></path><path fill=\"#eee\" d=\"m0 160 256-32 256 32v32H0Z\"></path><path fill=\"#338af3\" d=\"M0 0h512v160H0Z\"></path><path fill=\"#eee\" d=\"m0 352 256 32 256-32v-32H0Z\"></path><path fill=\"#6da544\" d=\"M0 352h512v160H0Z\"></path><circle cx=\"256\" cy=\"256\" r=\"160\" fill=\"#eee\"></circle><circle cx=\"256\" cy=\"256\" r=\"128\" fill=\"#338af3\"></circle><path fill=\"#ff9811\" d=\"M207 139v68h-68l49 49-49 49h68v68l49-49 49 49v-68h68l-49-49 49-49h-68v-68l-49 49z\"></path>", 8), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ a({ __name: "otomi", 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=otomi-Dzsa903S.js.map