@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.
@@ -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) open = false;
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;
@@ -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;
@@ -11,6 +11,8 @@ export interface BottomSheetProps {
11
11
  showHandle?: boolean;
12
12
  closeOnBackdrop?: boolean;
13
13
  closeOnEscape?: boolean;
14
+ /** Callback when sheet is closed */
15
+ onclose?: () => void;
14
16
  class?: string;
15
17
  }
16
18
  export interface BottomSheetHeaderProps {
@@ -73,7 +73,8 @@ export interface BottomNavProps {
73
73
  class?: string;
74
74
  }
75
75
  export interface BottomNavItemProps {
76
- label: string;
76
+ /** Label text (optional if using children/slots) */
77
+ label?: string;
77
78
  icon: string;
78
79
  href?: string;
79
80
  active?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aspect-ops/exon-ui",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Reusable Svelte UI components for web and Capacitor mobile apps",
5
5
  "author": "Exon Team",
6
6
  "license": "MIT",