@aspect-ops/exon-ui 0.4.1 → 0.4.2
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.
- package/dist/components/BottomSheet/BottomSheet.svelte +7 -1
- package/dist/components/SearchInput/SearchInput.svelte +6 -0
- package/dist/components/SearchInput/SearchInput.svelte.d.ts +2 -0
- package/dist/types/input.d.ts +4 -0
- package/dist/types/mobile.d.ts +2 -0
- package/dist/types/navigation.d.ts +2 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
showHandle = true,
|
|
14
14
|
closeOnBackdrop = true,
|
|
15
15
|
closeOnEscape = true,
|
|
16
|
+
onclose,
|
|
16
17
|
class: className = '',
|
|
17
18
|
children
|
|
18
19
|
}: Props = $props();
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
|
|
65
66
|
if (sheetHeight < minPoint) {
|
|
66
67
|
open = false;
|
|
68
|
+
onclose?.();
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -82,10 +84,14 @@
|
|
|
82
84
|
function handleOpenChange(value: boolean) {
|
|
83
85
|
if (!value && !closeOnEscape) return;
|
|
84
86
|
open = value;
|
|
87
|
+
if (!value) onclose?.();
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
function handleBackdropClick() {
|
|
88
|
-
if (closeOnBackdrop)
|
|
91
|
+
if (closeOnBackdrop) {
|
|
92
|
+
open = false;
|
|
93
|
+
onclose?.();
|
|
94
|
+
}
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
function handleKeydown(e: KeyboardEvent) {
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
loading?: boolean;
|
|
11
11
|
maxSuggestions?: number;
|
|
12
12
|
class?: string;
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
13
15
|
oninput?: (e: Event & { currentTarget: HTMLInputElement }) => void;
|
|
14
16
|
onchange?: (e: Event & { currentTarget: HTMLInputElement }) => void;
|
|
15
17
|
onselect?: (value: string) => void;
|
|
@@ -25,6 +27,8 @@
|
|
|
25
27
|
loading = false,
|
|
26
28
|
maxSuggestions = 5,
|
|
27
29
|
class: className = '',
|
|
30
|
+
'aria-label': ariaLabel,
|
|
31
|
+
inputmode = 'search',
|
|
28
32
|
oninput,
|
|
29
33
|
onchange,
|
|
30
34
|
onselect,
|
|
@@ -162,6 +166,8 @@
|
|
|
162
166
|
bind:value
|
|
163
167
|
{placeholder}
|
|
164
168
|
{disabled}
|
|
169
|
+
{inputmode}
|
|
170
|
+
aria-label={ariaLabel}
|
|
165
171
|
role="combobox"
|
|
166
172
|
aria-autocomplete="list"
|
|
167
173
|
aria-expanded={showDropdown}
|
|
@@ -8,6 +8,8 @@ interface Props {
|
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
maxSuggestions?: number;
|
|
10
10
|
class?: string;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
11
13
|
oninput?: (e: Event & {
|
|
12
14
|
currentTarget: HTMLInputElement;
|
|
13
15
|
}) => void;
|
package/dist/types/input.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export interface SearchInputProps {
|
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
maxSuggestions?: number;
|
|
9
9
|
class?: string;
|
|
10
|
+
/** Accessibility label for the input */
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
/** Input mode hint for virtual keyboards */
|
|
13
|
+
inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
10
14
|
}
|
|
11
15
|
export interface DatePickerProps {
|
|
12
16
|
value?: Date | null;
|
package/dist/types/mobile.d.ts
CHANGED