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,KAAD,EAAQ;AACP,MAAA,WAAW,EAAE,UADN;AAEP,MAAA,KAAK,EAAE,KAAK,OAFL;AAGP,MAAA,KAAK,EAAE,KAAK,MAHL;AAIP,MAAA,UAAU,EAAE,CAAC;AACX,QAAA,IAAI,EAAE,MADK;AAEX,QAAA,KAAK,EAAE,KAAK;AAFD,OAAD;AAJL,KAAR,EAQE,CAAC,KAAK,UAAL,EAAD,CARF,CADyB,CAApB,CAAR;AAWD;AA5IM,CAHM,C","sourcesContent":["// Styles\nimport './VBanner.sass'\n\n// Extensions\nimport VSheet from '../VSheet'\n\n// Components\nimport VAvatar from '../VAvatar'\nimport VIcon from '../VIcon'\nimport { VExpandTransition } from '../transitions'\n\n// Mixins\nimport Toggleable from '../../mixins/toggleable'\n\n// Types\nimport { VNode } from 'vue/types'\nimport mixins from '../../util/mixins'\nimport { PropValidator } from 'vue/types/options'\n\n/* @vue/component */\nexport default mixins(\n VSheet,\n Toggleable\n).extend({\n name: 'v-banner',\n\n inheritAttrs: false,\n\n props: {\n icon: String,\n iconColor: String,\n mobileBreakPoint: {\n type: [Number, String],\n default: 960,\n } as PropValidator<string | number>,\n singleLine: Boolean,\n sticky: Boolean,\n tile: {\n type: Boolean,\n default: true,\n },\n value: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n classes (): object {\n return {\n ...VSheet.options.computed.classes.call(this),\n 'v-banner--has-icon': this.hasIcon,\n 'v-banner--is-mobile': this.isMobile,\n 'v-banner--single-line': this.singleLine,\n 'v-banner--sticky': this.sticky,\n }\n },\n hasActions (): boolean {\n return Boolean(this.$slots.actions || this.$scopedSlots.actions)\n },\n hasIcon (): boolean {\n return Boolean(this.icon || this.$slots.icon)\n },\n isMobile (): boolean {\n return this.$vuetify.breakpoint.width < Number(this.mobileBreakPoint)\n },\n styles (): object {\n const styles = VSheet.options.computed.styles.call(this)\n\n if (!this.sticky) return styles\n\n const { bar, top } = this.$vuetify.application\n\n return {\n ...styles,\n position: 'sticky',\n top: `${bar + top}px`,\n zIndex: 1,\n }\n },\n },\n\n methods: {\n /** @public */\n toggle () {\n this.isActive = !this.isActive\n },\n iconClick (e: MouseEvent) {\n this.$emit('click:icon', e)\n },\n genIcon () {\n if (!this.hasIcon) return undefined\n\n let content\n\n if (this.icon) {\n content = this.$createElement(VIcon, {\n props: {\n color: this.iconColor,\n size: 28,\n },\n }, [this.icon])\n } else {\n content = this.$slots.icon\n }\n\n return this.$createElement(VAvatar, {\n staticClass: 'v-banner__icon',\n props: {\n color: this.color,\n size: 40,\n },\n on: {\n click: this.iconClick,\n },\n }, [content])\n },\n genText () {\n return this.$createElement('div', {\n staticClass: 'v-banner__text',\n }, this.$slots.default)\n },\n genActions () {\n if (!this.hasActions) return undefined\n\n const children = this.$scopedSlots.actions ? this.$scopedSlots.actions({\n dismiss: () => this.isActive = false,\n }) : this.$slots.actions\n\n return this.$createElement('div', {\n staticClass: 'v-banner__actions',\n }, children)\n },\n genContent () {\n return this.$createElement('div', {\n staticClass: 'v-banner__content',\n }, [\n this.genIcon(),\n this.genText(),\n ])\n },\n genWrapper () {\n return this.$createElement('div', {\n staticClass: 'v-banner__wrapper',\n }, [\n this.genContent(),\n this.genActions(),\n ])\n },\n },\n\n render (h): VNode {\n return h(VExpandTransition, [\n h('div', {\n staticClass: 'v-banner',\n class: this.classes,\n style: this.styles,\n directives: [{\n name: 'show',\n value: this.isActive,\n }],\n }, [this.genWrapper()]),\n ])\n },\n})\n"],"sourceRoot":"","file":"VBanner.js"} |