UNPKG

@ownclouders/design-system

Version:

ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components

54 lines (53 loc) 2.57 kB
import { AvailableSizeType, BreadcrumbItem } from '../../helpers'; import { RouteLocationPathRaw } from 'vue-router'; /** * OcBreadcrumb - component is responsible for showing breadcrumbs * * @prop {string} [id] - Optional ID for the breadcrumbs. If it's empty, a generated one will be used. * @prop {BreadcrumbItem[]} items - Array of breadcrumb items. * @prop {string} [variation='default'] - Variation of breadcrumbs. Can be `default` or `lead`. * @prop {string} [contextMenuPadding='medium'] - Defines the padding size around the drop content. Defaults to `medium`. * Valid values: xsmall, small, medium, large, xlarge, xxlarge, xxxlarge, remove * @prop {number} [maxWidth=-1] - Defines the maximum width of the breadcrumb. If the breadcrumb is wider than the given value, it will be reduced from the left side. If the value is -1, the breadcrumb will not be reduced. * @prop {number} [truncationOffset=2] - Defines the number of items that should always be displayed at the beginning of the breadcrumb. The default value is 2. * @prop {boolean} [showContextActions=false] - Determines if the last breadcrumb item should have context menu actions. * * @event {RouteLocationPathRaw} itemDroppedBreadcrumb - Event emitted when an item is dropped on the breadcrumb. * * @example * ```vue * <template> * <OcBreadcrumb :items="items" variation="lead" @item-dropped-breadcrumb="handleItemDropped" /> * </template> * ``` */ interface Props { id?: string; items: BreadcrumbItem[]; variation?: 'default' | 'lead'; contextMenuPadding?: AvailableSizeType | 'remove'; maxWidth?: number; truncationOffset?: number; showContextActions?: boolean; } declare function __VLS_template(): { attrs: Partial<{}>; slots: { contextMenu?(_: {}): any; }; refs: {}; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { itemDroppedBreadcrumb: (payload: RouteLocationPathRaw) => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ onItemDroppedBreadcrumb?: (payload: RouteLocationPathRaw) => any; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };