Cleanup p-c class

pull/310/head
cagataycivici 2020-05-02 12:46:30 +03:00
parent 935299b107
commit 3ec1a7446a
10 changed files with 12 additions and 11 deletions

View File

@ -4,7 +4,7 @@
<input ref="input" type="checkbox" :checked="checked" :value="value" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy">
</div>
<div ref="box" :class="['p-checkbox-box', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
<span :class="['p-checkbox-icon p-c', {'pi pi-check': checked}]"></span>
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
</div>
</div>
</template>

View File

@ -4,7 +4,7 @@
<input ref="input" type="checkbox" :checked="checked" @focus="onFocus($event)" @blur="onBlur($event)" :disabled="disabled">
</div>
<div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
<span :class="['p-checkbox-icon p-c', {'pi pi-check': checked}]"></span>
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
</div>
</div>
</template>

View File

@ -4,7 +4,7 @@
<input ref="input" type="checkbox" :checked="checked" @focus="onFocus($event)" @blur="onBlur($event)" :disabled="disabled">
</div>
<div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="checked">
<span :class="['p-checkbox-icon p-c', {'pi pi-check': checked}]"></span>
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
</div>
</div>
</template>

View File

@ -4,7 +4,7 @@
<input ref="input" type="radio" :checked="checked" @focus="onFocus($event)" @blur="onBlur($event)" :disabled="disabled">
</div>
<div ref="box" :class="['p-radiobutton-box p-component', {'p-highlight': checked, 'p-disabled': disabled, 'p-focus': focused}]" role="radio" :aria-checked="checked">
<span :class="['p-radiobutton-icon p-c', {'pi pi-circle-on': checked}]"></span>
<span :class="['p-radiobutton-icon', {'pi pi-circle-on': checked}]"></span>
</div>
</div>
</template>

View File

@ -22,7 +22,7 @@
<input type="checkbox" readonly @focus="onHeaderCheckboxFocus" @blur="onHeaderCheckboxBlur">
</div>
<div :class="['p-checkbox-box p-component', {'p-highlight': allSelected, 'p-focus': headerCheckboxFocused}]" role="checkbox" :aria-checked="allSelected">
<span :class="['p-checkbox-icon p-c', {'pi pi-check': allSelected}]"></span>
<span :class="['p-checkbox-icon', {'pi pi-check': allSelected}]"></span>
</div>
</div>
<div v-if="filter" class="p-multiselect-filter-container">
@ -39,7 +39,7 @@
:aria-label="getOptionLabel(option)" :key="getOptionRenderKey(option)" @click="onOptionSelect($event, option)" @keydown="onOptionKeyDown($event, option)" :tabindex="tabindex||'0'">
<div class="p-checkbox p-component">
<div :class="['p-checkbox-box p-component', {'p-highlight': isSelected(option)}]">
<span :class="['p-checkbox-icon p-c', {'pi pi-check': isSelected(option)}]"></span>
<span :class="['p-checkbox-icon', {'pi pi-check': isSelected(option)}]"></span>
</div>
</div>
<slot name="option" :option="option" :index="i">

View File

@ -4,7 +4,7 @@
<input ref="input" type="radio" :checked="checked" :value="value" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" :aria-labelledby="ariaLabelledBy">
</div>
<div ref="box" :class="['p-radiobutton-box', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="radio" :aria-checked="checked">
<span :class="['p-radiobutton-icon p-c', {'pi pi-circle-on': checked}]"></span>
<span :class="['p-radiobutton-icon', {'pi pi-circle-on': checked}]"></span>
</div>
</div>
</template>

View File

@ -297,7 +297,7 @@ export default {
return ['p-checkbox-box', {'p-highlight': this.checked}];
},
checkboxIcon() {
return ['p-checkbox-icon p-c', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
},
checkboxMode() {
return this.selectionMode === 'checkbox' && this.node.selectable !== false;

View File

@ -236,7 +236,7 @@ export default {
return ['p-checkbox-box', {'p-highlight': this.checked, 'p-focus': this.checkboxFocused}];
},
checkboxIcon() {
return ['p-checkbox-icon p-c', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];
},
checked() {
return this.selectionKeys ? this.selectionKeys[this.node.key] && this.selectionKeys[this.node.key].checked: false;

View File

@ -4,7 +4,7 @@
<input ref="input" type="checkbox" :checked="value === true" v-bind="$attrs" @focus="onFocus()" @blur="onBlur()" :aria-labelledby="ariaLabelledBy">
</div>
<div ref="box" :class="['p-checkbox-box', {'p-highlight': (value != null), 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="checkbox" :aria-checked="value === true">
<span :class="['p-checkbox-icon p-c', icon]"></span>
<span :class="['p-checkbox-icon', icon]"></span>
</div>
</div>
</template>

View File

@ -423,7 +423,8 @@ export default class DomHandler {
return (targetNode == 'INPUT' || targetNode == 'BUTTON' || targetNode == 'A' ||
parentNode == 'INPUT' || parentNode == 'BUTTON' || parentNode == 'A' ||
this.hasClass(element, 'p-button') || this.hasClass(element.parentElement, 'p-button')
this.hasClass(element, 'p-button') || this.hasClass(element.parentElement, 'p-button') ||
this.hasClass(element.parentElement, 'p-checkbox') || this.hasClass(element.parentElement, 'p-radiobutton')
);
}
}