UNPKG

@empathyco/x-components

Version:
81 lines 2.82 kB
import type { PropType, Ref } from 'vue'; import type { ListItem, VueCSSClasses } from '../utils/types'; /** * The type returned by the gridItems function. Basically it's a list of items with its CSS * classes and a slotName. */ interface GridItem { slotName: string; item: ListItem; cssClass: VueCSSClasses; } /** * Grid component that is able to render different items based on their modelName value. In order * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used * do not have modelName property, the default slot is used instead. It has a required property: * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the * number of columns is not specified, the grid automatically fills the rows with as many columns * as it can fit. * * @public */ declare const _default: import("vue").DefineComponent<{ /** Animation component that will be used to animate the base grid. */ animation: { type: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; default: string; }; /** * Number of columns the grid is divided into. By default, its value is 0, setting the grid * columns mode to auto-fill. */ columns: { type: NumberConstructor; default: number; }; /** * The list of items to be rendered. * * @remarks The items must have an ID property. */ items: { type: PropType<ListItem[]>; }; }, { gridItems: import("vue").ComputedRef<GridItem[]>; cssClasses: import("vue").ComputedRef<string>; style: import("vue").ComputedRef<Partial<CSSStyleDeclaration>>; gridEl: Ref<{ $el: HTMLElement; } | HTMLElement | undefined>; slots: Readonly<{ [name: string]: import("vue").Slot<any> | undefined; }>; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** Animation component that will be used to animate the base grid. */ animation: { type: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; default: string; }; /** * Number of columns the grid is divided into. By default, its value is 0, setting the grid * columns mode to auto-fill. */ columns: { type: NumberConstructor; default: number; }; /** * The list of items to be rendered. * * @remarks The items must have an ID property. */ items: { type: PropType<ListItem[]>; }; }>>, { animation: string | Function | Record<string, any>; columns: number; }, {}>; export default _default; //# sourceMappingURL=base-grid.vue?vue&type=script&lang.d.ts.map