@redvars/peacock 4.2.1 → 4.3.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.
Files changed (254) hide show
  1. package/dist/{BaseField-D8ByB0l3.js → BaseField-CHBcjVc2.js} +3 -3
  2. package/dist/{BaseField-D8ByB0l3.js.map → BaseField-CHBcjVc2.js.map} +1 -1
  3. package/dist/{BaseInput-xCHvT4AN.js → BaseInput-DZp2O8Gh.js} +2 -2
  4. package/dist/{BaseInput-xCHvT4AN.js.map → BaseInput-DZp2O8Gh.js.map} +1 -1
  5. package/dist/ai-badge.js +2 -2
  6. package/dist/ai-summary.js +2 -2
  7. package/dist/alert.js +2 -2
  8. package/dist/anchor-nav.js +2 -2
  9. package/dist/app-shell.js +2 -2
  10. package/dist/assistant-panel.js +2 -2
  11. package/dist/assistant-step.js +2 -2
  12. package/dist/assistant-steps.js +2 -2
  13. package/dist/avatar-group.js +2 -2
  14. package/dist/banner.js +2 -2
  15. package/dist/{base-progress-DxNgAQtw.js → base-progress-CKQ32Ruw.js} +2 -2
  16. package/dist/{base-progress-DxNgAQtw.js.map → base-progress-CKQ32Ruw.js.map} +1 -1
  17. package/dist/bottom-sheet.js +2 -2
  18. package/dist/breadcrumb.js +2 -2
  19. package/dist/calendar.js +2 -2
  20. package/dist/{canvas-base-DHKf2CmA.js → canvas-base-BoKef3yr.js} +2 -2
  21. package/dist/{canvas-base-DHKf2CmA.js.map → canvas-base-BoKef3yr.js.map} +1 -1
  22. package/dist/carousel.js +644 -0
  23. package/dist/carousel.js.map +1 -0
  24. package/dist/{cartesian-chart-G6VX1aKk.js → cartesian-chart-DqZxnoG1.js} +2 -2
  25. package/dist/{cartesian-chart-G6VX1aKk.js.map → cartesian-chart-DqZxnoG1.js.map} +1 -1
  26. package/dist/{cb-group-base-BBDUgxne.js → cb-group-base-DHwx72Gt.js} +3 -1
  27. package/dist/{cb-group-base-BBDUgxne.js.map → cb-group-base-DHwx72Gt.js.map} +1 -1
  28. package/dist/{cb-group-base-CZLzCnXK.js → cb-group-base-DXnAJxEK.js} +3 -3
  29. package/dist/{cb-group-base-CZLzCnXK.js.map → cb-group-base-DXnAJxEK.js.map} +1 -1
  30. package/dist/cb-group.js +7 -4
  31. package/dist/cb-group.js.map +1 -1
  32. package/dist/cb-rule.js +3 -3
  33. package/dist/chart-area.js +4 -4
  34. package/dist/chart-bar.js +4 -4
  35. package/dist/{chart-base-DREru2P0.js → chart-base-ByCJM_9C.js} +2 -2
  36. package/dist/{chart-base-DREru2P0.js.map → chart-base-ByCJM_9C.js.map} +1 -1
  37. package/dist/chart-doughnut.js +3 -3
  38. package/dist/chart-line.js +4 -4
  39. package/dist/chart-pie.js +3 -3
  40. package/dist/chat-event.js +2 -2
  41. package/dist/chat-message.js +2 -2
  42. package/dist/chat-thread.js +2 -2
  43. package/dist/checkbox-group.js +3 -3
  44. package/dist/checkbox.js +3 -3
  45. package/dist/chip-set.js +2 -2
  46. package/dist/chip.js +2 -2
  47. package/dist/circular-progress.js +3 -3
  48. package/dist/citation.js +2 -2
  49. package/dist/code-editor.js +3 -3
  50. package/dist/code-highlighter.js +2 -2
  51. package/dist/color-field.js +4 -4
  52. package/dist/color-picker.js +2 -2
  53. package/dist/command-palette.js +2 -2
  54. package/dist/comment-composer.js +4 -4
  55. package/dist/condition-builder.js +4 -4
  56. package/dist/confirm-dialog.js +2 -2
  57. package/dist/copy-button.js +2 -2
  58. package/dist/currency-field.js +4 -4
  59. package/dist/custom-elements-jsdocs.json +902 -74
  60. package/dist/custom-elements.json +3301 -446
  61. package/dist/date-field.js +5 -5
  62. package/dist/date-picker.js +2 -2
  63. package/dist/date-range-field.js +5 -5
  64. package/dist/datetime-field.js +5 -5
  65. package/dist/dependency-map.js +3 -3
  66. package/dist/description-item.js +2 -2
  67. package/dist/description-list.js +2 -2
  68. package/dist/{diagram-CHF70xTL.js → diagram-Cnrj-4y3.js} +2 -2
  69. package/dist/{diagram-CHF70xTL.js.map → diagram-Cnrj-4y3.js.map} +1 -1
  70. package/dist/diagram-controls.js +2 -2
  71. package/dist/diagram-minimap.js +2 -2
  72. package/dist/diagram.js +4 -4
  73. package/dist/diff-viewer.js +2 -2
  74. package/dist/discussion-activity.js +2 -2
  75. package/dist/discussion-comment.js +2 -2
  76. package/dist/discussion.js +4 -4
  77. package/dist/{document-editor-Cb9fCxvA.js → document-editor-C8ThjDQ7.js} +2 -2
  78. package/dist/{document-editor-Cb9fCxvA.js.map → document-editor-C8ThjDQ7.js.map} +1 -1
  79. package/dist/document-editor.js +3 -3
  80. package/dist/draft-card.js +2 -2
  81. package/dist/erd.js +3 -3
  82. package/dist/file-upload.js +3 -3
  83. package/dist/filter-bar.js +2 -2
  84. package/dist/flow.js +4 -4
  85. package/dist/form.js +2 -2
  86. package/dist/{generative-view-C4fJ2zI7.js → generative-view-CQ8-g1wY.js} +2 -2
  87. package/dist/{generative-view-C4fJ2zI7.js.map → generative-view-CQ8-g1wY.js.map} +1 -1
  88. package/dist/generative-view.js +3 -3
  89. package/dist/highlight-Be0wu7kh.js +252 -0
  90. package/dist/highlight-Be0wu7kh.js.map +1 -0
  91. package/dist/highlight.js +6 -0
  92. package/dist/highlight.js.map +1 -0
  93. package/dist/html-editor.js +4 -4
  94. package/dist/{i18n-controller-CH4e9sju.js → i18n-controller-DLJcJ5gO.js} +2 -2
  95. package/dist/{i18n-controller-CH4e9sju.js.map → i18n-controller-DLJcJ5gO.js.map} +1 -1
  96. package/dist/image.js +2 -2
  97. package/dist/index.js +27 -17
  98. package/dist/index.js.map +1 -1
  99. package/dist/inline-edit.js +2 -2
  100. package/dist/input.js +3 -3
  101. package/dist/json-viewer.js +2 -2
  102. package/dist/kanban.js +2 -2
  103. package/dist/kbd.js +2 -2
  104. package/dist/linear-progress.js +3 -3
  105. package/dist/listbox.js +2 -2
  106. package/dist/loader-full.js +19 -9
  107. package/dist/loader-full.js.map +1 -1
  108. package/dist/loader.js +46 -9
  109. package/dist/loader.js.map +1 -1
  110. package/dist/markdown-editor.js +4 -4
  111. package/dist/mention-input.js +4 -4
  112. package/dist/modal.js +2 -2
  113. package/dist/navigation-bar.js +2 -2
  114. package/dist/navigation-drawer.js +2 -2
  115. package/dist/navigation-rail.js +2 -2
  116. package/dist/notification-center.js +2 -2
  117. package/dist/number-field.js +4 -4
  118. package/dist/page-header.js +2 -2
  119. package/dist/pagination.js +2 -2
  120. package/dist/password-field.js +4 -4
  121. package/dist/password-rules.js +2 -2
  122. package/dist/phone-field.js +4 -4
  123. package/dist/{picker-field-loXW-xrW.js → picker-field-B5xOFc3-.js} +3 -3
  124. package/dist/{picker-field-loXW-xrW.js.map → picker-field-B5xOFc3-.js.map} +1 -1
  125. package/dist/pin-input.js +4 -4
  126. package/dist/presence-indicator.js +2 -2
  127. package/dist/prompt-input.js +4 -4
  128. package/dist/radio.js +3 -3
  129. package/dist/rating.js +3 -3
  130. package/dist/redvars-loader.js +2 -2
  131. package/dist/relative-time.js +2 -2
  132. package/dist/resizable-panels.js +2 -2
  133. package/dist/{rich-text-input-B5j0eqCJ.js → rich-text-input-C4B9D6oD.js} +3 -3
  134. package/dist/{rich-text-input-B5j0eqCJ.js.map → rich-text-input-C4B9D6oD.js.map} +1 -1
  135. package/dist/{schema-BJzlGRP1.js → schema-CPhNrjrx.js} +2 -2
  136. package/dist/{schema-BJzlGRP1.js.map → schema-CPhNrjrx.js.map} +1 -1
  137. package/dist/search.js +3 -3
  138. package/dist/select.js +4 -4
  139. package/dist/side-sheet.js +2 -2
  140. package/dist/signature-pad.js +3 -3
  141. package/dist/site-footer-group.js +142 -0
  142. package/dist/site-footer-group.js.map +1 -0
  143. package/dist/site-footer.js +338 -0
  144. package/dist/site-footer.js.map +1 -0
  145. package/dist/site-header.js +774 -0
  146. package/dist/site-header.js.map +1 -0
  147. package/dist/site-nav-group.js +123 -0
  148. package/dist/site-nav-group.js.map +1 -0
  149. package/dist/site-nav-link.js +321 -0
  150. package/dist/site-nav-link.js.map +1 -0
  151. package/dist/site-nav-menu.js +506 -0
  152. package/dist/site-nav-menu.js.map +1 -0
  153. package/dist/site-nav-shared-BDR2HG8e.js +23 -0
  154. package/dist/site-nav-shared-BDR2HG8e.js.map +1 -0
  155. package/dist/slider.js +3 -3
  156. package/dist/snackbar.js +2 -2
  157. package/dist/sparkline.js +2 -2
  158. package/dist/split-button.js +2 -2
  159. package/dist/src/__internal/i18n/strings.d.ts +24 -0
  160. package/dist/src/carousel/carousel.d.ts +135 -0
  161. package/dist/src/carousel/index.d.ts +1 -0
  162. package/dist/src/highlight/highlight.d.ts +56 -0
  163. package/dist/src/highlight/index.d.ts +2 -0
  164. package/dist/src/highlight/matches.d.ts +9 -0
  165. package/dist/src/index.d.ts +9 -0
  166. package/dist/src/site-footer/index.d.ts +2 -0
  167. package/dist/src/site-footer/site-footer-group.d.ts +34 -0
  168. package/dist/src/site-footer/site-footer.d.ts +74 -0
  169. package/dist/src/site-header/index.d.ts +4 -0
  170. package/dist/src/site-header/site-header.d.ts +170 -0
  171. package/dist/src/site-header/site-nav-group.d.ts +32 -0
  172. package/dist/src/site-header/site-nav-link.d.ts +65 -0
  173. package/dist/src/site-header/site-nav-menu.d.ts +104 -0
  174. package/dist/src/site-header/site-nav-shared.d.ts +13 -0
  175. package/dist/src/table/table.d.ts +5 -0
  176. package/dist/src/video/index.d.ts +2 -0
  177. package/dist/src/video/video-source.d.ts +12 -0
  178. package/dist/src/video/video.d.ts +80 -0
  179. package/dist/stat.js +2 -2
  180. package/dist/status-indicator.js +2 -2
  181. package/dist/step.js +2 -2
  182. package/dist/stepper.js +2 -2
  183. package/dist/{strings-o6v6Hrmn.js → strings-MXyrGrNs.js} +28 -1
  184. package/dist/strings-MXyrGrNs.js.map +1 -0
  185. package/dist/svg.js +2 -2
  186. package/dist/switch.js +3 -3
  187. package/dist/table.js +53 -10
  188. package/dist/table.js.map +1 -1
  189. package/dist/test/carousel.test.d.ts +1 -0
  190. package/dist/test/highlight.test.d.ts +1 -0
  191. package/dist/test/site-footer.test.d.ts +1 -0
  192. package/dist/test/site-header.test.d.ts +1 -0
  193. package/dist/test/video.test.d.ts +1 -0
  194. package/dist/textarea.js +4 -4
  195. package/dist/time-field.js +5 -5
  196. package/dist/time-picker.js +2 -2
  197. package/dist/timeline-item.js +2 -2
  198. package/dist/timeline.js +2 -2
  199. package/dist/{toggle-base-BSzBnLZN.js → toggle-base-I1wE_fVe.js} +2 -2
  200. package/dist/{toggle-base-BSzBnLZN.js.map → toggle-base-I1wE_fVe.js.map} +1 -1
  201. package/dist/tour.js +2 -2
  202. package/dist/transfer-list.js +3 -3
  203. package/dist/tree-chart.js +3 -3
  204. package/dist/tree-item.js +2 -2
  205. package/dist/tree.js +2 -2
  206. package/dist/tsconfig.tsbuildinfo +1 -1
  207. package/dist/typing-indicator.js +2 -2
  208. package/dist/url-field.js +4 -4
  209. package/dist/user-menu.js +2 -2
  210. package/dist/video-IwNmHyft.js +509 -0
  211. package/dist/video-IwNmHyft.js.map +1 -0
  212. package/dist/video.js +12 -0
  213. package/dist/video.js.map +1 -0
  214. package/dist/virtual-list.js +2 -2
  215. package/dist/workflow-timeline.js +2 -2
  216. package/dist/workflow.js +3 -3
  217. package/dist/workspace-switcher.js +2 -2
  218. package/package.json +1 -1
  219. package/readme.md +5 -0
  220. package/src/__internal/i18n/strings.ts +31 -0
  221. package/src/carousel/carousel.scss +124 -0
  222. package/src/carousel/carousel.ts +547 -0
  223. package/src/carousel/index.ts +1 -0
  224. package/src/condition-builder/cb-group-base.scss +5 -1
  225. package/src/condition-builder/cb-group-base.ts +1 -1
  226. package/src/condition-builder/cb-group.scss +4 -0
  227. package/src/highlight/highlight.scss +25 -0
  228. package/src/highlight/highlight.ts +123 -0
  229. package/src/highlight/index.ts +2 -0
  230. package/src/highlight/matches.ts +94 -0
  231. package/src/index.ts +18 -0
  232. package/src/loader.ts +36 -0
  233. package/src/site-footer/index.ts +2 -0
  234. package/src/site-footer/site-footer-group.scss +53 -0
  235. package/src/site-footer/site-footer-group.ts +52 -0
  236. package/src/site-footer/site-footer.scss +171 -0
  237. package/src/site-footer/site-footer.ts +151 -0
  238. package/src/site-header/index.ts +8 -0
  239. package/src/site-header/site-header.scss +238 -0
  240. package/src/site-header/site-header.ts +565 -0
  241. package/src/site-header/site-nav-group.scss +29 -0
  242. package/src/site-header/site-nav-group.ts +57 -0
  243. package/src/site-header/site-nav-link.scss +154 -0
  244. package/src/site-header/site-nav-link.ts +140 -0
  245. package/src/site-header/site-nav-menu.scss +182 -0
  246. package/src/site-header/site-nav-menu.ts +336 -0
  247. package/src/site-header/site-nav-shared.ts +27 -0
  248. package/src/table/table.scss +52 -2
  249. package/src/table/table.ts +20 -6
  250. package/src/video/index.ts +2 -0
  251. package/src/video/video-source.ts +80 -0
  252. package/src/video/video.scss +183 -0
  253. package/src/video/video.ts +246 -0
  254. package/dist/strings-o6v6Hrmn.js.map +0 -1
@@ -0,0 +1,151 @@
1
+ import { html, LitElement } from 'lit';
2
+ import { state } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import IndividualComponent from '@/IndividualComponent.js';
5
+ import { SiteFooterGroup } from './site-footer-group.js';
6
+ import styles from './site-footer.scss';
7
+
8
+ /**
9
+ * @label Site Footer
10
+ * @tag wc-site-footer
11
+ * @rawTag site-footer
12
+ *
13
+ * @summary The footer of a website or portal: brand, columns of links, legal links and social links.
14
+ * @overview
15
+ * <p>Site footer is the page's <code>contentinfo</code> landmark. The <code>brand</code> slot and
16
+ * the <code>wc-site-footer-group</code> columns sit at the top; a bottom row holds the
17
+ * <code>legal</code> slot (copyright and policy links) and the <code>social</code> slot (icon
18
+ * buttons that link to the site's profiles).</p>
19
+ * <p>Slots that are empty take no room, so the same component is a full website footer or a slim
20
+ * portal footer with one row of text and links.</p>
21
+ * <p>The footer responds to its own width, not the viewport's: narrower than 48rem the columns wrap
22
+ * two to a row, and narrower than 24rem they stack. Links stay visible at every width, one tap away,
23
+ * rather than folded into an accordion.</p>
24
+ *
25
+ * @slot brand - The site's logo and name, and an optional line of text under it.
26
+ * @slot - The footer's `wc-site-footer-group` columns.
27
+ * @slot legal - Copyright and policy links, in small type.
28
+ * @slot social - Links to the site's profiles, usually `wc-icon-button shape="round"` with an `aria-label` each.
29
+ *
30
+ * @csspart base - The `<footer>` element.
31
+ * @csspart top - The row of the brand and the columns.
32
+ * @csspart groups - The columns.
33
+ * @csspart bottom - The row of the legal and social slots.
34
+ *
35
+ * @cssprop --site-footer-background - Background of the footer. Defaults to `--color-surface-container-low`.
36
+ * @cssprop --site-footer-max-width - Width the footer's content is centred in. Defaults to `none`.
37
+ *
38
+ * @example
39
+ * ```html
40
+ * <wc-site-footer>
41
+ * <a slot="brand" href="/">Redvars</a>
42
+ * <p slot="brand">Code less. Scale everywhere. Build natively.</p>
43
+ * <wc-site-footer-group label="Product">
44
+ * <a href="/tables">Tables and forms</a>
45
+ * <a href="/pricing">Pricing</a>
46
+ * </wc-site-footer-group>
47
+ * <wc-site-footer-group label="Company">
48
+ * <a href="/about">About</a>
49
+ * <a href="/blog">Blog</a>
50
+ * </wc-site-footer-group>
51
+ * <span slot="legal">© 2026 Redvars</span>
52
+ * <a slot="legal" href="/privacy">Privacy</a>
53
+ * <wc-icon-button slot="social" variant="text" shape="round" href="https://github.com/redvars" aria-label="GitHub">
54
+ * <wc-icon name="code"></wc-icon>
55
+ * </wc-icon-button>
56
+ * </wc-site-footer>
57
+ * ```
58
+ * @example
59
+ * ```html
60
+ * <wc-site-footer>
61
+ * <span slot="legal">© Acme Corp. Support hours 08:00–18:00 CET.</span>
62
+ * <a slot="legal" href="/p/support/contact">Contact us</a>
63
+ * <a slot="legal" href="/p/support/privacy">Privacy</a>
64
+ * </wc-site-footer>
65
+ * ```
66
+ * @tags navigation layout
67
+ */
68
+ @IndividualComponent
69
+ export class SiteFooter extends LitElement {
70
+ // ── Static ───────────────────────────────────────────────────────────────
71
+
72
+ static styles = [styles];
73
+
74
+ static Group = SiteFooterGroup;
75
+
76
+ // ── State ────────────────────────────────────────────────────────────────
77
+
78
+ /** Which slots have content. */
79
+ @state() private filled = {
80
+ brand: false,
81
+ groups: false,
82
+ legal: false,
83
+ social: false,
84
+ };
85
+
86
+ // ── Private fields ───────────────────────────────────────────────────────
87
+
88
+ /** Watches the children, so the rows show and hide with their content. */
89
+ private readonly childObserver = new MutationObserver(() => this.syncSlots());
90
+
91
+ // ── Lifecycle ────────────────────────────────────────────────────────────
92
+
93
+ override connectedCallback() {
94
+ super.connectedCallback();
95
+ this.syncSlots();
96
+ this.childObserver.observe(this, {
97
+ childList: true,
98
+ attributes: true,
99
+ attributeFilter: ['slot'],
100
+ });
101
+ }
102
+
103
+ override disconnectedCallback() {
104
+ this.childObserver.disconnect();
105
+ super.disconnectedCallback();
106
+ }
107
+
108
+ // ── Private methods ──────────────────────────────────────────────────────
109
+
110
+ private syncSlots() {
111
+ const slots = Array.from(this.children).map(
112
+ child => child.getAttribute('slot') ?? '',
113
+ );
114
+ const filled = {
115
+ brand: slots.includes('brand'),
116
+ groups: slots.includes(''),
117
+ legal: slots.includes('legal'),
118
+ social: slots.includes('social'),
119
+ };
120
+ const changed = (Object.keys(filled) as (keyof typeof filled)[]).some(
121
+ key => filled[key] !== this.filled[key],
122
+ );
123
+ if (changed) this.filled = filled;
124
+ }
125
+
126
+ // ── Render ───────────────────────────────────────────────────────────────
127
+
128
+ render() {
129
+ const { brand, groups, legal, social } = this.filled;
130
+ const top = brand || groups;
131
+ return html`<footer
132
+ class=${classMap({ footer: true, slim: !top })}
133
+ part="base"
134
+ >
135
+ <div class="inner">
136
+ <div class="top" part="top" ?hidden=${!top}>
137
+ <div class="brand" ?hidden=${!brand}><slot name="brand"></slot></div>
138
+ <div class="groups" part="groups" ?hidden=${!groups}>
139
+ <slot></slot>
140
+ </div>
141
+ </div>
142
+ <div class="bottom" part="bottom" ?hidden=${!legal && !social}>
143
+ <div class="legal" ?hidden=${!legal}><slot name="legal"></slot></div>
144
+ <div class="social" ?hidden=${!social}>
145
+ <slot name="social"></slot>
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </footer>`;
150
+ }
151
+ }
@@ -0,0 +1,8 @@
1
+ export { SiteHeader, type SiteHeaderCloseDetail } from './site-header.js';
2
+ export {
3
+ SiteNavMenu,
4
+ type SiteNavMenuCloseDetail,
5
+ type SiteNavMenuCloseReason,
6
+ } from './site-nav-menu.js';
7
+ export { SiteNavGroup } from './site-nav-group.js';
8
+ export { SiteNavLink } from './site-nav-link.js';
@@ -0,0 +1,238 @@
1
+ @use '../../scss/mixin';
2
+
3
+ @include mixin.base-styles;
4
+
5
+ :host {
6
+ display: block;
7
+ position: relative;
8
+ z-index: var(--site-header-z-index, 10);
9
+ color: var(--color-on-surface);
10
+ --_height: var(--site-header-height, 4rem);
11
+ --_background: var(--site-header-background, var(--color-surface));
12
+ }
13
+
14
+ :host([sticky]) {
15
+ position: sticky;
16
+ inset-block-start: 0;
17
+ transition: transform var(--duration-medium2, 300ms)
18
+ var(--easing-standard, ease);
19
+ }
20
+
21
+ :host([data-scrolled-away]) {
22
+ transform: translateY(-100%);
23
+ }
24
+
25
+ // ── Skip link ─────────────────────────────────────────────────────────────
26
+
27
+ .skip-link {
28
+ @include mixin.get-typography(label-large);
29
+
30
+ position: absolute;
31
+ inset-block-start: var(--spacing-100);
32
+ inset-inline-start: var(--spacing-100);
33
+ z-index: 2;
34
+ padding: var(--spacing-100) var(--spacing-200);
35
+ border-radius: var(--shape-corner-full);
36
+ background-color: var(--color-inverse-surface);
37
+ color: var(--color-inverse-on-surface);
38
+ text-decoration: none;
39
+
40
+ // Out of sight until it has keyboard focus.
41
+ &:not(:focus) {
42
+ clip-path: inset(50%);
43
+ inline-size: 1px;
44
+ block-size: 1px;
45
+ overflow: hidden;
46
+ white-space: nowrap;
47
+ padding: 0;
48
+ }
49
+
50
+ &:focus-visible {
51
+ outline: 2px solid var(--color-primary);
52
+ outline-offset: 2px;
53
+ }
54
+ }
55
+
56
+ // ── Bar ───────────────────────────────────────────────────────────────────
57
+
58
+ .bar {
59
+ background-color: var(--_background);
60
+ border-block-end: 1px solid var(--color-outline-variant);
61
+ }
62
+
63
+ :host([sticky]) .bar {
64
+ box-shadow: var(--elevation-level1);
65
+ }
66
+
67
+ .inner {
68
+ position: relative; // A columns panel spans this box.
69
+ display: flex;
70
+ align-items: center;
71
+ gap: var(--spacing-300);
72
+ // The max width is the content's, without the padding, so it lines up with a page's content column.
73
+ max-inline-size: var(--site-header-max-width, none);
74
+ block-size: var(--_height);
75
+ margin-inline: auto;
76
+ padding-inline: var(--spacing-400);
77
+ box-sizing: content-box;
78
+ }
79
+
80
+ .compact .inner {
81
+ gap: var(--spacing-100);
82
+ padding-inline: var(--spacing-200);
83
+ }
84
+
85
+ .brand {
86
+ display: flex;
87
+ flex: none;
88
+ align-items: center;
89
+ min-inline-size: 0;
90
+
91
+ ::slotted(a) {
92
+ @include mixin.get-typography-not-important(title-medium);
93
+
94
+ display: inline-flex;
95
+ align-items: center;
96
+ gap: var(--spacing-100);
97
+ color: inherit;
98
+ font-weight: var(--font-weight-bold);
99
+ text-decoration: none;
100
+ border-radius: var(--shape-corner-small);
101
+ }
102
+
103
+ ::slotted(a:focus-visible) {
104
+ outline: 2px solid var(--color-primary);
105
+ outline-offset: 2px;
106
+ }
107
+ }
108
+
109
+ // At its natural width, so the header can measure whether the bar fits and collapse if not.
110
+ .nav {
111
+ display: flex;
112
+ flex: none;
113
+ align-items: center;
114
+ gap: var(--spacing-050);
115
+ }
116
+
117
+ .spacer {
118
+ flex: 1;
119
+ }
120
+
121
+ .actions,
122
+ .end {
123
+ display: flex;
124
+ flex: none;
125
+ align-items: center;
126
+ gap: var(--spacing-100);
127
+
128
+ &[hidden] {
129
+ display: none;
130
+ }
131
+ }
132
+
133
+ // ── Drawer (collapsed) ────────────────────────────────────────────────────
134
+
135
+ .drawer {
136
+ position: fixed;
137
+ inset-block: 0;
138
+ inset-inline-start: 0;
139
+ inset-inline-end: auto;
140
+ display: none;
141
+ flex-direction: column;
142
+ inline-size: min(
143
+ var(--site-header-drawer-width, 22.5rem),
144
+ calc(100vw - 3.5rem)
145
+ );
146
+ max-inline-size: none;
147
+ block-size: 100dvh;
148
+ max-block-size: none;
149
+ margin: 0;
150
+ padding: 0;
151
+ border: none;
152
+ border-start-end-radius: var(--shape-corner-large);
153
+ border-end-end-radius: var(--shape-corner-large);
154
+ background-color: var(--color-surface-container-low);
155
+ color: var(--color-on-surface-variant);
156
+ box-shadow: var(--elevation-level1);
157
+ overflow-y: auto;
158
+
159
+ &[open] {
160
+ display: flex;
161
+ animation: site-header-slide-in var(--duration-medium2, 300ms)
162
+ var(--easing-emphasized-decelerate, ease-out);
163
+ }
164
+
165
+ &:dir(rtl)[open] {
166
+ animation-name: site-header-slide-in-rtl;
167
+ }
168
+
169
+ &::backdrop {
170
+ background: color-mix(in srgb, var(--color-scrim, black) 32%, transparent);
171
+ }
172
+ }
173
+
174
+ .drawer-header {
175
+ display: flex;
176
+ justify-content: flex-end;
177
+ padding: var(--spacing-100);
178
+ }
179
+
180
+ .drawer-nav {
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: var(--spacing-025);
184
+ padding-inline: var(--spacing-150);
185
+ }
186
+
187
+ .drawer-actions {
188
+ display: flex;
189
+ flex-direction: column;
190
+ gap: var(--spacing-100);
191
+ margin-block-start: auto;
192
+ padding: var(--spacing-200) var(--spacing-300) var(--spacing-300);
193
+ border-block-start: 1px solid var(--color-outline-variant);
194
+
195
+ &[hidden] {
196
+ display: none;
197
+ }
198
+
199
+ ::slotted(*) {
200
+ inline-size: 100%;
201
+ }
202
+ }
203
+
204
+ @keyframes site-header-slide-in {
205
+ from {
206
+ transform: translateX(-100%);
207
+ }
208
+ }
209
+
210
+ @keyframes site-header-slide-in-rtl {
211
+ from {
212
+ transform: translateX(100%);
213
+ }
214
+ }
215
+
216
+ @media (prefers-reduced-motion: reduce) {
217
+ :host([sticky]) {
218
+ transition: none;
219
+ }
220
+
221
+ .drawer[open] {
222
+ animation: none;
223
+ }
224
+ }
225
+
226
+ @media (forced-colors: active) {
227
+ .bar {
228
+ border-block-end-color: CanvasText;
229
+ }
230
+
231
+ .drawer {
232
+ border-inline-end: 1px solid CanvasText;
233
+ }
234
+
235
+ .skip-link:focus {
236
+ outline: 2px solid Highlight;
237
+ }
238
+ }