vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
54 lines (53 loc) • 2.17 kB
JavaScript
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/gb.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "22883313-07a8-494f-b278-4dc6c16e1680" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#22883313-07a8-494f-b278-4dc6c16e1680)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#0052b4",
d: "M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"
}, null, -1), m = /*#__PURE__*/ r("path", {
fill: "#d80027",
d: "M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z"
}, null, -1), h = { fill: "none" }, g = ["r"], _ = /* @__PURE__ */ i({
__name: "gb",
props: {
flagName: {},
strokeColor: { default: "#000" },
strokeWidth: { default: 0 }
},
setup(i) {
let _ = i, v = e(() => 512 + 2 * _.strokeWidth), y = e(() => -_.strokeWidth), b = e(() => 256 + _.strokeWidth / 2);
return (e, i) => (o(), n("svg", {
xmlns: "http://www.w3.org/2000/svg",
class: "svg-circle-flags",
viewBox: `${y.value} ${y.value} ${v.value} ${v.value}`
}, [
l,
r("g", u, [
_.flagName ? (o(), n("title", d, s(_.flagName), 1)) : t("", !0),
f,
p,
m
]),
r("g", h, [r("circle", {
cx: "256",
cy: "256",
r: b.value,
fill: "none",
style: a({
stroke: _.strokeColor,
strokeWidth: _.strokeWidth
})
}, null, 12, g)])
], 8, c));
}
});
//#endregion
export { _ as default };
//# sourceMappingURL=gb-D1DTsO35.js.map