UNPKG

@empathyco/x-components

Version:
113 lines 3.02 kB
import type { BooleanFilter, Suggestion } from '@empathyco/x-types'; import type { PropType } from 'vue'; import type { QueryFeature } from '../../types'; import type { VueCSSClasses } from '../../utils/types'; import type { XEventsTypes } from '../../wiring/events.types'; /** * Renders a button with a default slot. It receives a query, which should be the query of the * module using this component, a suggestion, the {@link XEvent} that will be emitted * on click with a given feature. * * The default slot receives the suggestion and the matched query has props. * * @public */ declare const _default: import("vue").DefineComponent<{ /** * The normalized query of the module using this component. * * @public */ query: { type: StringConstructor; default: string; }; /** * The suggestion to render and use in the default slot. * * @public */ suggestion: { type: PropType<Suggestion>; required: true; }; /** * The feature from which the events will be emitted. * * @public */ feature: { type: PropType<QueryFeature>; }; /** * The {@link XEvent} that will be emitted when selecting a suggestion. * * @public */ suggestionSelectedEvents: { type: PropType<Partial<XEventsTypes>>; required: true; }; /** * Indicates if the curated suggestion should be highlighted. * * @public */ highlightCurated: { type: BooleanConstructor; }; }, { el: import("vue").Ref<HTMLElement | null>; filter: import("vue").ComputedRef<BooleanFilter | undefined>; emitEvents: () => void; dynamicCSSClasses: import("vue").ComputedRef<VueCSSClasses>; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** * The normalized query of the module using this component. * * @public */ query: { type: StringConstructor; default: string; }; /** * The suggestion to render and use in the default slot. * * @public */ suggestion: { type: PropType<Suggestion>; required: true; }; /** * The feature from which the events will be emitted. * * @public */ feature: { type: PropType<QueryFeature>; }; /** * The {@link XEvent} that will be emitted when selecting a suggestion. * * @public */ suggestionSelectedEvents: { type: PropType<Partial<XEventsTypes>>; required: true; }; /** * Indicates if the curated suggestion should be highlighted. * * @public */ highlightCurated: { type: BooleanConstructor; }; }>>, { query: string; highlightCurated: boolean; }, {}>; export default _default; //# sourceMappingURL=base-suggestion.vue?vue&type=script&lang.d.ts.map