diff --git a/package.json b/package.json index 39e64b3..1a1ab0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-radio", - "version": "1.1.0", + "version": "1.2.0", "description": "", "main": "tp-radio.js", "scripts": { diff --git a/tp-radio.js b/tp-radio.js index a8f9b55..686d859 100644 --- a/tp-radio.js +++ b/tp-radio.js @@ -18,10 +18,6 @@ class TpRadio extends Inert(ControlState(FormElement(LitElement))) { cursor: pointer; } - [hidden] { - display: none; - } - .circle { display: flex; align-items: center; @@ -38,6 +34,11 @@ class TpRadio extends Inert(ControlState(FormElement(LitElement))) { background: var(--tp-radio-dot-color, var(--tp-radio-color, #000)); width: calc(var(--tp-radio-width, 18px) - 4px); height: calc(var(--tp-radio-height, 18px) - 4px); + opacity: 0; + } + + .dot[visible] { + opacity: 1; } .wrap { @@ -58,7 +59,7 @@ class TpRadio extends Inert(ControlState(FormElement(LitElement))) { return html`