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.18 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/bt.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "2b4d5e2a-efbe-4c89-a68a-f9b28da33226" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#2b4d5e2a-efbe-4c89-a68a-f9b28da33226)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#ffda44",
d: "M0 0h512L281 293.2 0 512z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#ff9811",
d: "M506.7 0 0 506.7v5.3h512V0h-5.3z"
}, null, -1), m = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "M398.2 142V97.7h-85.3l-6.5 6.5c-23.2 23.2-19.3 50.2-16.5 70 2.7 18.3 3 25.3-3.8 32-6.8 7-14 6.6-32.2 4-19.7-3-46.8-6.8-70 16.4-23.2 23.2-19.3 50.3-16.4 70 2.6 18.3 3 25.4-4 32.2-6.7 6.8-13.7 6.5-32 3.8-7.2-1-14.5-2-22.4-2.2l-.5 44.6c5 0 10.6.8 16.5 1.7 7 1 15 2.2 23.5 2.2 8.7 0 18-1.3 27-5.2v35.6h66.8v-33.4H209v-22.2h22.3v-33.4h-18c.9-10.8-.6-21.2-2-30-2.5-18.4-3-25.4 4-32.2 6.8-6.8 13.8-6.5 32.2-3.8 14.3 2 32.6 4.7 50.4-3v35.6h66.8v-33.4h-33.3V231h22.3v-33.4h-17.8a130 130 0 0 0-2-30c-1.8-12.8-2.5-20-.4-25.6z"
}, null, -1), h = { fill: "none" }, g = ["r"], _ = /* @__PURE__ */ i({
__name: "bt",
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=bt-DrsgooD_.js.map