This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/es5/components/VIcon/VIcon.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
11 KiB
Text

{"version":3,"sources":["../../../src/components/VIcon/VIcon.ts"],"names":[],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;;;AAGA,IAAK,QAAL;;AAAA,CAAA,UAAK,QAAL,EAAa;AACX,EAAA,QAAA,CAAA,QAAA,CAAA,GAAA,MAAA;AACA,EAAA,QAAA,CAAA,OAAA,CAAA,GAAA,MAAA;AACA,EAAA,QAAA,CAAA,SAAA,CAAA,GAAA,MAAA;AACA,EAAA,QAAA,CAAA,QAAA,CAAA,GAAA,MAAA;AACA,EAAA,QAAA,CAAA,OAAA,CAAA,GAAA,MAAA;AACA,EAAA,QAAA,CAAA,QAAA,CAAA,GAAA,MAAA;AACD,CAPD,EAAK,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAb;;AASA,SAAS,cAAT,CAAyB,QAAzB,EAAyC;AACvC,SAAO,CAAC,KAAD,EAAQ,KAAR,EAAe,KAAf,EAAsB,KAAtB,EAA6B,IAA7B,CAAkC,UAAA,GAAG;AAAA,WAAI,QAAQ,CAAC,QAAT,CAAkB,GAAlB,CAAJ;AAAA,GAArC,CAAP;AACD;;AAED,SAAS,SAAT,CAAoB,IAApB,EAAgC;AAC9B,SAAQ,0CAA0C,IAA1C,CAA+C,IAA/C,KAAwD,UAAU,IAAV,CAAe,IAAf,CAAxD,IAAgF,IAAI,CAAC,MAAL,GAAc,CAAtG;AACD;;AAED,IAAM,KAAK,GAAG,qBACZ,kBADY,EAEZ,iBAFY,EAGZ;AACA;AAJY,EAKZ,MALY,CAKL;AACP,EAAA,IAAI,EAAE,QADC;AAGP,EAAA,KAAK,EAAE;AACL,IAAA,KAAK,EAAE,OADF;AAEL,IAAA,QAAQ,EAAE,OAFL;AAGL,IAAA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,QAAQ,GAAG,IAAI,CAAC,QAAL,CAAc,WAAd,IACT,IAAI,CAAC,QAAL,CAAc,SADL,IAET,QAFF,CADiB,CAKjB;AACA;;AACA,aAAO,IAAI,CAAC,QAAL,CAAc,WAArB;AACA,aAAO,IAAI,CAAC,QAAL,CAAc,SAArB;AACD;;AAED,WAAO,CAAC,CAAC,KAAD,EAAQ,IAAR,EAAc,QAAQ,GAAG,CAAC,QAAD,CAAH,GAAgB,QAAtC,CAAR;AACD;AAvBuB,CAAX,C","sourcesContent":["import './VIcon.sass'\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Sizeable from '../../mixins/sizeable'\nimport Themeable from '../../mixins/themeable'\n// Util\nimport { convertToUnit, keys, remapInternalIcon } from '../../util/helpers'\n// Types\nimport Vue, { CreateElement, VNode, VNodeChildren, VNodeData } from 'vue'\nimport mixins from '../../util/mixins'\nimport { VuetifyIcon, VuetifyIconComponent } from 'vuetify/types/services/icons'\n\nenum SIZE_MAP {\n xSmall = '12px',\n small = '16px',\n default = '24px',\n medium = '28px',\n large = '36px',\n xLarge = '40px'\n}\n\nfunction isFontAwesome5 (iconType: string): boolean {\n return ['fas', 'far', 'fal', 'fab'].some(val => iconType.includes(val))\n}\n\nfunction isSvgPath (icon: string): boolean {\n return (/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(icon) && /[\\dz]$/i.test(icon) && icon.length > 4)\n}\n\nconst VIcon = mixins(\n Colorable,\n Sizeable,\n Themeable\n /* @vue/component */\n).extend({\n name: 'v-icon',\n\n props: {\n dense: Boolean,\n disabled: Boolean,\n left: Boolean,\n right: Boolean,\n size: [Number, String],\n tag: {\n type: String,\n required: false,\n default: 'i',\n },\n },\n\n computed: {\n medium () {\n return false\n },\n },\n\n methods: {\n getIcon (): VuetifyIcon {\n let iconName = ''\n if (this.$slots.default) iconName = this.$slots.default[0].text!.trim()\n\n return remapInternalIcon(this, iconName)\n },\n getSize (): string | undefined {\n const sizes = {\n xSmall: this.xSmall,\n small: this.small,\n medium: this.medium,\n large: this.large,\n xLarge: this.xLarge,\n }\n\n const explicitSize = keys(sizes).find(key => sizes[key])\n\n return (\n (explicitSize && SIZE_MAP[explicitSize]) || convertToUnit(this.size)\n )\n },\n // Component data for both font and svg icon.\n getDefaultData (): VNodeData {\n const hasClickListener = Boolean(\n this.$listeners.click || this.$listeners['!click']\n )\n const data: VNodeData = {\n staticClass: 'v-icon notranslate',\n class: {\n 'v-icon--disabled': this.disabled,\n 'v-icon--left': this.left,\n 'v-icon--link': hasClickListener,\n 'v-icon--right': this.right,\n 'v-icon--dense': this.dense,\n },\n attrs: {\n 'aria-hidden': !hasClickListener,\n role: hasClickListener ? 'button' : null,\n ...this.$attrs,\n },\n on: this.$listeners,\n }\n\n return data\n },\n applyColors (data: VNodeData): void {\n data.class = { ...data.class, ...this.themeClasses }\n this.setTextColor(this.color, data)\n },\n renderFontIcon (icon: string, h: CreateElement): VNode {\n const newChildren: VNodeChildren = []\n const data = this.getDefaultData()\n\n let iconType = 'material-icons'\n // Material Icon delimiter is _\n // https://material.io/icons/\n const delimiterIndex = icon.indexOf('-')\n const isMaterialIcon = delimiterIndex <= -1\n\n if (isMaterialIcon) {\n // Material icon uses ligatures.\n newChildren.push(icon)\n } else {\n iconType = icon.slice(0, delimiterIndex)\n if (isFontAwesome5(iconType)) iconType = ''\n }\n\n data.class[iconType] = true\n data.class[icon] = !isMaterialIcon\n\n const fontSize = this.getSize()\n if (fontSize) data.style = { fontSize }\n\n this.applyColors(data)\n\n return h(this.tag, data, newChildren)\n },\n renderSvgIcon (icon: string, h: CreateElement): VNode {\n const data = this.getDefaultData()\n data.class['v-icon--svg'] = true\n\n data.attrs = {\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: '0 0 24 24',\n height: '24',\n width: '24',\n role: 'img',\n 'aria-hidden': !this.$attrs['aria-label'],\n 'aria-label': this.$attrs['aria-label'],\n }\n\n const fontSize = this.getSize()\n if (fontSize) {\n data.style = {\n fontSize,\n height: fontSize,\n width: fontSize,\n }\n data.attrs.height = fontSize\n data.attrs.width = fontSize\n }\n\n this.applyColors(data)\n\n return h('svg', data, [\n h('path', {\n attrs: {\n d: icon,\n },\n }),\n ])\n },\n renderSvgIconComponent (\n icon: VuetifyIconComponent,\n h: CreateElement\n ): VNode {\n const data = this.getDefaultData()\n data.class['v-icon--is-component'] = true\n\n const size = this.getSize()\n if (size) {\n data.style = {\n fontSize: size,\n height: size,\n }\n }\n\n this.applyColors(data)\n\n const component = icon.component\n data.props = icon.props\n data.nativeOn = data.on\n\n return h(component, data)\n },\n },\n\n render (h: CreateElement): VNode {\n const icon = this.getIcon()\n\n if (typeof icon === 'string') {\n if (isSvgPath(icon)) {\n return this.renderSvgIcon(icon, h)\n }\n return this.renderFontIcon(icon, h)\n }\n\n return this.renderSvgIconComponent(icon, h)\n },\n})\n\nexport default Vue.extend({\n name: 'v-icon',\n\n $_wrapperFor: VIcon,\n\n functional: true,\n\n render (h, { data, children }): VNode {\n let iconName = ''\n\n // Support usage of v-text and v-html\n if (data.domProps) {\n iconName = data.domProps.textContent ||\n data.domProps.innerHTML ||\n iconName\n\n // Remove nodes so it doesn't\n // overwrite our changes\n delete data.domProps.textContent\n delete data.domProps.innerHTML\n }\n\n return h(VIcon, data, iconName ? [iconName] : children)\n },\n})\n"],"sourceRoot":"","file":"VIcon.js"}