noph-ui 0.16.12 → 0.16.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
children,
|
|
25
25
|
onfocus,
|
|
26
26
|
onblur,
|
|
27
|
+
inputClass,
|
|
27
28
|
...attributes
|
|
28
29
|
}: TextFieldProps = $props()
|
|
29
30
|
|
|
@@ -183,7 +184,7 @@
|
|
|
183
184
|
}}
|
|
184
185
|
bind:value
|
|
185
186
|
bind:this={inputElement}
|
|
186
|
-
class=
|
|
187
|
+
class={['input', inputClass]}
|
|
187
188
|
rows={attributes.rows || 2}
|
|
188
189
|
></textarea>
|
|
189
190
|
{:else}
|
|
@@ -207,7 +208,7 @@
|
|
|
207
208
|
focused = false
|
|
208
209
|
;(onblur as FocusEventHandler<HTMLInputElement>)?.(event)
|
|
209
210
|
}}
|
|
210
|
-
class=
|
|
211
|
+
class={['input', inputClass]}
|
|
211
212
|
aria-invalid={errorRaw}
|
|
212
213
|
/>
|
|
213
214
|
{#if suffixText}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
|
|
2
|
+
import type { ClassValue, HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
|
|
3
3
|
interface FieldProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
supportingText?: string;
|
|
@@ -14,6 +14,7 @@ interface FieldProps {
|
|
|
14
14
|
element?: HTMLSpanElement;
|
|
15
15
|
inputElement?: HTMLInputElement | HTMLTextAreaElement;
|
|
16
16
|
populated?: boolean;
|
|
17
|
+
inputClass?: ClassValue;
|
|
17
18
|
reportValidity?: () => boolean;
|
|
18
19
|
checkValidity?: () => boolean;
|
|
19
20
|
}
|