diff --git a/package.json b/package.json index 15b7799..c788446 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@johntalton/bitsmush": "^1.0.1", "@johntalton/boschieu": "^6.0.1", "@johntalton/ds1841": "^1.0.1", - "@johntalton/ds3231": "^1.0.1", + "@johntalton/ds3231": "^1.1.0", "@johntalton/ds3502": "^4.0.0", "@johntalton/excamera-i2cdriver": "^1.0.0", "@johntalton/ht16k33": "^1.0.3", diff --git a/public/css/ds3231.css b/public/css/ds3231.css index 5644448..a6921d7 100644 --- a/public/css/ds3231.css +++ b/public/css/ds3231.css @@ -5,6 +5,10 @@ ds3231-config { & > form input[type="checkbox"] { justify-self: start; + accent-color: var(--color-accent--darker, red); + width: 1.25em; + height: 1.25em; + margin: 0.5em; } & > form[data-output] { diff --git a/public/css/mcp23.css b/public/css/mcp23.css index 57d25f4..5c2774a 100644 --- a/public/css/mcp23.css +++ b/public/css/mcp23.css @@ -20,6 +20,37 @@ mcp23-config { + & :has([data-badge]) { + position: relative; + display: grid; + + & > * { + grid-column: 1 / -1; + grid-row: 1 / -1; + } + } + + & [data-badge] { + align-self: center; + justify-self: end; + margin-inline-end: 1em; + + width: 1em; + height: 1em; + border-radius: 0.5em; + + --percent-accent: 0; + --max-accent: 0.5em; + --lerp-value: clamp( + 0px, + calc(var(--percent-accent) / 100.0 * var(--max-accent)), + var(--max-accent)); + border: var(--lerp-value) solid var(--color-accent--light, red); + + transition: border-width 500ms; + } + + & div[data-port] { display: flex; @@ -58,6 +89,10 @@ mcp23-config { background-color: var(--color-accent--darker, red); color: var(--color-accent--darker-text, red); text-decoration: underline; + + & ~ [data-badge] { + border-color: var(--color-accent--lighter, red); + } } &[data-active]:not(:hover) { @@ -116,6 +151,17 @@ mcp23-config { } + & form[data-refresh] { + display: flex; + flex-direction: row; + margin-block-end: 2em; + gap: 2em; + + & progress { + accent-color: var(--color-accent--darker, red); + } + } + & form[data-status] { display: flex; flex-direction: row; @@ -132,6 +178,14 @@ mcp23-config { & output[data-flag="false"] { visibility: hidden; } + + & output:where([name ^= "portApin"], [name ^= "portBpin"]) { + justify-self: end; + } + + & output:where([name ^= "portApin"], [name ^= "portBpin"])[data-high] { + justify-self: start; + } } } } \ No newline at end of file diff --git a/public/custom-elements/ds3231.html b/public/custom-elements/ds3231.html index 08339af..7a5c5b3 100644 --- a/public/custom-elements/ds3231.html +++ b/public/custom-elements/ds3231.html @@ -10,7 +10,7 @@
@@ -34,7 +34,7 @@ -