@flux-ui/application 3.0.0-next.57 → 3.0.0-next.59

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.
Files changed (33) hide show
  1. package/dist/component/FluxApplicationMenu.vue.d.ts +1 -4
  2. package/dist/component/FluxApplicationMenuContext.vue.d.ts +2 -1
  3. package/dist/composable/index.d.ts +1 -0
  4. package/dist/data/index.d.ts +2 -1
  5. package/dist/index.css +11 -31
  6. package/dist/index.js +114 -96
  7. package/dist/index.js.map +1 -1
  8. package/dist/routing/index.d.ts +2 -0
  9. package/package.json +5 -5
  10. package/src/component/FluxApplication.vue +2 -3
  11. package/src/component/FluxApplicationContent.vue +2 -2
  12. package/src/component/FluxApplicationHero.vue +1 -1
  13. package/src/component/FluxApplicationMenu.vue +13 -33
  14. package/src/component/FluxApplicationMenuAccount.vue +1 -1
  15. package/src/component/FluxApplicationMenuContext.vue +5 -3
  16. package/src/component/FluxApplicationMenuContextStack.vue +2 -2
  17. package/src/component/FluxApplicationMenuPromo.vue +1 -1
  18. package/src/component/FluxApplicationMenuToggle.vue +1 -1
  19. package/src/component/FluxApplicationSection.vue +1 -1
  20. package/src/component/FluxApplicationSide.vue +1 -1
  21. package/src/component/FluxApplicationTop.vue +1 -1
  22. package/src/composable/index.ts +1 -0
  23. package/src/composable/useApplicationContextMenu.ts +1 -1
  24. package/src/css/component/Application.module.scss +1 -1
  25. package/src/css/component/ApplicationContent.module.scss +1 -1
  26. package/src/css/component/ApplicationHero.module.scss +1 -0
  27. package/src/css/component/ApplicationMenu.module.scss +8 -28
  28. package/src/css/component/ApplicationSection.module.scss +1 -1
  29. package/src/css/component/ApplicationSide.module.scss +1 -1
  30. package/src/css/component/ApplicationTop.module.scss +2 -2
  31. package/src/data/index.ts +2 -1
  32. package/src/routing/index.ts +2 -0
  33. package/tsconfig.json +6 -2
@@ -0,0 +1,2 @@
1
+ export { default as useNamedRoutes } from './useNamedRoutes';
2
+ export { default as useRoute } from './useRoute';
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.57",
4
+ "version": "3.0.0-next.59",
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.57",
55
- "@flux-ui/internals": "3.0.0-next.57",
56
- "@flux-ui/types": "3.0.0-next.57",
54
+ "@flux-ui/components": "3.0.0-next.59",
55
+ "@flux-ui/internals": "3.0.0-next.59",
56
+ "@flux-ui/types": "3.0.0-next.59",
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.21.0",
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/useNamedRoutes';
26
- import useRoute from '../routing/useRoute';
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 '../css/component/ApplicationContent.module.scss';
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 '../css/component/ApplicationHero.module.scss';
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
- <nav
25
- v-if="showPageIndicator && totalLevels > 1"
26
- :class="$style.applicationMenuPageIndicator"
27
- aria-label="Menu levels">
28
- <button
29
- v-for="level in totalLevels"
30
- :key="level - 1"
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 { type VNode } from 'vue';
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 '../css/component/ApplicationMenu.module.scss';
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 {goToLevel, isMainMenuVisible, totalLevels, viewIndex} = useApplicationMenu();
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 '../css/component/ApplicationMenu.module.scss';
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 useApplicationContextRegistration from '../composable/useApplicationContextRegistration';
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/useNamedRoutes';
25
- import $style from '../css/component/ApplicationMenu.module.scss';
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 '../css/component/ApplicationMenu.module.scss';
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 '../css/component/ApplicationMenu.module.scss';
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 '../css/component/ApplicationSection.module.scss';
29
+ import $style from '~flux/application/css/component/ApplicationSection.module.scss';
30
30
 
31
31
  defineProps<{
32
32
  readonly title?: string;
@@ -8,7 +8,7 @@
8
8
  lang="ts"
9
9
  setup>
10
10
  import type { VNode } from 'vue';
11
- import $style from '../css/component/ApplicationSide.module.scss';
11
+ import $style from '~flux/application/css/component/ApplicationSide.module.scss';
12
12
 
13
13
  defineSlots<{
14
14
  default(): VNode;
@@ -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 '../css/component/ApplicationTop.module.scss';
59
+ import $style from '~flux/application/css/component/ApplicationTop.module.scss';
60
60
 
61
61
  defineProps<{
62
62
  readonly icon?: FluxIconName;
@@ -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/useNamedRoutes';
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 '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  :root {
4
4
  --application-duration: 360ms;
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .applicationContent {
4
4
  position: relative;
@@ -13,6 +13,7 @@
13
13
  }
14
14
 
15
15
  .applicationHeroSubtitle {
16
+ margin: 0;
16
17
  color: var(--foreground-secondary);
17
18
  font-size: 18px;
18
19
  }
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .applicationMenu {
4
4
  position: fixed;
@@ -51,31 +51,13 @@
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));
78
58
  border-bottom: 1px solid var(--application-menu-surface-stroke);
59
+ overflow: hidden;
60
+ transition: height var(--application-duration) var(--swift-out);
79
61
 
80
62
  &::before {
81
63
  top: calc(100% + 1px);
@@ -142,13 +124,6 @@
142
124
  border-color: var(--foreground-prominent);
143
125
  }
144
126
 
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
127
  .applicationMenuPanelEnterActive,
153
128
  .applicationMenuPanelEnterFrom,
154
129
  .applicationMenuPanelLeaveActive,
@@ -230,6 +205,11 @@
230
205
  font-weight: 500;
231
206
  }
232
207
 
208
+ .applicationMenu :local(.menuItemHighlighted) {
209
+ background: var(--gray-200);
210
+ color: var(--foreground-prominent);
211
+ }
212
+
233
213
  .applicationMenuAccount {
234
214
  position: relative;
235
215
 
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .applicationSection {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .applicationSide {
4
4
  position: fixed;
@@ -1,4 +1,4 @@
1
- @use '$flux/css/mixin';
1
+ @use '~flux/components/css/mixin';
2
2
 
3
3
  .applicationTop {
4
4
  position: sticky;
@@ -56,7 +56,7 @@
56
56
  flex-flow: row;
57
57
  gap: 21px;
58
58
 
59
- :local(.tabBar) {
59
+ :local(.baseTabBar) {
60
60
  --tab-padding: 18px;
61
61
 
62
62
  width: 100%;
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
 
@@ -0,0 +1,2 @@
1
+ export { default as useNamedRoutes } from './useNamedRoutes';
2
+ export { default as useRoute } from './useRoute';
package/tsconfig.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "files": [],
3
3
  "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
4
+ {
5
+ "path": "./tsconfig.app.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.node.json"
9
+ }
6
10
  ]
7
11
  }