feat(autocomplete): migrate Autocomplete with popover-owned filtering
Port the fixed-baseline Autocomplete onto the B02a collection protocol. The trigger is the single Tab entry; opening moves focus to the search box inside the popover, which owns filtering, aria-activedescendant and keyboard navigation while the list only tracks an active row. - Seven parts: root (field, value/open models, form value, owner wiring), trigger (anchor + activation), value (scoped slot with selectedItems and selectedText instead of copied item subtrees), indicator, clear button, popover (measured trigger width), filter (owns the search text and composes the inner SearchFieldInput into the combobox control). - Filter exposes input-value/update:inputValue/inputChange, matching ComboBox. - Confirming the active row in multiple mode now toggles it instead of replacing the accepted set (ComboBox shared the same bug). - ComboBox shows the accepted label on the first render via a display value that falls back to the selected record, so preselected fields are readable before the selection watcher runs (including SSR). - Popovers measure the anchor with a ResizeObserver because Reka does not publish the anchor size; the caller's root class is merged again so the trigger fills the field width. - 24 baseline previews, Chinese doc page, navigation, 17 behaviour tests, 5 demo/document contracts and an independent tarball consumption script for both pickers. Not included: the full bundler/NodeNext type matrix (B02d).
This commit is contained in:
@@ -979,3 +979,30 @@ export type {
|
||||
} from "./components/combo-box/context";
|
||||
|
||||
export { comboBoxVariants, type ComboBoxVariants } from "@heroui-vue/styles";
|
||||
|
||||
export { default as Autocomplete } from "./components/autocomplete/Autocomplete.vue";
|
||||
export { default as AutocompleteTrigger } from "./components/autocomplete/AutocompleteTrigger.vue";
|
||||
export { default as AutocompleteValue } from "./components/autocomplete/AutocompleteValue.vue";
|
||||
export { default as AutocompleteIndicator } from "./components/autocomplete/AutocompleteIndicator.vue";
|
||||
export { default as AutocompleteClearButton } from "./components/autocomplete/AutocompleteClearButton.vue";
|
||||
export { default as AutocompletePopover } from "./components/autocomplete/AutocompletePopover.vue";
|
||||
export { default as AutocompleteFilter } from "./components/autocomplete/AutocompleteFilter.vue";
|
||||
export type {
|
||||
AutocompleteProps,
|
||||
AutocompleteTriggerProps,
|
||||
AutocompleteValueProps,
|
||||
AutocompleteIndicatorProps,
|
||||
AutocompleteClearButtonProps,
|
||||
AutocompletePopoverProps,
|
||||
AutocompleteFilterProps,
|
||||
} from "./types";
|
||||
export type {
|
||||
AutocompleteSelectedItem,
|
||||
AutocompleteOptions,
|
||||
} from "./components/autocomplete/context";
|
||||
export type { AutocompleteValue as AutocompleteValueModel } from "./components/autocomplete/context";
|
||||
|
||||
export {
|
||||
autocompleteVariants,
|
||||
type AutocompleteVariants,
|
||||
} from "@heroui-vue/styles";
|
||||
|
||||
Reference in New Issue
Block a user