UNPKG

vue-circle-flags

Version:

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

50 lines (49 loc) 2.01 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/il.vue?vue&type=script&setup=true&lang.ts var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "a2135811-c982-4416-a8f1-c4acda7e2b1c" }, [/*#__PURE__*/ r("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" })], -1), u = { mask: "url(#a2135811-c982-4416-a8f1-c4acda7e2b1c)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", { fill: "#eee", d: "M0 0h512v55.7l-25 32.7 25 34v267.2l-26 36 26 30.7V512H0v-55.7l24.8-34.1L0 389.6V122.4l27.2-33.2L0 55.7z" }, null, -1), p = /*#__PURE__*/ r("path", { fill: "#0052b4", d: "M0 55.7v66.7h512V55.7zm0 333.9v66.7h512v-66.7zm352.4-189.3H288l-32-55.6-32.1 55.6h-64.3l32.1 55.7-32 55.7h64.2l32.1 55.6 32.1-55.6h64.3L320.3 256l32-55.7zm-57 55.7-19.7 34.2h-39.4L216.5 256l19.8-34.2h39.4l19.8 34.2zM256 187.6l7.3 12.7h-14.6zm-59.2 34.2h14.7l-7.4 12.7zm0 68.4 7.3-12.7 7.4 12.7zm59.2 34.2-7.3-12.7h14.6zm59.2-34.2h-14.7l7.4-12.7zm-14.7-68.4h14.7l-7.3 12.7z" }, null, -1), m = { fill: "none" }, h = ["r"], g = /* @__PURE__ */ i({ __name: "il", props: { flagName: {}, strokeColor: { default: "#000" }, strokeWidth: { default: 0 } }, setup(i) { let g = i, _ = e(() => 512 + 2 * g.strokeWidth), v = e(() => -g.strokeWidth), y = e(() => 256 + g.strokeWidth / 2); return (e, i) => (o(), n("svg", { xmlns: "http://www.w3.org/2000/svg", class: "svg-circle-flags", viewBox: `${v.value} ${v.value} ${_.value} ${_.value}` }, [ l, r("g", u, [ g.flagName ? (o(), n("title", d, s(g.flagName), 1)) : t("", !0), f, p ]), r("g", m, [r("circle", { cx: "256", cy: "256", r: y.value, fill: "none", style: a({ stroke: g.strokeColor, strokeWidth: g.strokeWidth }) }, null, 12, h)]) ], 8, c)); } }); //#endregion export { g as default }; //# sourceMappingURL=il-CphSWdfr.js.map