UNPKG

vue-circle-flags

Version:

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

58 lines (57 loc) 2.13 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/lr.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "e612d4cd-67b8-40b5-a9ab-d546e6dda595" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#e612d4cd-67b8-40b5-a9ab-d546e6dda595)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#eee", d: "M0 232.7 256 0h256l-19.2 24L512 46.4v46.7l-19.6 22.6 19.6 23.9v46.5L493.8 209l18.2 23.7v46.6L493 304l19 21.8v46.6l-18 23.5 18 23v46.6l-253.3 21L0 465.5v-46.6l18.8-21.6L0 372.4v-46.6l19.6-21.9L0 279.3z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#d80027", d: "m256 0-22 46.5h278V0zm-17.1 93.2v46.5H512V93.2zm-4.9 93 22 46.5h256v-46.5zM0 279.3v46.5h512v-46.5zm0 93.1v46.5h512v-46.5zm0 93.1V512h512v-46.5z" }, null, -1), m = /*#__PURE__*/ r("path", { fill: "#0052b4", d: "M0 0h256v232.7H0z" }, null, -1), h = /*#__PURE__*/ r("path", { fill: "#eee", d: "m152.4 66.8 16.6 51h53.6l-43.4 31.5 16.6 51-43.4-31.5-43.4 31.5 16.6-51-43.4-31.5h53.6z" }, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({ __name: "lr", 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=lr-CkAl-TDT.js.map