noph-ui 0.18.0 → 0.18.1
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
|
onkeydown,
|
|
25
25
|
onclick,
|
|
26
26
|
oninput,
|
|
27
|
+
focused = $bindable(false),
|
|
27
28
|
...attributes
|
|
28
29
|
}: AutoCompleteProps = $props()
|
|
29
30
|
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
populated={finalPopulated}
|
|
75
76
|
bind:clientWidth
|
|
76
77
|
bind:value
|
|
78
|
+
bind:focused
|
|
77
79
|
style="anchor-name:--{uid};"
|
|
78
80
|
onclick={(event) => {
|
|
79
81
|
finalPopulated = true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AutoCompleteProps } from './types.ts';
|
|
2
|
-
declare const AutoComplete: import("svelte").Component<AutoCompleteProps, {}, "element" | "value" | "reportValidity" | "checkValidity">;
|
|
2
|
+
declare const AutoComplete: import("svelte").Component<AutoCompleteProps, {}, "element" | "value" | "reportValidity" | "checkValidity" | "focused">;
|
|
3
3
|
type AutoComplete = ReturnType<typeof AutoComplete>;
|
|
4
4
|
export default AutoComplete;
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
children,
|
|
25
25
|
onfocus,
|
|
26
26
|
onblur,
|
|
27
|
+
focused = $bindable(false),
|
|
27
28
|
clientWidth = $bindable(),
|
|
28
29
|
clientHeight = $bindable(),
|
|
29
30
|
...attributes
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
let errorTextRaw: string = $state(errorText)
|
|
34
35
|
let focusOnInvalid = $state(true)
|
|
35
36
|
let doValidity = $state(false)
|
|
36
|
-
let focused = $state(false)
|
|
37
37
|
|
|
38
38
|
reportValidity = () => {
|
|
39
39
|
if (inputElement) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TextFieldProps } from './types.ts';
|
|
2
|
-
declare const TextField: import("svelte").Component<TextFieldProps, {}, "element" | "value" | "reportValidity" | "checkValidity" | "inputElement" | "clientWidth" | "clientHeight">;
|
|
2
|
+
declare const TextField: import("svelte").Component<TextFieldProps, {}, "element" | "value" | "reportValidity" | "checkValidity" | "inputElement" | "clientWidth" | "clientHeight" | "focused">;
|
|
3
3
|
type TextField = ReturnType<typeof TextField>;
|
|
4
4
|
export default TextField;
|
|
@@ -18,6 +18,7 @@ interface FieldProps {
|
|
|
18
18
|
checkValidity?: () => boolean;
|
|
19
19
|
clientWidth?: number;
|
|
20
20
|
clientHeight?: number;
|
|
21
|
+
focused?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export interface InputFieldProps extends HTMLInputAttributes, FieldProps {
|
|
23
24
|
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' | 'datetime-local';
|