@likable-hair/svelte 4.0.32 → 4.0.34
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.
|
@@ -58,9 +58,7 @@ declare class __sveltets_Render<Data> {
|
|
|
58
58
|
searchText: string | undefined;
|
|
59
59
|
disabled: boolean;
|
|
60
60
|
openMenu: () => void;
|
|
61
|
-
handleKeyDown: (event:
|
|
62
|
-
key: string;
|
|
63
|
-
}) => void;
|
|
61
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
64
62
|
unselect: (item: Item<Data>) => void;
|
|
65
63
|
select: (item: Item<Data>) => void;
|
|
66
64
|
}]> | undefined;
|
|
@@ -96,7 +94,7 @@ declare class __sveltets_Render<Data> {
|
|
|
96
94
|
}) => void) | undefined;
|
|
97
95
|
onfocus?: (() => void) | undefined;
|
|
98
96
|
onblur?: (() => void) | undefined;
|
|
99
|
-
onkeydown?: (() => void) | undefined;
|
|
97
|
+
onkeydown?: ((e: KeyboardEvent) => void) | undefined;
|
|
100
98
|
onclose?: ComponentProps<typeof import("../common/MenuOrDrawer.svelte").default>["onclose"];
|
|
101
99
|
};
|
|
102
100
|
events(): {};
|
|
@@ -104,7 +104,7 @@ function handleTextFieldBlur() {
|
|
|
104
104
|
let menuElement = $state();
|
|
105
105
|
function handleKeyDown(event) {
|
|
106
106
|
if (onkeydown) {
|
|
107
|
-
onkeydown();
|
|
107
|
+
onkeydown(event);
|
|
108
108
|
}
|
|
109
109
|
if (disabled)
|
|
110
110
|
return;
|
|
@@ -129,7 +129,8 @@ function handleKeyDown(event) {
|
|
|
129
129
|
pop();
|
|
130
130
|
}
|
|
131
131
|
else if (event.key == "Escape" || event.key == "Tab") {
|
|
132
|
-
|
|
132
|
+
if (emptySearchTextOnMenuClose)
|
|
133
|
+
searchText = "";
|
|
133
134
|
if (!!input)
|
|
134
135
|
input.blur();
|
|
135
136
|
menuOpened = false;
|
|
@@ -45,9 +45,7 @@ declare class __sveltets_Render<Data> {
|
|
|
45
45
|
searchText: string | undefined;
|
|
46
46
|
disabled: boolean;
|
|
47
47
|
openMenu: () => void;
|
|
48
|
-
handleKeyDown: (event:
|
|
49
|
-
key: string;
|
|
50
|
-
}) => void;
|
|
48
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
51
49
|
unselect: (item: Item<Data>) => void;
|
|
52
50
|
select: (item: Item<Data>) => void;
|
|
53
51
|
}]> | undefined;
|
|
@@ -83,7 +81,7 @@ declare class __sveltets_Render<Data> {
|
|
|
83
81
|
}) => void) | undefined;
|
|
84
82
|
onfocus?: (() => void) | undefined;
|
|
85
83
|
onblur?: (() => void) | undefined;
|
|
86
|
-
onkeydown?: (() => void) | undefined;
|
|
84
|
+
onkeydown?: ((e: KeyboardEvent) => void) | undefined;
|
|
87
85
|
onclose?: ComponentProps<typeof MenuOrDrawer>["onclose"];
|
|
88
86
|
};
|
|
89
87
|
events(): {};
|