PageSourceSearch

https://palplus.wepcofcu.com/en/js/jha-form-radio-button-DbXTqp5Z.js

js wepcofcu.com collected 2026-09-30 10:01:41 UTC 3,274 bytes, 1 lines download raw bytes

1import{n as e,r as t}from"./polymer-C_GypsRJ.js";window.JhaFormRadioButtonElement=class extends e{static get is(){return`jha-form-radio-button`}static get properties(){return{checked:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:window.JhaFormRadioButtonElement.prototype.checkChanged,value:!1},name:String,value:String,disabled:{type:Boolean,reflectToAttribute:!0,value:!1},disableClick:{type:Boolean,reflectToAttribute:!0,value:!1}}}constructor(){super(),this.form_=null}connectedCallback(){super.connectedCallback(),this.form_=this.closest(`form`),this.addEventListener(`click`,this.onClick_),this.addEventListener(`focus`,e=>{this.setAttribute(`aria-label`,this.innerText)}),this.addEventListener(`keydown`,this.onKeyDown_),this.setAttribute(`role`,`checkbox`)}checkChanged(e){this.setAttribute(`aria-checked`,e)}onClick_(e){this.disabled||this.disableClick||(this.checked=!0,this.dispatchEvent(new CustomEvent(`checked`,{bubbles:!0,composed:!1,detail:{value:this.value}})),this.form_&&setTimeout(()=>{for(let e of this.form_.querySelectorAll(window.JhaFormRadioButtonElement.is))e!==this&&e.name===this.name&&(e.checked=!1)},0))}onKeyDown_(e){switch(e&&e.keyCode){case 32:this.onClick_(e),e.preventDefault();break;case 38:{let t=this.previousElementSibling;t&&t instanceof window.JhaFormRadioButtonElement&&t.focus(),e.preventDefault();break}case 40:{let t=this.nextElementSibling;t&&t instanceof window.JhaFormRadioButtonElement&&t.focus(),e.preventDefault();break}default:break}}static get template(){return t`<style>:host{text-align:left;padding:var(--jha-form-radio-button-padding,8px);display:flex}:host(:focus),:host(:focus-within),:host(:focus-visible){background:var(--jha-focus-highlight-color);outline:none}label{color:var(--jha-text-base,#6b757b);cursor:pointer;flex:var(--jha-form-radio-button-label-flex,0 1 auto);margin-bottom:6px;padding-top:2px;font-size:14px;display:block;position:relative}input{display:none}span{text-align:center;border:1px solid var(--input-border-color,var(--jha-color-neutral,#8d99a0));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;width:14px;height:14px;margin-right:var(--jha-form-radio-button-padding-left,20px);background-position:50%;background-repeat:no-repeat;background-size:18px;border-radius:50%;flex-shrink:0;line-height:14px;transition:all .2s;display:block;position:relative;top:3px;left:0}:host([disabled]) span,:host([disabled]) label{opacity:.6;cursor:default}:host([checked]) span{background-color:var(--jha-color-primary,#006ee4);border-color:var(--jha-color-primary,#006ee4)}:host([checked]:focus) span,:host([checked]:focus-within) span,:host([checked]:focus-visible) span{box-shadow:0 0 0 2px var(--jha-color-primary,#006ee4)}:host([checked]) span:before{content:"";background-color:var(--jha-text-white,#fff);border-radius:50%;width:50%;height:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}</style> <input id="radioInput" type="radio" name$="[[name]]" value$="[[value]]" checked$="[[checked]]" disabled$="[[disabled]]"> <span></span> <label for="radioInput"> <slot></slot> </label>`}},customElements.define(window.JhaFormRadioButtonElement.is,window.JhaFormRadioButtonElement),window.JhaFormRadioButtonElement;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.