UNPKG

vue-circle-flags

Version:

A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags

1 lines 5.87 kB
{"version":3,"file":"id-jt-Cv10ccjA.cjs","names":[],"sources":["../src/components/flags/id-jt.vue","../src/components/flags/id-jt.vue"],"sourcesContent":["<template>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"svg-circle-flags\"\r\n :viewBox=\"`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`\"\r\n >\r\n <mask id=\"922d2d78-76b8-4670-8027-ef9836a8cfa6\">\r\n <circle cx=\"256\" cy=\"256\" r=\"256\" fill=\"#fff\" />\r\n </mask>\r\n <g mask=\"url(#922d2d78-76b8-4670-8027-ef9836a8cfa6)\">\r\n <title v-if=\"props.flagName\">{{ props.flagName }}</title>\r\n <path fill=\"#ffda44\" d=\"M0 0h512v512H0Z\" />\r\n <path\r\n fill=\"#d80027\"\r\n d=\"m256 114-6 2-95 78c-4 3-4 9-1 13l102-33 102 33c3-4 3-10-1-13l-95-78-6-2z\"\r\n />\r\n <path fill=\"#eee\" d=\"M278 231h-1zm-43 0z\" />\r\n <path\r\n fill=\"#6da544\"\r\n d=\"m256 134-99 72 6 22 51-32 42 25 42-25 51 32 6-22z\"\r\n />\r\n <path\r\n fill=\"#333\"\r\n d=\"m256 191-28 60-9-21-10 21-7-16-10 21-7-16-13 27 14 23h140l14-23-12-27-8 16-10-21-7 16-10-21-9 21zm-62 134zm124 0z\"\r\n />\r\n <path fill=\"#338af3\" d=\"m183 290 11 32h124l11-32h-73z\" />\r\n <path\r\n fill=\"#eee\"\r\n d=\"M256 129a4 4 0 0 0-2 1l-100 73a4 4 0 0 0-2 4l38 117a4 4 0 0 0 4 3h124a4 4 0 0 0 4-3l38-117a4 4 0 0 0-2-4l-100-73a4 4 0 0 0-2-1zm0 9 95 70-36 111H197l-36-111 95-70z\"\r\n />\r\n <rect\r\n width=\"9\"\r\n height=\"142\"\r\n x=\"252\"\r\n y=\"170\"\r\n fill=\"#ff9811\"\r\n rx=\"4.5\"\r\n ry=\"4.5\"\r\n />\r\n <rect\r\n width=\"128\"\r\n height=\"24\"\r\n x=\"192\"\r\n y=\"338\"\r\n fill=\"#d80027\"\r\n rx=\"12\"\r\n ry=\"12\"\r\n />\r\n <rect\r\n width=\"160\"\r\n height=\"24\"\r\n x=\"176\"\r\n y=\"350\"\r\n fill=\"#eee\"\r\n rx=\"12\"\r\n ry=\"12\"\r\n />\r\n <path fill=\"#ffda44\" d=\"m242 191 14-42 14 42-36-26h44z\" />\r\n </g>\r\n <g fill=\"none\">\r\n <circle\r\n cx=\"256\"\r\n cy=\"256\"\r\n :r=\"circleStroke\"\r\n fill=\"none\"\r\n :style=\"{ stroke: props.strokeColor, strokeWidth: props.strokeWidth }\"\r\n />\r\n </g>\r\n </svg>\r\n</template>\r\n<script setup lang=\"ts\">\r\n import { computed } from 'vue';\r\n\r\n const props = withDefaults(\r\n defineProps<{\r\n flagName: string | undefined;\r\n strokeColor?: string;\r\n strokeWidth?: number;\r\n }>(),\r\n {\r\n strokeColor: '#000',\r\n strokeWidth: 0\r\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</script>\r\n","<template>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"svg-circle-flags\"\r\n :viewBox=\"`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`\"\r\n >\r\n <mask id=\"922d2d78-76b8-4670-8027-ef9836a8cfa6\">\r\n <circle cx=\"256\" cy=\"256\" r=\"256\" fill=\"#fff\" />\r\n </mask>\r\n <g mask=\"url(#922d2d78-76b8-4670-8027-ef9836a8cfa6)\">\r\n <title v-if=\"props.flagName\">{{ props.flagName }}</title>\r\n <path fill=\"#ffda44\" d=\"M0 0h512v512H0Z\" />\r\n <path\r\n fill=\"#d80027\"\r\n d=\"m256 114-6 2-95 78c-4 3-4 9-1 13l102-33 102 33c3-4 3-10-1-13l-95-78-6-2z\"\r\n />\r\n <path fill=\"#eee\" d=\"M278 231h-1zm-43 0z\" />\r\n <path\r\n fill=\"#6da544\"\r\n d=\"m256 134-99 72 6 22 51-32 42 25 42-25 51 32 6-22z\"\r\n />\r\n <path\r\n fill=\"#333\"\r\n d=\"m256 191-28 60-9-21-10 21-7-16-10 21-7-16-13 27 14 23h140l14-23-12-27-8 16-10-21-7 16-10-21-9 21zm-62 134zm124 0z\"\r\n />\r\n <path fill=\"#338af3\" d=\"m183 290 11 32h124l11-32h-73z\" />\r\n <path\r\n fill=\"#eee\"\r\n d=\"M256 129a4 4 0 0 0-2 1l-100 73a4 4 0 0 0-2 4l38 117a4 4 0 0 0 4 3h124a4 4 0 0 0 4-3l38-117a4 4 0 0 0-2-4l-100-73a4 4 0 0 0-2-1zm0 9 95 70-36 111H197l-36-111 95-70z\"\r\n />\r\n <rect\r\n width=\"9\"\r\n height=\"142\"\r\n x=\"252\"\r\n y=\"170\"\r\n fill=\"#ff9811\"\r\n rx=\"4.5\"\r\n ry=\"4.5\"\r\n />\r\n <rect\r\n width=\"128\"\r\n height=\"24\"\r\n x=\"192\"\r\n y=\"338\"\r\n fill=\"#d80027\"\r\n rx=\"12\"\r\n ry=\"12\"\r\n />\r\n <rect\r\n width=\"160\"\r\n height=\"24\"\r\n x=\"176\"\r\n y=\"350\"\r\n fill=\"#eee\"\r\n rx=\"12\"\r\n ry=\"12\"\r\n />\r\n <path fill=\"#ffda44\" d=\"m242 191 14-42 14 42-36-26h44z\" />\r\n </g>\r\n <g fill=\"none\">\r\n <circle\r\n cx=\"256\"\r\n cy=\"256\"\r\n :r=\"circleStroke\"\r\n fill=\"none\"\r\n :style=\"{ stroke: props.strokeColor, strokeWidth: props.strokeWidth }\"\r\n />\r\n </g>\r\n </svg>\r\n</template>\r\n<script setup lang=\"ts\">\r\n import { computed } from 'vue';\r\n\r\n const props = withDefaults(\r\n defineProps<{\r\n flagName: string | undefined;\r\n strokeColor?: string;\r\n strokeWidth?: number;\r\n }>(),\r\n {\r\n strokeColor: '#000',\r\n strokeWidth: 0\r\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</script>\r\n"],"mappings":"o6CAqFQ,GAAA,EAAA,EAAA,cAAyB,IAAM,EAAI,EAAM,WAAW,EACxD,GAAA,EAAA,EAAA,cAA+B,CAAC,EAAM,WAAW,EACjD,GAAA,EAAA,EAAA,cAA8B,IAAM,EAAM,YAAc,CAAC"}