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A2D7D,UA3D6D,kBA2DrD,CA3DqD,EA2DpD;AACP,YAAM,OAAO,KAAK,kBAAL,CAAwB,KAAK,KAA7B,EAAoC;AAC/C,yBAAa,QADkC;AAE/C,qBAAS,KAAK,OAFiC;AAG/C,mBAAO,EAAE,UAAU,KAAK,QAAL,GAAgB,CAAC,CAAjB,GAAqB,CAAjC,EAHwC;AAI/C,wBAAY,CAAC;AACX,sBAAM,MADK;AAEX,uBAAO,KAAK;AAFD,aAAD,CAJmC;AAQ/C,gBAAI,KAAK;AARsC,SAApC,CAAb;AAWA,YAAM,QAAQ,KAAK,SAAL,IAAmB,KAAK,OAAL,IAAgB,KAAK,KAAtD;AACA,eAAO,EAAE,MAAF,EAAU,KAAK,YAAL,CAAkB,KAAlB,EAAyB,IAAzB,CAAV,EAA0C,CAAC,KAAK,UAAL,CAAgB,CAAhB,CAAD,CAA1C,CAAP;AACD;AAzE4D,CAAhD,C","sourcesContent":["import '../../stylus/components/_chips.styl'\n\n// Types\nimport { CreateElement, VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\n// Components\nimport VIcon from '../VIcon'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Themeable from '../../mixins/themeable'\nimport Toggleable from '../../mixins/toggleable'\n\n/* @vue/component */\nexport default mixins(Colorable, Themeable, Toggleable).extend({\n name: 'v-chip',\n\n props: {\n close: Boolean,\n disabled: Boolean,\n label: Boolean,\n outline: Boolean,\n // Used for selects/tagging\n selected: Boolean,\n small: Boolean,\n textColor: String,\n value: {\n type: Boolean,\n default: true\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-chip--disabled': this.disabled,\n 'v-chip--selected': this.selected && !this.disabled,\n 'v-chip--label': this.label,\n 'v-chip--outline': this.outline,\n 'v-chip--small': this.small,\n 'v-chip--removable': this.close,\n ...this.themeClasses\n }\n }\n },\n\n methods: {\n genClose (h: CreateElement): VNode {\n const data = {\n staticClass: 'v-chip__close',\n on: {\n click: (e: Event) => {\n e.stopPropagation()\n\n this.$emit('input', false)\n }\n }\n }\n\n return h('div', data, [\n h(VIcon, '$vuetify.icons.delete')\n ])\n },\n genContent (h: CreateElement): VNode {\n return h('span', {\n staticClass: 'v-chip__content'\n }, [\n this.$slots.default,\n this.close && this.genClose(h)\n ])\n }\n },\n\n render (h): VNode {\n const data = this.setBackgroundColor(this.color, {\n staticClass: 'v-chip',\n 'class': this.classes,\n attrs: { tabindex: this.disabled ? -1 : 0 },\n directives: [{\n name: 'show',\n value: this.isActive\n }],\n on: this.$listeners\n })\n\n const color = this.textColor || (this.outline && this.color)\n return h('span', this.setTextColor(color, data), [this.genContent(h)])\n }\n})\n"],"sourceRoot":""}
|