@vuecs/navigation
Version:
A package for multi level navigations.
285 lines • 9.93 kB
TypeScript
import type { ThemeClassesOverride, VariantValues } from '@vuecs/core';
import type { Component, ExtractPublicPropTypes, PropType, SlotsType, WatchSource } from 'vue';
import type { NavigationItem, NavigationOrientation, NavigationResolver, NavigationSubmenu } from '../../types';
import type { NavigationThemeClasses } from '../../helpers/component/types';
import type { NavItemsItemSlotProps } from '../type';
declare const navItemsProps: {
/**
* The source of this nav's items. Plain array, sync fn, or async fn.
* A fn receives a NavigationResolverContext and may read reactive
* state freely — the nav re-runs it automatically when that state
* changes.
*
* When omitted, the nav checks whether it is a nested submenu of a
* parent `<VCNavItem>` (via the {@link NAVIGATION_NODES_KEY} inject)
* and, if so, renders that parent's already-scored children as-is.
*/
data: {
type: PropType<NavigationItem[] | NavigationResolver>;
default: any;
};
/** Opt in to publishing this nav's resolved output into the registry. */
registry: {
type: BooleanConstructor;
default: boolean;
};
/** The key under which to publish. Required when `registry` is true. */
registryId: {
type: StringConstructor;
default: any;
};
/**
* Current path for active-state matching. When omitted, the nav softly
* reads vue-router's current route (via the `$route` global property)
* if a router is installed; router-free apps simply get `undefined`.
*/
path: {
type: StringConstructor;
default: any;
};
/**
* Extra reactive deps that should retrigger the resolver — for state
* read only AFTER the first `await` in an async resolver (auto-track
* can't see past an await).
*/
watch: {
type: PropType<WatchSource[]>;
default: any;
};
variant: {
type: StringConstructor;
default: any;
};
orientation: {
type: PropType<NavigationOrientation>;
default: any;
};
/**
* How items with children render their submenu. `auto` derives from
* orientation (horizontal → dropdown, otherwise collapse).
*/
submenu: {
type: PropType<NavigationSubmenu>;
default: string;
};
/**
* The tag (or component) for this nav's list container. Defaults to
* `'ul'`. Forwarded unchanged to every nesting level so the whole tree
* renders the same container tag. Honored in collapse mode only —
* dropdown mode keeps Reka's NavigationMenu primitives.
*/
as: {
type: PropType<string | Component>;
default: string;
};
/**
* The tag (or component) for each item wrapper. Defaults to `'li'`.
* Forwarded unchanged to every nesting level. Honored in collapse mode
* only — dropdown mode keeps Reka's NavigationMenu primitives.
*/
itemAs: {
type: PropType<string | Component>;
default: string;
};
themeClass: {
type: PropType<ThemeClassesOverride<NavigationThemeClasses>>;
default: any;
};
themeVariant: {
type: PropType<VariantValues>;
default: any;
};
};
export type NavItemsProps = ExtractPublicPropTypes<typeof navItemsProps>;
export declare const VCNavItems: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* The source of this nav's items. Plain array, sync fn, or async fn.
* A fn receives a NavigationResolverContext and may read reactive
* state freely — the nav re-runs it automatically when that state
* changes.
*
* When omitted, the nav checks whether it is a nested submenu of a
* parent `<VCNavItem>` (via the {@link NAVIGATION_NODES_KEY} inject)
* and, if so, renders that parent's already-scored children as-is.
*/
data: {
type: PropType<NavigationItem[] | NavigationResolver>;
default: any;
};
/** Opt in to publishing this nav's resolved output into the registry. */
registry: {
type: BooleanConstructor;
default: boolean;
};
/** The key under which to publish. Required when `registry` is true. */
registryId: {
type: StringConstructor;
default: any;
};
/**
* Current path for active-state matching. When omitted, the nav softly
* reads vue-router's current route (via the `$route` global property)
* if a router is installed; router-free apps simply get `undefined`.
*/
path: {
type: StringConstructor;
default: any;
};
/**
* Extra reactive deps that should retrigger the resolver — for state
* read only AFTER the first `await` in an async resolver (auto-track
* can't see past an await).
*/
watch: {
type: PropType<WatchSource[]>;
default: any;
};
variant: {
type: StringConstructor;
default: any;
};
orientation: {
type: PropType<NavigationOrientation>;
default: any;
};
/**
* How items with children render their submenu. `auto` derives from
* orientation (horizontal → dropdown, otherwise collapse).
*/
submenu: {
type: PropType<NavigationSubmenu>;
default: string;
};
/**
* The tag (or component) for this nav's list container. Defaults to
* `'ul'`. Forwarded unchanged to every nesting level so the whole tree
* renders the same container tag. Honored in collapse mode only —
* dropdown mode keeps Reka's NavigationMenu primitives.
*/
as: {
type: PropType<string | Component>;
default: string;
};
/**
* The tag (or component) for each item wrapper. Defaults to `'li'`.
* Forwarded unchanged to every nesting level. Honored in collapse mode
* only — dropdown mode keeps Reka's NavigationMenu primitives.
*/
itemAs: {
type: PropType<string | Component>;
default: string;
};
themeClass: {
type: PropType<ThemeClassesOverride<NavigationThemeClasses>>;
default: any;
};
themeVariant: {
type: PropType<VariantValues>;
default: any;
};
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* The source of this nav's items. Plain array, sync fn, or async fn.
* A fn receives a NavigationResolverContext and may read reactive
* state freely — the nav re-runs it automatically when that state
* changes.
*
* When omitted, the nav checks whether it is a nested submenu of a
* parent `<VCNavItem>` (via the {@link NAVIGATION_NODES_KEY} inject)
* and, if so, renders that parent's already-scored children as-is.
*/
data: {
type: PropType<NavigationItem[] | NavigationResolver>;
default: any;
};
/** Opt in to publishing this nav's resolved output into the registry. */
registry: {
type: BooleanConstructor;
default: boolean;
};
/** The key under which to publish. Required when `registry` is true. */
registryId: {
type: StringConstructor;
default: any;
};
/**
* Current path for active-state matching. When omitted, the nav softly
* reads vue-router's current route (via the `$route` global property)
* if a router is installed; router-free apps simply get `undefined`.
*/
path: {
type: StringConstructor;
default: any;
};
/**
* Extra reactive deps that should retrigger the resolver — for state
* read only AFTER the first `await` in an async resolver (auto-track
* can't see past an await).
*/
watch: {
type: PropType<WatchSource[]>;
default: any;
};
variant: {
type: StringConstructor;
default: any;
};
orientation: {
type: PropType<NavigationOrientation>;
default: any;
};
/**
* How items with children render their submenu. `auto` derives from
* orientation (horizontal → dropdown, otherwise collapse).
*/
submenu: {
type: PropType<NavigationSubmenu>;
default: string;
};
/**
* The tag (or component) for this nav's list container. Defaults to
* `'ul'`. Forwarded unchanged to every nesting level so the whole tree
* renders the same container tag. Honored in collapse mode only —
* dropdown mode keeps Reka's NavigationMenu primitives.
*/
as: {
type: PropType<string | Component>;
default: string;
};
/**
* The tag (or component) for each item wrapper. Defaults to `'li'`.
* Forwarded unchanged to every nesting level. Honored in collapse mode
* only — dropdown mode keeps Reka's NavigationMenu primitives.
*/
itemAs: {
type: PropType<string | Component>;
default: string;
};
themeClass: {
type: PropType<ThemeClassesOverride<NavigationThemeClasses>>;
default: any;
};
themeVariant: {
type: PropType<VariantValues>;
default: any;
};
}>> & Readonly<{}>, {
variant: string;
orientation: NavigationOrientation;
data: NavigationItem[] | NavigationResolver;
submenu: NavigationSubmenu;
as: string;
themeClass: ThemeClassesOverride<NavigationThemeClasses>;
themeVariant: VariantValues;
watch: WatchSource[];
itemAs: string;
registry: boolean;
registryId: string;
path: string;
}, SlotsType<{
item: NavItemsItemSlotProps;
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export {};
//# sourceMappingURL=module.d.ts.map