vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
1 lines • 5.69 kB
Source Map (JSON)
{"version":3,"file":"mx-6118be6c.cjs","sources":["../src/components/flags/mx.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = [\"viewBox\"]\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"mask\", { id: \"c54d7be6-89fd-42c8-b1c5-aee70c252801\" }, [\n /*#__PURE__*/_createElementVNode(\"circle\", {\n cx: \"256\",\n cy: \"256\",\n r: \"256\",\n fill: \"#fff\"\n })\n], -1)\nconst _hoisted_3 = { mask: \"url(#c54d7be6-89fd-42c8-b1c5-aee70c252801)\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = /*#__PURE__*/_createStaticVNode(\"<path fill=\\\"#eee\\\" d=\\\"M144 0h223l33 256-33 256H144l-32-256z\\\"></path><path fill=\\\"#496e2d\\\" d=\\\"M0 0h144v512H0z\\\"></path><path fill=\\\"#d80027\\\" d=\\\"M368 0h144v512H368z\\\"></path><path fill=\\\"#ffda44\\\" d=\\\"M256 277v10h12l10-22z\\\"></path><path fill=\\\"#496e2d\\\" d=\\\"M160 242a96 96 0 0 0 192 0h-11a85 85 0 0 1-170 0zm39 17-4 2c-2 2-2 6 1 8 15 14 34 22 54 24v17h12v-17c20-2 39-10 54-24 3-2 3-6 1-8s-6-2-8 0a78 78 0 0 1-53 21c-19 0-38-8-53-21z\\\"></path><path fill=\\\"#338af3\\\" d=\\\"M256 316c-14 0-28-5-40-13l6-9c20 13 48 13 68 0l7 9c-12 8-26 13-41 13z\\\"></path><path fill=\\\"#751a46\\\" d=\\\"M256 174c22 11 12 33 11 34l-2-4c-5-11-18-18-31-18v11c6 0 11 5 11 11-7 7-9 17-4 26l4 8-13 23 29-7 18 18v-11l11 11 23-11-35-21-5-21 28 16c4 11 12 21 23 26 9-83-42-91-61-91z\\\"></path><path fill=\\\"#6da544\\\" d=\\\"M222 271c-15 0-33-12-38-40l11-2c4 23 18 31 27 31 3 0 5-1 6-3 0-2 0-3-6-5-3-1-7-2-10-5-10-12 4-24 11-30 1-1 2-2 1-3 0 0-2-2-5-2-7 0-12-4-14-11-2-6 2-13 8-17l5 11c-2 0-2 2-2 4 0 0 1 2 3 2 7 0 14 4 16 9 1 3 2 9-5 15-7 7-11 12-9 15l5 1c5 2 14 5 13 17-1 8-8 13-17 13h-1z\\\"></path><path fill=\\\"#ffda44\\\" d=\\\"m234 186-12 11v11l18-9c3-1 3-5 1-7z\\\"></path><circle cx=\\\"172\\\" cy=\\\"275\\\" r=\\\"8\\\" fill=\\\"#ffda44\\\"></circle><circle cx=\\\"189\\\" cy=\\\"302\\\" r=\\\"8\\\" fill=\\\"#ffda44\\\"></circle><circle cx=\\\"216\\\" cy=\\\"323\\\" r=\\\"8\\\" fill=\\\"#ffda44\\\"></circle><circle cx=\\\"297\\\" cy=\\\"323\\\" r=\\\"8\\\" fill=\\\"#ffda44\\\"></circle><circle cx=\\\"324\\\" cy=\\\"302\\\" r=\\\"8\\\" fill=\\\"#ffda44\\\"></circle><circle cx=\\\"341\\\" cy=\\\"275\\\" r=\\\"8\\\" fill=\\\"#ffda44\\\"></circle><rect width=\\\"34\\\" height=\\\"22\\\" x=\\\"239\\\" y=\\\"299\\\" fill=\\\"#ff9811\\\" rx=\\\"11\\\" ry=\\\"11\\\"></rect>\", 16)\nconst _hoisted_21 = { fill: \"none\" }\nconst _hoisted_22 = [\"r\"]\n\nimport { computed } from 'vue';\r\n\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'mx',\n props: {\n flagName: {},\n strokeColor: { default: '#000' },\n strokeWidth: { default: 0 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\r\n \r\n\r\n const svgSize = computed(() => 512 + 2 * props.strokeWidth),\r\n viewBoxOrigin = computed(() => -props.strokeWidth),\r\n circleStroke = computed(() => 256 + props.strokeWidth / 2);\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n class: \"svg-circle-flags\",\n viewBox: `${viewBoxOrigin.value} ${viewBoxOrigin.value} ${svgSize.value} ${svgSize.value}`\n }, [\n _hoisted_2,\n _createElementVNode(\"g\", _hoisted_3, [\n (props.flagName)\n ? (_openBlock(), _createElementBlock(\"title\", _hoisted_4, _toDisplayString(props.flagName), 1))\n : _createCommentVNode(\"\", true),\n _hoisted_5\n ]),\n _createElementVNode(\"g\", _hoisted_21, [\n _createElementVNode(\"circle\", {\n cx: \"256\",\n cy: \"256\",\n r: circleStroke.value,\n fill: \"none\",\n style: _normalizeStyle({ stroke: props.strokeColor, strokeWidth: props.strokeWidth })\n }, null, 12, _hoisted_22)\n ])\n ], 8, _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","_createStaticVNode","_hoisted_21","_hoisted_22","_sfc_main","_defineComponent","__props","props","svgSize","computed","viewBoxOrigin","circleStroke","_ctx","_cache","_openBlock","_createElementBlock","_toDisplayString","_createCommentVNode","_normalizeStyle"],"mappings":"uGAGMA,EAAa,CAAC,SAAS,EACvBC,EAA8CC,EAAAA,mBAAA,OAAQ,CAAE,GAAI,wCAA0C,sBACzE,SAAU,CACzC,GAAI,MACJ,GAAI,MACJ,EAAG,MACH,KAAM,MAAA,CACP,CACH,EAAG,EAAE,EACCC,EAAa,CAAE,KAAM,8CACrBC,EAAa,CAAE,IAAK,GACpBC,EAA6CC,EAAA,kBAAA,i/CAAolD,EAAE,EACnoDC,EAAc,CAAE,KAAM,QACtBC,EAAc,CAAC,GAAG,EAKIC,EAAiBC,kBAAA,C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