@dialpad/dialtone-icons
Version:
Dialtone icon library
1 lines • 2.65 kB
Source Map (JSON)
{"version":3,"file":"snowflake.cjs","sources":["../../../src/icons/snowflake.vue"],"sourcesContent":["<template>\n <svg :aria-label=\"ariaLabel\" :class=\"iconSizeClass\" :data-qa=\"dataQA\" :aria-hidden=\"ariaHidden\" role=\"img\" data-name=\"Snowflake\" class=\"d-icon d-icon--snowflake\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g :clip-path=\"`url(#${uniqueID}a)`\"><path d=\"M1 5.5a.5.5 0 0 0 0 1h1.793L1.646 7.646a.5.5 0 1 0 .708.708L4.207 6.5h1.147l.146.024v1.269L3.646 9.646a.5.5 0 0 0 .708.708L5.5 9.207V11a.5.5 0 0 0 1 0V9.207l1.146 1.147a.5.5 0 0 0 .708-.708L6.5 7.793V6.5h1.293l1.853 1.854a.5.5 0 0 0 .708-.708L9.207 6.5H11a.5.5 0 0 0 0-1H9.207l1.147-1.146a.5.5 0 0 0-.708-.708L7.793 5.5H6.5V4.207l1.854-1.853a.5.5 0 1 0-.708-.708L6.5 2.793V1a.5.5 0 0 0-1 0v1.793L4.354 1.646a.5.5 0 1 0-.708.708L5.5 4.207V5.5H4.207L2.354 3.646a.5.5 0 1 0-.708.708L2.793 5.5H1Z\" fill=\"currentColor\"/></g><defs><clipPath :id=\"`${uniqueID}a`\"><path fill=\"#fff\" d=\"M0 0h12v12H0z\"/></clipPath></defs></svg>\n</template>\n\n<script>\nimport { getUniqueString } from '@/src/utils';\nimport { ICON_SIZE_MODIFIERS } from '@/src/constants';\n\nexport default {\n name: 'DtIconSnowflake',\n\n props: {\n /**\n * The size of the icon.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n size: {\n type: String,\n default: '500',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n },\n\n /**\n * @TODO: Remove this emit once the icons migration is complete,\n * they will no longer need this event.\n * */\n emits: ['loaded'],\n\n computed: {\n iconSizeClass () {\n return ICON_SIZE_MODIFIERS[this.size];\n },\n\n ariaHidden () {\n return !this.ariaLabel ? 'true' : 'false';\n },\n\n dataQA () {\n return this.$attrs['data-qa'] ?? 'dt-icon';\n },\n },\n\n created () {\n this.$emit('loaded');\n this.uniqueID = getUniqueString();\n },\n};\n</script>\n"],"names":["_sfc_main","s","ICON_SIZE_MODIFIERS","getUniqueString"],"mappings":"kJAQAA,EAAA,CACA,KAAA,kBAEA,MAAA,CAKA,KAAA,CACA,KAAA,OACA,QAAA,MACA,UAAAC,GAAA,OAAA,KAAAC,GAAA,EAAA,SAAAD,CAAA,CACA,EAKA,UAAA,CACA,KAAA,OACA,QAAA,MACA,CACA,EAMA,MAAA,CAAA,QAAA,EAEA,SAAA,CACA,eAAA,CACA,OAAAC,EAAA,EAAA,KAAA,IAAA,CACA,EAEA,YAAA,CACA,OAAA,KAAA,UAAA,QAAA,MACA,EAEA,QAAA,CACA,OAAA,KAAA,OAAA,SAAA,GAAA,SACA,CACA,EAEA,SAAA,CACA,KAAA,MAAA,QAAA,EACA,KAAA,SAAAC,EAAAA,GACA,CACA"}