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AEtBnB,EAAMK,KAAMkC,MAAOC,IAC1BxC,EAAM0E,IAAM,SAEL1E,GAPY,IAQpB,EACD2E,QAASV,EAAAA,EAAclD,QAAQe,QAAQ6C,SAGzCf,MAAAA,CAAQC,GACN,MAAMe,EAAQxD,EAAAA,EAAOL,QAAQ6C,OAAO5C,KAAKP,KAAMoD,GAI/C,OAFApD,KAAKoE,GAAGD,EAAMvE,KAAO,MAAOI,KAAKsC,QAE1B6B,CACR,G","sources":["webpack://neuro-terminal-spa-client/../../../src/components/VRadioGroup/VRadio.ts","webpack://neuro-terminal-spa-client/../../../src/components/VRadioGroup/VRadioGroup.ts"],"sourcesContent":["// Styles\nimport './VRadio.sass'\n\n// Components\nimport VRadioGroup from './VRadioGroup'\nimport VLabel from '../VLabel'\nimport VIcon from '../VIcon'\nimport VInput from '../VInput'\n\n// Mixins\nimport BindsAttrs from '../../mixins/binds-attrs'\nimport Colorable from '../../mixins/colorable'\nimport { factory as GroupableFactory } from '../../mixins/groupable'\nimport Rippleable from '../../mixins/rippleable'\nimport Themeable from '../../mixins/themeable'\nimport Selectable, { prevent } from '../../mixins/selectable'\n\n// Utilities\nimport { getSlot } from '../../util/helpers'\n\n// Types\nimport { VNode, VNodeData } from 'vue'\nimport mixins from '../../util/mixins'\nimport { mergeListeners } from '../../util/mergeData'\n\nconst baseMixins = mixins(\n BindsAttrs,\n Colorable,\n Rippleable,\n GroupableFactory('radioGroup'),\n Themeable\n)\n\ninterface options extends InstanceType {\n radioGroup: InstanceType\n}\n\n/* @vue/component */\nexport default baseMixins.extend().extend({\n name: 'v-radio',\n\n inheritAttrs: false,\n\n props: {\n disabled: {\n type: Boolean,\n default: null,\n },\n id: String,\n label: String,\n name: String,\n offIcon: {\n type: String,\n default: '$radioOff',\n },\n onIcon: {\n type: String,\n default: '$radioOn',\n },\n readonly: {\n type: Boolean,\n default: null,\n },\n value: {\n default: null,\n },\n },\n\n data: () => ({\n isFocused: false,\n }),\n\n computed: {\n classes (): object {\n return {\n 'v-radio--is-disabled': this.isDisabled,\n 'v-radio--is-focused': this.isFocused,\n ...this.themeClasses,\n ...this.groupClasses,\n }\n },\n computedColor (): string | undefined {\n if (this.isDisabled) return undefined\n return Selectable.options.computed.computedColor.call(this)\n },\n computedIcon (): string {\n return this.isActive\n ? this.onIcon\n : this.offIcon\n },\n computedId (): string {\n return VInput.options.computed.computedId.call(this)\n },\n hasLabel: VInput.options.computed.hasLabel,\n hasState (): boolean {\n return (this.radioGroup || {}).hasState\n },\n isDisabled (): boolean {\n return this.disabled ?? (\n !!this.radioGroup &&\n this.radioGroup.isDisabled\n )\n },\n isReadonly (): boolean {\n return this.readonly ?? (\n !!this.radioGroup &&\n this.radioGroup.isReadonly\n )\n },\n computedName (): string {\n if (this.name || !this.radioGroup) {\n return this.name\n }\n\n return this.radioGroup.name || `radio-${this.radioGroup._uid}`\n },\n rippleState (): string | undefined {\n return Selectable.options.computed.rippleState.call(this)\n },\n validationState (): string | undefined {\n return (this.radioGroup || {}).validationState || this.computedColor\n },\n },\n\n methods: {\n genInput (args: any) {\n // We can't actually use the mixin directly because\n // it's made for standalone components, but its\n // genInput method is exactly what we need\n return Selectable.options.methods.genInput.call(this, 'radio', args)\n },\n genLabel () {\n if (!this.hasLabel) return null\n\n return this.$createElement(VLabel, {\n on: {\n // Label shouldn't cause the input to focus\n click: prevent,\n },\n attrs: {\n for: this.computedId,\n },\n props: {\n color: this.validationState,\n focused: this.hasState,\n },\n }, getSlot(this, 'label') || this.label)\n },\n genRadio () {\n const { title, ...radioAttrs } = this.attrs$\n\n return this.$createElement('div', {\n staticClass: 'v-input--selection-controls__input',\n }, [\n this.$createElement(VIcon, this.setTextColor(this.validationState, {\n props: {\n dense: this.radioGroup && this.radioGroup.dense,\n },\n }), this.computedIcon),\n this.genInput({\n name: this.computedName,\n value: this.value,\n ...radioAttrs,\n }),\n this.genRipple(this.setTextColor(this.rippleState)),\n ])\n },\n onFocus (e: Event) {\n this.isFocused = true\n this.$emit('focus', e)\n },\n onBlur (e: Event) {\n this.isFocused = false\n this.$emit('blur', e)\n },\n onChange () {\n if (this.isDisabled || this.isReadonly || this.isActive) return\n\n this.toggle()\n },\n onKeydown: () => {}, // Override default with noop\n },\n\n render (h): VNode {\n const data: VNodeData = {\n staticClass: 'v-radio',\n class: this.classes,\n on: mergeListeners({\n click: this.onChange,\n }, this.listeners$),\n attrs: { title: this.attrs$.title },\n }\n\n return h('div', data, [\n this.genRadio(),\n this.genLabel(),\n ])\n },\n})\n","// Styles\nimport '../../styles/components/_selection-controls.sass'\nimport './VRadioGroup.sass'\n\n// Extensions\nimport VInput from '../VInput'\nimport { BaseItemGroup } from '../VItemGroup/VItemGroup'\n\n// Types\nimport mixins from '../../util/mixins'\nimport { PropType } from 'vue'\n\nconst baseMixins = mixins(\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: null as unknown as PropType,\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 = 'legend'\n\n return label\n },\n onClick: BaseItemGroup.options.methods.onClick,\n },\n\n render (h) {\n const vnode = VInput.options.render.call(this, h)\n\n this._b(vnode.data!, 'div', this.attrs$)\n\n return vnode\n },\n})\n"],"names":["baseMixins","mixins","BindsAttrs","Colorable","Rippleable","GroupableFactory","Themeable","extend","name","inheritAttrs","props","disabled","type","Boolean","default","id","String","label","offIcon","onIcon","readonly","value","data","isFocused","computed","classes","this","isDisabled","themeClasses","groupClasses","computedColor","Selectable","options","call","computedIcon","isActive","computedId","VInput","hasLabel","hasState","radioGroup","_a","isReadonly","computedName","_uid","rippleState","validationState","methods","genInput","args","genLabel","$createElement","VLabel","on","click","prevent","attrs","for","color","focused","getSlot","genRadio","title","radioAttrs","attrs$","staticClass","VIcon","setTextColor","dense","genRipple","onFocus","e","$emit","onBlur","onChange","toggle","onKeydown","render","h","class","mergeListeners","listeners$","BaseItemGroup","provide","column","height","Number","row","genDefaultSlot","role","genInputSlot","tag","onClick","vnode","_b"],"sourceRoot":""}