fix(pickers): repair data-slot selectors and align demos with the baseline
The CSS port prefixed data-slot attribute values with hv-, so the compiled selectors never matched the DOM and the ComboBox trigger chevron never rotated. Only class names get the prefix; slot values stay byte-identical. Also commit typed text as the value when allowsCustomValue finds no record, restore the baseline search-field shell in all 24 Autocomplete demos, and correct both doc pages against the pinned upstream sources.
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
ListBoxItem,
|
||||
ListBoxItemIndicator,
|
||||
SearchField,
|
||||
SearchFieldClearButton,
|
||||
SearchFieldGroup,
|
||||
SearchFieldInput,
|
||||
SearchFieldSearchIcon,
|
||||
@@ -68,10 +69,16 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
</AutocompleteTrigger>
|
||||
<AutocompletePopover>
|
||||
<AutocompleteFilter>
|
||||
<SearchField aria-label="搜索选项">
|
||||
<SearchField
|
||||
auto-focus
|
||||
name="search"
|
||||
variant="secondary"
|
||||
aria-label="搜索选项"
|
||||
>
|
||||
<SearchFieldGroup>
|
||||
<SearchFieldSearchIcon />
|
||||
<SearchFieldInput placeholder="搜索…" />
|
||||
<SearchFieldClearButton />
|
||||
</SearchFieldGroup>
|
||||
</SearchField>
|
||||
<ListBox>
|
||||
@@ -85,7 +92,7 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<template #empty>
|
||||
<EmptyState class="p-1">未找到结果</EmptyState>
|
||||
<EmptyState>未找到结果</EmptyState>
|
||||
</template>
|
||||
</ListBox>
|
||||
</AutocompleteFilter>
|
||||
@@ -106,10 +113,16 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
</AutocompleteTrigger>
|
||||
<AutocompletePopover>
|
||||
<AutocompleteFilter>
|
||||
<SearchField aria-label="搜索选项">
|
||||
<SearchField
|
||||
auto-focus
|
||||
name="search"
|
||||
variant="secondary"
|
||||
aria-label="搜索选项"
|
||||
>
|
||||
<SearchFieldGroup>
|
||||
<SearchFieldSearchIcon />
|
||||
<SearchFieldInput placeholder="搜索…" />
|
||||
<SearchFieldClearButton />
|
||||
</SearchFieldGroup>
|
||||
</SearchField>
|
||||
<ListBox>
|
||||
@@ -123,7 +136,7 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<template #empty>
|
||||
<EmptyState class="p-1">未找到结果</EmptyState>
|
||||
<EmptyState>未找到结果</EmptyState>
|
||||
</template>
|
||||
</ListBox>
|
||||
</AutocompleteFilter>
|
||||
@@ -169,10 +182,16 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
</AutocompleteTrigger>
|
||||
<AutocompletePopover>
|
||||
<AutocompleteFilter>
|
||||
<SearchField aria-label="搜索选项">
|
||||
<SearchField
|
||||
auto-focus
|
||||
name="search"
|
||||
variant="secondary"
|
||||
aria-label="搜索选项"
|
||||
>
|
||||
<SearchFieldGroup>
|
||||
<SearchFieldSearchIcon />
|
||||
<SearchFieldInput placeholder="搜索…" />
|
||||
<SearchFieldClearButton />
|
||||
</SearchFieldGroup>
|
||||
</SearchField>
|
||||
<ListBox>
|
||||
@@ -186,7 +205,7 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<template #empty>
|
||||
<EmptyState class="p-1">未找到结果</EmptyState>
|
||||
<EmptyState>未找到结果</EmptyState>
|
||||
</template>
|
||||
</ListBox>
|
||||
</AutocompleteFilter>
|
||||
@@ -232,10 +251,16 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
</AutocompleteTrigger>
|
||||
<AutocompletePopover>
|
||||
<AutocompleteFilter>
|
||||
<SearchField aria-label="搜索选项">
|
||||
<SearchField
|
||||
auto-focus
|
||||
name="search"
|
||||
variant="secondary"
|
||||
aria-label="搜索选项"
|
||||
>
|
||||
<SearchFieldGroup>
|
||||
<SearchFieldSearchIcon />
|
||||
<SearchFieldInput placeholder="搜索…" />
|
||||
<SearchFieldClearButton />
|
||||
</SearchFieldGroup>
|
||||
</SearchField>
|
||||
<ListBox>
|
||||
@@ -249,7 +274,7 @@ function onRemoveTags2(keys: TagKey[]) {
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<template #empty>
|
||||
<EmptyState class="p-1">未找到结果</EmptyState>
|
||||
<EmptyState>未找到结果</EmptyState>
|
||||
</template>
|
||||
</ListBox>
|
||||
</AutocompleteFilter>
|
||||
|
||||
Reference in New Issue
Block a user