Skip to content

Commit

Permalink
fix(): hard coded svg mask id
Browse files Browse the repository at this point in the history
  • Loading branch information
luizzappa committed Dec 2, 2023
1 parent 20e32c4 commit d941d10
Show file tree
Hide file tree
Showing 366 changed files with 1,095 additions and 2,554 deletions.
10 changes: 3 additions & 7 deletions src/components/flags/ad.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="ff2b99cc-61ef-4581-9efb-9f800136342d">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#ff2b99cc-61ef-4581-9efb-9f800136342d)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#0052b4" d="M0 0h144.7l36 254.6-36 257.4H0z" />
<path fill="#d80027" d="M367.3 0H512v512H367.3l-29.7-257.3z" />
Expand All @@ -33,7 +33,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -47,11 +47,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/ae.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="34cad71d-3fc5-4671-af56-5a6a2b82a374">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#34cad71d-3fc5-4671-af56-5a6a2b82a374)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#a2001d" d="M0 0h167l52.3 252L167 512H0z" />
<path
Expand All @@ -29,7 +29,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -43,11 +43,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/af-emirate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="84fcdfe2-458d-4d52-a5d5-8dd487b2c743">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#84fcdfe2-458d-4d52-a5d5-8dd487b2c743)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#eee" d="M0 0h512v512H0Z" />
<path
Expand All @@ -27,7 +27,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -41,11 +41,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/af.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="251f588c-6328-40d3-8cae-6df5ca6ecb6e">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#251f588c-6328-40d3-8cae-6df5ca6ecb6e)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path
fill="#d80027"
Expand Down Expand Up @@ -36,7 +36,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -50,11 +50,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/afar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="ce07b1e4-1e66-4673-beb5-659865b3c7c6">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#ce07b1e4-1e66-4673-beb5-659865b3c7c6)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#eee" d="m0 160 256-32 256 32v192l-256 32L0 352Z" />
<path fill="#0052b4" d="M0 0h512v160H0Z" />
Expand All @@ -31,7 +31,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -45,11 +45,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/ag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="a6425f5a-842f-4541-96ce-12b73471cf77">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#a6425f5a-842f-4541-96ce-12b73471cf77)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#333" d="M0 .4h512l-34 229H36z" />
<path
Expand All @@ -30,7 +30,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -44,11 +44,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/ai.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="314f0589-f5ab-41f9-a060-fac4844984a2">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#314f0589-f5ab-41f9-a060-fac4844984a2)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#0052b4" d="M256 0h256v512H0V256Z" />
<path
Expand Down Expand Up @@ -44,7 +44,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -58,11 +58,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/al.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="516e94b6-e0b3-423f-bd38-192869e48435">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#516e94b6-e0b3-423f-bd38-192869e48435)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#d80027" d="M0 0h512v512H0z" />
<path
Expand All @@ -27,7 +27,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -41,11 +41,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/am.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="997251ad-e9d8-4af7-b2fb-b1f7b255ae68">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#997251ad-e9d8-4af7-b2fb-b1f7b255ae68)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path
fill="#0052b4"
Expand All @@ -28,7 +28,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -42,11 +42,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/an.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="f7c322d8-56af-4b07-a988-a86c99255022">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#f7c322d8-56af-4b07-a988-a86c99255022)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path
fill="#eee"
Expand All @@ -32,7 +32,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -46,11 +46,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
10 changes: 3 additions & 7 deletions src/components/flags/ao.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
class="svg-circle-flags"
:viewBox="`${viewBoxOrigin} ${viewBoxOrigin} ${svgSize} ${svgSize}`"
>
<mask :id="`${maskId}`">
<mask id="eeda43b7-88eb-41c3-90e8-cfa6371e4ee6">
<circle cx="256" cy="256" r="256" fill="#fff" />
</mask>
<g :mask="`url(#${maskId})`">
<g mask="url(#eeda43b7-88eb-41c3-90e8-cfa6371e4ee6)">
<title v-if="props.flagName">{{ props.flagName }}</title>
<path fill="#d80027" d="M0 0h512v256l-253 36.6L0 256z" />
<path fill="#333" d="M0 256h512v256H0z" />
Expand Down Expand Up @@ -35,7 +35,7 @@
</svg>
</template>
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue';
import { computed } from 'vue';
const props = withDefaults(
defineProps<{
Expand All @@ -49,11 +49,7 @@
}
);
const maskId = ref<string>();
const svgSize = computed(() => 512 + 2 * props.strokeWidth),
viewBoxOrigin = computed(() => -props.strokeWidth),
circleStroke = computed(() => 256 + props.strokeWidth / 2);
onMounted(() => (maskId.value = window.crypto.randomUUID()));
</script>
Loading

0 comments on commit d941d10

Please sign in to comment.