impr: add inert property to disclosures for closed

This commit is contained in:
Xylight committed 2025-09-28 15:20:16 -07:00
1 parent fdcef736cf
commit 1f6fe23be5
4 files changed
+20 -11

No files matched your search

@@ -22,13 +22,18 @@
const id = $props.id()
</script>
<div {...rest} class={['w-full', clazz]}>
<div {...rest} class={['w-full relative', clazz]}>
<label for={id} class="w-full">
{@render summary?.({ open })}
</label>
{@render extended?.()}
<input {id} class="hidden input" type="checkbox" bind:checked={open} />
<div class="expand">
<input
{id}
class="appearance-none absolute w-full h-full inset-0 pointer-events-none"
type="checkbox"
bind:checked={open}
/>
<div class="expand" inert={!open}>
{@render children?.({ open })}
</div>
</div>
@@ -42,7 +47,7 @@
transition: grid-template-rows 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.input:checked + .expand {
input:checked + .expand {
grid-template-rows: 1fr;
}
+1 -1
View File
@@ -94,7 +94,7 @@
>
<div
bind:this={el}
use:trapFocus
use:trapFocus={true}
transition:scale|global={{
start: 0.97,
easing: backOut,