noph-ui 0.48.1 → 0.49.0
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.
|
@@ -104,11 +104,10 @@
|
|
|
104
104
|
</script>
|
|
105
105
|
|
|
106
106
|
{#snippet item(option: AutoCompleteOption, index: number)}
|
|
107
|
-
{#snippet supportingText()}
|
|
108
|
-
{option.supportingText}
|
|
109
|
-
{/snippet}
|
|
110
107
|
<Item
|
|
111
108
|
id="{uid}-opt-{index}"
|
|
109
|
+
class={option.class}
|
|
110
|
+
style={option.style}
|
|
112
111
|
softFocus={index === activeIndex}
|
|
113
112
|
aria-selected={index === activeIndex}
|
|
114
113
|
role="option"
|
|
@@ -125,7 +124,7 @@
|
|
|
125
124
|
variant="button"
|
|
126
125
|
start={option.start}
|
|
127
126
|
end={option.end}
|
|
128
|
-
supportingText={option.supportingText
|
|
127
|
+
supportingText={option.supportingText}
|
|
129
128
|
>{option.label}
|
|
130
129
|
</Item>
|
|
131
130
|
{/snippet}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import type { ItemProps } from '../list/types.js';
|
|
1
2
|
import type { TextFieldProps } from '../types.js';
|
|
2
|
-
|
|
3
|
-
export interface AutoCompleteOption {
|
|
3
|
+
export interface AutoCompleteOption extends Pick<ItemProps, 'start' | 'end' | 'supportingText' | 'class' | 'style'> {
|
|
4
4
|
value?: string | number;
|
|
5
5
|
label: string;
|
|
6
|
-
start?: Snippet;
|
|
7
|
-
end?: Snippet;
|
|
8
|
-
supportingText?: string;
|
|
9
6
|
}
|
|
10
7
|
export interface AutoCompleteProps extends Omit<TextFieldProps, 'clientWidth' | 'clientHeight'> {
|
|
11
8
|
options: AutoCompleteOption[];
|
package/dist/list/Item.svelte
CHANGED
package/dist/list/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ItemProps extends HTMLAttributes<ItemElement>, Omit<HTMLButtonA
|
|
|
7
7
|
end?: Snippet;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
variant?: 'button' | 'link' | 'text';
|
|
10
|
-
supportingText?: Snippet;
|
|
10
|
+
supportingText?: string | Snippet;
|
|
11
11
|
softFocus?: boolean;
|
|
12
12
|
lazy?: boolean;
|
|
13
13
|
type?: 'submit' | 'reset' | 'button' | null;
|