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AACL,QAAA,IAAI,EAAE,KAAK,UADN;AAEL,QAAA,IAAI,EAAE,KAAK,IAFN;AAGL,QAAA,MAAM,EAAE,KAAK,MAHR;AAIL,QAAA,GAAG,EAAE;AAJA;AAF0B,KAArB,EAQX,QARW,CAAd;AAUA,WAAO,CAAC,CAAC,KAAD,EAAQ,IAAR,EAAc,CAAC,KAAK,MAAL,CAAY,SAAb,EAAwB,IAAxB,CAAd,CAAR;AACD;AAlFoE,CAAxD,C","sourcesContent":["// Styles\nimport './VSpeedDial.sass'\n\n// Mixins\nimport Toggleable from '../../mixins/toggleable'\nimport Positionable from '../../mixins/positionable'\nimport Transitionable from '../../mixins/transitionable'\n\n// Directives\nimport ClickOutside from '../../directives/click-outside'\n\n// Types\nimport mixins from '../../util/mixins'\nimport { VNode, VNodeData } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\n/* @vue/component */\nexport default mixins(Positionable, Toggleable, Transitionable).extend({\n name: 'v-speed-dial',\n\n directives: { ClickOutside },\n\n props: {\n direction: {\n type: String,\n default: 'top',\n validator: (val: string) => {\n return ['top', 'right', 'bottom', 'left'].includes(val)\n },\n } as PropValidator<'top' | 'right' | 'bottom' | 'left'>,\n openOnHover: Boolean,\n transition: {\n type: String,\n default: 'scale-transition',\n },\n },\n\n computed: {\n classes (): object {\n return {\n 'v-speed-dial': true,\n 'v-speed-dial--top': this.top,\n 'v-speed-dial--right': this.right,\n 'v-speed-dial--bottom': this.bottom,\n 'v-speed-dial--left': this.left,\n 'v-speed-dial--absolute': this.absolute,\n 'v-speed-dial--fixed': this.fixed,\n [`v-speed-dial--direction-${this.direction}`]: true,\n }\n },\n },\n\n render (h): VNode {\n let children: VNode[] = []\n const data: VNodeData = {\n class: this.classes,\n directives: [{\n name: 'click-outside',\n value: () => (this.isActive = false),\n }],\n on: {\n click: () => (this.isActive = !this.isActive),\n },\n }\n\n if (this.openOnHover) {\n data.on!.mouseenter = () => (this.isActive = true)\n data.on!.mouseleave = () => (this.isActive = false)\n }\n\n if (this.isActive) {\n let btnCount = 0\n children = (this.$slots.default || []).map((b, i) => {\n if (b.tag && typeof b.componentOptions !== 'undefined' && b.componentOptions.Ctor.options.name === 'v-btn') {\n btnCount++\n return h('div', {\n style: {\n transitionDelay: btnCount * 0.05 + 's',\n },\n key: i,\n }, [b])\n } else {\n b.key = i\n return b\n }\n })\n }\n\n const list = h('transition-group', {\n class: 'v-speed-dial__list',\n props: {\n name: this.transition,\n mode: this.mode,\n origin: this.origin,\n tag: 'div',\n },\n }, children)\n\n return h('div', data, [this.$slots.activator, list])\n },\n})\n"],"sourceRoot":"","file":"VSpeedDial.js"} |