vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
68 lines (67 loc) • 2.09 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/in-as.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "a6bcadd4-241c-4232-ab7e-78eaed3ddca3" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#a6bcadd4-241c-4232-ab7e-78eaed3ddca3)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "M0 0h512v512H0z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#333",
d: "M256 112c-22 0-40 18-40 40-7-12-20-20-34-20a40 40 0 1 0 0 80h6v126h-2c-10 0-20 8-20 20v16c0 10 10 20 20 20h2v2c0 12 10 20 20 20h96c12 0 20-8 20-20v-2h2c12 0 20-10 20-20v-16c0-12-8-20-20-20h-2V212h6a40 40 0 1 0 0-80c-14 1-27 9-34 22v-2c0-22-18-40-40-40z"
}, null, -1), m = /*#__PURE__*/ r("rect", {
width: "224",
height: "32",
x: "144",
y: "448",
fill: "#acabb1",
rx: "16",
ry: "16"
}, null, -1), h = /*#__PURE__*/ r("rect", {
width: "192",
height: "48",
x: "160",
y: "32",
fill: "#acabb1",
rx: "24",
ry: "24"
}, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({
__name: "in-as",
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=in-as-Cbj-d_Vt.js.map