(this: CheckBox)
| 9 | import triState from "@ui5/webcomponents-icons/dist/tri-state.js"; |
| 10 | |
| 11 | export default function CheckBoxTemplate(this: CheckBox) { |
| 12 | return ( |
| 13 | <div |
| 14 | class={{ |
| 15 | "ui5-checkbox-root": true, |
| 16 | "ui5-checkbox--hoverable": !this.disabled && !this.readonly && isDesktop(), |
| 17 | }} |
| 18 | role={this.accInfo.role} |
| 19 | part="root" |
| 20 | aria-checked={this.accInfo.ariaChecked} |
| 21 | aria-readonly={this.accInfo.ariaReadonly} |
| 22 | aria-disabled={this.accInfo.ariaDisabled} |
| 23 | aria-label={this.ariaLabelText} |
| 24 | aria-labelledby={this.ariaLabelledBy} |
| 25 | aria-describedby={this.ariaDescribedBy} |
| 26 | aria-required={this.accInfo.ariaRequired} |
| 27 | tabindex={this.accInfo.tabindex} |
| 28 | onMouseDown={this._onmousedown} |
| 29 | onMouseUp={this._onmouseup} |
| 30 | onKeyDown={this._onkeydown} |
| 31 | onKeyUp={this._onkeyup} |
| 32 | onClick={this._onclick} |
| 33 | onFocusOut={this._onfocusout} |
| 34 | > |
| 35 | |
| 36 | {this.isDisplayOnly ? |
| 37 | <div class="ui5-checkbox-display-only-icon-inner"> |
| 38 | <Icon aria-hidden="true" name={displayOnlyIcon.call(this)} class="ui5-checkbox-display-only-icon" part="icon"/> |
| 39 | </div> |
| 40 | : |
| 41 | <div id={`${this._id}-CbBg`} class="ui5-checkbox-inner"> |
| 42 | {this.isCompletelyChecked && |
| 43 | <Icon aria-hidden="true" name={accept} class="ui5-checkbox-icon" part="icon"/> |
| 44 | } |
| 45 | </div> |
| 46 | } |
| 47 | |
| 48 | {this.accInfo.role === "checkbox" && |
| 49 | <input |
| 50 | id={`${this._id}-CB`} |
| 51 | type="checkbox" |
| 52 | checked={this.checked} |
| 53 | value={this.value} |
| 54 | readonly={this.readonly} |
| 55 | disabled={this.disabled} |
| 56 | tabindex={-1} |
| 57 | aria-hidden="true" |
| 58 | data-sap-no-tab-ref |
| 59 | /> |
| 60 | } |
| 61 | |
| 62 | {this.text && |
| 63 | <Label |
| 64 | id={`${this._id}-label`} |
| 65 | part="label" |
| 66 | class="ui5-checkbox-label" |
| 67 | wrappingType={this.wrappingType} |
| 68 | required={this.required} |
nothing calls this directly
no test coverage detected
searching dependent graphs…