@flux-ui/application 3.0.0-next.58 → 3.0.0-next.60
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/dist/component/FluxApplicationMenu.vue.d.ts +1 -4
- package/dist/component/FluxApplicationMenuContext.vue.d.ts +2 -1
- package/dist/composable/index.d.ts +1 -0
- package/dist/data/index.d.ts +2 -1
- package/dist/index.css +16 -31
- package/dist/index.js +114 -96
- package/dist/index.js.map +1 -1
- package/dist/routing/index.d.ts +2 -0
- package/package.json +5 -5
- package/src/component/FluxApplication.vue +2 -3
- package/src/component/FluxApplicationContent.vue +2 -2
- package/src/component/FluxApplicationHero.vue +1 -1
- package/src/component/FluxApplicationMenu.vue +13 -33
- package/src/component/FluxApplicationMenuAccount.vue +1 -1
- package/src/component/FluxApplicationMenuContext.vue +5 -3
- package/src/component/FluxApplicationMenuContextStack.vue +2 -2
- package/src/component/FluxApplicationMenuPromo.vue +1 -1
- package/src/component/FluxApplicationMenuToggle.vue +1 -1
- package/src/component/FluxApplicationSection.vue +1 -1
- package/src/component/FluxApplicationSide.vue +1 -1
- package/src/component/FluxApplicationTop.vue +1 -1
- package/src/composable/index.ts +1 -0
- package/src/composable/useApplicationContextMenu.ts +1 -1
- package/src/css/component/Application.module.scss +1 -1
- package/src/css/component/ApplicationContent.module.scss +1 -1
- package/src/css/component/ApplicationHero.module.scss +1 -0
- package/src/css/component/ApplicationMenu.module.scss +13 -28
- package/src/css/component/ApplicationSection.module.scss +1 -1
- package/src/css/component/ApplicationSide.module.scss +1 -1
- package/src/css/component/ApplicationTop.module.scss +2 -2
- package/src/data/index.ts +2 -1
- package/src/routing/index.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flux-ui/application",
|
|
3
3
|
"description": "Contains components to create applications with Flux UI.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.60",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"typings": "./dist/index.d.ts",
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@flux-ui/components": "3.0.0-next.
|
|
55
|
-
"@flux-ui/internals": "3.0.0-next.
|
|
56
|
-
"@flux-ui/types": "3.0.0-next.
|
|
54
|
+
"@flux-ui/components": "3.0.0-next.60",
|
|
55
|
+
"@flux-ui/internals": "3.0.0-next.60",
|
|
56
|
+
"@flux-ui/types": "3.0.0-next.60",
|
|
57
57
|
"clsx": "^2.1.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"vue-router": "^5.0.6"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@basmilius/vite-preset": "^3.
|
|
65
|
+
"@basmilius/vite-preset": "^3.24.0",
|
|
66
66
|
"@types/node": "^25.6.0",
|
|
67
67
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
68
68
|
"@vue/tsconfig": "^0.9.1",
|
|
@@ -22,9 +22,8 @@
|
|
|
22
22
|
import { useRemembered } from '@flux-ui/internals';
|
|
23
23
|
import { computed, onUnmounted, provide, ref, shallowRef, toRef, type VNode, watch } from 'vue';
|
|
24
24
|
import { type FluxApplicationContextInfo, FluxApplicationInjectionKey, type FluxApplicationLayout } from '../data';
|
|
25
|
-
import useNamedRoutes from '../routing
|
|
26
|
-
import
|
|
27
|
-
import $style from '../css/component/Application.module.scss';
|
|
25
|
+
import { useNamedRoutes, useRoute } from '../routing';
|
|
26
|
+
import $style from '~flux/application/css/component/Application.module.scss';
|
|
28
27
|
|
|
29
28
|
const {
|
|
30
29
|
contextMenuName = 'menu',
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
lang="ts"
|
|
17
17
|
setup>
|
|
18
18
|
import clsx from 'clsx';
|
|
19
|
+
import { watch } from 'vue';
|
|
19
20
|
import { useApplicationInjection } from '../composable';
|
|
20
21
|
import type { FluxApplicationLayout } from '../data';
|
|
21
|
-
import $style from '
|
|
22
|
-
import { watch } from 'vue';
|
|
22
|
+
import $style from '~flux/application/css/component/ApplicationContent.module.scss';
|
|
23
23
|
|
|
24
24
|
const {
|
|
25
25
|
layout = 'default'
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
lang="ts"
|
|
25
25
|
setup>
|
|
26
26
|
import type { VNode } from 'vue';
|
|
27
|
-
import $style from '
|
|
27
|
+
import $style from '~flux/application/css/component/ApplicationHero.module.scss';
|
|
28
28
|
|
|
29
29
|
defineProps<{
|
|
30
30
|
readonly title: string;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
:data-collapsible="showDesktopMenuToggle ? '' : undefined">
|
|
6
6
|
<FluxMenu
|
|
7
7
|
v-if="slots.header"
|
|
8
|
+
v-height-transition
|
|
8
9
|
:class="$style.applicationMenuHeader">
|
|
9
10
|
<slot name="header"/>
|
|
10
11
|
</FluxMenu>
|
|
@@ -21,45 +22,24 @@
|
|
|
21
22
|
</div>
|
|
22
23
|
</div>
|
|
23
24
|
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
type="button"
|
|
32
|
-
:class="[
|
|
33
|
-
$style.applicationMenuPageIndicatorDot,
|
|
34
|
-
(level - 1) === viewIndex && $style.applicationMenuPageIndicatorDotActive
|
|
35
|
-
]"
|
|
36
|
-
:aria-current="(level - 1) === viewIndex ? 'true' : undefined"
|
|
37
|
-
:aria-label="(level - 1) === 0 ? 'Hoofdmenu' : `Niveau ${level - 1}`"
|
|
38
|
-
@click="goToLevel(level - 1)"/>
|
|
39
|
-
</nav>
|
|
40
|
-
|
|
41
|
-
<FluxMenu
|
|
42
|
-
v-if="slots.footer"
|
|
43
|
-
:class="$style.applicationMenuFooter"
|
|
44
|
-
:data-hidden="!isMainMenuVisible ? '' : undefined">
|
|
45
|
-
<slot name="footer"/>
|
|
46
|
-
</FluxMenu>
|
|
25
|
+
<FluxFadeTransition>
|
|
26
|
+
<FluxMenu
|
|
27
|
+
v-if="slots.footer && isMainMenuVisible"
|
|
28
|
+
:class="$style.applicationMenuFooter">
|
|
29
|
+
<slot name="footer"/>
|
|
30
|
+
</FluxMenu>
|
|
31
|
+
</FluxFadeTransition>
|
|
47
32
|
</aside>
|
|
48
33
|
</template>
|
|
49
34
|
|
|
50
35
|
<script
|
|
51
36
|
lang="ts"
|
|
52
37
|
setup>
|
|
53
|
-
import { FluxMenu } from '@flux-ui/components';
|
|
54
|
-
import {
|
|
38
|
+
import { FluxFadeTransition, FluxMenu } from '@flux-ui/components';
|
|
39
|
+
import { vHeightTransition } from '@flux-ui/internals';
|
|
40
|
+
import type { VNode } from 'vue';
|
|
55
41
|
import { useApplicationInjection, useApplicationMenu } from '../composable';
|
|
56
|
-
import $style from '
|
|
57
|
-
|
|
58
|
-
const {
|
|
59
|
-
showPageIndicator = true
|
|
60
|
-
} = defineProps<{
|
|
61
|
-
readonly showPageIndicator?: boolean;
|
|
62
|
-
}>();
|
|
42
|
+
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
63
43
|
|
|
64
44
|
const slots = defineSlots<{
|
|
65
45
|
default(): VNode;
|
|
@@ -69,5 +49,5 @@
|
|
|
69
49
|
}>();
|
|
70
50
|
|
|
71
51
|
const {isMenuCollapsed, showDesktopMenuToggle} = useApplicationInjection();
|
|
72
|
-
const {
|
|
52
|
+
const {isMainMenuVisible, viewIndex} = useApplicationMenu();
|
|
73
53
|
</script>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { FluxFlyout, FluxMenuItem, FluxPane } from '@flux-ui/components';
|
|
32
32
|
import type { FluxIconName } from '@flux-ui/types';
|
|
33
33
|
import type { VNode } from 'vue';
|
|
34
|
-
import $style from '
|
|
34
|
+
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
35
35
|
|
|
36
36
|
defineProps<{
|
|
37
37
|
readonly icon?: FluxIconName;
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
lang="ts"
|
|
23
23
|
setup>
|
|
24
24
|
import { FluxSecondaryButton } from '@flux-ui/components';
|
|
25
|
-
import type { FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
25
|
+
import type { FluxIconName, FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
26
26
|
import { computed, inject } from 'vue';
|
|
27
27
|
import { matchedRouteKey } from 'vue-router';
|
|
28
|
+
import { useApplicationContextRegistration } from '../composable';
|
|
28
29
|
import { FluxApplicationInjectionKey } from '../data';
|
|
29
|
-
import
|
|
30
|
-
import $style from '../css/component/ApplicationMenu.module.scss';
|
|
30
|
+
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
31
31
|
|
|
32
32
|
const props = defineProps<{
|
|
33
33
|
readonly subtitle?: string;
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
readonly target?: string;
|
|
39
39
|
readonly to?: FluxTo;
|
|
40
40
|
readonly entryTo?: FluxTo;
|
|
41
|
+
readonly icon?: FluxIconName;
|
|
41
42
|
readonly type?: FluxPressableType;
|
|
42
43
|
}>();
|
|
43
44
|
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
to: props.to,
|
|
74
75
|
entryTo: props.entryTo ?? autoEntryTo.value,
|
|
75
76
|
href: props.href,
|
|
77
|
+
icon: props.icon,
|
|
76
78
|
type: props.type
|
|
77
79
|
}));
|
|
78
80
|
</script>
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
import { FluxMenu } from '@flux-ui/components';
|
|
22
22
|
import { defineComponent, h, provide, ref, toRef, type VNode } from 'vue';
|
|
23
23
|
import { RouterView, viewDepthKey } from 'vue-router';
|
|
24
|
-
import useNamedRoutes from '../routing
|
|
25
|
-
import $style from '
|
|
24
|
+
import { useNamedRoutes } from '../routing';
|
|
25
|
+
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
26
26
|
|
|
27
27
|
const {
|
|
28
28
|
name = 'menu'
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
setup>
|
|
16
16
|
import { FluxIcon } from '@flux-ui/components';
|
|
17
17
|
import type { FluxIconName } from '@flux-ui/types';
|
|
18
|
-
import $style from '
|
|
18
|
+
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
19
19
|
|
|
20
20
|
defineProps<{
|
|
21
21
|
readonly icon?: FluxIconName;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
setup>
|
|
25
25
|
import { FluxMenuItem } from '@flux-ui/components';
|
|
26
26
|
import { useApplicationInjection } from '../composable';
|
|
27
|
-
import $style from '
|
|
27
|
+
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
28
28
|
|
|
29
29
|
const {isMenuCollapsed} = useApplicationInjection();
|
|
30
30
|
</script>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
lang="ts"
|
|
27
27
|
setup>
|
|
28
28
|
import type { VNode } from 'vue';
|
|
29
|
-
import $style from '
|
|
29
|
+
import $style from '~flux/application/css/component/ApplicationSection.module.scss';
|
|
30
30
|
|
|
31
31
|
defineProps<{
|
|
32
32
|
readonly title?: string;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
import type { VNode } from 'vue';
|
|
57
57
|
import { useApplicationInjection } from '../composable';
|
|
58
58
|
import FluxApplicationMenuToggle from './FluxApplicationMenuToggle.vue';
|
|
59
|
-
import $style from '
|
|
59
|
+
import $style from '~flux/application/css/component/ApplicationTop.module.scss';
|
|
60
60
|
|
|
61
61
|
defineProps<{
|
|
62
62
|
readonly icon?: FluxIconName;
|
package/src/composable/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as useApplicationContextMenu } from './useApplicationContextMenu';
|
|
2
|
+
export { default as useApplicationContextRegistration } from './useApplicationContextRegistration';
|
|
2
3
|
export { default as useApplicationInjection } from './useApplicationInjection';
|
|
3
4
|
export { default as useApplicationMenu } from './useApplicationMenu';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, type ComputedRef, toRef } from 'vue';
|
|
2
|
-
import useNamedRoutes from '../routing
|
|
2
|
+
import { useNamedRoutes } from '../routing';
|
|
3
3
|
|
|
4
4
|
export default function (name: string = 'menu'): UseApplicationContextMenu {
|
|
5
5
|
const matches = useNamedRoutes(toRef(() => name));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use '~flux/components/css/mixin';
|
|
2
2
|
|
|
3
3
|
.applicationMenu {
|
|
4
4
|
position: fixed;
|
|
@@ -51,31 +51,14 @@
|
|
|
51
51
|
background: linear-gradient(to top, var(--application-menu-surface), transparent);
|
|
52
52
|
transition: opacity var(--application-duration) var(--swift-out);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Collapses the footer in sync with the slider track when the
|
|
57
|
-
* user navigates into a context-menu panel. Animating `max-height`
|
|
58
|
-
* is the standard hack to transition a height-auto element; 50vh
|
|
59
|
-
* is far above any realistic footer height yet small enough to
|
|
60
|
-
* animate smoothly without the leading edge appearing to "wait".
|
|
61
|
-
*/
|
|
62
|
-
&[data-hidden] {
|
|
63
|
-
max-height: 0;
|
|
64
|
-
padding-top: 0;
|
|
65
|
-
padding-bottom: 0;
|
|
66
|
-
opacity: 0;
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
|
|
70
|
-
&::before {
|
|
71
|
-
opacity: 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
54
|
}
|
|
75
55
|
|
|
76
56
|
.applicationMenuHeader {
|
|
77
57
|
padding-top: max(12px, env(safe-area-inset-top));
|
|
58
|
+
flex-shrink: 0;
|
|
78
59
|
border-bottom: 1px solid var(--application-menu-surface-stroke);
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
transition: height var(--application-duration) var(--swift-out);
|
|
79
62
|
|
|
80
63
|
&::before {
|
|
81
64
|
top: calc(100% + 1px);
|
|
@@ -142,13 +125,6 @@
|
|
|
142
125
|
border-color: var(--foreground-prominent);
|
|
143
126
|
}
|
|
144
127
|
|
|
145
|
-
/**
|
|
146
|
-
* No visual animation on enter/leave — just hold the leaving panel in
|
|
147
|
-
* the DOM for the duration of the slider's translate transition so it
|
|
148
|
-
* stays visible while the track slides away from it. Without this the
|
|
149
|
-
* v-for would unmount the panel the moment matches shrinks, leaving
|
|
150
|
-
* the slider sliding over an empty track.
|
|
151
|
-
*/
|
|
152
128
|
.applicationMenuPanelEnterActive,
|
|
153
129
|
.applicationMenuPanelEnterFrom,
|
|
154
130
|
.applicationMenuPanelLeaveActive,
|
|
@@ -230,6 +206,15 @@
|
|
|
230
206
|
font-weight: 500;
|
|
231
207
|
}
|
|
232
208
|
|
|
209
|
+
.applicationMenu :local(.menuItemHighlighted) {
|
|
210
|
+
background: var(--gray-200);
|
|
211
|
+
color: var(--foreground-prominent);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.applicationMenu :local(.menuItemHighlighted) :local(.menuItemIcon) {
|
|
215
|
+
color: var(--foreground-prominent);
|
|
216
|
+
}
|
|
217
|
+
|
|
233
218
|
.applicationMenuAccount {
|
|
234
219
|
position: relative;
|
|
235
220
|
|
package/src/data/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { FluxIconName, FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
1
2
|
import type { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
-
import type { FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
3
3
|
|
|
4
4
|
export const FluxApplicationInjectionKey: InjectionKey<FluxApplicationInjection> = Symbol();
|
|
5
5
|
|
|
@@ -10,6 +10,7 @@ export type FluxApplicationContextInfo = {
|
|
|
10
10
|
readonly to?: FluxTo;
|
|
11
11
|
readonly entryTo?: FluxTo;
|
|
12
12
|
readonly href?: string;
|
|
13
|
+
readonly icon?: FluxIconName;
|
|
13
14
|
readonly type?: FluxPressableType;
|
|
14
15
|
};
|
|
15
16
|
|