UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

259 lines (258 loc) 9.09 kB
import type { NeonTreeMenuSectionModel } from '@/model/navigation/tree-menu/NeonTreeMenuSectionModel'; import { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor'; /** * Three level tree menu. This is useful for displaying a hierarchical navigation in NeonSideNav.The top level of the * menu is expandable on click but will not navigate to a page. The second level is links to pages and the third level * is the fragments on that page. */ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ /** * Id for the tree menu. This is used specifically to namespace the menu icons so that icon paths are unique. A * typical scenario is the tree menu is used in a side nav and also a drawer which means icon ids will be duplicated * unless they're namespaced. */ id: { type: StringConstructor; required: true; }; /** * The tree model defining the menu. */ modelValue: { type: () => Array<NeonTreeMenuSectionModel>; required: true; }; /** * The menu highlight color (excludes low-contrast and neutral). */ color: { type: () => NeonFunctionalColor; default: NeonFunctionalColor; }; /** * Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu). */ expandAll: { type: BooleanConstructor; default: boolean; }; /** * Highlight menu items only if the route exactly matches a menu item. This is useful if every route is in the tree menu. */ exactHighlighting: { type: BooleanConstructor; default: boolean; }; }>, { url: import("vue").Ref<string | null, string | null>; emit: (event: "click" | "update:modelValue", ...args: any[]) => void; click: ($event: KeyboardEvent) => void; onSectionClick: (key: string) => void; onItemClick: (key: string) => void; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:modelValue")[], "click" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** * Id for the tree menu. This is used specifically to namespace the menu icons so that icon paths are unique. A * typical scenario is the tree menu is used in a side nav and also a drawer which means icon ids will be duplicated * unless they're namespaced. */ id: { type: StringConstructor; required: true; }; /** * The tree model defining the menu. */ modelValue: { type: () => Array<NeonTreeMenuSectionModel>; required: true; }; /** * The menu highlight color (excludes low-contrast and neutral). */ color: { type: () => NeonFunctionalColor; default: NeonFunctionalColor; }; /** * Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu). */ expandAll: { type: BooleanConstructor; default: boolean; }; /** * Highlight menu items only if the route exactly matches a menu item. This is useful if every route is in the tree menu. */ exactHighlighting: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onClick?: ((...args: any[]) => any) | undefined; "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; }>, { color: NeonFunctionalColor; expandAll: boolean; exactHighlighting: boolean; }, {}, { NeonIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ name: { type: StringConstructor; required: true; }; id: { type: StringConstructor; default: null; }; color: { type: () => NeonFunctionalColor; default: null; }; inverse: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; }>, { sanitizedAttributes: import("vue").ComputedRef<{ [x: string]: unknown; }>; icon: import("vue").ComputedRef<string | undefined>; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ name: { type: StringConstructor; required: true; }; id: { type: StringConstructor; default: null; }; color: { type: () => NeonFunctionalColor; default: null; }; inverse: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{}>, { color: NeonFunctionalColor; id: string; inverse: boolean; disabled: boolean; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; NeonLink: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ href: { type: StringConstructor; default: null; }; noStyle: { type: BooleanConstructor; default: boolean; }; outlineStyle: { type: () => import("../../../neon").NeonOutlineStyle; default: import("../../../neon").NeonOutlineStyle; }; externalIndicator: { type: BooleanConstructor; default: boolean; }; }>, { neonLink: import("vue").Ref<HTMLAnchorElement | null, HTMLAnchorElement | null>; routerUrl: import("vue").ComputedRef<string | undefined>; sanitizedAttributes: import("vue").ComputedRef<{ [x: string]: unknown; }>; activeRoute: import("vue").ComputedRef<boolean | "" | undefined>; exactRoute: import("vue").ComputedRef<boolean | "" | undefined>; onClick: () => void; onSpace: () => Promise<void>; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ href: { type: StringConstructor; default: null; }; noStyle: { type: BooleanConstructor; default: boolean; }; outlineStyle: { type: () => import("../../../neon").NeonOutlineStyle; default: import("../../../neon").NeonOutlineStyle; }; externalIndicator: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onClick?: ((...args: any[]) => any) | undefined; }>, { href: string; noStyle: boolean; outlineStyle: import("../../../neon").NeonOutlineStyle; externalIndicator: boolean; }, {}, { NeonIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ name: { type: StringConstructor; required: true; }; id: { type: StringConstructor; default: null; }; color: { type: () => NeonFunctionalColor; default: null; }; inverse: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; }>, { sanitizedAttributes: import("vue").ComputedRef<{ [x: string]: unknown; }>; icon: import("vue").ComputedRef<string | undefined>; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ name: { type: StringConstructor; required: true; }; id: { type: StringConstructor; default: null; }; color: { type: () => NeonFunctionalColor; default: null; }; inverse: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{}>, { color: NeonFunctionalColor; id: string; inverse: boolean; disabled: boolean; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default _default;