@dialpad/dialtone-icons
Version:
Dialtone icon library
1 lines • 2.61 kB
Source Map (JSON)
{"version":3,"file":"pin.cjs","sources":["../../../src/icons/pin.vue"],"sourcesContent":["<template>\n <svg :aria-label=\"ariaLabel\" :class=\"iconSizeClass\" :data-qa=\"dataQA\" :aria-hidden=\"ariaHidden\" role=\"img\" data-name=\"Pin\" class=\"d-icon d-icon--pin\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g :clip-path=\"`url(#${uniqueID}a)`\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 .5a1.5 1.5 0 0 0 0 3v1.88a.5.5 0 0 1-.277.447l-.892.451a1.5 1.5 0 0 0-.83 1.342v.88a.5.5 0 0 0 .5.5h3v2a.5.5 0 1 0 1 0V9h3a.5.5 0 0 0 .5-.5v-.88a1.5 1.5 0 0 0-.831-1.342l-.89-.45h-.002A.5.5 0 0 1 8 5.38V3.5a1.5 1.5 0 1 0 0-3H4Zm0 1a.5.5 0 0 0 0 1h.5A.5.5 0 0 1 5 3v2.38a1.5 1.5 0 0 1-.83 1.342l-.892.45A.5.5 0 0 0 3 7.62V8h6v-.38a.5.5 0 0 0-.277-.447L8.72 7.17l-.889-.449a1.5 1.5 0 0 1-.83-1.342V3a.5.5 0 0 1 .5-.5H8a.5.5 0 0 0 0-1H4Z\" 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: 'DtIconPin',\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,YAEA,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"}