@empathyco/x-components
Version:
Empathy X Components
53 lines • 2.23 kB
TypeScript
import type { Result } from '@empathyco/x-types';
import type { PropType } from 'vue';
/**
* Component that exposes the result merged with its selected variant in the default slot.
*
* It receives the original result and keeps track of the selected variant.
*
* It provides the original result, the array containing the selected variants and a callback to
* set the selected variant to be used from a child.
*
* @public
*/
declare const _default: import("vue").DefineComponent<{
/** The original result containing the variants. */
result: {
type: PropType<Result>;
required: true;
};
/**
* The provider by default will auto select the first variants of all levels.
* This prop allows to limit the number of variants auto selected when the provider is created.
* Take into account that the depth will be the variants level + 1, so, setting autoSelectDepth
* to 0 will not select any variant, setting it to 1 will select only the first variant of the
* first level, and so on.
*/
autoSelectDepth: {
type: NumberConstructor;
default: number;
};
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | "", unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/** The original result containing the variants. */
result: {
type: PropType<Result>;
required: true;
};
/**
* The provider by default will auto select the first variants of all levels.
* This prop allows to limit the number of variants auto selected when the provider is created.
* Take into account that the depth will be the variants level + 1, so, setting autoSelectDepth
* to 0 will not select any variant, setting it to 1 will select only the first variant of the
* first level, and so on.
*/
autoSelectDepth: {
type: NumberConstructor;
default: number;
};
}>>, {
autoSelectDepth: number;
}, {}>;
export default _default;
//# sourceMappingURL=result-variants-provider.vue?vue&type=script&lang.d.ts.map