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K,cAAL,CAAoB,KAApB,EAA2B;AAChC,QAAA,WAAW,EAAE,6BADmB;AAEhC,QAAA,KAAK,EAAE;AACL,UAAA,EAAE,EAAE,KAAK,EADJ;AAEL,UAAA,IAAI,EAAE,YAFD;AAGL,6BAAmB,KAAK;AAHnB;AAFyB,OAA3B,EAOJ,MAAM,CAAC,OAAP,CAAe,OAAf,CAAuB,cAAvB,CAAsC,IAAtC,CAA2C,IAA3C,CAPI,CAAP;AAQD,KAVM;;AAWP,IAAA,YAAY,GAAA;AACV,YAAM,MAAM,GAAG,MAAM,CAAC,OAAP,CAAe,OAAf,CAAuB,YAAvB,CAAoC,IAApC,CAAyC,IAAzC,CAAf;AAEA,aAAO,MAAM,CAAC,IAAP,CAAa,EAAb,CAAiB,KAAxB;AAEA,aAAO,MAAP;AACD,KAjBM;;AAkBP,IAAA,QAAQ,GAAA;AACN,YAAM,KAAK,GAAG,MAAM,CAAC,OAAP,CAAe,OAAf,CAAuB,QAAvB,CAAgC,IAAhC,CAAqC,IAArC,CAAd;AAEA,UAAI,CAAC,KAAL,EAAY,OAAO,IAAP;AAEZ,MAAA,KAAK,CAAC,IAAN,CAAY,KAAZ,CAAmB,EAAnB,GAAwB,KAAK,UAA7B,CALM,CAMN;;AACA,aAAO,KAAK,CAAC,IAAN,CAAY,KAAZ,CAAmB,GAA1B;AACA,MAAA,KAAK,CAAC,GAAN,GAAY,KAAZ;AAEA,aAAO,KAAP;AACD,KA7BM;;AA8BP,IAAA,OAAO,EAAE,aAAa,CAAC,OAAd,CAAsB,OAAtB,CAA8B;AA9BhC;AAvCsB,CAAlB,CAAf","sourcesContent":["// Styles\nimport '../../styles/components/_selection-controls.sass'\nimport './VRadioGroup.sass'\n\n// Extensions\nimport VInput from '../VInput'\nimport { BaseItemGroup } from '../VItemGroup/VItemGroup'\n\n// Mixins\nimport Comparable from '../../mixins/comparable'\n\n// Types\nimport mixins from '../../util/mixins'\nimport { PropValidator } from 'vue/types/options'\n\nconst baseMixins = mixins(\n Comparable,\n BaseItemGroup,\n VInput\n)\n\n/* @vue/component */\nexport default baseMixins.extend({\n name: 'v-radio-group',\n\n provide () {\n return {\n radioGroup: this,\n }\n },\n\n props: {\n column: {\n type: Boolean,\n default: true,\n },\n height: {\n type: [Number, String],\n default: 'auto',\n },\n name: String,\n row: Boolean,\n // If no value set on VRadio\n // will match valueComparator\n // force default to null\n value: {\n default: null,\n } as PropValidator<any>,\n },\n\n computed: {\n classes (): object {\n return {\n ...VInput.options.computed.classes.call(this),\n 'v-input--selection-controls v-input--radio-group': true,\n 'v-input--radio-group--column': this.column && !this.row,\n 'v-input--radio-group--row': this.row,\n }\n },\n },\n\n methods: {\n genDefaultSlot () {\n return this.$createElement('div', {\n staticClass: 'v-input--radio-group__input',\n attrs: {\n id: this.id,\n role: 'radiogroup',\n 'aria-labelledby': this.computedId,\n },\n }, VInput.options.methods.genDefaultSlot.call(this))\n },\n genInputSlot () {\n const render = VInput.options.methods.genInputSlot.call(this)\n\n delete render.data!.on!.click\n\n return render\n },\n genLabel () {\n const label = VInput.options.methods.genLabel.call(this)\n\n if (!label) return null\n\n label.data!.attrs!.id = this.computedId\n // WAI considers this an orphaned label\n delete label.data!.attrs!.for\n label.tag = 'div'\n\n return label\n },\n onClick: BaseItemGroup.options.methods.onClick,\n },\n})\n"
|