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.12 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/us.vue?vue&type=script&setup=true&lang.ts
var c = ["viewBox"], l = /*#__PURE__*/ r("mask", { id: "f1f3e6b8-ffa0-4b59-9553-5efd4188b450" }, [/*#__PURE__*/ r("circle", {
cx: "256",
cy: "256",
r: "256",
fill: "#fff"
})], -1), u = { mask: "url(#f1f3e6b8-ffa0-4b59-9553-5efd4188b450)" }, d = { key: 0 }, f = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "M256 0h256v64l-32 32 32 32v64l-32 32 32 32v64l-32 32 32 32v64l-256 32L0 448v-64l32-32-32-32v-64z"
}, null, -1), p = /*#__PURE__*/ r("path", {
fill: "#d80027",
d: "M224 64h288v64H224Zm0 128h288v64H256ZM0 320h512v64H0Zm0 128h512v64H0Z"
}, null, -1), m = /*#__PURE__*/ r("path", {
fill: "#0052b4",
d: "M0 0h256v256H0Z"
}, null, -1), h = /*#__PURE__*/ r("path", {
fill: "#eee",
d: "m187 243 57-41h-70l57 41-22-67zm-81 0 57-41H93l57 41-22-67zm-81 0 57-41H12l57 41-22-67zm162-81 57-41h-70l57 41-22-67zm-81 0 57-41H93l57 41-22-67zm-81 0 57-41H12l57 41-22-67Zm162-82 57-41h-70l57 41-22-67Zm-81 0 57-41H93l57 41-22-67zm-81 0 57-41H12l57 41-22-67Z"
}, null, -1), g = { fill: "none" }, _ = ["r"], v = /* @__PURE__ */ i({
__name: "us",
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=us-ClnkjxK4.js.map