@threadlabs/looma 0.44.6 → 0.45.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.
@@ -1,19 +1,31 @@
1
1
  <!-- Generated by HTML Next 1.0.0-alpha.69 for Vue 3.5. Do not edit. -->
2
2
  <script setup lang="ts">
3
- import { computed, watchSyncEffect } from 'vue'
3
+ import { computed, getCurrentInstance, provide, ref, useTemplateRef, watchSyncEffect } from 'vue'
4
4
  import type { PropType } from 'vue'
5
- import { checkHydratedRoot, nativeAttrs, useReflectedProp } from './host'
5
+ import {
6
+ attribute,
7
+ checkHydratedRoot,
8
+ concat,
9
+ createDispatch,
10
+ nativeAttrs,
11
+ useComponentHost,
12
+ useReflectedProp,
13
+ } from './host'
14
+ import { acceptsControllerWrite } from './props'
6
15
  import {
7
16
  BINDING_INPUTS_PROP,
8
17
  checkedProp,
9
18
  checkPropInput,
10
19
  type InputBindings,
20
+ propValidityState,
11
21
  READY_INPUT,
12
22
  requireInputStatus,
13
23
  UNRESOLVED_INPUT,
14
24
  vPropValidity,
15
25
  vuePropInputs,
16
26
  } from './props'
27
+ import UiIcon from './UiIcon.vue'
28
+ import UiIconButton from './UiIconButton.vue'
17
29
 
18
30
  defineOptions({ inheritAttrs: false })
19
31
 
@@ -24,10 +36,17 @@ const propValidityContract = {
24
36
  required: false,
25
37
  target: { attribute: 'breakpoint' },
26
38
  description:
27
- 'The viewport width at which navigation replaces the menu trigger: sm is 40rem, md 48rem, and lg 64rem. The consumer owns the menu or drawer the trigger\n opens.',
39
+ 'The viewport width at which navigation changes from an automatic mobile drawer to inline links: sm is 40rem, md 48rem, and lg 64rem.',
28
40
  values: ['sm', 'md', 'lg'],
29
41
  default: 'lg',
30
42
  },
43
+ closeLabel: {
44
+ type: { kind: 'terminal', name: 'string' },
45
+ required: false,
46
+ target: { attribute: 'label' },
47
+ description: 'Accessible name of the drawer\'s close button.',
48
+ default: 'Close navigation',
49
+ },
31
50
  label: {
32
51
  type: { kind: 'terminal', name: 'string' },
33
52
  required: false,
@@ -35,6 +54,13 @@ const propValidityContract = {
35
54
  description: 'Accessible name for the primary navigation region.',
36
55
  default: 'Main',
37
56
  },
57
+ menuLabel: {
58
+ type: { kind: 'terminal', name: 'string' },
59
+ required: false,
60
+ target: { attribute: 'label' },
61
+ description: 'Accessible name of the automatic mobile menu button.',
62
+ default: 'Open navigation',
63
+ },
38
64
  sticky: {
39
65
  type: { kind: 'terminal', name: 'boolean' },
40
66
  required: false,
@@ -46,21 +72,35 @@ const propValidityContract = {
46
72
  } as const
47
73
  const props = defineProps({
48
74
  breakpoint: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null> },
75
+ closeLabel: { type: null as unknown as PropType<string | null> },
49
76
  label: { type: null as unknown as PropType<string | null> },
77
+ menuLabel: { type: null as unknown as PropType<string | null> },
50
78
  sticky: { type: null as unknown as PropType<boolean | null> },
51
79
  [BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
52
80
  })
53
- const acceptedProps: Record<string, unknown> = { breakpoint: 'lg', label: 'Main', sticky: false }
81
+ const acceptedProps: Record<string, unknown> = {
82
+ breakpoint: 'lg',
83
+ closeLabel: 'Close navigation',
84
+ label: 'Main',
85
+ menuLabel: 'Open navigation',
86
+ sticky: false,
87
+ }
54
88
  const inputTracking = vuePropInputs(acceptedProps, {
55
89
  breakpoint: 'lg',
90
+ closeLabel: 'Close navigation',
56
91
  label: 'Main',
92
+ menuLabel: 'Open navigation',
57
93
  sticky: false,
58
94
  }, (name, value, source, values) => {
59
95
  switch (name) {
60
96
  case 'breakpoint':
61
97
  return checkPropInput(value, { kind: 'terminal', name: 'keyword' }, true, true)
98
+ case 'closeLabel':
99
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
62
100
  case 'label':
63
101
  return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
102
+ case 'menuLabel':
103
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
64
104
  case 'sticky':
65
105
  return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
66
106
  default:
@@ -78,11 +118,21 @@ const checkedProps = computed(() => {
78
118
  props['breakpoint'],
79
119
  props[BINDING_INPUTS_PROP],
80
120
  ) as 'sm' | 'md' | 'lg',
121
+ closeLabel: propInputs.value<string | null>(
122
+ 'closeLabel',
123
+ props['closeLabel'],
124
+ props[BINDING_INPUTS_PROP],
125
+ ) as string,
81
126
  label: propInputs.value<string | null>(
82
127
  'label',
83
128
  props['label'],
84
129
  props[BINDING_INPUTS_PROP],
85
130
  ) as string,
131
+ menuLabel: propInputs.value<string | null>(
132
+ 'menuLabel',
133
+ props['menuLabel'],
134
+ props[BINDING_INPUTS_PROP],
135
+ ) as string,
86
136
  sticky: propInputs.value<boolean | null>(
87
137
  'sticky',
88
138
  props['sticky'],
@@ -100,7 +150,71 @@ watchSyncEffect(() => {
100
150
  void checkedProps.value
101
151
  })
102
152
  const reflectedProp = useReflectedProp()
153
+ const hydrationInstance = getCurrentInstance()
103
154
 
155
+ const root = ref<HTMLElement | null>(null)
156
+ const triggerElement = useTemplateRef<HTMLElement>('triggerElement')
157
+ const panelElement = useTemplateRef<HTMLElement>('panelElement')
158
+ const closeElement = useTemplateRef<HTMLElement>('closeElement')
159
+ const navigationElement = useTemplateRef<HTMLElement>('navigationElement')
160
+ const enhanced = ref(false)
161
+ const drawer = ref(false)
162
+ let guardedPrevious: any = null
163
+ const guarded = computed(() => {
164
+ const candidate: any = ((objectValue: any, indexValue: any) =>
165
+ objectValue === Symbol.for('html-next.invalid-result')
166
+ || indexValue === Symbol.for('html-next.invalid-result')
167
+ ? Symbol.for('html-next.invalid-result')
168
+ : objectValue[indexValue])({ true: 'dialog', false: 'none' }, concat(drawer.value))
169
+ if (candidate === Symbol.for('html-next.invalid-result')) {
170
+ return guardedPrevious
171
+ }
172
+ return guardedPrevious = attribute(((objectValue: any, indexValue: any) =>
173
+ objectValue === Symbol.for('html-next.invalid-result')
174
+ || indexValue === Symbol.for('html-next.invalid-result')
175
+ ? Symbol.for('html-next.invalid-result')
176
+ : objectValue[indexValue])({ true: 'dialog', false: 'none' }, concat(drawer.value)))
177
+ })
178
+ let guardedBindingPrevious: any = null
179
+ const guardedBinding = computed(() => {
180
+ const candidate: any = ((objectValue: any, indexValue: any) =>
181
+ objectValue === Symbol.for('html-next.invalid-result')
182
+ || indexValue === Symbol.for('html-next.invalid-result')
183
+ ? Symbol.for('html-next.invalid-result')
184
+ : objectValue[indexValue])(
185
+ { true: checkedProps.value.label, false: null },
186
+ concat(drawer.value),
187
+ )
188
+ if (candidate === Symbol.for('html-next.invalid-result')) {
189
+ return guardedBindingPrevious
190
+ }
191
+ return guardedBindingPrevious = typeof (((objectValue: any, indexValue: any) =>
192
+ objectValue === Symbol.for('html-next.invalid-result')
193
+ || indexValue === Symbol.for('html-next.invalid-result')
194
+ ? Symbol.for('html-next.invalid-result')
195
+ : objectValue[indexValue])(
196
+ { true: checkedProps.value.label, false: null },
197
+ concat(drawer.value),
198
+ )) === 'boolean'
199
+ ? String(((objectValue: any, indexValue: any) =>
200
+ objectValue === Symbol.for('html-next.invalid-result')
201
+ || indexValue === Symbol.for('html-next.invalid-result')
202
+ ? Symbol.for('html-next.invalid-result')
203
+ : objectValue[indexValue])(
204
+ { true: checkedProps.value.label, false: null },
205
+ concat(drawer.value),
206
+ ))
207
+ : attribute(((objectValue: any, indexValue: any) =>
208
+ objectValue === Symbol.for('html-next.invalid-result')
209
+ || indexValue === Symbol.for('html-next.invalid-result')
210
+ ? Symbol.for('html-next.invalid-result')
211
+ : objectValue[indexValue])(
212
+ { true: checkedProps.value.label, false: null },
213
+ concat(drawer.value),
214
+ ))
215
+ })
216
+ provide('html-next:ui-site-header:enhanced', enhanced)
217
+ provide('html-next:ui-site-header:drawer', drawer)
104
218
  checkHydratedRoot('header', 'ui-site-header')
105
219
 
106
220
  /** The values the styles' :host() and :state() rules test. */
@@ -110,8 +224,52 @@ const hostState = computed(() =>
110
224
  checkedProps.value.breakpoint && 'breakpoint',
111
225
  checkedProps.value.breakpoint != null
112
226
  && `breakpoint=${encodeURIComponent(checkedProps.value.breakpoint)}`,
227
+ drawer.value && 'drawer',
228
+ enhanced.value && 'enhanced',
113
229
  ].filter(Boolean).join(' ')
114
230
  )
231
+
232
+ const dispatch = createDispatch(root)
233
+
234
+ useComponentHost(() => import('../components/ui-site-header/ui-site-header.js'), {
235
+ root,
236
+ module: true,
237
+ dispatch,
238
+ acceptsState: (name: string, keys: readonly string[], value: unknown) =>
239
+ acceptsControllerWrite(
240
+ value,
241
+ ({
242
+ enhanced: { kind: 'terminal', name: 'boolean' },
243
+ drawer: { kind: 'terminal', name: 'boolean' },
244
+ } as Record<string, any>)[name],
245
+ keys,
246
+ ),
247
+ initials: { enhanced: false, drawer: false },
248
+ controllerSource: {
249
+ specifier: '../components/ui-site-header/ui-site-header.js',
250
+ definition: './components/ui-site-header/ui-site-header.html',
251
+ },
252
+ props: checkedProps,
253
+ inputs: propInputs,
254
+ inputTracking,
255
+ propInputs: (name: string) => {
256
+ const incoming = hydrationInstance?.vnode.props
257
+ const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
258
+ return incoming !== null && incoming !== undefined
259
+ ? (incoming[name] ?? incoming[kebab] ?? null)
260
+ : null
261
+ },
262
+ propNames: ['breakpoint', 'closeLabel', 'label', 'menuLabel', 'sticky'],
263
+ propValidity: (name: string) =>
264
+ propValidityState({ contract: propValidityContract, values: { ...props } }, name),
265
+ refs: {
266
+ trigger: triggerElement,
267
+ panel: panelElement,
268
+ close: closeElement,
269
+ navigation: navigationElement,
270
+ },
271
+ state: { enhanced, drawer },
272
+ })
115
273
  </script>
116
274
 
117
275
  <template>
@@ -122,16 +280,65 @@ const hostState = computed(() =>
122
280
  data-hn-ui-site-header
123
281
  v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
124
282
  :data-ui-site-header-prop-breakpoint="reflectedProp('breakpoint', 'breakpoint', checkedProps.breakpoint, undefined, false)"
283
+ :data-ui-site-header-prop-close-label="reflectedProp('closeLabel', 'close-label', checkedProps.closeLabel, undefined, false)"
125
284
  :data-ui-site-header-prop-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
285
+ :data-ui-site-header-prop-menu-label="reflectedProp('menuLabel', 'menu-label', checkedProps.menuLabel, undefined, false)"
126
286
  :data-ui-site-header-prop-sticky="reflectedProp('sticky', 'sticky', checkedProps.sticky, undefined, false)"
127
287
  :data-ui-site-header-state="hostState || undefined"
288
+ ref="root"
128
289
  >
129
- <span class="menu" data-hn-ui-site-header><slot name="menu" /></span>
130
290
  <div class="identity" data-hn-ui-site-header>
131
291
  <div class="brand" data-hn-ui-site-header><slot name="brand" /></div>
132
- <nav class="navigation" data-hn-ui-site-header :aria-label="checkedProps.label ?? undefined">
133
- <slot name="navigation" />
134
- </nav>
292
+ <div class="menu" data-hn-ui-site-header>
293
+ <div class="custom-menu" data-hn-ui-site-header><slot name="menu" /></div>
294
+ <div class="automatic-menu" data-hn-ui-site-header>
295
+ <UiIconButton
296
+ class="ui-icon-button"
297
+ size="sm"
298
+ aria-haspopup="dialog"
299
+ aria-expanded="false"
300
+ :label="checkedProps.menuLabel"
301
+ v-bind="{
302
+ [BINDING_INPUTS_PROP]: {
303
+ label: () => ({ value: checkedProps.menuLabel, status: inputStatus('menuLabel', true) }),
304
+ },
305
+ }"
306
+ ref="triggerElement"
307
+ ><UiIcon class="ui-icon" name="menu" /></UiIconButton>
308
+ </div>
309
+ </div>
310
+ <dialog
311
+ class="navigation-panel"
312
+ data-hn-ui-site-header
313
+ :open="true"
314
+ :role="guarded"
315
+ :aria-label="guardedBinding"
316
+ ref="panelElement"
317
+ >
318
+ <div class="panel-heading" data-hn-ui-site-header>
319
+ <span class="panel-title" data-hn-ui-site-header>{{ checkedProps.label }}</span>{{
320
+ ' '
321
+ }}<UiIconButton
322
+ class="ui-icon-button"
323
+ size="sm"
324
+ :label="checkedProps.closeLabel"
325
+ v-bind="{
326
+ [BINDING_INPUTS_PROP]: {
327
+ label: () => ({ value: checkedProps.closeLabel, status: inputStatus('closeLabel', true) }),
328
+ },
329
+ }"
330
+ ref="closeElement"
331
+ ><UiIcon class="ui-icon" name="x" /></UiIconButton>
332
+ </div>
333
+ <nav
334
+ class="navigation"
335
+ data-hn-ui-site-header
336
+ :aria-label="checkedProps.label ?? undefined"
337
+ ref="navigationElement"
338
+ >
339
+ <slot name="navigation" />
340
+ </nav>
341
+ </dialog>
135
342
  </div>
136
343
  <div class="actions" data-hn-ui-site-header><slot name="actions" /></div>
137
344
  </header>
@@ -139,7 +346,7 @@ const hostState = computed(() =>
139
346
 
140
347
  <style scoped>
141
348
  /* Text shares a baseline inside one group; the group is centred beside any control height. */
142
- /* Without a supplied menu trigger, keep the destinations available on narrow screens. */
349
+ /* The same navigation remains inline before upgrade and on desktop. No links are cloned or moved. */
143
350
  @scope (.ui-site-header) to ([data-hn]) {
144
351
  :global(:scope:where([data-hn-ui-site-header])) {
145
352
  box-sizing: border-box !important;
@@ -161,17 +368,13 @@ const hostState = computed(() =>
161
368
  inset-block-start: 0;
162
369
  z-index: var(--ui-site-header-z-index, 10);
163
370
  }
164
- :global(.menu:where([data-hn-ui-site-header])),
165
371
  :global(.actions:where([data-hn-ui-site-header])) {
166
- display: flex !important;
372
+ display: grid !important;
167
373
  flex: none;
168
374
  align-items: center !important;
169
375
  gap: var(--ui-space-2) !important;
170
376
  min-inline-size: 0;
171
377
  max-inline-size: 100%;
172
- }
173
- :global(.actions:where([data-hn-ui-site-header])) {
174
- display: grid !important;
175
378
  grid-auto-flow: column !important;
176
379
  grid-auto-columns: minmax(max-content, var(--ui-control-min-block-size)) !important;
177
380
  justify-items: center !important;
@@ -208,9 +411,6 @@ const hostState = computed(() =>
208
411
  font-size: var(--ui-font-size-sm);
209
412
  font-weight: var(--ui-font-semibold);
210
413
  }
211
- :global(:scope:has(> .menu:not(:empty)) .navigation:where([data-hn-ui-site-header])) {
212
- display: none !important;
213
- }
214
414
  :global(.navigation > :where(:not([data-hn-ui-site-header])):is(a)) {
215
415
  color: inherit;
216
416
  text-decoration: none;
@@ -224,7 +424,6 @@ const hostState = computed(() =>
224
424
  outline: var(--ui-focus-width) solid var(--ui-focus-ring);
225
425
  outline-offset: var(--ui-focus-width);
226
426
  }
227
- :global(.menu:empty:where([data-hn-ui-site-header])),
228
427
  :global(.actions:empty:where([data-hn-ui-site-header])),
229
428
  :global(.brand:empty:where([data-hn-ui-site-header])),
230
429
  :global(.navigation:empty:where([data-hn-ui-site-header])) {
@@ -235,45 +434,405 @@ const hostState = computed(() =>
235
434
  min-block-size: var(--ui-site-header-height, 4.25rem);
236
435
  column-gap: var(--ui-space-4) !important;
237
436
  }
238
- :global(:scope[data-ui-site-header-state~="breakpoint=sm"]
239
- .navigation:not(:empty):where([data-hn-ui-site-header])) {
240
- display: flex !important;
241
- }
242
- :global(:scope[data-ui-site-header-state~="breakpoint=sm"]
243
- .menu:where([data-hn-ui-site-header])) {
244
- display: none !important;
245
- }
246
437
  }
247
438
  @media (min-width: 48rem) {
248
439
  :global(:scope[data-ui-site-header-state~="breakpoint=md"]:where([data-hn-ui-site-header])) {
249
440
  min-block-size: var(--ui-site-header-height, 4.25rem);
250
441
  column-gap: var(--ui-space-4) !important;
251
442
  }
252
- :global(:scope[data-ui-site-header-state~="breakpoint=md"]
253
- .navigation:not(:empty):where([data-hn-ui-site-header])) {
254
- display: flex !important;
255
- }
256
- :global(:scope[data-ui-site-header-state~="breakpoint=md"]
257
- .menu:where([data-hn-ui-site-header])) {
258
- display: none !important;
259
- }
260
443
  }
261
444
  @media (min-width: 64rem) {
262
445
  :global(:scope[data-ui-site-header-state~="breakpoint=lg"]:where([data-hn-ui-site-header])) {
263
446
  min-block-size: var(--ui-site-header-height, 4.25rem);
264
447
  column-gap: var(--ui-space-4) !important;
265
448
  }
266
- :global(:scope[data-ui-site-header-state~="breakpoint=lg"]
267
- .navigation:not(:empty):where([data-hn-ui-site-header])) {
268
- display: flex !important;
449
+ }
450
+ :global(.navigation-panel:where([data-hn-ui-site-header])) {
451
+ position: static;
452
+ display: flex !important;
453
+ align-items: baseline !important;
454
+ min-inline-size: 0;
455
+ max-inline-size: none;
456
+ margin: 0 !important;
457
+ padding: 0 !important;
458
+ border: 0;
459
+ background: transparent;
460
+ color: inherit;
461
+ }
462
+ :global(.navigation-panel:not([open]):where([data-hn-ui-site-header])),
463
+ :global(.menu:where([data-hn-ui-site-header])),
464
+ :global(.panel-heading:where([data-hn-ui-site-header])) {
465
+ display: none !important;
466
+ }
467
+ :global(:scope[data-ui-site-header-state~="drawer"] .identity:where([data-hn-ui-site-header])) {
468
+ flex-wrap: nowrap !important;
469
+ align-items: center !important;
470
+ }
471
+ :global(:scope[data-ui-site-header-state~="drawer"] .brand:where([data-hn-ui-site-header])) {
472
+ flex: 1 1 0;
473
+ }
474
+ :global(:scope[data-ui-site-header-state~="enhanced"][data-ui-site-header-state~="drawer"]:has(.navigation:not(:empty), .custom-menu:not(:empty))
475
+ .menu:where([data-hn-ui-site-header])) {
476
+ display: grid !important;
477
+ grid-template-columns: minmax(max-content, var(--ui-control-min-block-size)) !important;
478
+ justify-items: center !important;
479
+ flex: none;
480
+ }
481
+ :global(.automatic-menu:where([data-hn-ui-site-header])) {
482
+ display: grid !important;
483
+ justify-items: center !important;
484
+ }
485
+ :global(.custom-menu:empty:where([data-hn-ui-site-header])),
486
+ :global(.menu:has(> .custom-menu:not(:empty)) .automatic-menu:where([data-hn-ui-site-header])) {
487
+ display: none !important;
488
+ }
489
+ :global(:scope[data-ui-site-header-state~="drawer"]
490
+ .navigation-panel:where([data-hn-ui-site-header])) {
491
+ position: fixed;
492
+ inset-block: 0;
493
+ inset-inline-start: 0;
494
+ inset-inline-end: auto;
495
+ box-sizing: border-box !important;
496
+ inline-size: min(var(--ui-site-header-navigation-width, 280px), 85vw);
497
+ max-inline-size: none;
498
+ block-size: 100dvh;
499
+ max-block-size: none;
500
+ margin: 0 !important;
501
+ padding: 0 !important;
502
+ overflow: hidden;
503
+ border: 0;
504
+ border-inline-end: var(--ui-border-width) solid
505
+ var(--ui-overlay-border, var(--ui-border-divider));
506
+ background: var(--ui-overlay-surface, var(--ui-surface-elevated));
507
+ color: var(--ui-text-primary);
508
+ box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
509
+ transform: translateX(-100%);
510
+ transition:
511
+ transform var(--ui-motion-reveal) var(--ui-motion-reveal-ease),
512
+ display var(--ui-motion-reveal) allow-discrete,
513
+ overlay var(--ui-motion-reveal) allow-discrete;
514
+ }
515
+ :global(:scope[data-ui-site-header-state~="drawer"]
516
+ .navigation-panel[open]:where([data-hn-ui-site-header])) {
517
+ display: flex !important;
518
+ flex-direction: column !important;
519
+ align-items: stretch !important;
520
+ transform: translateX(0);
521
+ }
522
+ :global(:scope[data-ui-site-header-state~="drawer"]
523
+ .navigation-panel:dir(rtl):not([open]):where([data-hn-ui-site-header])) {
524
+ transform: translateX(100%);
525
+ }
526
+ @starting-style {
527
+ :global(:scope[data-ui-site-header-state~="drawer"]
528
+ .navigation-panel[open]:where([data-hn-ui-site-header])) {
529
+ transform: translateX(-100%);
269
530
  }
270
- :global(:scope[data-ui-site-header-state~="breakpoint=lg"]
271
- .menu:where([data-hn-ui-site-header])) {
272
- display: none !important;
531
+ :global(:scope[data-ui-site-header-state~="drawer"]
532
+ .navigation-panel[open]:dir(rtl):where([data-hn-ui-site-header])) {
533
+ transform: translateX(100%);
534
+ }
535
+ }
536
+ :global(:scope:where([data-hn-ui-site-header])) {
537
+ --_ui-site-header-backdrop: var(--ui-overlay-backdrop, rgb(0 0 0 / 0.32));
538
+ }
539
+ :global(.navigation-panel:where([data-hn-ui-site-header])::backdrop) {
540
+ background: var(--_ui-site-header-backdrop);
541
+ }
542
+ :global(.navigation-panel[data-ui-backdrop-hidden]:where([data-hn-ui-site-header])::backdrop) {
543
+ background: transparent;
544
+ }
545
+ :global(:scope[data-ui-site-header-state~="drawer"]
546
+ .panel-heading:where([data-hn-ui-site-header])) {
547
+ display: flex !important;
548
+ align-items: center !important;
549
+ justify-content: space-between !important;
550
+ gap: var(--ui-space-3) !important;
551
+ padding: var(--ui-space-4) !important;
552
+ flex: none;
553
+ border-block-end: var(--ui-border-width) solid var(--ui-border-divider);
554
+ }
555
+ :global(.panel-title:where([data-hn-ui-site-header])) {
556
+ font-size: var(--ui-font-size-lg);
557
+ font-weight: var(--ui-font-semibold);
558
+ line-height: var(--ui-line-height-tight);
559
+ }
560
+ :global(:scope[data-ui-site-header-state~="drawer"] .navigation:where([data-hn-ui-site-header])) {
561
+ font-weight: var(--ui-font-normal);
562
+ flex: 1 1 auto;
563
+ flex-direction: column !important;
564
+ flex-wrap: nowrap !important;
565
+ align-items: stretch !important;
566
+ gap: var(--ui-space-4) !important;
567
+ min-block-size: 0;
568
+ overflow: auto;
569
+ --_ui-scroll-fade-direction: to bottom;
570
+ --_ui-scroll-fade-size: var(--ui-scroll-fade-size, 24px);
571
+ mask-image: linear-gradient(
572
+ var(--_ui-scroll-fade-direction),
573
+ transparent,
574
+ #000 var(--_ui-scroll-fade-start),
575
+ #000 calc(100% - var(--_ui-scroll-fade-end)),
576
+ transparent
577
+ );
578
+ animation:
579
+ ui-scroll-fade-start linear,
580
+ ui-scroll-fade-start-hold linear,
581
+ ui-scroll-fade-end-hold linear,
582
+ ui-scroll-fade-end linear;
583
+ animation-timeline: scroll(self block);
584
+ animation-range:
585
+ 0 var(--_ui-scroll-fade-size),
586
+ var(--_ui-scroll-fade-size) calc(100% + 1px),
587
+ -1px calc(100% - var(--_ui-scroll-fade-size)),
588
+ calc(100% - var(--_ui-scroll-fade-size)) 100%;
589
+ overscroll-behavior: contain;
590
+ padding: var(--ui-space-4) !important;
591
+ }
592
+ @media (prefers-reduced-motion: reduce) {
593
+ :global(:scope[data-ui-site-header-state~="drawer"]
594
+ .navigation-panel:where([data-hn-ui-site-header])) {
595
+ transition: none;
273
596
  }
274
597
  }
275
598
  :global(:scope[hidden]:where([data-hn-ui-site-header])) {
276
599
  display: none !important;
277
600
  }
278
601
  }
602
+ @scope ([data-slotted~="ui-site-header"]:not([data-hn])) to ([data-hn], [data-slotted]) {
603
+ :global(:where(.ui-site-header):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
604
+ box-sizing: border-box !important;
605
+ display: flex !important;
606
+ flex-wrap: wrap !important;
607
+ align-items: center !important;
608
+ align-content: center !important;
609
+ gap: var(--ui-space-2) !important;
610
+ inline-size: 100%;
611
+ min-inline-size: 0;
612
+ min-block-size: var(--ui-site-header-compact-height, 3.75rem);
613
+ padding: var(--ui-space-2) var(--ui-site-header-padding-inline, var(--ui-space-4)) !important;
614
+ border-block-end: var(--ui-border-width) solid var(--ui-site-header-border, var(--ui-border));
615
+ background: var(--ui-site-header-surface, var(--ui-surface));
616
+ color: var(--ui-text-primary);
617
+ }
618
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="sticky"]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
619
+ position: sticky;
620
+ inset-block-start: 0;
621
+ z-index: var(--ui-site-header-z-index, 10);
622
+ }
623
+ :global(.actions:where(:scope, :scope *):where([data-hn-ui-site-header])) {
624
+ display: grid !important;
625
+ flex: none;
626
+ align-items: center !important;
627
+ gap: var(--ui-space-2) !important;
628
+ min-inline-size: 0;
629
+ max-inline-size: 100%;
630
+ grid-auto-flow: column !important;
631
+ grid-auto-columns: minmax(max-content, var(--ui-control-min-block-size)) !important;
632
+ justify-items: center !important;
633
+ margin-inline-start: auto !important;
634
+ }
635
+ :global(.identity:where(:scope, :scope *):where([data-hn-ui-site-header])) {
636
+ display: flex !important;
637
+ flex: 1 1 0;
638
+ flex-wrap: wrap !important;
639
+ align-items: baseline !important;
640
+ gap: var(--ui-space-2) var(--ui-space-6) !important;
641
+ min-inline-size: 0;
642
+ }
643
+ :global(.brand:where(:scope, :scope *):where([data-hn-ui-site-header])) {
644
+ min-inline-size: 0;
645
+ font-size: var(--ui-font-size-lg);
646
+ font-weight: var(--ui-font-bold);
647
+ }
648
+ :global(.navigation:where(:scope, :scope *):where([data-hn-ui-site-header])) {
649
+ display: flex !important;
650
+ flex-wrap: wrap !important;
651
+ align-items: baseline !important;
652
+ gap: var(--ui-space-2) var(--ui-space-5) !important;
653
+ min-inline-size: 0;
654
+ font-size: var(--ui-font-size-sm);
655
+ font-weight: var(--ui-font-semibold);
656
+ }
657
+ :global(.actions:empty:where(:scope, :scope *):where([data-hn-ui-site-header])),
658
+ :global(.brand:empty:where(:scope, :scope *):where([data-hn-ui-site-header])),
659
+ :global(.navigation:empty:where(:scope, :scope *):where([data-hn-ui-site-header])) {
660
+ display: none !important;
661
+ }
662
+ @media (min-width: 40rem) {
663
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="breakpoint=sm"]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
664
+ min-block-size: var(--ui-site-header-height, 4.25rem);
665
+ column-gap: var(--ui-space-4) !important;
666
+ }
667
+ }
668
+ @media (min-width: 48rem) {
669
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="breakpoint=md"]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
670
+ min-block-size: var(--ui-site-header-height, 4.25rem);
671
+ column-gap: var(--ui-space-4) !important;
672
+ }
673
+ }
674
+ @media (min-width: 64rem) {
675
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="breakpoint=lg"]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
676
+ min-block-size: var(--ui-site-header-height, 4.25rem);
677
+ column-gap: var(--ui-space-4) !important;
678
+ }
679
+ }
680
+ :global(.navigation-panel:where(:scope, :scope *):where([data-hn-ui-site-header])) {
681
+ position: static;
682
+ display: flex !important;
683
+ align-items: baseline !important;
684
+ min-inline-size: 0;
685
+ max-inline-size: none;
686
+ margin: 0 !important;
687
+ padding: 0 !important;
688
+ border: 0;
689
+ background: transparent;
690
+ color: inherit;
691
+ }
692
+ :global(.navigation-panel:not([open]):where(:scope, :scope *):where([data-hn-ui-site-header])),
693
+ :global(.menu:where(:scope, :scope *):where([data-hn-ui-site-header])),
694
+ :global(.panel-heading:where(:scope, :scope *):where([data-hn-ui-site-header])) {
695
+ display: none !important;
696
+ }
697
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
698
+ .identity:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
699
+ flex-wrap: nowrap !important;
700
+ align-items: center !important;
701
+ }
702
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
703
+ .brand:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
704
+ flex: 1 1 0;
705
+ }
706
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="enhanced"][data-ui-site-header-state~="drawer"]:has(.navigation:not(:empty), .custom-menu:not(:empty))
707
+ .menu:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
708
+ display: grid !important;
709
+ grid-template-columns: minmax(max-content, var(--ui-control-min-block-size)) !important;
710
+ justify-items: center !important;
711
+ flex: none;
712
+ }
713
+ :global(.automatic-menu:where(:scope, :scope *):where([data-hn-ui-site-header])) {
714
+ display: grid !important;
715
+ justify-items: center !important;
716
+ }
717
+ :global(.custom-menu:empty:where(:scope, :scope *):where([data-hn-ui-site-header])),
718
+ :global(.menu:has(> .custom-menu:not(:empty)):where(:scope, :scope *)
719
+ .automatic-menu:where([data-hn-ui-site-header])) {
720
+ display: none !important;
721
+ }
722
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
723
+ .navigation-panel:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
724
+ position: fixed;
725
+ inset-block: 0;
726
+ inset-inline-start: 0;
727
+ inset-inline-end: auto;
728
+ box-sizing: border-box !important;
729
+ inline-size: min(var(--ui-site-header-navigation-width, 280px), 85vw);
730
+ max-inline-size: none;
731
+ block-size: 100dvh;
732
+ max-block-size: none;
733
+ margin: 0 !important;
734
+ padding: 0 !important;
735
+ overflow: hidden;
736
+ border: 0;
737
+ border-inline-end: var(--ui-border-width) solid
738
+ var(--ui-overlay-border, var(--ui-border-divider));
739
+ background: var(--ui-overlay-surface, var(--ui-surface-elevated));
740
+ color: var(--ui-text-primary);
741
+ box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
742
+ transform: translateX(-100%);
743
+ transition:
744
+ transform var(--ui-motion-reveal) var(--ui-motion-reveal-ease),
745
+ display var(--ui-motion-reveal) allow-discrete,
746
+ overlay var(--ui-motion-reveal) allow-discrete;
747
+ }
748
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
749
+ .navigation-panel[open]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
750
+ display: flex !important;
751
+ flex-direction: column !important;
752
+ align-items: stretch !important;
753
+ transform: translateX(0);
754
+ }
755
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
756
+ .navigation-panel:dir(rtl):not([open]):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
757
+ transform: translateX(100%);
758
+ }
759
+ @starting-style {
760
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
761
+ .navigation-panel[open]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
762
+ transform: translateX(-100%);
763
+ }
764
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
765
+ .navigation-panel[open]:dir(rtl):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
766
+ transform: translateX(100%);
767
+ }
768
+ }
769
+ :global(:where(.ui-site-header):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
770
+ --_ui-site-header-backdrop: var(--ui-overlay-backdrop, rgb(0 0 0 / 0.32));
771
+ }
772
+ :global(.navigation-panel:where(:not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where(:scope, :scope
773
+ *):where([data-hn-ui-site-header])::backdrop) {
774
+ background: var(--_ui-site-header-backdrop);
775
+ }
776
+ :global(.navigation-panel[data-ui-backdrop-hidden]:where(:not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where(:scope, :scope
777
+ *):where([data-hn-ui-site-header])::backdrop) {
778
+ background: transparent;
779
+ }
780
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
781
+ .panel-heading:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
782
+ display: flex !important;
783
+ align-items: center !important;
784
+ justify-content: space-between !important;
785
+ gap: var(--ui-space-3) !important;
786
+ padding: var(--ui-space-4) !important;
787
+ flex: none;
788
+ border-block-end: var(--ui-border-width) solid var(--ui-border-divider);
789
+ }
790
+ :global(.panel-title:where(:scope, :scope *):where([data-hn-ui-site-header])) {
791
+ font-size: var(--ui-font-size-lg);
792
+ font-weight: var(--ui-font-semibold);
793
+ line-height: var(--ui-line-height-tight);
794
+ }
795
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
796
+ .navigation:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
797
+ font-weight: var(--ui-font-normal);
798
+ flex: 1 1 auto;
799
+ flex-direction: column !important;
800
+ flex-wrap: nowrap !important;
801
+ align-items: stretch !important;
802
+ gap: var(--ui-space-4) !important;
803
+ min-block-size: 0;
804
+ overflow: auto;
805
+ --_ui-scroll-fade-direction: to bottom;
806
+ --_ui-scroll-fade-size: var(--ui-scroll-fade-size, 24px);
807
+ mask-image: linear-gradient(
808
+ var(--_ui-scroll-fade-direction),
809
+ transparent,
810
+ #000 var(--_ui-scroll-fade-start),
811
+ #000 calc(100% - var(--_ui-scroll-fade-end)),
812
+ transparent
813
+ );
814
+ animation:
815
+ ui-scroll-fade-start linear,
816
+ ui-scroll-fade-start-hold linear,
817
+ ui-scroll-fade-end-hold linear,
818
+ ui-scroll-fade-end linear;
819
+ animation-timeline: scroll(self block);
820
+ animation-range:
821
+ 0 var(--_ui-scroll-fade-size),
822
+ var(--_ui-scroll-fade-size) calc(100% + 1px),
823
+ -1px calc(100% - var(--_ui-scroll-fade-size)),
824
+ calc(100% - var(--_ui-scroll-fade-size)) 100%;
825
+ overscroll-behavior: contain;
826
+ padding: var(--ui-space-4) !important;
827
+ }
828
+ @media (prefers-reduced-motion: reduce) {
829
+ :global(:where(.ui-site-header)[data-ui-site-header-state~="drawer"]
830
+ .navigation-panel:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
831
+ transition: none;
832
+ }
833
+ }
834
+ :global(:where(.ui-site-header)[hidden]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-site-header"]))):where([data-hn-ui-site-header])) {
835
+ display: none !important;
836
+ }
837
+ }
279
838
  </style>