@flux-ui/application 3.2.0-beta.1 → 3.2.0-beta.11
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/FluxApplicationMenuContextSwitcher.vue.d.ts +3 -0
- package/dist/component/index.d.ts +1 -0
- package/dist/index.css +37 -27
- package/dist/index.js +77 -36
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/component/FluxApplicationMenuContext.vue +4 -2
- package/src/component/FluxApplicationMenuContextStack.vue +2 -2
- package/src/component/FluxApplicationMenuContextSwitcher.vue +29 -0
- package/src/component/FluxApplicationMenuToggle.vue +2 -0
- package/src/component/index.ts +1 -0
- package/src/css/component/ApplicationContent.module.scss +15 -4
- package/src/css/component/ApplicationMenu.module.scss +20 -18
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.2.0-beta.
|
|
4
|
+
"version": "3.2.0-beta.11",
|
|
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.2.0-beta.
|
|
55
|
-
"@flux-ui/internals": "3.2.0-beta.
|
|
56
|
-
"@flux-ui/types": "3.2.0-beta.
|
|
54
|
+
"@flux-ui/components": "3.2.0-beta.11",
|
|
55
|
+
"@flux-ui/internals": "3.2.0-beta.11",
|
|
56
|
+
"@flux-ui/types": "3.2.0-beta.11",
|
|
57
57
|
"clsx": "^2.1.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"vue-router": "^5.1.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@basmilius/vite-preset": "^3.
|
|
66
|
-
"@types/node": "^26.0
|
|
65
|
+
"@basmilius/vite-preset": "^3.50.0",
|
|
66
|
+
"@types/node": "^26.1.0",
|
|
67
67
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
68
68
|
"@vue/tsconfig": "^0.9.1",
|
|
69
69
|
"sass-embedded": "^1.100.0",
|
|
70
70
|
"typescript": "^6.0.3",
|
|
71
|
-
"vite": "^8.1.
|
|
72
|
-
"vue-tsc": "^3.3.
|
|
71
|
+
"vite": "^8.1.3",
|
|
72
|
+
"vue-tsc": "^3.3.6"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
@click="onBack()"/>
|
|
13
13
|
|
|
14
14
|
<div :class="$style.applicationMenuContextContent">
|
|
15
|
-
<
|
|
16
|
-
|
|
15
|
+
<div :class="$style.applicationMenuContextContentInner">
|
|
16
|
+
<strong>{{ title }}</strong>
|
|
17
|
+
<span v-if="subtitle">{{ subtitle }}</span>
|
|
18
|
+
</div>
|
|
17
19
|
</div>
|
|
18
20
|
</div>
|
|
19
21
|
</template>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
lang="ts"
|
|
20
20
|
setup>
|
|
21
21
|
import { FluxMenu } from '@flux-ui/components';
|
|
22
|
-
import { defineComponent, h, provide,
|
|
22
|
+
import { computed, defineComponent, h, provide, toRef, type VNode } from 'vue';
|
|
23
23
|
import { RouterView, viewDepthKey } from 'vue-router';
|
|
24
24
|
import { useNamedRoutes } from '../routing';
|
|
25
25
|
import $style from '~flux/application/css/component/ApplicationMenu.module.scss';
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
setup(props): () => VNode {
|
|
48
|
-
provide(viewDepthKey,
|
|
48
|
+
provide(viewDepthKey, computed(() => props.depth));
|
|
49
49
|
|
|
50
50
|
return () => h(RouterView, {name: props.viewName});
|
|
51
51
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FluxFadeTransition>
|
|
3
|
+
<FluxMenuGroup
|
|
4
|
+
v-if="totalLevels > 1"
|
|
5
|
+
:key="totalLevels"
|
|
6
|
+
is-horizontal>
|
|
7
|
+
<FluxMenuItem
|
|
8
|
+
icon-leading="grid-2"
|
|
9
|
+
:is-highlighted="0 === viewIndex"
|
|
10
|
+
@click="goToLevel(0)"/>
|
|
11
|
+
|
|
12
|
+
<FluxMenuItem
|
|
13
|
+
v-for="(context, index) of contexts"
|
|
14
|
+
:key="context.id"
|
|
15
|
+
:icon-leading="context.icon"
|
|
16
|
+
:is-highlighted="index + 1 === viewIndex"
|
|
17
|
+
@click="goToLevel(index + 1)"/>
|
|
18
|
+
</FluxMenuGroup>
|
|
19
|
+
</FluxFadeTransition>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script
|
|
23
|
+
lang="ts"
|
|
24
|
+
setup>
|
|
25
|
+
import { FluxFadeTransition, FluxMenuGroup, FluxMenuItem } from '@flux-ui/components';
|
|
26
|
+
import { useApplicationMenu } from '../composable';
|
|
27
|
+
|
|
28
|
+
const {contexts, totalLevels, viewIndex, goToLevel} = useApplicationMenu();
|
|
29
|
+
</script>
|
package/src/component/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as FluxApplicationMenu } from './FluxApplicationMenu.vue';
|
|
|
5
5
|
export { default as FluxApplicationMenuAccount } from './FluxApplicationMenuAccount.vue';
|
|
6
6
|
export { default as FluxApplicationMenuContext } from './FluxApplicationMenuContext.vue';
|
|
7
7
|
export { default as FluxApplicationMenuContextStack } from './FluxApplicationMenuContextStack.vue';
|
|
8
|
+
export { default as FluxApplicationMenuContextSwitcher } from './FluxApplicationMenuContextSwitcher.vue';
|
|
8
9
|
export { default as FluxApplicationMenuPromo } from './FluxApplicationMenuPromo.vue';
|
|
9
10
|
export { default as FluxApplicationMenuToggle } from './FluxApplicationMenuToggle.vue';
|
|
10
11
|
export { default as FluxApplicationSection } from './FluxApplicationSection.vue';
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
> :is(:local(.calendar), :local(.table)) {
|
|
56
56
|
max-height: 100%;
|
|
57
57
|
flex-grow: 1;
|
|
58
|
+
background: var(--surface);
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
> :local(.calendar) {
|
|
@@ -70,11 +71,16 @@
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
> :local(.table) {
|
|
73
|
-
:local(.tableCell):
|
|
74
|
+
:local(.tableCell):not(:local(.tableBar)):not(:local(.tableGroup)):not(:local(.isRaw)):first-child {
|
|
74
75
|
padding-left: 21px;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
:local(.tableCell):
|
|
78
|
+
:local(.tableCell):not(:local(.tableBar)):not(:local(.tableGroup)):not(:local(.isRaw)):last-child {
|
|
79
|
+
padding-right: 21px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:is(:local(.tableBarContent), :local(.tableGroupContent)) {
|
|
83
|
+
padding-left: 21px;
|
|
78
84
|
padding-right: 21px;
|
|
79
85
|
}
|
|
80
86
|
}
|
|
@@ -108,11 +114,16 @@
|
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
> .table {
|
|
111
|
-
.tableCell:first-child
|
|
117
|
+
.tableCell:not(.tableBar):not(.tableGroup):not(.isRaw):first-child {
|
|
112
118
|
padding-left: 12px;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
|
-
.tableCell:last-child
|
|
121
|
+
.tableCell:not(.tableBar):not(.tableGroup):not(.isRaw):last-child {
|
|
122
|
+
padding-right: 12px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:is(.tableBarContent, .tableGroupContent) {
|
|
126
|
+
padding-left: 12px;
|
|
116
127
|
padding-right: 12px;
|
|
117
128
|
}
|
|
118
129
|
}
|
|
@@ -225,19 +225,26 @@
|
|
|
225
225
|
margin-top: -12px;
|
|
226
226
|
margin-left: -12px;
|
|
227
227
|
margin-right: -12px;
|
|
228
|
-
padding: 15px;
|
|
228
|
+
padding: 15px 16px;
|
|
229
229
|
flex-flow: row nowrap;
|
|
230
230
|
gap: 15px;
|
|
231
|
-
border: 1px solid var(--application-menu-surface-stroke);
|
|
232
|
-
border-top: 0;
|
|
233
|
-
border-left: 0;
|
|
234
|
-
border-right: 0;
|
|
231
|
+
border-bottom: 1px solid var(--application-menu-surface-stroke);
|
|
235
232
|
}
|
|
236
233
|
|
|
237
234
|
.applicationMenuContextContent {
|
|
238
|
-
display:
|
|
235
|
+
display: grid;
|
|
239
236
|
align-self: center;
|
|
237
|
+
grid-template-rows: 1fr;
|
|
238
|
+
transition: var(--application-duration) var(--swift-out);
|
|
239
|
+
transition-property: filter, grid-template-rows, opacity, translate;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.applicationMenuContextContentInner {
|
|
243
|
+
display: flex;
|
|
240
244
|
flex-flow: column;
|
|
245
|
+
min-height: 0;
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
overflow: hidden;
|
|
241
248
|
|
|
242
249
|
:global(strong) {
|
|
243
250
|
color: var(--foreground-prominent);
|
|
@@ -307,7 +314,7 @@
|
|
|
307
314
|
width: var(--application-menu-width-collapsed);
|
|
308
315
|
|
|
309
316
|
:local(.menuItemLabel) {
|
|
310
|
-
filter: blur(
|
|
317
|
+
filter: blur(3px);
|
|
311
318
|
opacity: 0;
|
|
312
319
|
translate: -12px 0;
|
|
313
320
|
}
|
|
@@ -315,10 +322,6 @@
|
|
|
315
322
|
:local(.menuSubHeader) {
|
|
316
323
|
display: none;
|
|
317
324
|
height: 0;
|
|
318
|
-
/* Keep the sub-header's negative margins (sum -12px = one panel gap) while
|
|
319
|
-
it is a zero-height flex item, so the space it leaves equals the single
|
|
320
|
-
gap that remains after `display: none` removes it — avoiding a jump of
|
|
321
|
-
the group below at the end of the collapse. */
|
|
322
325
|
margin-top: -9px;
|
|
323
326
|
margin-bottom: -3px;
|
|
324
327
|
padding-top: 0;
|
|
@@ -326,17 +329,17 @@
|
|
|
326
329
|
opacity: 0;
|
|
327
330
|
}
|
|
328
331
|
|
|
329
|
-
.applicationMenuPromo
|
|
330
|
-
.applicationMenuContext {
|
|
332
|
+
.applicationMenuPromo {
|
|
331
333
|
opacity: 0;
|
|
332
334
|
pointer-events: none;
|
|
333
335
|
}
|
|
334
336
|
|
|
335
|
-
.
|
|
336
|
-
|
|
337
|
-
filter: blur(
|
|
337
|
+
.applicationMenuContextContent {
|
|
338
|
+
grid-template-rows: 0fr;
|
|
339
|
+
filter: blur(3px);
|
|
338
340
|
opacity: 0;
|
|
339
341
|
translate: -12px 0;
|
|
342
|
+
pointer-events: none;
|
|
340
343
|
}
|
|
341
344
|
}
|
|
342
345
|
}
|
|
@@ -365,8 +368,7 @@ html[data-application-resizing] {
|
|
|
365
368
|
.applicationMenuPromo,
|
|
366
369
|
.applicationMenu :local(.menuSubHeader),
|
|
367
370
|
.applicationMenu :local(.menuItemLabel),
|
|
368
|
-
.
|
|
369
|
-
.applicationMenuContextPillContent :global(span) {
|
|
371
|
+
.applicationMenuContextContent {
|
|
370
372
|
transition: none;
|
|
371
373
|
}
|
|
372
374
|
}
|