@jskit-ai/shell-web 0.2.10 → 0.2.12

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 (75) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/fixtures/adaptive-shell/src/App.vue +7 -0
  3. package/fixtures/adaptive-shell/src/OwnBarLayout.vue +24 -0
  4. package/fixtures/adaptive-shell/src/RecordListPage.vue +22 -0
  5. package/fixtures/adaptive-shell/src/RecordPage.vue +30 -0
  6. package/fixtures/adaptive-shell/src/ScreenPage.vue +7 -3
  7. package/fixtures/adaptive-shell/src/SettingsPage.vue +24 -0
  8. package/fixtures/adaptive-shell/src/StudioPage.vue +26 -0
  9. package/fixtures/adaptive-shell/src/main.js +64 -55
  10. package/fixtures/adaptive-shell/src/records.js +13 -0
  11. package/fixtures/adaptive-shell/src/theme/index.js +3 -0
  12. package/locales/en.json +1 -0
  13. package/package.json +22 -5
  14. package/patterns/application-shell/PATTERN.md +3 -1
  15. package/patterns/application-shell/example/expected-existing/src/pages/home/index.vue +5 -18
  16. package/patterns/application-shell/example/expected-existing/src/views/NotFound.vue +14 -0
  17. package/patterns/application-shell/example/src/pages/home/index.vue +21 -57
  18. package/patterns/application-shell/example/src/pages/home/settings/general/index.vue +24 -19
  19. package/patterns/application-shell/example/src/pages/home/settings.vue +27 -84
  20. package/patterns/application-shell/example/src/views/NotFound.vue +15 -0
  21. package/patterns/page-and-placement/example/src/components/SyncStatusElement.vue +2 -2
  22. package/patterns/page-and-placement/example/src/pages/home/reports/activity.vue +1 -1
  23. package/patterns/page-and-placement/example/src/pages/home/reports/overview.vue +1 -1
  24. package/patterns/page-and-placement/example/src/pages/home/reports.vue +6 -3
  25. package/patterns/page-and-placement/example/src/placement.js +1 -1
  26. package/src/client/components/ShellErrorHost.vue +13 -15
  27. package/src/client/components/ShellLayout.vue +340 -187
  28. package/src/client/components/ShellListDetail.vue +77 -0
  29. package/src/client/components/ShellMenuLinkItem.vue +10 -24
  30. package/src/client/components/ShellNavigationItem.vue +175 -0
  31. package/src/client/components/ShellNavigationScope.vue +18 -0
  32. package/src/client/components/ShellOutlet.vue +1 -1
  33. package/src/client/components/ShellOutletMenuWidget.vue +2 -2
  34. package/src/client/components/ShellPageAction.vue +91 -0
  35. package/src/client/components/ShellPageActions.vue +32 -0
  36. package/src/client/components/ShellPageActionsTarget.vue +24 -0
  37. package/src/client/components/ShellPageTitle.vue +49 -0
  38. package/src/client/components/ShellSurfaceAwareMenuLinkItem.vue +10 -24
  39. package/src/client/components/ShellTabLinkItem.vue +77 -3
  40. package/src/client/components/ShellUpButton.vue +29 -0
  41. package/src/client/composables/useShellAppBar.js +27 -0
  42. package/src/client/composables/useShellDrawer.js +28 -18
  43. package/src/client/composables/useShellPageTitle.js +15 -0
  44. package/src/client/composables/useShellRouteTransition.js +1 -1
  45. package/src/client/composables/useShellWindowSizeClass.js +21 -0
  46. package/src/client/error/presentation.js +3 -5
  47. package/src/client/index.js +11 -0
  48. package/src/client/lib/menuIcons.js +21 -65
  49. package/src/client/navigation/documentNavigation.js +38 -0
  50. package/src/client/navigation/shellNavigationRuntime.js +480 -0
  51. package/src/client/navigation/useShellNavigation.js +94 -0
  52. package/src/client/providers/ShellWebClientProvider.js +11 -0
  53. package/src/client/support/drawerPresentation.js +9 -4
  54. package/src/client/support/drawerWidth.js +18 -1
  55. package/src/client/support/navigationPresentation.js +40 -0
  56. package/src/client/support/shellLayoutClass.js +6 -25
  57. package/src/client/support/windowSizeClass.js +29 -0
  58. package/src/test/adaptiveShellSmoke.js +43 -16
  59. package/src/test/shellNavigation.js +32 -0
  60. package/test/adaptiveShell.browser.test.js +251 -111
  61. package/test/clientUpdate.test.js +6 -1
  62. package/test/drawerPresentation.test.js +7 -7
  63. package/test/errorPresentation.test.js +4 -5
  64. package/test/materialBaselines.browser.test.js +96 -0
  65. package/test/menuIcons.test.js +14 -22
  66. package/test/outletMenuWidgetContract.test.js +2 -3
  67. package/test/playwrightContract.test.js +3 -1
  68. package/test/provider.test.js +9 -1
  69. package/test/settingsPlacementContract.test.js +49 -28
  70. package/test/shellGestureSupport.test.js +21 -9
  71. package/test/translation.test.js +2 -2
  72. package/test/useShellDrawer.test.js +20 -5
  73. package/test/useShellRouteTransition.test.js +3 -3
  74. package/patterns/application-shell/example/src/pages/home/settings/index.vue +0 -7
  75. package/src/client/components/ShellNavigationTooltip.vue +0 -39
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
- import { computed, inject, ref } from "vue";
2
+ import { computed, inject, onBeforeUnmount, onMounted, ref } from "vue";
3
3
  import { useDisplay } from "vuetify";
4
+ import { useShellAppBar } from "../composables/useShellAppBar.js";
4
5
  import { useShellDrawer } from "../composables/useShellDrawer.js";
5
6
  import { useShellLayoutState } from "../composables/useShellLayoutState.js";
6
7
  import { useShellPullToRefresh } from "../composables/useShellPullToRefresh.js";
@@ -8,10 +9,17 @@ import {
8
9
  DEFAULT_SHELL_NAVIGATION_ITEM_SPACING,
9
10
  DEFAULT_SHELL_RAIL_WIDTH
10
11
  } from "../support/drawerWidth.js";
12
+ import { normalizeDesktopDrawerClosedMode } from "../support/drawerPresentation.js";
11
13
  import { resolveShellLayoutClass } from "../support/shellLayoutClass.js";
14
+ import { resolveWindowSizeClass } from "../support/windowSizeClass.js";
12
15
  import { NO_SHELL_WEB_REFRESH_RUNTIME, SHELL_WEB_REFRESH_RUNTIME_KEY } from "../runtime/refreshRuntime.js";
16
+ import { useShellNavigation } from "../navigation/useShellNavigation.js";
17
+ import ShellNavigationScope from "./ShellNavigationScope.vue";
13
18
  import ShellOutlet from "./ShellOutlet.vue";
19
+ import ShellPageActionsTarget from "./ShellPageActionsTarget.vue";
20
+ import ShellPageTitle from "./ShellPageTitle.vue";
14
21
  import ShellRouteTransition from "./ShellRouteTransition.vue";
22
+ import ShellUpButton from "./ShellUpButton.vue";
15
23
  import { useJskitText } from "../i18n.js";
16
24
 
17
25
  const { t, text } = useJskitText();
@@ -25,6 +33,7 @@ const props = defineProps({
25
33
  type: String,
26
34
  default: ""
27
35
  },
36
+ // The app bar title of pages that declare none (meta.jskit.title) and set none (useShellPageTitle).
28
37
  title: {
29
38
  type: String,
30
39
  default: ""
@@ -37,8 +46,9 @@ const props = defineProps({
37
46
  type: String,
38
47
  default: "rail"
39
48
  },
49
+ // Material 3's 360dp when unset; a number fixes the width, "content" fits the drawer to its labels.
40
50
  drawerWidth: {
41
- type: Number,
51
+ type: [Number, String],
42
52
  default: null
43
53
  },
44
54
  railWidth: {
@@ -65,10 +75,19 @@ const {
65
75
  const display = useDisplay();
66
76
  /** @type {import("../types.js").ShellRefreshRuntime} */
67
77
  const refreshRuntime = inject(SHELL_WEB_REFRESH_RUNTIME_KEY, NO_SHELL_WEB_REFRESH_RUNTIME);
78
+ const { canGoUp } = useShellNavigation();
68
79
  const navigationToggle = ref(null);
80
+ const scrolled = ref(false);
69
81
 
70
- const layoutClass = computed(() => resolveShellLayoutClass(display.name.value));
82
+ const viewportWidth = computed(() => display.width.value);
83
+ const sizeClass = computed(() => resolveWindowSizeClass(display.width.value));
84
+ const layoutClass = computed(() => resolveShellLayoutClass(display.width.value));
71
85
  const isCompactLayout = computed(() => layoutClass.value === "compact");
86
+ // Compact and medium windows open the drawer over the page; a medium window keeps a navigation rail beside it.
87
+ const modalLayout = computed(() => layoutClass.value !== "expanded");
88
+ const showsMediumRail = computed(() =>
89
+ layoutClass.value === "medium" && normalizeDesktopDrawerClosedMode(props.desktopDrawerClosedMode) === "rail"
90
+ );
72
91
  const {
73
92
  pullRefreshing,
74
93
  pullProgress,
@@ -84,42 +103,73 @@ const {
84
103
  resolvedDrawerWidth,
85
104
  resolvedNavigationItemSpacing,
86
105
  resolvedRailWidth
87
- } = useShellDrawer({ props, isCompactLayout, navigationToggle, layoutState });
106
+ } = useShellDrawer({ props, modalLayout, viewportWidth, navigationToggle, layoutState });
107
+
108
+ const standardDrawerVisible = computed(() => !modalLayout.value && drawerPresentation.value.visible);
109
+ // The menu control sits in the rail or drawer header when one shows, otherwise first in the app bar of a top-level
110
+ // page; an inner page's leading slot is its Up arrow.
111
+ const toggleInAppBar = computed(() => !showsMediumRail.value && !standardDrawerVisible.value);
112
+ const fallbackTitle = computed(() => text(props.title) || resolvedSurfaceLabel.value);
113
+ const navigationStyle = computed(() => ({
114
+ "--shell-navigation-item-spacing": `${resolvedNavigationItemSpacing.value}px`,
115
+ "--shell-navigation-rail-width": `${resolvedRailWidth.value}px`
116
+ }));
117
+
118
+ useShellAppBar();
119
+
120
+ function updateScrolled() {
121
+ scrolled.value = window.scrollY > 0;
122
+ }
123
+
124
+ onMounted(() => {
125
+ window.addEventListener("scroll", updateScrolled, { passive: true });
126
+ updateScrolled();
127
+ });
128
+
129
+ onBeforeUnmount(() => {
130
+ window.removeEventListener("scroll", updateScrolled);
131
+ });
88
132
  </script>
89
133
 
90
134
  <template>
91
135
  <v-app-bar
92
- :density="isCompactLayout ? 'compact' : 'comfortable'"
93
- elevation="0"
136
+ :color="scrolled ? 'surface-container' : 'surface'"
137
+ flat
138
+ :height="64"
94
139
  class="shell-layout__app-bar"
140
+ :class="`shell-layout--size-${sizeClass}`"
95
141
  data-testid="jskit-shell-app-bar"
142
+ :data-size-class="sizeClass"
96
143
  >
97
- <v-app-bar-nav-icon
98
- ref="navigationToggle"
99
- class="shell-layout__nav-toggle"
100
- data-testid="jskit-shell-nav-toggle"
101
- :aria-label="drawerToggleLabel"
102
- :aria-expanded="drawerOpen"
103
- aria-controls="jskit-shell-drawer"
104
- @click="toggleDrawer"
105
- />
106
-
107
- <slot name="top-left" :surface="resolvedSurface">
108
- <div class="shell-layout__top-left d-flex align-center ga-2">
109
- <span class="shell-layout__surface-label">
110
- {{ resolvedSurfaceLabel }}
111
- </span>
112
- <ShellOutlet target="shell-layout:top-left" />
144
+ <div class="shell-layout__app-bar-row">
145
+ <ShellUpButton v-if="canGoUp" class="shell-layout__leading" />
146
+ <v-btn
147
+ v-else-if="toggleInAppBar"
148
+ ref="navigationToggle"
149
+ class="shell-layout__leading"
150
+ icon="$menu"
151
+ variant="text"
152
+ color="on-surface"
153
+ data-testid="jskit-shell-nav-toggle"
154
+ :aria-label="drawerToggleLabel"
155
+ :aria-expanded="drawerOpen"
156
+ aria-controls="jskit-shell-drawer"
157
+ @click="toggleDrawer"
158
+ />
159
+
160
+ <div class="shell-layout__headline" :class="{ 'shell-layout__headline--leading': canGoUp || toggleInAppBar }">
161
+ <ShellPageTitle :title="fallbackTitle" />
162
+ <p v-if="props.subtitle" class="shell-layout__page-subtitle">{{ text(props.subtitle) }}</p>
113
163
  </div>
114
- </slot>
115
164
 
116
- <v-spacer />
165
+ <ShellPageActionsTarget />
117
166
 
118
- <slot name="top-right" :surface="resolvedSurface">
119
- <div class="shell-layout__top-right d-flex align-center ga-2">
120
- <ShellOutlet target="shell-layout:top-right" />
121
- </div>
122
- </slot>
167
+ <slot name="top-right" :surface="resolvedSurface">
168
+ <div class="shell-layout__top-right">
169
+ <ShellOutlet target="shell-layout:top-right" />
170
+ </div>
171
+ </slot>
172
+ </div>
123
173
  </v-app-bar>
124
174
 
125
175
  <div
@@ -140,6 +190,39 @@ const {
140
190
  <span class="shell-layout__pull-refresh-label">{{ pullRefreshLabel }}</span>
141
191
  </div>
142
192
 
193
+ <v-navigation-drawer
194
+ v-if="showsMediumRail"
195
+ class="shell-layout__rail"
196
+ data-testid="jskit-shell-rail"
197
+ data-presentation="rail"
198
+ :style="navigationStyle"
199
+ permanent
200
+ rail
201
+ :rail-width="resolvedRailWidth"
202
+ color="surface"
203
+ >
204
+ <div class="shell-layout__rail-header">
205
+ <v-btn
206
+ ref="navigationToggle"
207
+ icon="$menu"
208
+ variant="text"
209
+ color="on-surface-variant"
210
+ data-testid="jskit-shell-nav-toggle"
211
+ :aria-label="drawerToggleLabel"
212
+ :aria-expanded="drawerOpen"
213
+ aria-controls="jskit-shell-drawer"
214
+ @click="toggleDrawer"
215
+ />
216
+ </div>
217
+ <ShellNavigationScope presentation="rail">
218
+ <v-list nav class="shell-layout__rail-list">
219
+ <ShellOutlet target="shell-layout:primary-menu" default />
220
+ <ShellOutlet target="shell-layout:secondary-menu" />
221
+ </v-list>
222
+ </ShellNavigationScope>
223
+ </v-navigation-drawer>
224
+
225
+ <!-- A modal drawer is the outermost layout item, so it opens from the window's edge over the rail and app bar. -->
143
226
  <v-navigation-drawer
144
227
  id="jskit-shell-drawer"
145
228
  :model-value="drawerPresentation.visible"
@@ -151,52 +234,70 @@ const {
151
234
  :data-drawer-width="resolvedDrawerWidth"
152
235
  :data-navigation-item-spacing="resolvedNavigationItemSpacing"
153
236
  :data-rail-width="resolvedRailWidth"
154
- :style="{
155
- '--shell-navigation-item-spacing': `${resolvedNavigationItemSpacing}px`,
156
- '--shell-navigation-rail-width': `${resolvedRailWidth}px`
157
- }"
158
- :temporary="isCompactLayout"
159
- :permanent="!isCompactLayout"
237
+ :style="navigationStyle"
238
+ :color="modalLayout ? 'surface-container-low' : 'surface'"
239
+ :temporary="modalLayout"
240
+ :permanent="!modalLayout"
241
+ :order="modalLayout ? -1 : 0"
160
242
  :width="resolvedDrawerWidth"
161
243
  :rail="drawerPresentation.rail"
162
244
  :rail-width="resolvedRailWidth"
163
245
  @update:model-value="handleDrawerVisibilityChange"
164
246
  >
247
+ <div class="shell-layout__drawer-header">
248
+ <v-btn
249
+ v-if="standardDrawerVisible"
250
+ ref="navigationToggle"
251
+ :icon="drawerPresentation.rail ? '$menu' : '$menuOpen'"
252
+ variant="text"
253
+ color="on-surface-variant"
254
+ data-testid="jskit-shell-nav-toggle"
255
+ :aria-label="drawerToggleLabel"
256
+ :aria-expanded="drawerOpen"
257
+ aria-controls="jskit-shell-drawer"
258
+ @click="toggleDrawer"
259
+ />
260
+ <span v-if="!drawerPresentation.rail" class="shell-layout__surface-label">{{ resolvedSurfaceLabel }}</span>
261
+ </div>
262
+ <div v-if="!drawerPresentation.rail" class="shell-layout__identity">
263
+ <slot name="top-left" :surface="resolvedSurface">
264
+ <ShellOutlet target="shell-layout:top-left" />
265
+ </slot>
266
+ </div>
165
267
  <slot name="menu" :surface="resolvedSurface" :rail="drawerPresentation.rail">
166
- <v-list
167
- nav
168
- density="comfortable"
169
- class="pt-2"
170
- :prepend-gap="resolvedNavigationItemSpacing"
171
- >
172
- <ShellOutlet
173
- target="shell-layout:primary-menu"
174
- default
175
- />
176
- <v-divider class="my-2" />
177
- <ShellOutlet target="shell-layout:secondary-menu" />
178
- </v-list>
268
+ <ShellNavigationScope :presentation="drawerPresentation.rail ? 'rail' : 'drawer'">
269
+ <v-list
270
+ nav
271
+ class="shell-layout__drawer-list"
272
+ :prepend-gap="resolvedNavigationItemSpacing"
273
+ >
274
+ <ShellOutlet
275
+ target="shell-layout:primary-menu"
276
+ default
277
+ />
278
+ <v-divider class="shell-layout__drawer-divider" />
279
+ <ShellOutlet target="shell-layout:secondary-menu" />
280
+ </v-list>
281
+ </ShellNavigationScope>
179
282
  </slot>
180
283
  </v-navigation-drawer>
181
284
 
182
285
  <v-main class="bg-background">
183
- <v-container fluid class="shell-layout__content">
184
- <h1 v-if="title" class="shell-layout__title text-h5">{{ text(title) }}</h1>
185
- <p v-if="subtitle" class="shell-layout__subtitle text-body-2 text-medium-emphasis">{{ text(subtitle) }}</p>
286
+ <div class="shell-layout__content" :class="{ 'shell-layout__content--compact': isCompactLayout }">
186
287
  <ShellRouteTransition>
187
288
  <slot />
188
289
  </ShellRouteTransition>
189
- </v-container>
290
+ </div>
190
291
  </v-main>
191
292
 
192
293
  <v-bottom-navigation
193
294
  v-if="isCompactLayout"
194
295
  class="shell-layout__bottom-nav"
195
296
  data-testid="jskit-shell-bottom-nav"
196
- color="primary"
197
- density="comfortable"
297
+ bg-color="surface-container"
298
+ :elevation="0"
299
+ :height="80"
198
300
  grow
199
- mandatory
200
301
  >
201
302
  <ShellOutlet target="shell-layout:primary-bottom-nav" />
202
303
  </v-bottom-navigation>
@@ -206,21 +307,22 @@ const {
206
307
  :model-value="supportingContentOpen"
207
308
  @update:model-value="setSupportingContentOpen"
208
309
  >
209
- <v-card rounded="t-xl" class="shell-layout__supporting-sheet" data-testid="jskit-shell-supporting-bottom-sheet">
210
- <v-card-title class="shell-layout__supporting-title">
211
- <span>{{ text(supportingContentTitle) || t("jskit.shell.layout.details") }}</span>
212
- <v-btn variant="text" @click="closeSupportingContent">{{ t("jskit.shell.actions.close") }}</v-btn>
213
- </v-card-title>
214
- <v-card-text>
310
+ <v-card class="shell-layout__supporting-sheet" data-testid="jskit-shell-supporting-bottom-sheet">
311
+ <div class="shell-layout__supporting-title">
312
+ <h2 class="shell-layout__supporting-headline">{{ text(supportingContentTitle) || t("jskit.shell.layout.details") }}</h2>
313
+ <v-btn icon="$close" variant="text" color="on-surface-variant" :aria-label="t('jskit.shell.actions.close')" @click="closeSupportingContent" />
314
+ </div>
315
+ <div class="shell-layout__supporting-body">
215
316
  <ShellOutlet target="shell-layout:supporting-bottom-sheet" />
216
- </v-card-text>
317
+ </div>
217
318
  </v-card>
218
319
  </v-bottom-sheet>
219
320
 
220
321
  <v-navigation-drawer
221
322
  v-if="!isCompactLayout"
222
323
  :model-value="supportingContentOpen"
223
- border
324
+ class="shell-layout__supporting-side-sheet"
325
+ color="surface-container-low"
224
326
  temporary
225
327
  location="right"
226
328
  :width="384"
@@ -229,8 +331,8 @@ const {
229
331
  >
230
332
  <div class="shell-layout__supporting-side-panel">
231
333
  <div class="shell-layout__supporting-title">
232
- <strong>{{ text(supportingContentTitle) || t("jskit.shell.layout.details") }}</strong>
233
- <v-btn variant="text" @click="closeSupportingContent">{{ t("jskit.shell.actions.close") }}</v-btn>
334
+ <h2 class="shell-layout__supporting-headline">{{ text(supportingContentTitle) || t("jskit.shell.layout.details") }}</h2>
335
+ <v-btn icon="$close" variant="text" color="on-surface-variant" :aria-label="t('jskit.shell.actions.close')" @click="closeSupportingContent" />
234
336
  </div>
235
337
  <ShellOutlet target="shell-layout:supporting-side-panel" />
236
338
  </div>
@@ -238,62 +340,143 @@ const {
238
340
  </template>
239
341
 
240
342
  <style scoped>
241
- /*
242
- * Shell chrome follows the app's Vuetify theme and is restyled through these
243
- * custom properties (set them on :root or any ancestor):
244
- * --shell-chrome-border-width / --shell-chrome-border-color shared dividers
245
- * --shell-app-bar-border-width, --shell-navigation-border-width,
246
- * --shell-bottom-navigation-border-width per-edge overrides
247
- * --shell-app-bar-background, --shell-navigation-background,
248
- * --shell-bottom-navigation-background surfaces
249
- * A Material 3 restyle sets the border widths to 0 and separates surfaces
250
- * tonally, e.g. --shell-navigation-background: rgb(var(--v-theme-surface-container-low)).
251
- */
343
+ /* Material 3 small top app bar: 64dp, surface at rest and surface-container once the page scrolls under it. */
252
344
  .shell-layout__app-bar {
253
- border-style: solid;
254
- border-color: var(--shell-chrome-border-color, rgba(var(--v-border-color), var(--v-border-opacity)));
255
- border-width: 0 0 var(--shell-app-bar-border-width, var(--shell-chrome-border-width, thin));
256
- background: var(--shell-app-bar-background, rgb(var(--v-theme-surface)));
257
- color: rgb(var(--v-theme-on-surface));
345
+ transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1);
258
346
  }
259
347
 
260
- .shell-layout__drawer {
261
- border-style: solid;
262
- border-color: var(--shell-chrome-border-color, rgba(var(--v-border-color), var(--v-border-opacity)));
263
- border-width: 0;
264
- border-inline-end-width: var(--shell-navigation-border-width, var(--shell-chrome-border-width, thin));
265
- background: var(--shell-navigation-background, rgb(var(--v-theme-surface)));
348
+ .shell-layout__app-bar :deep(.v-toolbar__content) {
349
+ padding: 0;
266
350
  }
267
351
 
268
- .shell-layout__content {
269
- padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
352
+ .shell-layout__app-bar-row {
353
+ align-items: center;
354
+ display: flex;
355
+ height: 100%;
356
+ inline-size: 100%;
357
+ min-width: 0;
358
+ padding-inline: 4px;
359
+ }
360
+
361
+ .shell-layout__leading {
362
+ flex: 0 0 auto;
363
+ }
364
+
365
+ .shell-layout__headline {
366
+ flex: 1 1 auto;
367
+ min-width: 0;
368
+ padding-inline: 12px 4px;
369
+ }
370
+
371
+ .shell-layout__headline--leading {
372
+ padding-inline-start: 4px;
373
+ }
374
+
375
+ .shell-layout__page-subtitle {
376
+ color: rgb(var(--v-theme-on-surface-variant));
377
+ font-size: 0.75rem;
378
+ font-weight: 500;
379
+ letter-spacing: 0.03125rem;
380
+ line-height: 1rem;
381
+ margin: 0;
382
+ overflow: hidden;
383
+ text-overflow: ellipsis;
384
+ white-space: nowrap;
270
385
  }
271
386
 
272
- .shell-layout__top-left,
273
387
  .shell-layout__top-right {
388
+ align-items: center;
389
+ color: rgb(var(--v-theme-on-surface-variant));
390
+ display: flex;
391
+ flex: 0 0 auto;
274
392
  min-width: 0;
275
393
  }
276
394
 
277
- .shell-layout__nav-toggle {
278
- min-height: 48px;
279
- min-width: 48px;
395
+ /* Navigation rail (medium windows, and expanded ones with the drawer collapsed): 80dp, menu control on top. */
396
+ .shell-layout__rail,
397
+ .shell-layout__drawer {
398
+ border: 0;
280
399
  }
281
400
 
282
- .shell-layout__drawer :deep(.v-list-item-title) {
401
+ .shell-layout__rail-header,
402
+ .shell-layout__drawer-header {
403
+ align-items: center;
404
+ display: flex;
405
+ gap: 4px;
406
+ min-height: 56px;
407
+ padding-block: 4px;
408
+ }
409
+
410
+ .shell-layout__rail-header,
411
+ .shell-layout__drawer[data-presentation="rail"] .shell-layout__drawer-header {
412
+ justify-content: center;
413
+ }
414
+
415
+ .shell-layout__drawer:not([data-presentation="rail"]) .shell-layout__drawer-header {
416
+ padding-inline: 24px 12px;
417
+ }
418
+
419
+ .shell-layout__drawer[data-presentation="drawer"] .shell-layout__drawer-header {
420
+ padding-inline-start: max(0px, calc(var(--shell-navigation-rail-width) / 2 - 24px));
421
+ }
422
+
423
+ .shell-layout__surface-label {
424
+ color: rgb(var(--v-theme-on-surface-variant));
425
+ font-size: 0.875rem;
426
+ font-weight: 500;
427
+ letter-spacing: 0.00625rem;
428
+ line-height: 1.25rem;
429
+ min-width: 0;
430
+ overflow: hidden;
431
+ padding-inline-start: 4px;
432
+ text-overflow: ellipsis;
283
433
  white-space: nowrap;
284
434
  }
285
435
 
436
+ .shell-layout__identity {
437
+ min-width: 0;
438
+ padding-inline: 12px;
439
+ }
440
+
441
+ .shell-layout__identity:empty {
442
+ display: none;
443
+ }
444
+
445
+ .shell-layout__rail-list,
446
+ .shell-layout__drawer[data-presentation="rail"] .shell-layout__drawer-list {
447
+ display: flex;
448
+ flex-direction: column;
449
+ gap: 4px;
450
+ padding: 0;
451
+ }
452
+
453
+ .shell-layout__rail-list :deep(.v-list-item),
454
+ .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item) {
455
+ inline-size: 100%;
456
+ justify-content: center;
457
+ margin: 0;
458
+ min-height: 56px;
459
+ min-width: 48px;
460
+ }
461
+
462
+ .shell-layout__drawer[data-presentation="rail"] .shell-layout__drawer-divider {
463
+ display: none;
464
+ }
465
+
466
+ /* Navigation drawer: items 56dp pills inset 12dp, icons lined up with the rail's. */
286
467
  .shell-layout__drawer {
287
468
  --shell-navigation-drawer-inset: 12px;
288
469
  --shell-navigation-icon-size: 24px;
289
470
  }
290
471
 
291
- .shell-layout__drawer[data-presentation="drawer"] :deep(.v-list--nav) {
472
+ .shell-layout__drawer:not([data-presentation="rail"]) .shell-layout__drawer-list {
473
+ padding-block: 0 12px;
292
474
  padding-inline-end: calc(var(--shell-navigation-item-spacing) / 2);
293
475
  padding-inline-start: var(--shell-navigation-drawer-inset);
294
476
  }
295
477
 
296
- .shell-layout__drawer[data-presentation="drawer"] :deep(.v-list-item) {
478
+ .shell-layout__drawer:not([data-presentation="rail"]) :deep(.v-list-item) {
479
+ margin-bottom: 0;
297
480
  padding-inline-end: calc(var(--shell-navigation-item-spacing) / 2);
298
481
  padding-inline-start: max(
299
482
  0px,
@@ -305,82 +488,45 @@ const {
305
488
  );
306
489
  }
307
490
 
308
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item) {
309
- grid-template-areas: "prepend";
310
- grid-template-columns: minmax(0, 1fr);
311
- inline-size: 100%;
312
- min-height: 48px;
313
- min-width: 48px;
314
- padding-inline: 0;
491
+ .shell-layout__drawer :deep(.v-list-item-title) {
492
+ white-space: nowrap;
315
493
  }
316
494
 
317
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item__prepend) {
318
- inline-size: 100%;
319
- justify-content: center;
320
- min-width: 0;
495
+ .shell-layout__drawer-divider {
496
+ margin-block: 8px;
497
+ margin-inline: 16px;
321
498
  }
322
499
 
323
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item__prepend .v-list-item__spacer),
324
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item__content),
325
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item__append) {
500
+ /* The divider separates the secondary destinations from the primary ones, so it goes when either group is empty
501
+ (a compact window's drawer has no primary destinations: they are in the navigation bar). */
502
+ .shell-layout__drawer-divider:first-child,
503
+ .shell-layout__drawer-divider:last-child {
326
504
  display: none;
327
505
  }
328
506
 
329
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item__overlay) {
330
- border-radius: 999px;
331
- inset-block: 8px;
332
- inset-inline: 4px;
333
- }
334
-
335
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item--active > .v-list-item__overlay) {
336
- background: color-mix(
337
- in srgb,
338
- rgb(var(--v-theme-primary)) 18%,
339
- rgb(var(--v-theme-surface))
340
- );
341
- opacity: 1;
342
- }
343
-
344
- .shell-layout__drawer[data-presentation="rail"] :deep(.v-list-item--active .v-icon) {
345
- color: rgb(var(--v-theme-primary));
346
- opacity: 1;
347
- }
348
-
349
- .shell-layout__top-right {
350
- max-width: min(45vw, 18rem);
351
- overflow: hidden;
352
- }
353
-
354
- .shell-layout__surface-label {
355
- color: rgb(var(--v-theme-on-surface));
356
- display: block;
357
- font-size: 0.95rem;
358
- font-weight: 650;
359
- letter-spacing: -0.01em;
360
- line-height: 1.2;
361
- max-width: 12rem;
362
- overflow: hidden;
363
- text-overflow: ellipsis;
364
- white-space: nowrap;
507
+ /* Modal drawer: Material 3 rounds its trailing corners 16dp. */
508
+ .shell-layout__drawer[data-presentation="modal"] {
509
+ border-end-end-radius: 16px;
510
+ border-start-end-radius: 16px;
365
511
  }
366
512
 
367
- .shell-layout__title {
368
- margin-bottom: 0.25rem;
513
+ /* Material 3 window margins: 16dp on compact windows, 24dp wider. */
514
+ .shell-layout__content {
515
+ padding: 8px 24px calc(24px + env(safe-area-inset-bottom, 0px));
369
516
  }
370
517
 
371
- .shell-layout__subtitle {
372
- margin-bottom: 0.75rem;
518
+ .shell-layout__content--compact {
519
+ padding-inline: 16px;
373
520
  }
374
521
 
522
+ /* Navigation bar (compact windows): 80dp on surface-container. */
375
523
  .shell-layout__bottom-nav {
376
- border-top: var(--shell-bottom-navigation-border-width, var(--shell-chrome-border-width, thin)) solid
377
- var(--shell-chrome-border-color, rgba(var(--v-border-color), var(--v-border-opacity)));
378
- background: var(--shell-bottom-navigation-background, rgb(var(--v-theme-surface)));
379
524
  padding-bottom: env(safe-area-inset-bottom, 0px);
380
525
  }
381
526
 
382
- .shell-layout__bottom-nav :deep(.v-btn) {
383
- min-height: 48px;
527
+ .shell-layout__bottom-nav :deep(.v-bottom-navigation__content) {
528
+ gap: 8px;
529
+ padding-inline: 8px;
384
530
  }
385
531
 
386
532
  .shell-layout__supporting-sheet {
@@ -388,42 +534,63 @@ const {
388
534
  overflow: auto;
389
535
  }
390
536
 
537
+ .shell-layout__supporting-side-sheet {
538
+ border: 0;
539
+ border-end-start-radius: 16px;
540
+ border-start-start-radius: 16px;
541
+ }
542
+
391
543
  .shell-layout__supporting-side-panel {
392
544
  display: flex;
393
545
  flex-direction: column;
394
- gap: 1rem;
395
- padding: 1rem;
546
+ gap: 16px;
547
+ padding: 12px 12px 24px 24px;
396
548
  }
397
549
 
398
550
  .shell-layout__supporting-title {
399
551
  align-items: center;
400
552
  display: flex;
401
- gap: 0.75rem;
553
+ gap: 12px;
402
554
  justify-content: space-between;
555
+ min-height: 56px;
556
+ }
557
+
558
+ .shell-layout__supporting-sheet .shell-layout__supporting-title {
559
+ padding: 12px 12px 0 24px;
560
+ }
561
+
562
+ .shell-layout__supporting-body {
563
+ padding: 0 24px 24px;
403
564
  }
404
565
 
405
- .shell-layout__supporting-title :deep(.v-btn) {
406
- min-height: 48px;
566
+ .shell-layout__supporting-headline {
567
+ color: rgb(var(--v-theme-on-surface-variant));
568
+ font-size: 1.375rem;
569
+ font-weight: 400;
570
+ line-height: 1.75rem;
571
+ margin: 0;
407
572
  }
408
573
 
409
574
  .shell-layout__pull-refresh {
410
575
  align-items: center;
411
- background: rgb(var(--v-theme-surface));
412
- border: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
413
- border-radius: 999px;
414
- box-shadow: var(--v-shadow-3);
576
+ background: rgb(var(--v-theme-surface-container-low));
577
+ border-radius: 9999px;
578
+ box-shadow:
579
+ 0 1px 2px 0 rgba(var(--v-theme-shadow), 0.3),
580
+ 0 2px 6px 2px rgba(var(--v-theme-shadow), 0.15);
581
+ color: rgb(var(--v-theme-on-surface));
415
582
  display: flex;
416
- gap: 0.5rem;
583
+ gap: 8px;
417
584
  left: 50%;
418
585
  opacity: min(1, calc(var(--shell-pull-refresh-distance) / 56));
419
- padding: 0.45rem 0.75rem;
586
+ padding: 8px 12px;
420
587
  pointer-events: none;
421
588
  position: fixed;
422
- top: calc(env(safe-area-inset-top, 0px) + 3.75rem);
589
+ top: calc(env(safe-area-inset-top, 0px) + 72px);
423
590
  transform: translate3d(-50%, calc((var(--shell-pull-refresh-distance) - 72px) * 0.35), 0);
424
591
  transition:
425
- opacity 160ms ease,
426
- transform 160ms ease;
592
+ opacity 200ms cubic-bezier(0.2, 0, 0, 1),
593
+ transform 200ms cubic-bezier(0.2, 0, 0, 1);
427
594
  z-index: 2700;
428
595
  }
429
596
 
@@ -432,24 +599,10 @@ const {
432
599
  }
433
600
 
434
601
  .shell-layout__pull-refresh-label {
435
- font-size: 0.78rem;
436
- font-weight: 600;
602
+ font-size: 0.75rem;
603
+ font-weight: 500;
604
+ letter-spacing: 0.03125rem;
605
+ line-height: 1rem;
437
606
  white-space: nowrap;
438
607
  }
439
-
440
- @media (max-width: 640px) {
441
- .shell-layout__content {
442
- padding-inline:
443
- calc(1px + env(safe-area-inset-left, 0px))
444
- calc(1px + env(safe-area-inset-right, 0px));
445
- }
446
-
447
- .shell-layout__surface-label {
448
- max-width: 8rem;
449
- }
450
-
451
- .shell-layout__top-right {
452
- max-width: 40vw;
453
- }
454
- }
455
608
  </style>