refactor: consume Commonlib as a package

This commit is contained in:
vorotamoroz
2026-07-17 11:13:16 +00:00
parent 6475d32769
commit a721d3b602
665 changed files with 3438 additions and 31592 deletions
@@ -0,0 +1,34 @@
<script lang="ts">
import { translateIfAvailable as translate } from "@vrtmrz/livesync-commonlib/compat/common/i18n";
type Props = {
value: string;
name?: string;
placeholder?: string;
disabled?: boolean;
required?: boolean;
};
let {
value = $bindable(),
name = "password",
placeholder = "Enter your password",
disabled = false,
required = false,
}: Props = $props();
let showPassword = $state(false);
const type = $derived.by(() => (showPassword ? "text" : "password"));
const translatedPlaceholder = $derived.by(() => translate(placeholder));
</script>
<input
{type}
{name}
placeholder={translatedPlaceholder}
bind:value
{disabled}
{required}
spellcheck="false"
autocorrect="off"
autocapitalize="off"
/>
<input type="checkbox" bind:checked={showPassword} />