@flux-ui/application 3.0.0-next.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/component/FluxApplication.vue.d.ts +28 -0
- package/dist/component/FluxApplicationContent.vue.d.ts +24 -0
- package/dist/component/FluxApplicationHero.vue.d.ts +26 -0
- package/dist/component/FluxApplicationMenu.vue.d.ts +29 -0
- package/dist/component/FluxApplicationMenuAccount.vue.d.ts +29 -0
- package/dist/component/FluxApplicationMenuContext.vue.d.ts +15 -0
- package/dist/component/FluxApplicationMenuContextStack.vue.d.ts +6 -0
- package/dist/component/FluxApplicationMenuPromo.vue.d.ts +22 -0
- package/dist/component/FluxApplicationMenuToggle.vue.d.ts +3 -0
- package/dist/component/FluxApplicationSection.vue.d.ts +26 -0
- package/dist/component/FluxApplicationSide.vue.d.ts +20 -0
- package/dist/component/FluxApplicationTop.vue.d.ts +29 -0
- package/dist/component/index.d.ts +12 -0
- package/dist/composable/index.d.ts +3 -0
- package/dist/composable/useApplicationContextMenu.d.ts +7 -0
- package/dist/composable/useApplicationContextRegistration.d.ts +2 -0
- package/dist/composable/useApplicationInjection.d.ts +2 -0
- package/dist/composable/useApplicationMenu.d.ts +26 -0
- package/dist/data/index.d.ts +29 -0
- package/dist/index.css +746 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4331 -0
- package/dist/index.js.map +1 -0
- package/dist/routing/useNamedRoutes.d.ts +14 -0
- package/dist/routing/useRoute.d.ts +8 -0
- package/dist/types.d.ts +13 -0
- package/package.json +71 -0
- package/src/component/FluxApplication.vue +144 -0
- package/src/component/FluxApplicationContent.vue +37 -0
- package/src/component/FluxApplicationHero.vue +34 -0
- package/src/component/FluxApplicationMenu.vue +73 -0
- package/src/component/FluxApplicationMenuAccount.vue +47 -0
- package/src/component/FluxApplicationMenuContext.vue +78 -0
- package/src/component/FluxApplicationMenuContextStack.vue +53 -0
- package/src/component/FluxApplicationMenuPromo.vue +23 -0
- package/src/component/FluxApplicationMenuToggle.vue +30 -0
- package/src/component/FluxApplicationSection.vue +40 -0
- package/src/component/FluxApplicationSide.vue +16 -0
- package/src/component/FluxApplicationTop.vue +74 -0
- package/src/component/index.ts +12 -0
- package/src/composable/index.ts +3 -0
- package/src/composable/useApplicationContextMenu.ts +19 -0
- package/src/composable/useApplicationContextRegistration.ts +25 -0
- package/src/composable/useApplicationInjection.ts +12 -0
- package/src/composable/useApplicationMenu.ts +79 -0
- package/src/css/component/Application.module.scss +88 -0
- package/src/css/component/ApplicationContent.module.scss +119 -0
- package/src/css/component/ApplicationHero.module.scss +17 -0
- package/src/css/component/ApplicationMenu.module.scss +421 -0
- package/src/css/component/ApplicationSection.module.scss +43 -0
- package/src/css/component/ApplicationSide.module.scss +21 -0
- package/src/css/component/ApplicationTop.module.scss +111 -0
- package/src/data/index.ts +38 -0
- package/src/index.ts +3 -0
- package/src/routing/useNamedRoutes.ts +34 -0
- package/src/routing/useRoute.ts +11 -0
- package/src/types.d.ts +13 -0
- package/tsconfig.json +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# `@flux-ui/application`
|
|
2
|
+
|
|
3
|
+
Contains Flux UI components for creating applications.
|
|
4
|
+
|
|
5
|
+
## ⭐️ Prerequisites
|
|
6
|
+
|
|
7
|
+
- Bun >= 1.2.13
|
|
8
|
+
- Node >= 23
|
|
9
|
+
|
|
10
|
+
## 🚀 Getting started
|
|
11
|
+
|
|
12
|
+
1. Make sure that the monorepo of Flux is used.
|
|
13
|
+
2. Run `bun install` in the root of the project.
|
|
14
|
+
3. Run `bun --cwd packages/application build` to build the project.
|
|
15
|
+
4. To link Flux Application globally, using Bun, run `bun link --cwd packages/application`.
|
|
16
|
+
- In another project, use `link:@flux-ui/application` as the dependency version in `package.json`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
readonly contextMenuName?: string;
|
|
4
|
+
readonly showDesktopMenuToggle?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): VNode[];
|
|
10
|
+
menu(): VNode[];
|
|
11
|
+
side(): VNode[];
|
|
12
|
+
}> & {
|
|
13
|
+
default(): VNode[];
|
|
14
|
+
menu(): VNode[];
|
|
15
|
+
side(): VNode[];
|
|
16
|
+
};
|
|
17
|
+
refs: {};
|
|
18
|
+
rootEl: HTMLDivElement;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FluxApplicationLayout } from '../data';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
readonly layout?: FluxApplicationLayout;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): any;
|
|
10
|
+
}> & {
|
|
11
|
+
default(): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: HTMLElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLElement>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly subtitle?: string;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
start?(): VNode;
|
|
10
|
+
end?(): VNode;
|
|
11
|
+
}> & {
|
|
12
|
+
start?(): VNode;
|
|
13
|
+
end?(): VNode;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
readonly showPageIndicator?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default(): VNode;
|
|
9
|
+
context?(): VNode;
|
|
10
|
+
footer?(): VNode;
|
|
11
|
+
header?(): VNode;
|
|
12
|
+
}> & {
|
|
13
|
+
default(): VNode;
|
|
14
|
+
context?(): VNode;
|
|
15
|
+
footer?(): VNode;
|
|
16
|
+
header?(): VNode;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FluxIconName } from '@flux-ui/types';
|
|
2
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
readonly icon?: FluxIconName;
|
|
5
|
+
readonly imageAlt?: string;
|
|
6
|
+
readonly imageSrc?: string;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
};
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: Readonly<{
|
|
12
|
+
avatar?(): VNode;
|
|
13
|
+
switcher?(): VNode;
|
|
14
|
+
}> & {
|
|
15
|
+
avatar?(): VNode;
|
|
16
|
+
switcher?(): VNode;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLDivElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
readonly subtitle?: string;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
readonly tabindex?: string | number;
|
|
7
|
+
readonly href?: string;
|
|
8
|
+
readonly rel?: string;
|
|
9
|
+
readonly target?: string;
|
|
10
|
+
readonly to?: FluxTo;
|
|
11
|
+
readonly entryTo?: FluxTo;
|
|
12
|
+
readonly type?: FluxPressableType;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
readonly name?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FluxIconName } from '@flux-ui/types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
readonly icon?: FluxIconName;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
readonly title?: string;
|
|
4
|
+
readonly info?: string;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): VNode;
|
|
10
|
+
end?(): VNode;
|
|
11
|
+
}> & {
|
|
12
|
+
default(): VNode;
|
|
13
|
+
end?(): VNode;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
default(): VNode;
|
|
6
|
+
}> & {
|
|
7
|
+
default(): VNode;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLElement>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FluxIconName } from '@flux-ui/types';
|
|
2
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
readonly icon?: FluxIconName;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
end?(): VNode;
|
|
11
|
+
start?(): VNode;
|
|
12
|
+
tabs?(): VNode;
|
|
13
|
+
}> & {
|
|
14
|
+
end?(): VNode;
|
|
15
|
+
start?(): VNode;
|
|
16
|
+
tabs?(): VNode;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as FluxApplication } from './FluxApplication.vue';
|
|
2
|
+
export { default as FluxApplicationContent } from './FluxApplicationContent.vue';
|
|
3
|
+
export { default as FluxApplicationHero } from './FluxApplicationHero.vue';
|
|
4
|
+
export { default as FluxApplicationMenu } from './FluxApplicationMenu.vue';
|
|
5
|
+
export { default as FluxApplicationMenuAccount } from './FluxApplicationMenuAccount.vue';
|
|
6
|
+
export { default as FluxApplicationMenuContext } from './FluxApplicationMenuContext.vue';
|
|
7
|
+
export { default as FluxApplicationMenuContextStack } from './FluxApplicationMenuContextStack.vue';
|
|
8
|
+
export { default as FluxApplicationMenuPromo } from './FluxApplicationMenuPromo.vue';
|
|
9
|
+
export { default as FluxApplicationMenuToggle } from './FluxApplicationMenuToggle.vue';
|
|
10
|
+
export { default as FluxApplicationSection } from './FluxApplicationSection.vue';
|
|
11
|
+
export { default as FluxApplicationSide } from './FluxApplicationSide.vue';
|
|
12
|
+
export { default as FluxApplicationTop } from './FluxApplicationTop.vue';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
export default function (name?: string): UseApplicationContextMenu;
|
|
3
|
+
type UseApplicationContextMenu = {
|
|
4
|
+
readonly contextMenuKey: ComputedRef<string | undefined>;
|
|
5
|
+
readonly hasContextMenu: ComputedRef<boolean>;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { FluxApplicationContextInfo, FluxApplicationLayout } from '../data';
|
|
3
|
+
export default function (): UseApplicationMenu;
|
|
4
|
+
type UseApplicationMenu = {
|
|
5
|
+
readonly activeContext: ComputedRef<FluxApplicationContextInfo | undefined>;
|
|
6
|
+
readonly canGoBack: ComputedRef<boolean>;
|
|
7
|
+
readonly canGoForward: ComputedRef<boolean>;
|
|
8
|
+
readonly contexts: ComputedRef<readonly FluxApplicationContextInfo[]>;
|
|
9
|
+
readonly isMainMenuVisible: ComputedRef<boolean>;
|
|
10
|
+
readonly isMenuCollapsed: Ref<boolean>;
|
|
11
|
+
readonly layout: Ref<FluxApplicationLayout>;
|
|
12
|
+
readonly totalLevels: ComputedRef<number>;
|
|
13
|
+
readonly viewIndex: Ref<number>;
|
|
14
|
+
close(): void;
|
|
15
|
+
goToChild(): void;
|
|
16
|
+
goToCurrent(): void;
|
|
17
|
+
goToLevel(index: number): void;
|
|
18
|
+
goToMain(): void;
|
|
19
|
+
goToParent(): void;
|
|
20
|
+
open(): void;
|
|
21
|
+
showContextMenu(): void;
|
|
22
|
+
showMainMenu(): void;
|
|
23
|
+
toggle(): void;
|
|
24
|
+
toggleMainMenu(): void;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
3
|
+
export declare const FluxApplicationInjectionKey: InjectionKey<FluxApplicationInjection>;
|
|
4
|
+
export type FluxApplicationContextInfo = {
|
|
5
|
+
readonly id: symbol;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly subtitle?: string;
|
|
8
|
+
readonly to?: FluxTo;
|
|
9
|
+
readonly entryTo?: FluxTo;
|
|
10
|
+
readonly href?: string;
|
|
11
|
+
readonly type?: FluxPressableType;
|
|
12
|
+
};
|
|
13
|
+
export type FluxApplicationInjection = {
|
|
14
|
+
readonly activeContext: ComputedRef<FluxApplicationContextInfo | undefined>;
|
|
15
|
+
readonly contexts: ComputedRef<readonly FluxApplicationContextInfo[]>;
|
|
16
|
+
readonly isMenuCollapsed: Ref<boolean>;
|
|
17
|
+
readonly layout: Ref<FluxApplicationLayout>;
|
|
18
|
+
readonly showDesktopMenuToggle: Ref<boolean>;
|
|
19
|
+
readonly totalLevels: ComputedRef<number>;
|
|
20
|
+
readonly viewIndex: Ref<number>;
|
|
21
|
+
goToChild(): void;
|
|
22
|
+
goToCurrent(): void;
|
|
23
|
+
goToLevel(index: number): void;
|
|
24
|
+
goToMain(): void;
|
|
25
|
+
goToParent(): void;
|
|
26
|
+
pushContext(info: FluxApplicationContextInfo): void;
|
|
27
|
+
removeContext(id: symbol): void;
|
|
28
|
+
};
|
|
29
|
+
export type FluxApplicationLayout = 'default' | 'dashboard' | 'full' | 'medium' | 'narrow';
|