[ui] DomiUi: @domi/ui v1.4.0: Water and Touch her are Button again (the handler fix from here), the credit is DomiCredit link={false}

This commit is contained in:
2026-11-23 02:31:50 +01:00
parent 7f8b6861f9
commit 87ca83cd1b
17 changed files with 213 additions and 60 deletions
+11 -2
View File
@@ -56,6 +56,9 @@
disabled = false,
type = 'button',
children,
// Taken out of rest, so the button can run them before its own (a spread before the attribute would lose them).
onkeydown: passedKeydown,
onblur: passedBlur,
...rest
}: Props = $props();
@@ -133,8 +136,14 @@
aria-label={iconOnly ? (armed ? confirm : label) : undefined}
title={iconOnly ? (armed ? confirm : label) : undefined}
onclick={press}
onkeydown={(e) => e.key === 'Escape' && armed && disarm()}
onblur={disarm}
onkeydown={(e) => {
passedKeydown?.(e);
if (e.key === 'Escape' && armed) disarm();
}}
onblur={(e) => {
passedBlur?.(e);
disarm();
}}
use:strike
>
<span class="domi-btn__label">
@@ -8,14 +8,19 @@
import { DOMI_ATTRIBUTION as A } from '../lib/credit';
interface Props {
/**
* true (default): the URL is a link. false: the URL is plain text, for an offline app (Rosea's game, an app with
* no network): the licence asks for the URL to be shown, not to be clickable.
*/
link?: boolean;
class?: string;
}
let { class: cls = '' }: Props = $props();
let { link = true, class: cls = '' }: Props = $props();
</script>
<p class={['domi-credit', cls]}>
<!-- Real spaces around the dots, so copied text reads as the licence writes it; flex ignores them in layout. -->
<span>{A.phrase}</span> <span class="domi-credit__dot" aria-hidden="true">·</span>
<a href={A.url} target="_blank" rel="noopener noreferrer">{A.url}</a>
{#if link}<a href={A.url} target="_blank" rel="noopener noreferrer">{A.url}</a>{:else}<span class="domi-credit__url">{A.url}</span>{/if}
<span class="domi-credit__dot" aria-hidden="true">·</span> <span>{A.copyright}</span>
</p>