button.php
2 years ago
checkbox.php
2 years ago
collapse.php
2 years ago
colorpicker.php
2 years ago
component-wrapper.php
2 years ago
dimensions.php
2 years ago
f-select.php
2 years ago
fselect.php
2 years ago
iconpicker.php
2 years ago
input.php
2 years ago
list-table-heading.php
2 years ago
list-table-item.php
2 years ago
list-table.php
2 years ago
notice.php
2 years ago
pagination.php
2 years ago
popup.php
2 years ago
radio.php
2 years ago
repeater-item.php
2 years ago
repeater.php
2 years ago
select.php
2 years ago
switcher.php
2 years ago
tabs-panel.php
2 years ago
tabs.php
2 years ago
textarea.php
2 years ago
time.php
2 years ago
title.php
2 years ago
wp-media.php
2 years ago
radio.php
62 lines
| 1 | <cx-vui-component-wrapper |
| 2 | :elementId="currentId" |
| 3 | :label="label" |
| 4 | :description="description" |
| 5 | :wrapper-css="wrapperCss" |
| 6 | :preventWrap="preventWrap" |
| 7 | v-if="isVisible()" |
| 8 | > |
| 9 | <div |
| 10 | :class="{ |
| 11 | 'cx-vui-radiogroup': true, |
| 12 | 'cx-vui-radiogroup--single-item': this.optionsList.length === 1 |
| 13 | }" |
| 14 | :id="currentId" |
| 15 | tabindex="0" |
| 16 | > |
| 17 | <div |
| 18 | class="cx-vui-radio-wrap" |
| 19 | v-for="( option, index ) in optionsList" |
| 20 | > |
| 21 | <div |
| 22 | :key="name + option.value + index" |
| 23 | :class="{ |
| 24 | 'cx-vui-radio': true, |
| 25 | 'cx-vui-radio--disabled': disabled, |
| 26 | 'cx-vui-radio--checked': option.value === currentValue, |
| 27 | 'cx-vui-radio--focused': isOptionInFocus( option.value ), |
| 28 | }" |
| 29 | @click="handleInput( $event, option.value )" |
| 30 | @focus="handleFocus( $event, option.value )" |
| 31 | @blur="handleBlur( $event, option.value )" |
| 32 | tabindex="0" |
| 33 | > |
| 34 | <input |
| 35 | :class="{ |
| 36 | 'cx-vui-radio__input': true, |
| 37 | }" |
| 38 | :name="name + '[' + option.value + ']'" |
| 39 | :value="option.value" |
| 40 | :checked="option.value === currentValue" |
| 41 | :disabled="disabled" |
| 42 | type="radio" |
| 43 | > |
| 44 | <div |
| 45 | :class="{ |
| 46 | 'cx-vui-radio__mark': true, |
| 47 | 'cx-vui-radio__mark--disabled': disabled, |
| 48 | 'cx-vui-radio__mark--checked': option.value === currentValue, |
| 49 | 'cx-vui-radio__mark--focused': isOptionInFocus( option.value ), |
| 50 | }" |
| 51 | > |
| 52 | </div> |
| 53 | <div |
| 54 | :class="{ |
| 55 | 'cx-vui-radio__label': true, |
| 56 | }" |
| 57 | v-html="option.label" |
| 58 | ></div> |
| 59 | </div> |
| 60 | </div> |
| 61 | </div> |
| 62 | </cx-vui-component-wrapper> |