@nxgt/material 3.85.1 → 3.86.1
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 +36 -0
- package/README.md +39 -5
- package/dist/{alert-dialog-1t6ULy5i.js → alert-dialog-DZnt8PYE.js} +1 -1
- package/dist/{async-slice-xyA9Uzct.js → async-slice-D3OdV2BS.js} +1 -1
- package/dist/{button-DhiNGrdT.js → button-MAL5an7L.js} +1 -1
- package/dist/{calculator-BcgxxScL.js → calculator-C3a8YMwl.js} +10 -10
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-C4WQAHcN.js → calculator-segment-BigMpjhn.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-m0_usuzd.js → chip-DKAKoNxq.js} +2 -2
- package/dist/{code-editor-BgKFrcld.js → code-editor-B6dFQSUJ.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-BWw17W9s.js → code-language-items-CXEMiWoF.js} +2 -2
- package/dist/components/components.css +2 -0
- package/dist/components/theme-tokens.css +18 -0
- package/dist/components/ui/layout/app-bar/top-app-bar/top-app-bar-collapse.css +60 -0
- package/dist/components/ui/layout/app-bar/top-app-bar/top-app-bar.css +205 -0
- package/dist/components/ui/layout/app-shell/app-header.css +70 -63
- package/dist/{components-DfSE2F8d.js → components-C2MBVly0.js} +17327 -16929
- package/dist/components.js +24 -24
- package/dist/{conversion-variant-DultZZQm.js → conversion-variant-BT5n4-jm.js} +3 -3
- package/dist/{currency-field-CPbaM7ay.js → currency-field-t41sFYg_.js} +4 -4
- package/dist/{dialog-DmlG9opW.js → dialog-BjKiRXJg.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CDKev8dk.js → dropdown-menu-IRFp4CH9.js} +1 -1
- package/dist/editor.js +7 -7
- package/dist/{empty-state-C56000TB.js → empty-state-C70prDDr.js} +1 -1
- package/dist/{financial-variant-BYjQ690K.js → financial-variant-BIpzs8IL.js} +5 -5
- package/dist/{hooks-BTwLAy_A.js → hooks-CjO11MS7.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-CDtW6utN.js → hover-card-cU_aJa18.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-ec7MmUGA.js → icon-badge-D3KO6uEQ.js} +1 -1
- package/dist/{icon-button-CG4aO8Gh.js → icon-button-DrqNk1Ww.js} +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-bar/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-actions.d.ts +15 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-headline.d.ts +4 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-link.d.ts +9 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-menu-section.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-primary-action.d.ts +12 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-row.d.ts +23 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-title-block.d.ts +18 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.actions.d.ts +43 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.d.ts +9 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.types.d.ts +120 -0
- package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.utils.d.ts +43 -0
- package/dist/lib/components/ui/layout/app-shell/activity-app-bar.d.ts +6 -6
- package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +6 -3
- package/dist/lib/components/ui/layout/app-shell/activity-column-props.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +2 -2
- package/dist/lib/components/ui/layout/app-shell/activity-layout-navigation.types.d.ts +32 -4
- package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +12 -2
- package/dist/lib/components/ui/layout/app-shell/app-header.d.ts +9 -3
- package/dist/lib/components/ui/layout/app-shell/header-look.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/header-title.d.ts +9 -36
- package/dist/lib/components/ui/layout/app-shell/header.utils.d.ts +13 -3
- package/dist/lib/components/ui/layout/app-shell/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/navigation.utils.d.ts +7 -2
- package/dist/lib/components/ui/layout/app-shell/shell-scroll.d.ts +23 -1
- package/dist/lib/components/ui/layout/app-shell/shell-top-app-bar.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/shell-top-app-bar.parts.d.ts +58 -0
- package/dist/lib/components/ui/layout/app-shell/shell-top-app-bar.types.d.ts +26 -0
- package/dist/lib/components/ui/layout/app-shell/use-header-scroll.d.ts +16 -9
- package/dist/lib/components/ui/layout/app-shell/use-shell-header.d.ts +1 -1
- package/dist/lib/components/ui/primitives/tabs/tabs-press.d.ts +11 -0
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -0
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +28 -28
- package/dist/map.js +7 -7
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/{percent-field-8_pILs15.js → percent-field-D47IlaPF.js} +1 -1
- package/dist/{picker-surface-pyGv-Qh9.js → picker-surface-Cg4V4-E0.js} +4 -4
- package/dist/{popover-3EF4q2CT.js → popover-Dzk4-l9U.js} +1 -1
- package/dist/{pos-types-Dv2UxKSN.js → pos-types-JOXMY4Y2.js} +1 -1
- package/dist/{pos-variant-DJvtN9N8.js → pos-variant-B2mS8bMB.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-Bmcq2KzC.js → programmer-variant-C_Tl0P4_.js} +2 -2
- package/dist/{public-BNebh4z0.js → public-ByAsqBOf.js} +9 -9
- package/dist/{rich-code-block-DmX7d58S.js → rich-code-block-CJAfqk6b.js} +5 -5
- package/dist/{scientific-variant-DijUrpP8.js → scientific-variant-CskM4MLV.js} +2 -2
- package/dist/{sortable-provider-Cnmt_gWu.js → sortable-provider-ICS_vkLA.js} +2 -2
- package/dist/{spinner-C6LP2Rw8.js → spinner-CweqX5A9.js} +1 -1
- package/dist/styles.css +2 -0
- package/dist/{tabs-Bj1zOe7-.js → tabs-95Y2LmnV.js} +65 -43
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-Cxku5iBP.js → theme-toggle-WAFkncYx.js} +1 -1
- package/dist/{toolbar-items-CEIuSxU_.js → toolbar-items-BsgzHSNf.js} +4 -4
- package/dist/{translate-material-DI3nmQ6I.js → translate-material-DTIAPmlU.js} +1 -1
- package/dist/{translator-BstxG_hN.js → translator-BRZNhsy5.js} +8 -0
- package/dist/{use-chat-composer-BqLkk_iH.js → use-chat-composer-CleSUh_y.js} +15 -15
- package/dist/{use-heading-spy-nFyb9_KE.js → use-heading-spy-D8WbHJuK.js} +4 -4
- package/dist/{use-material-translation-1kCHtB0p.js → use-material-translation-CCy1Me0h.js} +1 -1
- package/dist/{use-return-focus-Hv8rn55-.js → use-return-focus-BA8G1qVU.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/navigation-and-layout.md +85 -32
- package/docs/guides/app-shell.md +158 -63
- package/docs/guides/drawing.md +2 -0
- package/docs/guides/layouts.md +3 -3
- package/docs/guides/migrating-to-top-app-bar.md +156 -0
- package/docs/guides/theming.md +5 -0
- package/docs/previews/navigation-layout-appshell-blue-moon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
- package/docs/previews/navigation-layout-appshell-page-ground.webp +0 -0
- package/docs/previews/navigation-layout-appshell-themes.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-topappbar.webp +0 -0
- package/docs/roadmap.md +17 -6
- package/docs/troubleshooting.md +80 -0
- package/lib/components/components.css +2 -0
- package/lib/components/theme-tokens.css +18 -0
- package/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar-collapse.css +60 -0
- package/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.css +205 -0
- package/lib/components/ui/layout/app-shell/app-header.css +70 -63
- package/lib/styles.css +2 -0
- package/lib/themes/ambre.css +5 -1
- package/lib/themes/ardoise.css +5 -1
- package/lib/themes/bleumono.css +5 -1
- package/lib/themes/bluemoon.css +5 -1
- package/lib/themes/corail.css +5 -1
- package/lib/themes/foret.css +5 -1
- package/lib/themes/lavande.css +5 -1
- package/lib/themes/menthe.css +5 -1
- package/lib/themes/ocean.css +5 -1
- package/lib/themes/pink.css +5 -1
- package/lib/themes/prune.css +5 -1
- package/lib/themes/sable.css +5 -1
- package/lib/themes/slate.css +5 -1
- package/lib/themes/teal.css +5 -1
- package/package.json +2 -2
- package/dist/lib/components/ui/layout/app-bar/top-app-bar.d.ts +0 -18
- package/dist/lib/components/ui/layout/app-shell/app-header-row.d.ts +0 -3
- package/dist/lib/components/ui/layout/app-shell/header-context.d.ts +0 -10
- package/dist/lib/components/ui/layout/app-shell/page-title.d.ts +0 -27
- /package/dist/lib/components/ui/layout/{app-shell → app-bar/top-app-bar}/use-truncated-title.d.ts +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* TopAppBar (issue #2510): flat on the page ground; the scroll tint and a
|
|
2
|
+
* hairline arrive with [data-scrolled]. --surface-container comes from the
|
|
3
|
+
* theme; the fallback keeps the bar right until a theme defines it.
|
|
4
|
+
*
|
|
5
|
+
* The at-rest look (ground, hairline slot, radius, transition) is in
|
|
6
|
+
* `@layer components`, so a `className` background, radius or shadow wins
|
|
7
|
+
* (Tailwind utilities are a later layer). The scrolled tint is not layered: it
|
|
8
|
+
* is the bar's state, and overrides a className background once scrolled. */
|
|
9
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"]) {
|
|
10
|
+
--top-app-bar-tint: var(
|
|
11
|
+
--surface-container,
|
|
12
|
+
color-mix(in oklab, var(--primary) 12%, var(--ground, var(--background)))
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
:is(.dark, [data-theme="dark"])
|
|
16
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"]),
|
|
17
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"]):is(
|
|
18
|
+
.dark,
|
|
19
|
+
[data-theme="dark"]
|
|
20
|
+
) {
|
|
21
|
+
--top-app-bar-tint: var(
|
|
22
|
+
--surface-container,
|
|
23
|
+
color-mix(in oklab, var(--primary) 26%, var(--ground, var(--background)))
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
@layer components {
|
|
27
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"]) {
|
|
28
|
+
background: var(--ground, var(--background));
|
|
29
|
+
box-shadow: inset 0 -1px 0 transparent;
|
|
30
|
+
border-radius: 0;
|
|
31
|
+
transition:
|
|
32
|
+
background-color 200ms ease,
|
|
33
|
+
box-shadow 200ms ease;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"])[data-scrolled] {
|
|
37
|
+
background: var(--top-app-bar-tint);
|
|
38
|
+
box-shadow: inset 0 -1px 0 var(--border);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-slot="top-app-bar-row"] {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 1rem;
|
|
45
|
+
padding-inline: 1rem;
|
|
46
|
+
min-height: 3rem;
|
|
47
|
+
}
|
|
48
|
+
[data-slot="top-app-bar-actions"] {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 0.25rem;
|
|
52
|
+
margin-inline-start: auto;
|
|
53
|
+
}
|
|
54
|
+
:is([data-slot="top-app-bar-tabs"], [data-slot="app-header-tabs"]) {
|
|
55
|
+
padding-inline: 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Title block: the h1, and the subtitle after it, stacked. */
|
|
59
|
+
:is(
|
|
60
|
+
[data-slot="top-app-bar-title-block"],
|
|
61
|
+
[data-slot="app-header-page-title-row"]
|
|
62
|
+
) {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
min-width: 0;
|
|
67
|
+
flex: 1;
|
|
68
|
+
gap: 0.0625rem;
|
|
69
|
+
}
|
|
70
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
71
|
+
margin: 0;
|
|
72
|
+
font-size: 1.25rem;
|
|
73
|
+
line-height: 1.5rem;
|
|
74
|
+
font-weight: 700;
|
|
75
|
+
letter-spacing: -0.01em;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
}
|
|
80
|
+
:is(
|
|
81
|
+
[data-slot="top-app-bar-title"],
|
|
82
|
+
[data-slot="app-header-page-title"]
|
|
83
|
+
):focus-visible {
|
|
84
|
+
outline: none;
|
|
85
|
+
border-radius: 0.25rem;
|
|
86
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
|
|
87
|
+
}
|
|
88
|
+
:is([data-slot="top-app-bar-subtitle"], [data-slot="app-header-context"]) {
|
|
89
|
+
margin: 0;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
font-size: 0.875rem;
|
|
94
|
+
line-height: 1.25rem;
|
|
95
|
+
font-weight: 500;
|
|
96
|
+
color: var(--muted-foreground);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Medium and large: the title on its own row. */
|
|
100
|
+
:is([data-slot="top-app-bar-headline"], [data-slot="app-header-headline"]) {
|
|
101
|
+
padding: 0.25rem 1rem 0.75rem;
|
|
102
|
+
}
|
|
103
|
+
:is([data-slot="top-app-bar-headline"], [data-slot="app-header-headline"])
|
|
104
|
+
:is(
|
|
105
|
+
[data-slot="top-app-bar-title-block"],
|
|
106
|
+
[data-slot="app-header-page-title-row"]
|
|
107
|
+
) {
|
|
108
|
+
flex: none;
|
|
109
|
+
align-items: flex-start;
|
|
110
|
+
}
|
|
111
|
+
:is([data-slot="top-app-bar-headline"], [data-slot="app-header-headline"])
|
|
112
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
113
|
+
white-space: normal;
|
|
114
|
+
text-wrap: balance;
|
|
115
|
+
letter-spacing: -0.02em;
|
|
116
|
+
}
|
|
117
|
+
:is(
|
|
118
|
+
[data-slot="top-app-bar"],
|
|
119
|
+
[data-slot="app-header"]
|
|
120
|
+
)[data-size="medium-flexible"]
|
|
121
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
122
|
+
font-size: 1.75rem;
|
|
123
|
+
line-height: 2rem;
|
|
124
|
+
}
|
|
125
|
+
:is(
|
|
126
|
+
[data-slot="top-app-bar"],
|
|
127
|
+
[data-slot="app-header"]
|
|
128
|
+
)[data-size="large-flexible"]
|
|
129
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
130
|
+
font-size: 2.5rem;
|
|
131
|
+
line-height: 1.08;
|
|
132
|
+
display: -webkit-box;
|
|
133
|
+
-webkit-box-orient: vertical;
|
|
134
|
+
-webkit-line-clamp: 2;
|
|
135
|
+
line-clamp: 2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Centre: the row's content and the title block are centred. */
|
|
139
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"])[data-align="center"]
|
|
140
|
+
[data-slot="top-app-bar-row"] {
|
|
141
|
+
justify-content: center;
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"])[data-align="center"]
|
|
145
|
+
:is(
|
|
146
|
+
[data-slot="top-app-bar-title-block"],
|
|
147
|
+
[data-slot="app-header-page-title-row"]
|
|
148
|
+
) {
|
|
149
|
+
align-items: center;
|
|
150
|
+
text-align: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Search: the field is the bar's centre; the h1 stays for assistive tech.
|
|
154
|
+
* The bar is positioned only here (its sr-only title is absolute), so a bar
|
|
155
|
+
* can be made `sticky` with a class. */
|
|
156
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"])[data-size="search"] {
|
|
157
|
+
position: relative;
|
|
158
|
+
}
|
|
159
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"])[data-size="search"]
|
|
160
|
+
:is(
|
|
161
|
+
[data-slot="top-app-bar-title-block"],
|
|
162
|
+
[data-slot="app-header-page-title-row"]
|
|
163
|
+
) {
|
|
164
|
+
position: absolute;
|
|
165
|
+
width: 1px;
|
|
166
|
+
height: 1px;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
clip-path: inset(50%);
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
}
|
|
171
|
+
[data-slot="top-app-bar-search"] {
|
|
172
|
+
flex: 1;
|
|
173
|
+
min-width: 0;
|
|
174
|
+
max-width: 40rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@media (max-width: 767px) {
|
|
178
|
+
[data-slot="top-app-bar-row"] {
|
|
179
|
+
gap: 0.25rem;
|
|
180
|
+
padding-inline: 0.5rem;
|
|
181
|
+
}
|
|
182
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
183
|
+
font-size: 1.125rem;
|
|
184
|
+
}
|
|
185
|
+
:is(
|
|
186
|
+
[data-slot="top-app-bar"],
|
|
187
|
+
[data-slot="app-header"]
|
|
188
|
+
)[data-size="medium-flexible"]
|
|
189
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
190
|
+
font-size: 1.75rem;
|
|
191
|
+
}
|
|
192
|
+
:is(
|
|
193
|
+
[data-slot="top-app-bar"],
|
|
194
|
+
[data-slot="app-header"]
|
|
195
|
+
)[data-size="large-flexible"]
|
|
196
|
+
:is([data-slot="top-app-bar-title"], [data-slot="app-header-page-title"]) {
|
|
197
|
+
font-size: 2.25rem;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (prefers-reduced-motion: reduce) {
|
|
202
|
+
:is([data-slot="top-app-bar"], [data-slot="app-header"]) {
|
|
203
|
+
transition: none;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -1,93 +1,58 @@
|
|
|
1
|
-
/* The
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[data-slot="
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
/* The bar's height now: the row, and the headline's share still showing. */
|
|
13
|
-
[data-slot="app-header"][data-variant] {
|
|
14
|
-
--nxgt-header-h: var(--nxgt-header-height);
|
|
15
|
-
}
|
|
16
|
-
[data-slot="app-header"]:is([data-variant="medium"], [data-variant="large"]) {
|
|
17
|
-
--nxgt-header-h: calc(
|
|
18
|
-
var(--nxgt-header-height) +
|
|
19
|
-
var(--nxgt-header-extra) *
|
|
20
|
-
(1 - var(--nxgt-header-progress, 0))
|
|
21
|
-
);
|
|
22
|
-
height: var(--nxgt-header-h);
|
|
23
|
-
}
|
|
24
|
-
[data-slot="app-header-headline"] {
|
|
25
|
-
min-height: 0;
|
|
26
|
-
opacity: clamp(0, calc(1 - var(--nxgt-header-progress, 0) * 1.6), 1);
|
|
27
|
-
transform: translateY(calc(var(--nxgt-header-progress, 0) * -0.75rem));
|
|
28
|
-
}
|
|
29
|
-
/* Not collapsing: the headline stays. */
|
|
30
|
-
[data-slot="app-header"]:not([data-collapsible])
|
|
31
|
-
[data-slot="app-header-headline"] {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
transform: none;
|
|
34
|
-
}
|
|
35
|
-
/* The copy of the title in the small row appears once the headline is going. */
|
|
36
|
-
[data-slot="app-header-collapsed-title"] {
|
|
37
|
-
opacity: clamp(0, calc((var(--nxgt-header-progress, 0) - 0.5) * 2), 1);
|
|
1
|
+
/* The shell's bar is a TopAppBar (shell-top-app-bar.tsx): its sizes, the
|
|
2
|
+
* collapse and the scroll tint live in top-app-bar.css. What follows is what
|
|
3
|
+
* only the shell adds: the bar hiding on scroll, its tab row, and the bar's
|
|
4
|
+
* whole height on the layout root. */
|
|
5
|
+
|
|
6
|
+
/* The context line (the tenant) is a desktop line: a phone's menu sheet
|
|
7
|
+
* carries it. */
|
|
8
|
+
@media (max-width: 767px) {
|
|
9
|
+
[data-slot="activity-layout"] [data-slot="app-header-context"] {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
38
12
|
}
|
|
39
13
|
|
|
40
14
|
/* Hide on scroll: the bar slides up under the gutter, and out of the tab order
|
|
41
15
|
* (`inert`, set with data-hidden). A bar in a contained shell is in the flow,
|
|
42
16
|
* so it also gives its room back. */
|
|
43
|
-
[data-slot="app-header"][data-
|
|
44
|
-
transition:
|
|
17
|
+
[data-slot="activity-layout"] [data-slot="app-header"][data-hide-on-scroll] {
|
|
18
|
+
transition:
|
|
19
|
+
transform 200ms ease,
|
|
20
|
+
background-color 200ms ease,
|
|
21
|
+
box-shadow 200ms ease;
|
|
45
22
|
}
|
|
46
23
|
[data-slot="app-header"][data-hidden] {
|
|
47
24
|
transform: translateY(calc(-100% - 1rem - env(safe-area-inset-top, 0px)));
|
|
48
25
|
}
|
|
49
26
|
[data-slot="activity-layout"][data-scroll="container"]
|
|
50
27
|
[data-slot="app-header"][data-hidden] {
|
|
51
|
-
margin-bottom: calc(-1 * var(--nxgt-header-
|
|
28
|
+
margin-bottom: calc(-1 * var(--nxgt-header-total, 4rem) - 0.5rem);
|
|
52
29
|
}
|
|
53
30
|
@media (prefers-reduced-motion: reduce) {
|
|
54
|
-
[data-slot="app-header"][data-
|
|
31
|
+
[data-slot="activity-layout"] [data-slot="app-header"][data-hide-on-scroll] {
|
|
55
32
|
transition: none;
|
|
56
33
|
}
|
|
57
34
|
}
|
|
58
35
|
|
|
59
|
-
/* Tabs: a row of one size under the bar, stuck to it (app-
|
|
60
|
-
* is that much taller; while it hides on scroll it slides up by
|
|
61
|
-
* the tabs, which stay pinned at the top of the window. */
|
|
36
|
+
/* Tabs: a row of one size under the bar, stuck to it (shell-top-app-bar.tsx).
|
|
37
|
+
* The bar is that much taller; while it hides on scroll it slides up by
|
|
38
|
+
* everything but the tabs, which stay pinned at the top of the window. */
|
|
62
39
|
[data-slot="app-header"] {
|
|
63
40
|
--nxgt-header-tabs: 3rem;
|
|
64
41
|
}
|
|
65
|
-
[data-slot="app-header"][data-tabs]:is(
|
|
66
|
-
[data-variant="medium"],
|
|
67
|
-
[data-variant="large"]
|
|
68
|
-
) {
|
|
69
|
-
height: calc(var(--nxgt-header-h) + var(--nxgt-header-tabs));
|
|
70
|
-
}
|
|
71
42
|
[data-slot="app-header"][data-tabs][data-hidden] {
|
|
72
43
|
transform: translateY(calc(var(--nxgt-header-tabs) - 100%));
|
|
73
44
|
}
|
|
74
45
|
[data-slot="activity-layout"][data-scroll="container"]
|
|
75
46
|
[data-slot="app-header"][data-tabs][data-hidden] {
|
|
76
|
-
margin-bottom: calc(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
[data-slot="app-header"][data-tabs] [data-slot="app-header-headline"] {
|
|
81
|
-
padding-bottom: calc(1rem * (1 - var(--nxgt-header-progress, 0)));
|
|
82
|
-
}
|
|
83
|
-
[data-slot="app-header"][data-tabs]:not([data-collapsible])
|
|
84
|
-
[data-slot="app-header-headline"] {
|
|
85
|
-
padding-bottom: 1rem;
|
|
47
|
+
margin-bottom: calc(
|
|
48
|
+
-1 *
|
|
49
|
+
(var(--nxgt-header-total, 4rem) - var(--nxgt-header-tabs))
|
|
50
|
+
);
|
|
86
51
|
}
|
|
87
52
|
|
|
88
53
|
/* The bar's whole height on the layout root (ActivityLayout sets data-header and
|
|
89
54
|
* data-header-tabs on it: nothing restyles the page from a descendant), for the sticky panels
|
|
90
|
-
* (sticky-offset.ts): worked out here from the bar's
|
|
55
|
+
* (sticky-offset.ts): worked out here from the bar's size and tabs so the
|
|
91
56
|
* server's first paint is right; use-header-height.ts then replaces it with the
|
|
92
57
|
* measured height (a custom row, a wrapped tab bar). */
|
|
93
58
|
[data-slot="activity-layout"] {
|
|
@@ -98,11 +63,53 @@
|
|
|
98
63
|
);
|
|
99
64
|
}
|
|
100
65
|
[data-slot="activity-layout"][data-header="medium"] {
|
|
101
|
-
--nxgt-header-total-extra:
|
|
66
|
+
--nxgt-header-total-extra: 3rem;
|
|
102
67
|
}
|
|
103
68
|
[data-slot="activity-layout"][data-header="large"] {
|
|
104
|
-
--nxgt-header-total-extra:
|
|
69
|
+
--nxgt-header-total-extra: 6.5rem;
|
|
105
70
|
}
|
|
106
71
|
[data-slot="activity-layout"][data-header-tabs] {
|
|
107
72
|
--nxgt-header-total-tabs: 3rem;
|
|
108
73
|
}
|
|
74
|
+
|
|
75
|
+
/* A phone's small bar keeps a long title readable by touch (a record's number,
|
|
76
|
+
* #2324): two lines, then cut, in the row's 3rem. */
|
|
77
|
+
@media (max-width: 767px) {
|
|
78
|
+
[data-slot="activity-layout"]
|
|
79
|
+
[data-slot="app-header"]:is([data-size="small"], [data-size="search"])
|
|
80
|
+
[data-slot="app-header-page-title"] {
|
|
81
|
+
display: -webkit-box;
|
|
82
|
+
-webkit-box-orient: vertical;
|
|
83
|
+
-webkit-line-clamp: 2;
|
|
84
|
+
line-clamp: 2;
|
|
85
|
+
white-space: normal;
|
|
86
|
+
overflow-wrap: anywhere;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Tabs close the bar: the row's bottom padding goes to the tab row. */
|
|
91
|
+
[data-slot="app-header"][data-tabs] {
|
|
92
|
+
padding-bottom: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* The bar's height is --nxgt-header-height (documented: theming guide), as the
|
|
96
|
+
* rail's header and the first-paint total below read it: the row is that
|
|
97
|
+
* height less the bar's own vertical padding (py-2, 1rem). */
|
|
98
|
+
[data-slot="app-header"] [data-slot="top-app-bar-row"] {
|
|
99
|
+
min-height: calc(var(--nxgt-header-height, 4rem) - 1rem);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* At rest the shell's bar is the page colour at 90%, frosted (its class), as it
|
|
103
|
+
* always was; once the page scrolls top-app-bar.css tints it. Layered like the
|
|
104
|
+
* bar's own ground, so a `className` background wins. Under a backdrop the
|
|
105
|
+
* chrome's fill is a utility class, which wins too; once scrolled the tint
|
|
106
|
+
* would cover it, so that state gets the fill back below. */
|
|
107
|
+
@layer components {
|
|
108
|
+
[data-slot="app-header"]:not([data-scrolled]) {
|
|
109
|
+
background: color-mix(in oklab, var(--background) 90%, transparent);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
[data-slot="activity-layout"][data-backdrop]
|
|
113
|
+
[data-slot="app-header"][data-scrolled] {
|
|
114
|
+
background: var(--nxgt-backdrop-fill-chrome);
|
|
115
|
+
}
|