Refresh UI components and showcase; release updated framework packages
This commit is contained in:
1 parent
d800228585
commit
c77f5e1cec
293 files changed
+22544
-35778
No files matched your search
@@ -62,8 +62,9 @@ component ComboBox {
|
||||
state activeIndex: number = -1
|
||||
|
||||
functions {
|
||||
shared function groupOptions(group) { return group.options || [] }
|
||||
shared function allOptions() {
|
||||
return [...groups.flatMap((group) => group.options || []), ...options]
|
||||
return groups.flatMap(groupOptions).concat(options)
|
||||
}
|
||||
|
||||
shared function searchableText(option) {
|
||||
@@ -84,7 +85,7 @@ component ComboBox {
|
||||
}
|
||||
|
||||
shared function matchingOptions(list) {
|
||||
return list.filter((option) => matches(option))
|
||||
return list.filter(matches)
|
||||
}
|
||||
|
||||
shared function visibleOptions(list) {
|
||||
@@ -103,7 +104,7 @@ component ComboBox {
|
||||
}
|
||||
|
||||
shared function selectedOptions() {
|
||||
return allOptions().filter((option) => isSelected(option))
|
||||
return allOptions().filter(isSelected)
|
||||
}
|
||||
|
||||
shared function selectedText() {
|
||||
@@ -312,8 +313,7 @@ component ComboBox {
|
||||
role="listbox"
|
||||
>
|
||||
{#each groups as group}
|
||||
{#if visibleOptions(group.options || []).length}
|
||||
<div class="wrn-next__option-group" role="group" aria-label="{group.label}">
|
||||
<div class="wrn-next__option-group" role="group" aria-label="{group.label}" data-show="visibleOptions(group.options || []).length > 0">
|
||||
<div class="wrn-next__group-label">{group.label}</div>
|
||||
{#each group.options || [] as option}
|
||||
<button
|
||||
@@ -336,7 +336,6 @@ component ComboBox {
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
{#each options as option}
|
||||
|
||||
Reference in new issue
Block a user