@flux-ui/application 3.2.0-beta.1 → 3.2.0-beta.3

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/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.1",
4
+ "version": "3.2.0-beta.3",
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.1",
55
- "@flux-ui/internals": "3.2.0-beta.1",
56
- "@flux-ui/types": "3.2.0-beta.1",
54
+ "@flux-ui/components": "3.2.0-beta.3",
55
+ "@flux-ui/internals": "3.2.0-beta.3",
56
+ "@flux-ui/types": "3.2.0-beta.3",
57
57
  "clsx": "^2.1.1"
58
58
  },
59
59
  "peerDependencies": {
@@ -12,8 +12,10 @@
12
12
  @click="onBack()"/>
13
13
 
14
14
  <div :class="$style.applicationMenuContextContent">
15
- <strong>{{ title }}</strong>
16
- <span v-if="subtitle">{{ subtitle }}</span>
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>
@@ -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>
@@ -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) {
@@ -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: flex;
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(6px);
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
- .applicationMenuContextPillContent :global(strong),
336
- .applicationMenuContextPillContent :global(span) {
337
- filter: blur(6px);
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
- .applicationMenuContextPillContent :global(strong),
369
- .applicationMenuContextPillContent :global(span) {
371
+ .applicationMenuContextContent {
370
372
  transition: none;
371
373
  }
372
374
  }