@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.
- package/CHANGELOG.md +10 -0
- package/fixtures/adaptive-shell/src/App.vue +7 -0
- package/fixtures/adaptive-shell/src/OwnBarLayout.vue +24 -0
- package/fixtures/adaptive-shell/src/RecordListPage.vue +22 -0
- package/fixtures/adaptive-shell/src/RecordPage.vue +30 -0
- package/fixtures/adaptive-shell/src/ScreenPage.vue +7 -3
- package/fixtures/adaptive-shell/src/SettingsPage.vue +24 -0
- package/fixtures/adaptive-shell/src/StudioPage.vue +26 -0
- package/fixtures/adaptive-shell/src/main.js +64 -55
- package/fixtures/adaptive-shell/src/records.js +13 -0
- package/fixtures/adaptive-shell/src/theme/index.js +3 -0
- package/locales/en.json +1 -0
- package/package.json +22 -5
- package/patterns/application-shell/PATTERN.md +3 -1
- package/patterns/application-shell/example/expected-existing/src/pages/home/index.vue +5 -18
- package/patterns/application-shell/example/expected-existing/src/views/NotFound.vue +14 -0
- package/patterns/application-shell/example/src/pages/home/index.vue +21 -57
- package/patterns/application-shell/example/src/pages/home/settings/general/index.vue +24 -19
- package/patterns/application-shell/example/src/pages/home/settings.vue +27 -84
- package/patterns/application-shell/example/src/views/NotFound.vue +15 -0
- package/patterns/page-and-placement/example/src/components/SyncStatusElement.vue +2 -2
- package/patterns/page-and-placement/example/src/pages/home/reports/activity.vue +1 -1
- package/patterns/page-and-placement/example/src/pages/home/reports/overview.vue +1 -1
- package/patterns/page-and-placement/example/src/pages/home/reports.vue +6 -3
- package/patterns/page-and-placement/example/src/placement.js +1 -1
- package/src/client/components/ShellErrorHost.vue +13 -15
- package/src/client/components/ShellLayout.vue +340 -187
- package/src/client/components/ShellListDetail.vue +77 -0
- package/src/client/components/ShellMenuLinkItem.vue +10 -24
- package/src/client/components/ShellNavigationItem.vue +175 -0
- package/src/client/components/ShellNavigationScope.vue +18 -0
- package/src/client/components/ShellOutlet.vue +1 -1
- package/src/client/components/ShellOutletMenuWidget.vue +2 -2
- package/src/client/components/ShellPageAction.vue +91 -0
- package/src/client/components/ShellPageActions.vue +32 -0
- package/src/client/components/ShellPageActionsTarget.vue +24 -0
- package/src/client/components/ShellPageTitle.vue +49 -0
- package/src/client/components/ShellSurfaceAwareMenuLinkItem.vue +10 -24
- package/src/client/components/ShellTabLinkItem.vue +77 -3
- package/src/client/components/ShellUpButton.vue +29 -0
- package/src/client/composables/useShellAppBar.js +27 -0
- package/src/client/composables/useShellDrawer.js +28 -18
- package/src/client/composables/useShellPageTitle.js +15 -0
- package/src/client/composables/useShellRouteTransition.js +1 -1
- package/src/client/composables/useShellWindowSizeClass.js +21 -0
- package/src/client/error/presentation.js +3 -5
- package/src/client/index.js +11 -0
- package/src/client/lib/menuIcons.js +21 -65
- package/src/client/navigation/documentNavigation.js +38 -0
- package/src/client/navigation/shellNavigationRuntime.js +480 -0
- package/src/client/navigation/useShellNavigation.js +94 -0
- package/src/client/providers/ShellWebClientProvider.js +11 -0
- package/src/client/support/drawerPresentation.js +9 -4
- package/src/client/support/drawerWidth.js +18 -1
- package/src/client/support/navigationPresentation.js +40 -0
- package/src/client/support/shellLayoutClass.js +6 -25
- package/src/client/support/windowSizeClass.js +29 -0
- package/src/test/adaptiveShellSmoke.js +43 -16
- package/src/test/shellNavigation.js +32 -0
- package/test/adaptiveShell.browser.test.js +251 -111
- package/test/clientUpdate.test.js +6 -1
- package/test/drawerPresentation.test.js +7 -7
- package/test/errorPresentation.test.js +4 -5
- package/test/materialBaselines.browser.test.js +96 -0
- package/test/menuIcons.test.js +14 -22
- package/test/outletMenuWidgetContract.test.js +2 -3
- package/test/playwrightContract.test.js +3 -1
- package/test/provider.test.js +9 -1
- package/test/settingsPlacementContract.test.js +49 -28
- package/test/shellGestureSupport.test.js +21 -9
- package/test/translation.test.js +2 -2
- package/test/useShellDrawer.test.js +20 -5
- package/test/useShellRouteTransition.test.js +3 -3
- package/patterns/application-shell/example/src/pages/home/settings/index.vue +0 -7
- 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
|
|
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,
|
|
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
|
-
:
|
|
93
|
-
|
|
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
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
165
|
+
<ShellPageActionsTarget />
|
|
117
166
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
:
|
|
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
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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="
|
|
197
|
-
|
|
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
|
|
210
|
-
<
|
|
211
|
-
<
|
|
212
|
-
<v-btn variant="text"
|
|
213
|
-
</
|
|
214
|
-
<
|
|
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
|
-
</
|
|
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
|
-
|
|
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
|
-
<
|
|
233
|
-
<v-btn variant="text"
|
|
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
|
-
|
|
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-
|
|
261
|
-
|
|
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-
|
|
269
|
-
|
|
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
|
-
.
|
|
278
|
-
|
|
279
|
-
|
|
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-
|
|
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="
|
|
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="
|
|
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
|
|
309
|
-
|
|
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
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
min-width: 0;
|
|
495
|
+
.shell-layout__drawer-divider {
|
|
496
|
+
margin-block: 8px;
|
|
497
|
+
margin-inline: 16px;
|
|
321
498
|
}
|
|
322
499
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
.shell-layout__drawer
|
|
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
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
-
.
|
|
368
|
-
|
|
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-
|
|
372
|
-
|
|
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-
|
|
383
|
-
|
|
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:
|
|
395
|
-
padding:
|
|
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:
|
|
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-
|
|
406
|
-
|
|
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:
|
|
413
|
-
|
|
414
|
-
|
|
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:
|
|
583
|
+
gap: 8px;
|
|
417
584
|
left: 50%;
|
|
418
585
|
opacity: min(1, calc(var(--shell-pull-refresh-distance) / 56));
|
|
419
|
-
padding:
|
|
586
|
+
padding: 8px 12px;
|
|
420
587
|
pointer-events: none;
|
|
421
588
|
position: fixed;
|
|
422
|
-
top: calc(env(safe-area-inset-top, 0px) +
|
|
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
|
|
426
|
-
transform
|
|
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.
|
|
436
|
-
font-weight:
|
|
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>
|