{ // Clicking a mixed-state checkbox always transitions to ticked rather than following HTML's default toggle from the previous `checked` value if (mixed && inputElement && !inputElement.checked) { inputElement.checked = true; checked = true; } dispatch("checked", inputElement?.checked || false); }} {disabled} tabindex={disabled ? -1 : 0} bind:this={inputElement} />