vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
1 lines • 4.13 kB
Source Map (JSON)
{"version":3,"file":"ug-ByiWquid.cjs","names":[],"sources":["../src/components/flags/ug.vue","../src/components/flags/ug.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=\"4ce45e2b-2d53-401b-a22e-b89652ec99c3\">\r\n <circle cx=\"256\" cy=\"256\" r=\"256\" fill=\"#fff\" />\r\n </mask>\r\n <g mask=\"url(#4ce45e2b-2d53-401b-a22e-b89652ec99c3)\">\r\n <title v-if=\"props.flagName\">{{ props.flagName }}</title>\r\n <path fill=\"#ffda44\" d=\"M0 85v342l256 31 256-31V85L256 53Z\" />\r\n <path fill=\"#333\" d=\"M0 0h512v85H0z\" />\r\n <path fill=\"#d80027\" d=\"M0 171h512v85l-256 31L0 256Z\" />\r\n <path fill=\"#333\" d=\"M0 256h512v85H0z\" />\r\n <path fill=\"#d80027\" d=\"M0 427h512v85H0z\" />\r\n <circle cx=\"256\" cy=\"256\" r=\"85.3\" fill=\"#eee\" />\r\n <path\r\n fill=\"#333\"\r\n d=\"m287 260-31-13 8-26a17 17 0 0 0-5-16l8-8a28 28 0 0 0-19-8 28 28 0 0 0-20 8l8 8a17 17 0 0 0-5 12l1 5-12 12h21s-9 13-14 24c-4 11 0 25 12 30l6 2 11 10v12l-11 11h22v-23l10-10h21a22 22 0 0 0-11-30z\"\r\n />\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=\"4ce45e2b-2d53-401b-a22e-b89652ec99c3\">\r\n <circle cx=\"256\" cy=\"256\" r=\"256\" fill=\"#fff\" />\r\n </mask>\r\n <g mask=\"url(#4ce45e2b-2d53-401b-a22e-b89652ec99c3)\">\r\n <title v-if=\"props.flagName\">{{ props.flagName }}</title>\r\n <path fill=\"#ffda44\" d=\"M0 85v342l256 31 256-31V85L256 53Z\" />\r\n <path fill=\"#333\" d=\"M0 0h512v85H0z\" />\r\n <path fill=\"#d80027\" d=\"M0 171h512v85l-256 31L0 256Z\" />\r\n <path fill=\"#333\" d=\"M0 256h512v85H0z\" />\r\n <path fill=\"#d80027\" d=\"M0 427h512v85H0z\" />\r\n <circle cx=\"256\" cy=\"256\" r=\"85.3\" fill=\"#eee\" />\r\n <path\r\n fill=\"#333\"\r\n d=\"m287 260-31-13 8-26a17 17 0 0 0-5-16l8-8a28 28 0 0 0-19-8 28 28 0 0 0-20 8l8 8a17 17 0 0 0-5 12l1 5-12 12h21s-9 13-14 24c-4 11 0 25 12 30l6 2 11 10v12l-11 11h22v-23l10-10h21a22 22 0 0 0-11-30z\"\r\n />\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":"89BAgDQ,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"}