From ff9af6dd0a057bf8f1c270dc1a9c58ebbb15a5df Mon Sep 17 00:00:00 2001 From: Elijah Duffy Date: Thu, 3 Jul 2025 11:16:30 -0700 Subject: [PATCH] styled raw input: make name property optional --- src/lib/StyledRawInput.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/StyledRawInput.svelte b/src/lib/StyledRawInput.svelte index f7c7884..7a87de5 100644 --- a/src/lib/StyledRawInput.svelte +++ b/src/lib/StyledRawInput.svelte @@ -5,9 +5,10 @@ type InputValidatorEvent, type ValidatorOptions } from '@svelte-toolkit/validate'; + import { generateIdentifier } from './util.js'; type $Props = Omit & { - name: string; + name?: string; value?: string; validate?: ValidatorOptions; ref?: HTMLInputElement | null; @@ -15,6 +16,7 @@ }; let { + id = generateIdentifier('styled-raw-input'), name, value = $bindable(''), placeholder, @@ -35,7 +37,7 @@