@nxgt/material 3.85.1 → 3.86.0

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 (143) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +39 -5
  3. package/dist/{alert-dialog-1t6ULy5i.js → alert-dialog-DZnt8PYE.js} +1 -1
  4. package/dist/{async-slice-xyA9Uzct.js → async-slice-D3OdV2BS.js} +1 -1
  5. package/dist/{button-DhiNGrdT.js → button-MAL5an7L.js} +1 -1
  6. package/dist/{calculator-BcgxxScL.js → calculator-CyBjPONf.js} +10 -10
  7. package/dist/calculator-field.js +6 -6
  8. package/dist/{calculator-segment-C4WQAHcN.js → calculator-segment-BigMpjhn.js} +1 -1
  9. package/dist/calculator.js +1 -1
  10. package/dist/charts.js +3 -3
  11. package/dist/{chip-m0_usuzd.js → chip-DKAKoNxq.js} +2 -2
  12. package/dist/{code-editor-BgKFrcld.js → code-editor-B6dFQSUJ.js} +4 -4
  13. package/dist/code-editor.js +4 -4
  14. package/dist/{code-language-items-BWw17W9s.js → code-language-items-CXEMiWoF.js} +2 -2
  15. package/dist/components/components.css +2 -0
  16. package/dist/components/theme-tokens.css +18 -0
  17. package/dist/components/ui/layout/app-bar/top-app-bar/top-app-bar-collapse.css +60 -0
  18. package/dist/components/ui/layout/app-bar/top-app-bar/top-app-bar.css +205 -0
  19. package/dist/components/ui/layout/app-shell/app-header.css +70 -63
  20. package/dist/{components-DfSE2F8d.js → components-BVHbzzju.js} +17327 -16929
  21. package/dist/components.js +24 -24
  22. package/dist/{conversion-variant-DultZZQm.js → conversion-variant-BT5n4-jm.js} +3 -3
  23. package/dist/{currency-field-CPbaM7ay.js → currency-field-t41sFYg_.js} +4 -4
  24. package/dist/{dialog-DmlG9opW.js → dialog-BjKiRXJg.js} +3 -3
  25. package/dist/dnd.js +1 -1
  26. package/dist/{dropdown-menu-CDKev8dk.js → dropdown-menu-IRFp4CH9.js} +1 -1
  27. package/dist/editor.js +7 -7
  28. package/dist/{empty-state-C56000TB.js → empty-state-C70prDDr.js} +1 -1
  29. package/dist/{financial-variant-BYjQ690K.js → financial-variant-DqW4HJ_v.js} +5 -5
  30. package/dist/{hooks-BTwLAy_A.js → hooks-CjO11MS7.js} +2 -2
  31. package/dist/hooks.js +2 -2
  32. package/dist/{hover-card-CDtW6utN.js → hover-card-cU_aJa18.js} +1 -1
  33. package/dist/i18n.js +3 -3
  34. package/dist/{icon-badge-ec7MmUGA.js → icon-badge-D3KO6uEQ.js} +1 -1
  35. package/dist/{icon-button-CG4aO8Gh.js → icon-button-DrqNk1Ww.js} +1 -1
  36. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  37. package/dist/lib/components/ui/layout/app-bar/index.d.ts +1 -1
  38. package/dist/lib/components/ui/layout/app-bar/top-app-bar/index.d.ts +1 -0
  39. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-actions.d.ts +15 -0
  40. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-headline.d.ts +4 -0
  41. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-link.d.ts +9 -0
  42. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-menu-section.d.ts +14 -0
  43. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-primary-action.d.ts +12 -0
  44. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-row.d.ts +23 -0
  45. package/dist/lib/components/ui/layout/app-bar/top-app-bar/partials/top-app-bar-title-block.d.ts +18 -0
  46. package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.actions.d.ts +43 -0
  47. package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.d.ts +9 -0
  48. package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.types.d.ts +120 -0
  49. package/dist/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.utils.d.ts +43 -0
  50. package/dist/lib/components/ui/layout/app-shell/activity-app-bar.d.ts +6 -6
  51. package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +6 -3
  52. package/dist/lib/components/ui/layout/app-shell/activity-column-props.d.ts +1 -1
  53. package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +2 -2
  54. package/dist/lib/components/ui/layout/app-shell/activity-layout-navigation.types.d.ts +32 -4
  55. package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +12 -2
  56. package/dist/lib/components/ui/layout/app-shell/app-header.d.ts +9 -3
  57. package/dist/lib/components/ui/layout/app-shell/header-look.d.ts +14 -0
  58. package/dist/lib/components/ui/layout/app-shell/header-title.d.ts +9 -36
  59. package/dist/lib/components/ui/layout/app-shell/header.utils.d.ts +13 -3
  60. package/dist/lib/components/ui/layout/app-shell/index.d.ts +1 -1
  61. package/dist/lib/components/ui/layout/app-shell/navigation.utils.d.ts +7 -2
  62. package/dist/lib/components/ui/layout/app-shell/shell-scroll.d.ts +23 -1
  63. package/dist/lib/components/ui/layout/app-shell/shell-top-app-bar.d.ts +10 -0
  64. package/dist/lib/components/ui/layout/app-shell/shell-top-app-bar.parts.d.ts +58 -0
  65. package/dist/lib/components/ui/layout/app-shell/shell-top-app-bar.types.d.ts +26 -0
  66. package/dist/lib/components/ui/layout/app-shell/use-header-scroll.d.ts +16 -9
  67. package/dist/lib/components/ui/layout/app-shell/use-shell-header.d.ts +1 -1
  68. package/dist/lib/i18n/resources/en/en.d.ts +4 -0
  69. package/dist/lib/i18n/resources/en/material.json.d.ts +4 -0
  70. package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
  71. package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -0
  72. package/dist/lib/i18n/resources/resources.d.ts +8 -0
  73. package/dist/lib/i18n/translator.d.ts +1 -1
  74. package/dist/lib.js +1 -1
  75. package/dist/main.js +28 -28
  76. package/dist/map.js +7 -7
  77. package/dist/material.css +1 -1
  78. package/dist/pdf-reader.js +1 -1
  79. package/dist/{percent-field-8_pILs15.js → percent-field-D47IlaPF.js} +1 -1
  80. package/dist/{picker-surface-pyGv-Qh9.js → picker-surface-Cg4V4-E0.js} +4 -4
  81. package/dist/{popover-3EF4q2CT.js → popover-Dzk4-l9U.js} +1 -1
  82. package/dist/{pos-types-Dv2UxKSN.js → pos-types-JOXMY4Y2.js} +1 -1
  83. package/dist/{pos-variant-DJvtN9N8.js → pos-variant-B2mS8bMB.js} +4 -4
  84. package/dist/print.js +1 -1
  85. package/dist/{programmer-variant-Bmcq2KzC.js → programmer-variant-C_Tl0P4_.js} +2 -2
  86. package/dist/{public-BNebh4z0.js → public-ByAsqBOf.js} +9 -9
  87. package/dist/{rich-code-block-DmX7d58S.js → rich-code-block-CJAfqk6b.js} +5 -5
  88. package/dist/{scientific-variant-DijUrpP8.js → scientific-variant-CskM4MLV.js} +2 -2
  89. package/dist/{sortable-provider-Cnmt_gWu.js → sortable-provider-ICS_vkLA.js} +2 -2
  90. package/dist/{spinner-C6LP2Rw8.js → spinner-CweqX5A9.js} +1 -1
  91. package/dist/styles.css +2 -0
  92. package/dist/{tabs-Bj1zOe7-.js → tabs-BOT9B4le.js} +1 -1
  93. package/dist/theme-picker.js +2 -2
  94. package/dist/{theme-toggle-Cxku5iBP.js → theme-toggle-WAFkncYx.js} +1 -1
  95. package/dist/{toolbar-items-CEIuSxU_.js → toolbar-items-BsgzHSNf.js} +4 -4
  96. package/dist/{translate-material-DI3nmQ6I.js → translate-material-DTIAPmlU.js} +1 -1
  97. package/dist/{translator-BstxG_hN.js → translator-BRZNhsy5.js} +8 -0
  98. package/dist/{use-chat-composer-BqLkk_iH.js → use-chat-composer-67MgWAHz.js} +15 -15
  99. package/dist/{use-heading-spy-nFyb9_KE.js → use-heading-spy-D8WbHJuK.js} +4 -4
  100. package/dist/{use-material-translation-1kCHtB0p.js → use-material-translation-CCy1Me0h.js} +1 -1
  101. package/dist/{use-return-focus-Hv8rn55-.js → use-return-focus-BA8G1qVU.js} +1 -1
  102. package/docs/README.md +1 -0
  103. package/docs/components/navigation-and-layout.md +85 -32
  104. package/docs/guides/app-shell.md +158 -63
  105. package/docs/guides/drawing.md +2 -0
  106. package/docs/guides/layouts.md +3 -3
  107. package/docs/guides/migrating-to-top-app-bar.md +156 -0
  108. package/docs/guides/theming.md +5 -0
  109. package/docs/previews/navigation-layout-appshell-blue-moon.webp +0 -0
  110. package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
  111. package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
  112. package/docs/previews/navigation-layout-appshell-page-ground.webp +0 -0
  113. package/docs/previews/navigation-layout-appshell-themes.webp +0 -0
  114. package/docs/previews/navigation-layout-appshell.webp +0 -0
  115. package/docs/previews/navigation-layout-topappbar.webp +0 -0
  116. package/docs/roadmap.md +17 -6
  117. package/docs/troubleshooting.md +80 -0
  118. package/lib/components/components.css +2 -0
  119. package/lib/components/theme-tokens.css +18 -0
  120. package/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar-collapse.css +60 -0
  121. package/lib/components/ui/layout/app-bar/top-app-bar/top-app-bar.css +205 -0
  122. package/lib/components/ui/layout/app-shell/app-header.css +70 -63
  123. package/lib/styles.css +2 -0
  124. package/lib/themes/ambre.css +5 -1
  125. package/lib/themes/ardoise.css +5 -1
  126. package/lib/themes/bleumono.css +5 -1
  127. package/lib/themes/bluemoon.css +5 -1
  128. package/lib/themes/corail.css +5 -1
  129. package/lib/themes/foret.css +5 -1
  130. package/lib/themes/lavande.css +5 -1
  131. package/lib/themes/menthe.css +5 -1
  132. package/lib/themes/ocean.css +5 -1
  133. package/lib/themes/pink.css +5 -1
  134. package/lib/themes/prune.css +5 -1
  135. package/lib/themes/sable.css +5 -1
  136. package/lib/themes/slate.css +5 -1
  137. package/lib/themes/teal.css +5 -1
  138. package/package.json +2 -2
  139. package/dist/lib/components/ui/layout/app-bar/top-app-bar.d.ts +0 -18
  140. package/dist/lib/components/ui/layout/app-shell/app-header-row.d.ts +0 -3
  141. package/dist/lib/components/ui/layout/app-shell/header-context.d.ts +0 -10
  142. package/dist/lib/components/ui/layout/app-shell/page-title.d.ts +0 -27
  143. /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 app bar's variants (app-header.tsx). A medium or large bar is a first row
2
- * (the small bar) and a headline row under it. `--nxgt-header-progress` (0
3
- * expanded, 1 collapsed) is set on the bar by use-header-scroll.ts as the shell
4
- * scrolls; unset (the server, a bar outside the shell) it is 0, the expanded
5
- * bar. Scoped to the bar's `data-variant`: the default small bar is untouched. */
6
- [data-slot="app-header"][data-variant="medium"] {
7
- --nxgt-header-extra: 5rem;
8
- }
9
- [data-slot="app-header"][data-variant="large"] {
10
- --nxgt-header-extra: 8rem;
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-variant] {
44
- transition: transform 200ms ease;
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-h) - 0.5rem);
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-variant] {
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-header.tsx). The bar
60
- * is that much taller; while it hides on scroll it slides up by everything but
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(-1 * var(--nxgt-header-h));
77
- }
78
- /* The headline's bottom padding goes with the collapse when tabs close the bar,
79
- * else it would keep 1rem the tabs have no room for. */
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 variant and tabs so the
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: 5rem;
66
+ --nxgt-header-total-extra: 3rem;
102
67
  }
103
68
  [data-slot="activity-layout"][data-header="large"] {
104
- --nxgt-header-total-extra: 8rem;
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
+ }