@taprootio/espalier 7.2.0 → 7.5.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.
- package/CHANGELOG.md +20 -0
- package/custom-elements.json +36241 -46953
- package/dist/badge/esp-badge.d.ts +46 -0
- package/dist/badge/esp-badge.js +41 -6
- package/dist/breadcrumbs/breadcrumb-separators.d.ts +4 -0
- package/dist/breadcrumbs/breadcrumb-separators.js +1 -0
- package/dist/breadcrumbs/esp-breadcrumb.d.ts +14 -14
- package/dist/breadcrumbs/esp-breadcrumb.js +14 -7
- package/dist/breadcrumbs/esp-breadcrumbs.d.ts +16 -9
- package/dist/breadcrumbs/esp-breadcrumbs.js +9 -6
- package/dist/cli/theme-check.js +2 -2
- package/dist/font-picker/esp-font-picker.d.ts +11 -14
- package/dist/font-picker/esp-font-picker.js +5 -5
- package/dist/footer/esp-footer-link-group.js +12 -9
- package/dist/footer/esp-footer.d.ts +8 -3
- package/dist/footer/esp-footer.js +20 -12
- package/dist/footer/paint-registration.js +1 -1
- package/dist/header/esp-header-button.js +3 -3
- package/dist/header/esp-header.js +9 -9
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/pickers/esp-picker-item.js +1 -1
- package/dist/root/esp-root.d.ts +8 -1
- package/dist/root/esp-root.js +80 -13
- package/dist/root/helpers/compute-semantic-properties.js +1 -1
- package/dist/root/helpers/compute-theme-properties.js +1 -1
- package/dist/root/helpers/data-companion-properties.js +1 -1
- package/dist/root/helpers/lightness-ramp-properties.js +1 -1
- package/dist/shared/blockquote-styles.d.ts +3 -0
- package/dist/shared/blockquote-styles.js +4 -4
- package/dist/shared/color-engine.js +1 -1
- package/dist/shared/component-property-compiler.js +1 -0
- package/dist/shared/component-property-diagnostics.js +1 -0
- package/dist/shared/component-property-normalizer.js +1 -0
- package/dist/shared/component-property-resets.js +1 -0
- package/dist/shared/document-sprite.js +1 -1
- package/dist/shared/esp-element-base.d.ts +3 -0
- package/dist/shared/esp-element-base.js +3 -3
- package/dist/shared/font-helpers.d.ts +3 -3
- package/dist/shared/font-helpers.js +1 -1
- package/dist/shared/font-plan.d.ts +1 -1
- package/dist/shared/footer-ink-styles.js +18 -0
- package/dist/shared/footer-ink.js +1 -0
- package/dist/shared/governing-root.d.ts +24 -0
- package/dist/shared/governing-root.js +1 -0
- package/dist/shared/intent-values.js +1 -1
- package/dist/shared/paint-catalog.js +1 -1
- package/dist/shared/paint-fit.js +1 -1
- package/dist/shared/public-token-catalog.generated.js +1 -0
- package/dist/shared/root-event-subscription.d.ts +11 -0
- package/dist/shared/scoped-style-declarations.js +1 -0
- package/dist/shared/semantic-color-names.d.ts +16 -0
- package/dist/shared/semantic-color-names.js +1 -0
- package/dist/shared/settable-component-properties.js +1 -0
- package/dist/shared/theme-core.d.ts +808 -0
- package/dist/shared/theme-core.js +1 -0
- package/dist/shared/theme-fit-report.d.ts +34 -6
- package/dist/shared/theme-fit-report.js +1 -1
- package/dist/shared/theme-mapping-grammar.d.ts +16 -0
- package/dist/shared/theme-mapping-grammar.js +1 -0
- package/dist/shared/theme-properties.d.ts +3 -1
- package/dist/shared/theme-properties.js +1 -1
- package/dist/shared/theme-validation.d.ts +52 -0
- package/dist/shared/theme-validation.js +1 -0
- package/dist/shared/theme.d.ts +4 -876
- package/dist/shared/theme.js +1 -1
- package/dist/shared/token-pairings.d.ts +1 -1
- package/dist/testing/observe-paint.iife.js +2 -2
- package/espalier.css-data.json +109 -5
- package/espalier.token-manifest.json +5914 -32
- package/package.json +5 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var n=function(
|
|
1
|
+
var n=function(o,e,r,a){var s=arguments.length,l=s<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,r):a,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,e,r,a);else for(var g=o.length-1;g>=0;g--)(p=o[g])&&(l=(s<3?p(l):s>3?p(e,r,l):p(e,r))||l);return s>3&&l&&Object.defineProperty(e,r,l),l};import{FooterAlignmentController as m,footerAlignmentStyles as k,footerAlignmentHostStyles as v}from"../shared/footer-alignment.js";import{css as b,html as d,nothing as c}from"lit";import{customElement as x,property as i}from"lit/decorators.js";import{footerHeadingFit as A,footerLinkFit as f}from"../shared/footer-ink-styles.js";import{EspalierElementBase as u}from"../shared/esp-element-base.js";const h="esp-footer-link-group-heading";let t=class extends u{constructor(){super(...arguments),this.alignment=new m(this,"group"),this.heading=""}get inlineAlign(){return this.alignment.get("inline-align")}set inlineAlign(e){this.alignment.set("inlineAlign","inline-align",e,"placement")}get inlineAlignWrapped(){return this.alignment.get("inline-align-wrapped")}set inlineAlignWrapped(e){this.alignment.set("inlineAlignWrapped","inline-align-wrapped",e,"placement")}get inlineAlignStacked(){return this.alignment.get("inline-align-stacked")}set inlineAlignStacked(e){this.alignment.set("inlineAlignStacked","inline-align-stacked",e,"placement")}get blockAlign(){return this.alignment.get("block-align")}set blockAlign(e){this.alignment.set("blockAlign","block-align",e,"placement")}get blockAlignWrapped(){return this.alignment.get("block-align-wrapped")}set blockAlignWrapped(e){this.alignment.set("blockAlignWrapped","block-align-wrapped",e,"placement")}get blockAlignStacked(){return this.alignment.get("block-align-stacked")}set blockAlignStacked(e){this.alignment.set("blockAlignStacked","block-align-stacked",e,"placement")}get textAlign(){return this.alignment.get("text-align")}set textAlign(e){this.alignment.set("textAlign","text-align",e,"text")}get textAlignWrapped(){return this.alignment.get("text-align-wrapped")}set textAlignWrapped(e){this.alignment.set("textAlignWrapped","text-align-wrapped",e,"text")}get textAlignStacked(){return this.alignment.get("text-align-stacked")}set textAlignStacked(e){this.alignment.set("textAlignStacked","text-align-stacked",e,"text")}render(){return d`
|
|
2
2
|
<div class="alignment-scope">
|
|
3
3
|
<nav
|
|
4
4
|
class="alignment-content"
|
|
5
5
|
part="nav"
|
|
6
|
-
aria-labelledby=${this.heading?
|
|
6
|
+
aria-labelledby=${this.heading?h:c}
|
|
7
7
|
aria-label=${this.heading?c:"Footer links"}
|
|
8
8
|
>
|
|
9
|
-
${this.heading?d`<h2 part="heading" id=${
|
|
9
|
+
${this.heading?d`<h2 part="heading" id=${h}>${this.heading}</h2>`:c}
|
|
10
10
|
<div part="links" class="links"><slot></slot></div>
|
|
11
11
|
</nav>
|
|
12
12
|
</div>
|
|
13
|
-
`}};t.styles=[...
|
|
13
|
+
`}};t.styles=[...u.styles,k,v,b`
|
|
14
14
|
:host {
|
|
15
15
|
display: block;
|
|
16
16
|
min-inline-size: 0;
|
|
@@ -33,8 +33,9 @@ var n=function(a,e,r,o){var s=arguments.length,l=s<3?e:o===null?o=Object.getOwnP
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
h2 {
|
|
36
|
+
${A}
|
|
36
37
|
margin: 0;
|
|
37
|
-
color: var(--esp-footer-heading-color, var(--esp-color-headings));
|
|
38
|
+
color: var(--esp-footer-heading-color, var(--_esp-footer-local-fitted-heading-color, var(--esp-color-headings)));
|
|
38
39
|
font-family: var(
|
|
39
40
|
--_esp-font-headings-effective,
|
|
40
41
|
var(
|
|
@@ -42,7 +43,7 @@ var n=function(a,e,r,o){var s=arguments.length,l=s<3?e:o===null?o=Object.getOwnP
|
|
|
42
43
|
var(--_esp-font-body-effective, var(--esp-font-body, var(--_esp-font-body-fallback)))
|
|
43
44
|
)
|
|
44
45
|
);
|
|
45
|
-
font-size: var(--esp-type-normal);
|
|
46
|
+
font-size: var(--esp-footer-heading-font-size, var(--esp-type-normal));
|
|
46
47
|
font-weight: var(--esp-font-weight-headings);
|
|
47
48
|
line-height: 1.25;
|
|
48
49
|
overflow-wrap: anywhere;
|
|
@@ -56,10 +57,11 @@ var n=function(a,e,r,o){var s=arguments.length,l=s<3?e:o===null?o=Object.getOwnP
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
::slotted(a) {
|
|
60
|
+
${f}
|
|
59
61
|
text-align: var(--_esp-footer-text-css, inherit);
|
|
60
62
|
inline-size: fit-content;
|
|
61
63
|
max-inline-size: 100%;
|
|
62
|
-
color: var(--esp-footer-link-color, var(--esp-color-link));
|
|
64
|
+
color: var(--esp-footer-link-color, var(--_esp-footer-local-fitted-link-color, var(--esp-color-link)));
|
|
63
65
|
overflow-wrap: anywhere;
|
|
64
66
|
text-decoration: none;
|
|
65
67
|
text-underline-offset: 0.18em;
|
|
@@ -71,11 +73,12 @@ var n=function(a,e,r,o){var s=arguments.length,l=s<3?e:o===null?o=Object.getOwnP
|
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
::slotted(a:focus-visible) {
|
|
76
|
+
${f}
|
|
74
77
|
border-radius: var(--esp-size-border-radius);
|
|
75
78
|
outline: var(
|
|
76
79
|
--esp-footer-focus-outline,
|
|
77
|
-
2px solid var(--esp-footer-link-color, var(--esp-color-link))
|
|
80
|
+
2px solid var(--esp-footer-link-color, var(--_esp-footer-local-fitted-link-color, var(--esp-color-link)))
|
|
78
81
|
);
|
|
79
82
|
outline-offset: 3px;
|
|
80
83
|
}
|
|
81
|
-
`],n([i({attribute:"inline-align",reflect:!0})],t.prototype,"inlineAlign",null),n([i({attribute:"inline-align-wrapped",reflect:!0})],t.prototype,"inlineAlignWrapped",null),n([i({attribute:"inline-align-stacked",reflect:!0})],t.prototype,"inlineAlignStacked",null),n([i({attribute:"block-align",reflect:!0})],t.prototype,"blockAlign",null),n([i({attribute:"block-align-wrapped",reflect:!0})],t.prototype,"blockAlignWrapped",null),n([i({attribute:"block-align-stacked",reflect:!0})],t.prototype,"blockAlignStacked",null),n([i({attribute:"text-align",reflect:!0})],t.prototype,"textAlign",null),n([i({attribute:"text-align-wrapped",reflect:!0})],t.prototype,"textAlignWrapped",null),n([i({attribute:"text-align-stacked",reflect:!0})],t.prototype,"textAlignStacked",null),n([i({type:String})],t.prototype,"heading",void 0),t=n([
|
|
84
|
+
`],n([i({attribute:"inline-align",reflect:!0})],t.prototype,"inlineAlign",null),n([i({attribute:"inline-align-wrapped",reflect:!0})],t.prototype,"inlineAlignWrapped",null),n([i({attribute:"inline-align-stacked",reflect:!0})],t.prototype,"inlineAlignStacked",null),n([i({attribute:"block-align",reflect:!0})],t.prototype,"blockAlign",null),n([i({attribute:"block-align-wrapped",reflect:!0})],t.prototype,"blockAlignWrapped",null),n([i({attribute:"block-align-stacked",reflect:!0})],t.prototype,"blockAlignStacked",null),n([i({attribute:"text-align",reflect:!0})],t.prototype,"textAlign",null),n([i({attribute:"text-align-wrapped",reflect:!0})],t.prototype,"textAlignWrapped",null),n([i({attribute:"text-align-stacked",reflect:!0})],t.prototype,"textAlignStacked",null),n([i({type:String})],t.prototype,"heading",void 0),t=n([x("esp-footer-link-group")],t);export{t as EspalierFooterLinkGroup};
|
|
@@ -213,11 +213,16 @@ import "./esp-footer-link-group.js";
|
|
|
213
213
|
* @csspart bottom - The final legal/utility region.
|
|
214
214
|
* @cssprop --esp-footer-background - Base footer color. Defaults to `var(--esp-color-layer-2)`.
|
|
215
215
|
* @cssprop --esp-footer-color - Body text color. Defaults to `var(--esp-color-text)`.
|
|
216
|
-
* @cssprop --esp-footer-heading-color - Heading and configured-brand color.
|
|
217
|
-
* @cssprop --esp-footer-
|
|
216
|
+
* @cssprop --esp-footer-heading-color - Heading and configured-brand color. The theme fits its headings color to the default footer surface.
|
|
217
|
+
* @cssprop --esp-footer-heading-size - Size step for link-group headings and slotted `h2` headings: `small`, `normal`, `medium`, `big`, or `large`. Defaults to `normal`.
|
|
218
|
+
* @cssprop --esp-footer-heading-font-size - Font size derived from the authored heading step. Defaults to `var(--esp-type-normal)`.
|
|
219
|
+
* @cssprop --esp-footer-link-color - Link color. The theme fits its link color to the default footer surface.
|
|
220
|
+
* @cssprop --esp-footer-link-decoration - Resting decoration of bare footer links and the configured brand link: `none` or `underline`. Bare links default to `underline` and the brand defaults to `none`. All supported links underline on hover.
|
|
221
|
+
* @cssprop --esp-footer-link-underline-offset - Underline offset of supported links, from `0em` to `0.5em`. Defaults to `0.18em` for group links and brand hover, and `auto` elsewhere.
|
|
222
|
+
* @cssprop --esp-footer-link-underline-thickness - Underline thickness of supported links, from `0em` to `0.2em` or `auto`. Defaults to `auto`.
|
|
218
223
|
* @cssprop --esp-footer-link-hover-color - Hovered link color. Defaults to `var(--esp-color-link-hover)`.
|
|
219
224
|
* @cssprop --esp-footer-link-hover-bg - Hovered link background. Defaults to `var(--esp-color-link-hover-bg)`.
|
|
220
|
-
* @cssprop --esp-footer-focus-outline - Focus-visible outline for footer links. Defaults to
|
|
225
|
+
* @cssprop --esp-footer-focus-outline - Focus-visible outline for footer links. Defaults to a 2px solid outline in the footer link color.
|
|
221
226
|
* @cssprop --esp-footer-border - Block-start footer border. Defaults to `1px solid var(--esp-color-border)`.
|
|
222
227
|
* @cssprop --esp-footer-padding-block - Content block padding. Defaults to `var(--esp-size-padding-page)`.
|
|
223
228
|
* @cssprop --esp-footer-padding-inline - Content inline padding. Defaults to `var(--esp-size-padding-page)`.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(p,e,a,r);else for(var d=p.length-1;d>=0;d--)(s=p[d])&&(l=(o<3?s(l):o>3?s(e,a,l):s(e,a))||l);return o>3&&l&&Object.defineProperty(e,a,l),l};import{FooterAlignmentController as
|
|
1
|
+
var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(p,e,a,r);else for(var d=p.length-1;d>=0;d--)(s=p[d])&&(l=(o<3?s(l):o>3?s(e,a,l):s(e,a))||l);return o>3&&l&&Object.defineProperty(e,a,l),l};import{FooterAlignmentController as h,footerAlignmentStyles as k}from"../shared/footer-alignment.js";import{FooterLogoGeometryController as x,footerNaturalLogoStyles as v,normalizeFooterLogoSizing as A}from"../shared/footer-logo-geometry.js";import{footerHeadingFit as y,footerInkLayerStyles as S,footerLinkFit as w}from"../shared/footer-ink-styles.js";import{paintedSurface as B}from"../shared/surface-layer.js";import{css as _,html as z,nothing as T}from"lit";import{customElement as W,property as i,state as I}from"lit/decorators.js";import{styleMap as g}from"lit/directives/style-map.js";import{CONFIGURED_BRAND_LOGO_ASPECT_RATIO as L,configuredBrandLogoGeometry as C,renderConfiguredBrand as $,resolveConfiguredBrand as O}from"../shared/configured-brand.js";import{syncNormalizedAttribute as c}from"../shared/attribute-helpers.js";import{EspalierElementBase as b}from"../shared/esp-element-base.js";import{slotHasContent as m}from"../shared/slot-content.js";import{renderVisualOverlay as N,visualOverlayStyles as E}from"../shared/visual-overlay.js";import"./esp-footer-column.js";import"./esp-footer-link-group.js";const u={media:!1,brand:!1,groups:!1,aside:!1,bottom:!1};let t=class extends b{get layout(){return this.alignment.layout}constructor(){super(),this.alignment=new h(this,"footer"),this.brandLogoSizingBacker="fixed",this.slotContent={...u},this.brandText="",this.brandLogo="",this.lightBrandLogo="",this.darkBrandLogo="",this.brandHref="",this.brandAlt="",this.brandColor="",this.lightBrandColor="",this.darkBrandColor="",this.brandSpanBacker=1,this.asideSpanBacker=1,this.fullBleedContent=!1,this.landmarkLabel="",this.handleSlotChange=e=>{if(!(e.target instanceof HTMLSlotElement))return;const a=this.slotRegion(e.target);if(!a)return;const r=m(e.target);this.slotContent[a]!==r&&(this.slotContent={...this.slotContent,[a]:r})},new x(this,()=>({sizing:this.brandLogoSizing,scheme:this.scheme,lightSource:this.lightBrandLogo||this.brandLogo,darkSource:this.darkBrandLogo||this.brandLogo}))}get inlineAlign(){return this.alignment.get("inline-align")}set inlineAlign(e){this.alignment.set("inlineAlign","inline-align",e,"placement")}get inlineAlignWrapped(){return this.alignment.get("inline-align-wrapped")}set inlineAlignWrapped(e){this.alignment.set("inlineAlignWrapped","inline-align-wrapped",e,"placement")}get inlineAlignStacked(){return this.alignment.get("inline-align-stacked")}set inlineAlignStacked(e){this.alignment.set("inlineAlignStacked","inline-align-stacked",e,"placement")}get blockAlign(){return this.alignment.get("block-align")}set blockAlign(e){this.alignment.set("blockAlign","block-align",e,"placement")}get blockAlignWrapped(){return this.alignment.get("block-align-wrapped")}set blockAlignWrapped(e){this.alignment.set("blockAlignWrapped","block-align-wrapped",e,"placement")}get blockAlignStacked(){return this.alignment.get("block-align-stacked")}set blockAlignStacked(e){this.alignment.set("blockAlignStacked","block-align-stacked",e,"placement")}get textAlign(){return this.alignment.get("text-align")}set textAlign(e){this.alignment.set("textAlign","text-align",e,"text")}get textAlignWrapped(){return this.alignment.get("text-align-wrapped")}set textAlignWrapped(e){this.alignment.set("textAlignWrapped","text-align-wrapped",e,"text")}get textAlignStacked(){return this.alignment.get("text-align-stacked")}set textAlignStacked(e){this.alignment.set("textAlignStacked","text-align-stacked",e,"text")}get brandInlineAlign(){return this.alignment.get("brand-inline-align")}set brandInlineAlign(e){this.alignment.set("brandInlineAlign","brand-inline-align",e,"placement")}get brandInlineAlignWrapped(){return this.alignment.get("brand-inline-align-wrapped")}set brandInlineAlignWrapped(e){this.alignment.set("brandInlineAlignWrapped","brand-inline-align-wrapped",e,"placement")}get brandInlineAlignStacked(){return this.alignment.get("brand-inline-align-stacked")}set brandInlineAlignStacked(e){this.alignment.set("brandInlineAlignStacked","brand-inline-align-stacked",e,"placement")}get brandBlockAlign(){return this.alignment.get("brand-block-align")}set brandBlockAlign(e){this.alignment.set("brandBlockAlign","brand-block-align",e,"placement")}get brandBlockAlignWrapped(){return this.alignment.get("brand-block-align-wrapped")}set brandBlockAlignWrapped(e){this.alignment.set("brandBlockAlignWrapped","brand-block-align-wrapped",e,"placement")}get brandBlockAlignStacked(){return this.alignment.get("brand-block-align-stacked")}set brandBlockAlignStacked(e){this.alignment.set("brandBlockAlignStacked","brand-block-align-stacked",e,"placement")}get brandTextAlign(){return this.alignment.get("brand-text-align")}set brandTextAlign(e){this.alignment.set("brandTextAlign","brand-text-align",e,"text")}get brandTextAlignWrapped(){return this.alignment.get("brand-text-align-wrapped")}set brandTextAlignWrapped(e){this.alignment.set("brandTextAlignWrapped","brand-text-align-wrapped",e,"text")}get brandTextAlignStacked(){return this.alignment.get("brand-text-align-stacked")}set brandTextAlignStacked(e){this.alignment.set("brandTextAlignStacked","brand-text-align-stacked",e,"text")}get asideInlineAlign(){return this.alignment.get("aside-inline-align")}set asideInlineAlign(e){this.alignment.set("asideInlineAlign","aside-inline-align",e,"placement")}get asideInlineAlignWrapped(){return this.alignment.get("aside-inline-align-wrapped")}set asideInlineAlignWrapped(e){this.alignment.set("asideInlineAlignWrapped","aside-inline-align-wrapped",e,"placement")}get asideInlineAlignStacked(){return this.alignment.get("aside-inline-align-stacked")}set asideInlineAlignStacked(e){this.alignment.set("asideInlineAlignStacked","aside-inline-align-stacked",e,"placement")}get asideBlockAlign(){return this.alignment.get("aside-block-align")}set asideBlockAlign(e){this.alignment.set("asideBlockAlign","aside-block-align",e,"placement")}get asideBlockAlignWrapped(){return this.alignment.get("aside-block-align-wrapped")}set asideBlockAlignWrapped(e){this.alignment.set("asideBlockAlignWrapped","aside-block-align-wrapped",e,"placement")}get asideBlockAlignStacked(){return this.alignment.get("aside-block-align-stacked")}set asideBlockAlignStacked(e){this.alignment.set("asideBlockAlignStacked","aside-block-align-stacked",e,"placement")}get asideTextAlign(){return this.alignment.get("aside-text-align")}set asideTextAlign(e){this.alignment.set("asideTextAlign","aside-text-align",e,"text")}get asideTextAlignWrapped(){return this.alignment.get("aside-text-align-wrapped")}set asideTextAlignWrapped(e){this.alignment.set("asideTextAlignWrapped","aside-text-align-wrapped",e,"text")}get asideTextAlignStacked(){return this.alignment.get("aside-text-align-stacked")}set asideTextAlignStacked(e){this.alignment.set("asideTextAlignStacked","aside-text-align-stacked",e,"text")}get bottomInlineAlign(){return this.alignment.get("bottom-inline-align")}set bottomInlineAlign(e){this.alignment.set("bottomInlineAlign","bottom-inline-align",e,"placement")}get bottomInlineAlignWrapped(){return this.alignment.get("bottom-inline-align-wrapped")}set bottomInlineAlignWrapped(e){this.alignment.set("bottomInlineAlignWrapped","bottom-inline-align-wrapped",e,"placement")}get bottomInlineAlignStacked(){return this.alignment.get("bottom-inline-align-stacked")}set bottomInlineAlignStacked(e){this.alignment.set("bottomInlineAlignStacked","bottom-inline-align-stacked",e,"placement")}get bottomTextAlign(){return this.alignment.get("bottom-text-align")}set bottomTextAlign(e){this.alignment.set("bottomTextAlign","bottom-text-align",e,"text")}get bottomTextAlignWrapped(){return this.alignment.get("bottom-text-align-wrapped")}set bottomTextAlignWrapped(e){this.alignment.set("bottomTextAlignWrapped","bottom-text-align-wrapped",e,"text")}get bottomTextAlignStacked(){return this.alignment.get("bottom-text-align-stacked")}set bottomTextAlignStacked(e){this.alignment.set("bottomTextAlignStacked","bottom-text-align-stacked",e,"text")}get brandLogoSizing(){return this.brandLogoSizingBacker}set brandLogoSizing(e){const a=this.brandLogoSizingBacker;this.brandLogoSizingBacker=A(e),this.requestUpdate("brandLogoSizing",this.hasAttribute("brand-logo-sizing")?a:void 0),c(this,"brand-logo-sizing",this.brandLogoSizingBacker)}get brandSpan(){return this.brandSpanBacker}set brandSpan(e){const a=this.brandSpanBacker;this.brandSpanBacker=Number.isInteger(e)&&e>=1&&e<=3?e:1,this.requestUpdate("brandSpan",this.hasAttribute("brand-span")?a:void 0),c(this,"brand-span",String(this.brandSpanBacker))}get asideSpan(){return this.asideSpanBacker}set asideSpan(e){const a=this.asideSpanBacker;this.asideSpanBacker=Number.isInteger(e)&&e>=1&&e<=2?e:1,this.requestUpdate("asideSpan",this.hasAttribute("aside-span")?a:void 0),c(this,"aside-span",String(this.asideSpanBacker))}slotRegion(e){return e.name?["media","brand","aside","bottom"].includes(e.name)?e.name:null:"groups"}firstUpdated(e){super.firstUpdated(e);const a={...u};for(const r of this.shadowRoot?.querySelectorAll("slot")??[]){const o=this.slotRegion(r);o&&(a[o]=m(r))}Object.entries(a).some(([r,o])=>this.slotContent[r]!==o)&&(this.slotContent=a)}render(){const{media:e,brand:a,groups:r,aside:o,bottom:l}=this.slotContent,s=O({scheme:this.scheme,brandLogo:this.brandLogo,brandColor:this.brandColor,lightBrandLogo:this.lightBrandLogo,darkBrandLogo:this.darkBrandLogo,lightBrandColor:this.lightBrandColor,darkBrandColor:this.darkBrandColor}),d=a||!!(s.brandLogo||this.brandText),f=d||r||o;return z`
|
|
2
2
|
<footer
|
|
3
3
|
part="footer"
|
|
4
|
-
aria-label=${this.landmarkLabel||
|
|
4
|
+
aria-label=${this.landmarkLabel||T}
|
|
5
5
|
style=${g({"--_esp-footer-brand-color":s.brandColor||null})}
|
|
6
6
|
>
|
|
7
|
-
${
|
|
7
|
+
${N({className:"background",rootPart:"background"})}
|
|
8
8
|
<div part="content" class="content-frame">
|
|
9
9
|
<div class="content">
|
|
10
10
|
|
|
@@ -13,7 +13,7 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
13
13
|
<slot name="media" @slotchange=${this.handleSlotChange}></slot>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
<div part="primary" class="primary" ?hidden=${!
|
|
16
|
+
<div part="primary" class="primary" ?hidden=${!f}>
|
|
17
17
|
<div
|
|
18
18
|
part="brand"
|
|
19
19
|
class="brand alignment-scope"
|
|
@@ -22,7 +22,7 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
22
22
|
>
|
|
23
23
|
<div class="alignment-content">
|
|
24
24
|
<slot name="brand" @slotchange=${this.handleSlotChange}
|
|
25
|
-
>${
|
|
25
|
+
>${$({brandLogo:s.brandLogo,brandText:this.brandText,brandHref:this.brandHref,brandAlt:this.brandAlt})}</slot
|
|
26
26
|
>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -54,7 +54,7 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
</footer>
|
|
57
|
-
`}};t.styles=[...b.styles,
|
|
57
|
+
`}};t.styles=[...b.styles,B(2),S,C,k,v,_`
|
|
58
58
|
:host {
|
|
59
59
|
display: block;
|
|
60
60
|
min-inline-size: 0;
|
|
@@ -201,6 +201,7 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.configured-brand {
|
|
204
|
+
${y}
|
|
204
205
|
|
|
205
206
|
display: var(--_esp-footer-lockup-display, inline-flex);
|
|
206
207
|
align-items: var(--_esp-footer-lockup-block, center);
|
|
@@ -208,7 +209,7 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
208
209
|
max-inline-size: 100%;
|
|
209
210
|
color: var(
|
|
210
211
|
--_esp-footer-brand-color,
|
|
211
|
-
var(--esp-footer-heading-color, var(--esp-color-headings))
|
|
212
|
+
var(--esp-footer-heading-color, var(--_esp-footer-local-fitted-heading-color, var(--esp-color-headings)))
|
|
212
213
|
);
|
|
213
214
|
font-family: var(
|
|
214
215
|
--_esp-font-brand-effective,
|
|
@@ -233,18 +234,25 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
233
234
|
text-decoration: none;
|
|
234
235
|
}
|
|
235
236
|
|
|
237
|
+
a.configured-brand {
|
|
238
|
+
text-decoration-line: var(--esp-footer-link-decoration, none);
|
|
239
|
+
text-underline-offset: var(--esp-footer-link-underline-offset, auto);
|
|
240
|
+
text-decoration-thickness: var(--esp-footer-link-underline-thickness, auto);
|
|
241
|
+
}
|
|
242
|
+
|
|
236
243
|
a.configured-brand:hover {
|
|
237
244
|
background: var(--esp-footer-link-hover-bg, var(--esp-color-link-hover-bg));
|
|
238
245
|
color: var(--esp-footer-link-hover-color, var(--esp-color-link-hover));
|
|
239
|
-
text-decoration: underline;
|
|
240
|
-
text-underline-offset: 0.18em;
|
|
246
|
+
text-decoration-line: underline;
|
|
247
|
+
text-underline-offset: var(--esp-footer-link-underline-offset, 0.18em);
|
|
241
248
|
}
|
|
242
249
|
|
|
243
250
|
a.configured-brand:focus-visible {
|
|
251
|
+
${w}
|
|
244
252
|
border-radius: var(--esp-size-border-radius);
|
|
245
253
|
outline: var(
|
|
246
254
|
--esp-footer-focus-outline,
|
|
247
|
-
2px solid var(--esp-footer-link-color, var(--esp-color-link))
|
|
255
|
+
2px solid var(--esp-footer-link-color, var(--_esp-footer-local-fitted-link-color, var(--esp-color-link)))
|
|
248
256
|
);
|
|
249
257
|
outline-offset: 3px;
|
|
250
258
|
}
|
|
@@ -252,7 +260,7 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
252
260
|
.brand-logo {
|
|
253
261
|
|
|
254
262
|
aspect-ratio: auto
|
|
255
|
-
var(--esp-footer-brand-logo-aspect-ratio, ${
|
|
263
|
+
var(--esp-footer-brand-logo-aspect-ratio, ${L});
|
|
256
264
|
display: block;
|
|
257
265
|
inline-size: auto;
|
|
258
266
|
|
|
@@ -310,4 +318,4 @@ var n=function(p,e,a,r){var o=arguments.length,l=o<3?e:r===null?r=Object.getOwnP
|
|
|
310
318
|
);
|
|
311
319
|
}
|
|
312
320
|
}
|
|
313
|
-
|
|
321
|
+
`,E],n([i({attribute:"inline-align",reflect:!0})],t.prototype,"inlineAlign",null),n([i({attribute:"inline-align-wrapped",reflect:!0})],t.prototype,"inlineAlignWrapped",null),n([i({attribute:"inline-align-stacked",reflect:!0})],t.prototype,"inlineAlignStacked",null),n([i({attribute:"block-align",reflect:!0})],t.prototype,"blockAlign",null),n([i({attribute:"block-align-wrapped",reflect:!0})],t.prototype,"blockAlignWrapped",null),n([i({attribute:"block-align-stacked",reflect:!0})],t.prototype,"blockAlignStacked",null),n([i({attribute:"text-align",reflect:!0})],t.prototype,"textAlign",null),n([i({attribute:"text-align-wrapped",reflect:!0})],t.prototype,"textAlignWrapped",null),n([i({attribute:"text-align-stacked",reflect:!0})],t.prototype,"textAlignStacked",null),n([i({attribute:"brand-inline-align",reflect:!0})],t.prototype,"brandInlineAlign",null),n([i({attribute:"brand-inline-align-wrapped",reflect:!0})],t.prototype,"brandInlineAlignWrapped",null),n([i({attribute:"brand-inline-align-stacked",reflect:!0})],t.prototype,"brandInlineAlignStacked",null),n([i({attribute:"brand-block-align",reflect:!0})],t.prototype,"brandBlockAlign",null),n([i({attribute:"brand-block-align-wrapped",reflect:!0})],t.prototype,"brandBlockAlignWrapped",null),n([i({attribute:"brand-block-align-stacked",reflect:!0})],t.prototype,"brandBlockAlignStacked",null),n([i({attribute:"brand-text-align",reflect:!0})],t.prototype,"brandTextAlign",null),n([i({attribute:"brand-text-align-wrapped",reflect:!0})],t.prototype,"brandTextAlignWrapped",null),n([i({attribute:"brand-text-align-stacked",reflect:!0})],t.prototype,"brandTextAlignStacked",null),n([i({attribute:"aside-inline-align",reflect:!0})],t.prototype,"asideInlineAlign",null),n([i({attribute:"aside-inline-align-wrapped",reflect:!0})],t.prototype,"asideInlineAlignWrapped",null),n([i({attribute:"aside-inline-align-stacked",reflect:!0})],t.prototype,"asideInlineAlignStacked",null),n([i({attribute:"aside-block-align",reflect:!0})],t.prototype,"asideBlockAlign",null),n([i({attribute:"aside-block-align-wrapped",reflect:!0})],t.prototype,"asideBlockAlignWrapped",null),n([i({attribute:"aside-block-align-stacked",reflect:!0})],t.prototype,"asideBlockAlignStacked",null),n([i({attribute:"aside-text-align",reflect:!0})],t.prototype,"asideTextAlign",null),n([i({attribute:"aside-text-align-wrapped",reflect:!0})],t.prototype,"asideTextAlignWrapped",null),n([i({attribute:"aside-text-align-stacked",reflect:!0})],t.prototype,"asideTextAlignStacked",null),n([i({attribute:"bottom-inline-align",reflect:!0})],t.prototype,"bottomInlineAlign",null),n([i({attribute:"bottom-inline-align-wrapped",reflect:!0})],t.prototype,"bottomInlineAlignWrapped",null),n([i({attribute:"bottom-inline-align-stacked",reflect:!0})],t.prototype,"bottomInlineAlignStacked",null),n([i({attribute:"bottom-text-align",reflect:!0})],t.prototype,"bottomTextAlign",null),n([i({attribute:"bottom-text-align-wrapped",reflect:!0})],t.prototype,"bottomTextAlignWrapped",null),n([i({attribute:"bottom-text-align-stacked",reflect:!0})],t.prototype,"bottomTextAlignStacked",null),n([i({attribute:"brand-logo-sizing",reflect:!0,useDefault:!0})],t.prototype,"brandLogoSizing",null),n([I()],t.prototype,"slotContent",void 0),n([i({attribute:"brand-text",type:String})],t.prototype,"brandText",void 0),n([i({attribute:"brand-logo",type:String})],t.prototype,"brandLogo",void 0),n([i({attribute:"light-brand-logo",type:String})],t.prototype,"lightBrandLogo",void 0),n([i({attribute:"dark-brand-logo",type:String})],t.prototype,"darkBrandLogo",void 0),n([i({attribute:"brand-href",type:String})],t.prototype,"brandHref",void 0),n([i({attribute:"brand-alt",type:String})],t.prototype,"brandAlt",void 0),n([i({attribute:"brand-color",type:String})],t.prototype,"brandColor",void 0),n([i({attribute:"light-brand-color",type:String})],t.prototype,"lightBrandColor",void 0),n([i({attribute:"dark-brand-color",type:String})],t.prototype,"darkBrandColor",void 0),n([i({attribute:"brand-span",type:Number,reflect:!0})],t.prototype,"brandSpan",null),n([i({attribute:"aside-span",type:Number,reflect:!0})],t.prototype,"asideSpan",null),n([i({attribute:"full-bleed-content",type:Boolean,reflect:!0})],t.prototype,"fullBleedContent",void 0),n([i({attribute:"landmark-label",type:String})],t.prototype,"landmarkLabel",void 0),t=n([W("esp-footer")],t);export{t as EspalierFooter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PAINT_INTERACTIONS as
|
|
1
|
+
import{PAINT_INTERACTIONS as h,closestPaintElement as i,configuredBrandColor as m,isPaintFocus as x,isPaintHover as p}from"../menu/navigation-paint.js";import{FOOTER_HEADING_INK as d,FOOTER_INK_PROPERTIES as l,FOOTER_LINK_INK as a,FOOTER_INK_MODE as c}from"../shared/footer-ink.js";import{parsePaintColor as u}from"../shared/paint-color.js";import{TOKEN_PAIRINGS as T}from"../shared/token-pairings.js";const g={foregroundDerivations:[d],foregroundAliases:["headings"]},b={foregroundDerivations:[a],foregroundAliases:["link"]},N=({element:e,source:t})=>{const o=i(e,".brand .configured-brand");if(!(!o||!i(o,"esp-footer"))){if(t==="outline"&&e===o&&o.matches("a[href]"))return{element:"brand-link",owner:o,...b};if(t==="text"&&i(e,".brand-text"))return{element:"brand-text",owner:o,...o.matches("a[href]")?{}:{state:()=>"rest"},...o.matches("a[href]:hover")?{}:{brandColor:m(o,"--_esp-footer-brand-color"),...g}}}};function v(e){const t=e.ownerDocument,o=t.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=t.createRange();for(let n=o.nextNode();n;n=o.nextNode()){const s=n.parentElement;if(!(!s||!n.textContent?.trim()||s.closest("svg, [hidden], .sr-only"))&&t.defaultView?.getComputedStyle(s).visibility==="visible"&&(r.selectNodeContents(n),Array.from(r.getClientRects()).some(({width:f,height:k})=>f>0&&k>0)))return!0}return!1}const E=({element:e,source:t})=>{if(!i(e,"esp-footer")||i(e,"esp-button"))return;const o=i(e,"a[href]");if(o&&!o.classList.contains("configured-brand")&&(t==="text"||t==="outline"&&e===o&&v(o)))return{element:"footer-link",owner:o,...t==="outline"||!o.matches(":hover")?b:{}};if(t!=="text")return;const r=i(e,"h1, h2, h3, h4, h5, h6");if(r)return{element:"footer-heading",owner:r,state:()=>"rest",...g};if(i(e,".aside, .bottom, esp-footer-link-group"))return{element:"footer-body",owner:e,state:()=>"rest"}},O=T.linkHover.bg,A={derivations:{[d]:({readProperty:e,readColor:t})=>u(e("--esp-footer-heading-color")??(e(c)==="semantic"?void 0:e(l.headings))??t("headings")??""),[a]:({readProperty:e,readColor:t})=>u(e("--esp-footer-link-color")??(e(c)==="semantic"?void 0:e(l.link))??t("link")??"")},entriesByRole:{footer:[{element:"footer-heading",foreground:d,background:"layer2",state:"rest",kind:"text",flags:["footerHeadings"]},{element:"footer-body",foreground:"text",background:"layer2",state:"rest",kind:"text",flags:["footerBody"]},...h.flatMap(e=>{const t=p(e),o=x(e),r={foreground:t?"linkHover":a,background:t?O:"layer2",state:e,kind:"text"},n=[{...r,element:"footer-link",flags:["footerLinks"]},{...r,element:"brand-text",foreground:t?"linkHover":"brand-color",flags:e==="rest"?["brandText"]:["brandText","brandLink"]}];if(o)for(const[s,f]of[["footer-link","footerLinks"],["brand-link","brandLink"]])n.push({element:s,foreground:a,background:"layer2",state:e,kind:"ring",flags:[f]});return n})]},targets:{footer:[N,E]}};export{A as footerPaintRegistration};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var a=function(i,e,r,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,r,n);else for(var
|
|
1
|
+
var a=function(i,e,r,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,r,n);else for(var c=i.length-1;c>=0;c--)(l=i[c])&&(o=(s<3?l(o):s>3?l(e,r,o):l(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o};import{LitElement as h,css as u,html as b,nothing as p}from"lit";import{customElement as v,eventOptions as m,property as d}from"lit/decorators.js";import{ref as f}from"lit/directives/ref.js";import{getIconHrefForHost as g}from"../shared/intent-values.js";import{SlottedIconController as x}from"../shared/slotted-icon-controller.js";import{renderSpriteIcon as S}from"../shared/svgs/render-sprite-icon.js";import{DocumentSpriteController as y}from"../shared/document-sprite.js";import{ESP_EVENTS as E}from"../shared/events.js";import{insetNavigationFocusOutline as w}from"../menu/navigation-focus-outline.js";let t=class extends h{constructor(){super(),this.iconSlot=new x(this),this.ariaLabel=null,this.ariaControls=null,this.ariaExpanded=null,this.icon="",new y(this)}handleClick(e){this.dispatchEvent(new CustomEvent(E.CLICKED,{detail:{},bubbles:!0,composed:!0}))}render(){const e=g(this.icon,this),r=this.iconSlot.hasSlottedIcon(":scope > *");return b`<button
|
|
2
2
|
@click=${this.handleClick}
|
|
3
3
|
aria-label=${this.ariaLabel??p}
|
|
4
4
|
aria-controls=${this.ariaControls??p}
|
|
@@ -38,11 +38,11 @@ var a=function(i,e,r,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnP
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:focus-visible {
|
|
41
|
-
${
|
|
41
|
+
${w}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&:hover {
|
|
45
45
|
background: var(--_esp-header-button-background-hover, var(--esp-header-button-background-hover, var(--esp-color-layer-4)));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
`,a([
|
|
48
|
+
`,a([d({attribute:"aria-label",type:String})],t.prototype,"ariaLabel",void 0),a([d({attribute:"aria-controls",type:String})],t.prototype,"ariaControls",void 0),a([d({attribute:"aria-expanded",type:String})],t.prototype,"ariaExpanded",void 0),a([d({type:String})],t.prototype,"icon",void 0),a([m({capture:!1,passive:!0})],t.prototype,"handleClick",null),t=a([v("esp-header-button")],t);export{t as EspalierHeaderButton};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var a=function(f,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(f,e,t,r);else for(var d=f.length-1;d>=0;d--)(i=f[d])&&(s=(n<3?i(s):n>3?i(e,t,s):i(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};import{
|
|
1
|
+
var a=function(f,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(f,e,t,r);else for(var d=f.length-1;d>=0;d--)(i=f[d])&&(s=(n<3?i(s):n>3?i(e,t,s):i(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};import{governingRoot as Q}from"../shared/governing-root.js";import{paintedSurface as Y}from"../shared/surface-layer.js";import{css as I,html as b,nothing as p,unsafeCSS as K}from"lit";import{customElement as Z,property as l,state as v}from"lit/decorators.js";import{classMap as W}from"lit/directives/class-map.js";import{styleMap as J}from"lit/directives/style-map.js";import"../burger/esp-burger.js";import{createRef as A,ref as H}from"lit/directives/ref.js";import{MENU_PRESENTATION_CHANGED as S,MENU_LAYOUT_CHANGED as R,MENU_FIT_PROBE_STYLES as X,menuPresentationStyle as ee,renderMenuNode as te}from"../menu/menu-presentation.js";import{EspalierMenu as T}from"../menu/esp-menu.js";import{configuredBrandFocusOutline as re}from"../menu/navigation-focus-outline.js";import{RafThrottle as q}from"../shared/raf-throttle.js";import{viewportSize as ne}from"../shared/viewport.js";import{CONFIGURED_BRAND_LOGO_ASPECT_RATIO as U,configuredBrandLogoGeometry as oe,renderConfiguredBrand as F,resolveConfiguredBrand as ie}from"../shared/configured-brand.js";import{EspalierElementBase as V}from"../shared/esp-element-base.js";import{ESP_EVENTS as x}from"../shared/events.js";import{HEADER_GEOMETRY_PAINT_PROPERTIES as ae,HeaderGeometryController as se}from"./header-geometry-controller.js";const de="(max-width: 36rem)",G=I`
|
|
2
2
|
background-color 0.24s ease,
|
|
3
3
|
border-color 0.24s ease,
|
|
4
4
|
box-shadow 0.24s ease,
|
|
5
5
|
color 0.24s ease,
|
|
6
6
|
transform 0.24s ease
|
|
7
|
-
`;function L(f,e){const t=new Set(f);return{allowedValues:t,converter:{fromAttribute(n){return n??e},toAttribute(n){return t.has(n)?n:e}},defaultValue:e}}const de=["standard","centered-brand","centered-menu","extended","extended-centered","minimal"],le=["start","center","end"],he=["truncate","wrap","nowrap"],ce=["auto","inline","drawer"],ue=["hidden","visible"],pe=["compact","standard"],j=new Set(Array.from({length:41},(f,e)=>(e+10)/10)),M=L(de,"standard"),D=L(le,"start"),B=L(he,"truncate"),z=L(ce,"auto"),P=L(ue,"hidden"),k=L(pe,"compact");let o=class extends V{constructor(){super(...arguments),this.menuOpen=!1,this.navigationConstrained=!1,this.menuTooLarge=!1,this.mobileMenu=!1,this.scrolled=!1,this.hiddenByScroll=!1,this.scrollProgress=0,this.showBurger=!1,this.layout=M.defaultValue,this.brandText="",this.brandLogo="",this.lightBrandLogo="",this.darkBrandLogo="",this.compactBrandLogo="",this.lightCompactBrandLogo="",this.darkCompactBrandLogo="",this.heightMultiplier=1,this.minHeightMultiplier=1,this.compactSize=k.defaultValue,this.brandHref="",this.brandAlt="",this.brandColor="",this.lightBrandColor="",this.darkBrandColor="",this.brandAlign=D.defaultValue,this.brandWrap=B.defaultValue,this.menuDisplay=z.defaultValue,this.themeToggle=P.defaultValue,this.scrollBehavior="none",this.scrollThreshold=16,this.dockOffset=0,this.drawerTarget="",this.previewCollapseRequested=!1,this.fullBleedContent=!1,this.geometry=new ae(this,()=>({heightMultiplier:this.heightMultiplier,minHeightMultiplier:this.minHeightMultiplier,compactSize:this.compactSize,compactLogo:!!(this.compactBrandLogo||this.lightCompactBrandLogo||this.darkCompactBrandLogo)}),()=>this.syncBrandFitWidth(),()=>this.runScrollStateUpdate(!0)),this.readyCompactLogo="",this.naturalBrandWidth=0,this.syncCompactLogoReadiness=()=>{const e=this.shadowRoot?.querySelector(".compact-brand-fit .brand-logo"),t=this.compactLogoSource,r=t&&e?.getAttribute("src")===t&&e.complete&&e.naturalWidth>0?t:"";r!==this.readyCompactLogo&&(this.readyCompactLogo=r)},this.keyboardFocusHeld=!1,this.pointerFocusPending=!1,this.pointerActivation=null,this.onGeometryKeyboard=()=>{this.pointerFocusPending=!1,this.keyboardFocusHeld=!0,this.updateScrollState()},this.onGeometryPointer=e=>{if(!e.isPrimary||e.button!==0||this.pointerActivation)return;this.pointerFocusPending=!0;const t=e.composedPath();this.geometryPointerBlocked(t)||(this.pointerActivation={pointerId:e.pointerId,path:t}),this.keyboardFocusHeld=!1,this.updateScrollState()},this.releaseGeometryPointer=()=>{this.pointerActivation&&(this.pointerActivation=null,this.updateScrollState())},this.onGeometryPointerEnd=e=>{if(!e.isPrimary||this.pointerActivation&&e.pointerId!==this.pointerActivation.pointerId)return;this.pointerFocusPending=!1;const t=e.composedPath();(e.type==="pointercancel"||!t.includes(this)||this.geometryPointerBlocked(t)||this.pointerActivation&&this.geometryPointerBlocked(this.pointerActivation.path))&&this.releaseGeometryPointer()},this.onGeometryClick=e=>{e instanceof PointerEvent&&e.pointerId!==this.pointerActivation?.pointerId||this.releaseGeometryPointer()},this.onGeometryDrag=()=>{this.pointerFocusPending=!1,this.releaseGeometryPointer()},this.onGeometryBlur=()=>{this.keyboardFocusHeld=!1,this.pointerFocusPending=!1,this.releaseGeometryPointer(),this.updateScrollState()},this.openHeaderPopovers=new Set,this.onHeaderPopoverOpened=e=>{e.target&&this.openHeaderPopovers.add(e.target),this.updateScrollState()},this.onHeaderPopoverClosed=e=>{e.target&&this.openHeaderPopovers.delete(e.target),this.updateScrollState()},this.onHeaderGroupToggle=e=>{e.detail.open?this.onHeaderPopoverOpened(e):this.onHeaderPopoverClosed(e)},this.onGeometryFocus=e=>{const t=e.composedPath();this.keyboardFocusHeld=!this.pointerFocusPending&&t.some(r=>r instanceof Element&&r.matches(":focus-visible")),this.updateScrollState()},this.onGeometryFocusOut=()=>{queueMicrotask(()=>{this.isConnected&&(this.matches(":focus-within")||(this.keyboardFocusHeld=!1,this.pointerFocusPending=!1),this.updateScrollState())})},this.menuContainer=A(),this.menuButton=A(),this.menu=void 0,this.externalDrawerTarget=null,this.lastScrollY=0,this.lastInlineMenuWidth=0,this.mobileMenuQuery=null,this.menuDrawerListenersAttached=!1,this.observingMenuContainer=!1,this.scrollListenersAttached=!1,this.scrollFrame=new q(()=>this.runScrollStateUpdate()),this.resizeObserver=new ResizeObserver(()=>this.syncMenuLayout()),this.menuChildObserver=null,this.endProbe=A(),this.observedEndProbe=null,this.endProbeObserver=null,this.invalidMenuSlot=null,this.actionsWidth=0,this.syncPrimaryMenu=()=>{const r=(this.menuContainer.value?.querySelector('slot[name="menu"]')?.assignedElements()??[])[0],n=r instanceof T&&r.parentElement===this?r:void 0,s=r&&!n?r:null;s&&s!==this.invalidMenuSlot&&console.warn("<esp-header>: the menu slot expects an <esp-menu> element, received",s),this.invalidMenuSlot=s,this.geometry.setPrimaryMenu(n),n!==this.menu&&(this.demoteMenuToggle(),this.removeMenuDrawerListeners(),this.menu?.removeEventListener(S,this.onPrimaryPresentationChanged),this.menu?.removeEventListener(R,this.onPrimaryLayoutChanged),this.menu&&(this.menu.headerEndOwner=null,this.menu.sliding=!1),this.menuChildObserver?.disconnect(),this.menuChildObserver=null,this.menu=n,this.lastInlineMenuWidth=0,this.lastDrawerBrandKey="",this.addMenuDrawerListeners(),this.menu?.addEventListener(S,this.onPrimaryPresentationChanged),this.observeMenuChildren(),this.syncDrawerBrand(),this.requestUpdate()),this.menu?.addEventListener(S,this.onPrimaryPresentationChanged),this.menu?.addEventListener(R,this.onPrimaryLayoutChanged),this.menu&&(this.menu.headerEndOwner=this.menu.mode==="horizontal"?this:null),this.syncExternalDrawerTarget(),this.syncMenuLayout()},this.onPrimaryPresentationChanged=()=>{this.menu?.headerDrawerActive&&this.returnEndFocusToBurger(),this.requestUpdate()},this.onPrimaryLayoutChanged=()=>{if(!this.menu)return;this.geometry.invalidate();const e=this.menu.mode==="horizontal"&&this.menu.parentElement===this?this:null;this.menu.headerEndOwner!==e&&(this.menu.headerEndOwner=e),this.menu.headerDrawerActive&&this.returnEndFocusToBurger(),this.observeMenuChildren(),this.requestUpdate(),this.syncMenuLayout()},this.updateScrollState=()=>this.scrollFrame.schedule(),this.handleMobileMenuQueryChange=e=>{this.mobileMenu=e.matches,this.syncMenuLayout(),this.syncExternalDrawerControl()},this.toggleTheme=()=>{const e=this.getThemeRoot();if(!e)return;e.scheme=e.scheme==="dark"?"light":"dark";const t=e.scheme==="dark"?"dark":"light";this.dispatchEvent(new CustomEvent(x.HEADER_THEME_TOGGLE,{detail:{scheme:t},bubbles:!0,composed:!0}))},this.handleMenuToggleClicked=()=>{if(this.menuOpen){this.closeNav();return}this.openNav()},this.onMenuDrawerOpened=()=>{this.menuOpen=!0,document.body.classList.add("menu-open"),this.burger&&(this.burger.menuOpen=!0)},this.onMenuDrawerClosed=()=>{this.menuOpen=!1,document.body.classList.remove("menu-open"),this.burger&&(this.burger.menuOpen=!1),this.demoteMenuToggle(),this.updateScrollState()},this.onMenuDrawerPresented=e=>{e.target!==this.menu||!this.menu?.isFullScreenDrawer||this.promoteMenuToggle()},this.menuTogglePromoted=!1,this.promotedToggleFrame=new q(()=>this.positionPromotedToggle()),this.handlePromotedViewportResize=()=>this.promotedToggleFrame.schedule(),this.lastDrawerBrandKey="",this.inertedHeaderChrome=[],this.onGeometryContentChanged=()=>this.geometry.invalidate()}resolveBrand(){return oe({scheme:this.scheme,brandLogo:this.brandLogo,brandColor:this.brandColor,lightBrandLogo:this.lightBrandLogo,darkBrandLogo:this.darkBrandLogo,lightBrandColor:this.lightBrandColor,darkBrandColor:this.darkBrandColor})}get compactLogoSource(){if(!this.resolveBrand().brandLogo)return"";const e=this.scheme==="dark"?this.darkCompactBrandLogo:this.lightCompactBrandLogo,t=this.scheme==="dark"?this.lightCompactBrandLogo:this.darkCompactBrandLogo;return e||this.compactBrandLogo||t}syncBrandFitWidth(){const e=this.menuContainer.value?.parentElement;if(!e)return;const t=e.querySelector(".brand-fit-probe");this.naturalBrandWidth=t?.getBoundingClientRect().width??0;const r=e.querySelector('slot[name="brand"]')?.assignedElements().length,n=[...t?.querySelectorAll(".brand-logo")??[]].map(d=>d.getBoundingClientRect().width),s=getComputedStyle(e),i=[s.paddingTop,s.paddingBottom,s.borderTopWidth,s.borderBottomWidth].reduce((d,h)=>d+(parseFloat(h)||0),0);for(const[d,h]of[["--_esp-header-stable-brand-width",this.geometry.active&&!r?this.naturalBrandWidth:null],["--_esp-header-logo-reservation-width",Math.max(0,...n)],["--_esp-header-bar-block-insets",i]])if(h===null)e.style.removeProperty(d);else{const c=`${h}px`;e.style.getPropertyValue(d)!==c&&e.style.setProperty(d,c)}}geometryPointerBlocked(e){return e.some(t=>t instanceof Element&&(!t.isConnected||t.matches(":disabled, [aria-disabled=true], [inert]")))}get headerOverlayHeld(){for(const e of this.openHeaderPopovers)e instanceof Element&&!e.isConnected&&this.openHeaderPopovers.delete(e);return this.menuOpen||this.openHeaderPopovers.size>0}get usesIntrinsicNavigation(){return!!this.menu?.headerNavigationOwned}syncEndProbeObserver(){const e=this.endProbe.value??null;e!==this.observedEndProbe&&(this.endProbeObserver?.disconnect(),this.observedEndProbe=e,e&&(this.endProbeObserver??=new ResizeObserver(()=>this.syncMenuLayout()),this.endProbeObserver.observe(e,{box:"border-box"})),this.syncMenuLayout())}returnEndFocusToBurger(){const e=this.shadowRoot?.querySelector(".header-end"),t=this.shadowRoot?.activeElement;t&&e?.contains(t)&&this.updateComplete.then(()=>this.getBurgerFocusTarget()?.focus({preventScroll:!0}))}readHeaderEndFit(){const e=this.menuContainer.value?.parentElement;if(!e||!this.menu)return null;const t=getComputedStyle(e),r=e.clientWidth-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0),n=parseFloat(t.columnGap)||0,s=e.querySelector(":scope > .brand"),d=s?.querySelector("slot")?.assignedElements().length?Math.max(s?.scrollWidth??0,s?.getBoundingClientRect().width??0):this.naturalBrandWidth,h=e.querySelector(":scope > .buttons"),c=Array.from(h?.children??[]).flatMap(g=>g.matches(".header-end, .header-end-measurement, .menu-toggle")?[]:g instanceof HTMLSlotElement?g.assignedElements():[g]).filter(g=>getComputedStyle(g).display!=="none");let u=c.reduce((g,N)=>{const $=getComputedStyle(N);return g+N.getBoundingClientRect().width+(parseFloat($.marginLeft)||0)+(parseFloat($.marginRight)||0)},0);const E=this.endProbe.value?.getBoundingClientRect().width??0,m=h&&parseFloat(getComputedStyle(h).columnGap)||0;u+=m*Math.max(0,c.length-1+(E>0?1:0));const y=this.menu.getHeaderNavigationWidths().main,w=E+u,_=this.layout==="extended"?y>r||d+w+n>r:this.layout==="extended-centered"?y>r||d+2*w+2*n>r:this.layout==="centered-brand"?d+2*Math.max(y,w)+2*n>r:d+y+w+2*n>r,C=this.getExternalDrawerTarget()?h?.querySelector(".menu-toggle"):null,O=u+(C&&getComputedStyle(C).display!=="none"?C.getBoundingClientRect().width+(c.length||E?m:0):0);return{width:r,brandWidth:d,main:y,endWidth:E,actions:u,actionFloor:O,gap:n,tooWide:_}}syncMenuLayout(){if(this.syncBrandFitWidth(),!this.menuContainer.value||!this.menu||!this.menu.getWidth)return;this.positionPromotedToggle();const e=this.menu.getWidth();e>0&&(this.lastInlineMenuWidth=e);const t=this.lastInlineMenuWidth||e,r=this.getExternalDrawerTarget(),n=this.menuDisplay!=="inline",s=this.showBurger||this.menuDisplay==="drawer"||this.layout==="minimal"||this.previewCollapseRequested,i=n&&this.menuDisplay==="auto",d=i?this.layout==="centered-menu"?this.centeredMenuCapacity():this.menuContainer.value.clientWidth:0,h=this.usesIntrinsicNavigation?this.readHeaderEndFit():null;h&&this.actionsWidth!==h.actionFloor&&(this.actionsWidth=h.actionFloor,this.requestUpdate()),this.menuTooLarge=i&&(h?h.tooWide:t>d);const c=n&&!r&&this.hasDrawerableContent()&&(this.menuTooLarge||s||this.mobileMenu);c&&this.returnEndFocusToBurger(),this.menu.sliding=c,this.navigationConstrained=h?.tooWide??!1}centeredMenuCapacity(){const e=this.menuContainer.value?.parentElement;if(!(e instanceof HTMLElement))return 0;const t=d=>d?d.getBoundingClientRect().width:0,r=getComputedStyle(e),n=e.clientWidth-(Number.parseFloat(r.paddingLeft)||0)-(Number.parseFloat(r.paddingRight)||0),s=e.querySelector(":scope > section.brand"),i=e.querySelector(":scope > section.buttons");return n-t(s)-t(i)+t(i?.querySelector("esp-header-button.menu-toggle"))}menuHasContent(){return!!(this.menu??this.querySelector(':scope > [slot="menu"]'))?.querySelector("esp-menu-item, esp-menu-group")}hasDrawerableContent(){return this.showBurger||!!this.getExternalDrawerTarget()||this.menuHasContent()}getExternalDrawerTarget(){if(!this.drawerTarget)return null;const e=document.getElementById(this.drawerTarget);return e===this.menu?null:e&&"openDrawer"in e&&typeof e.openDrawer=="function"&&"closeDrawer"in e&&typeof e.closeDrawer=="function"?e:null}getBurgerFocusTarget(){const t=this.shadowRoot?.querySelector("esp-header-button.menu-toggle")?.shadowRoot?.querySelector("button"),r=this.menuButton.value?.shadowRoot?.querySelector("button");return t??r??null}getScrollTokens(){const e=this.scrollBehavior.split(/\s+/).map(t=>t.trim().toLowerCase()).filter(Boolean);return new Set(e.filter(t=>t!=="none"))}getEffectiveScrollThreshold(){return Number.isFinite(this.scrollThreshold)?Math.max(0,this.scrollThreshold):0}clearScrollState(){this.geometry.requestScroll(0,!1,!1,this.getEffectiveScrollThreshold(),!1),this.scrolled=!1,this.hiddenByScroll=!1,this.scrollProgress=0}runScrollStateUpdate(e=!1){const t=this.getScrollTokens();if(!t.size){e||this.clearScrollState();return}const r=Math.max(0,window.scrollY||document.documentElement.scrollTop||0),n=this.getEffectiveScrollThreshold(),s=Number.isFinite(this.dockOffset)?Math.max(0,this.dockOffset):n,i=r>(t.has("dock")?s:n),d=r>this.lastScrollY,h=t.has("reveal")&&d&&r>n&&!this.menuOpen;if(this.geometry.requestScroll(r,t.has("compact"),t.has("collapse-topbar")&&i,n,this.headerOverlayHeld||this.keyboardFocusHeld||this.pointerActivation!==null),!e){if(this.scrolled=i,this.hiddenByScroll=h,t.has("progress")){const c=document.documentElement,u=Math.max(1,c.scrollHeight-window.innerHeight);this.scrollProgress=Math.min(1,r/u)}else this.scrollProgress=0;this.lastScrollY=r}}cancelScrollUpdate(){this.scrollFrame.cancel()}syncScrollListeners(){const e=this.getScrollTokens().size>0;if(e&&!this.scrollListenersAttached?(window.addEventListener("scroll",this.updateScrollState,{passive:!0}),window.addEventListener("resize",this.updateScrollState,{passive:!0}),this.scrollListenersAttached=!0):!e&&this.scrollListenersAttached&&this.removeScrollListeners(),e){this.updateScrollState();return}this.cancelScrollUpdate(),this.clearScrollState()}removeScrollListeners(){this.scrollListenersAttached&&(window.removeEventListener("scroll",this.updateScrollState),window.removeEventListener("resize",this.updateScrollState),this.scrollListenersAttached=!1)}addMenuDrawerListeners(){!this.menu||this.menuDrawerListenersAttached||(this.menu.addEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.menu.addEventListener("esp-menu-drawer-presented",this.onMenuDrawerPresented),this.menu.addEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.menuDrawerListenersAttached=!0)}removeMenuDrawerListeners(){!this.menu||!this.menuDrawerListenersAttached||(this.menu.removeEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.menu.removeEventListener("esp-menu-drawer-presented",this.onMenuDrawerPresented),this.menu.removeEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.menuDrawerListenersAttached=!1)}observeMenuContainer(){if(!this.menuContainer.value||this.observingMenuContainer)return;this.resizeObserver.observe(this.menuContainer.value);const e=this.menuContainer.value.parentElement;if(e){this.resizeObserver.observe(e);for(const t of e.querySelectorAll(":scope > section.brand, :scope > section.buttons, :scope > .brand-fit-probe"))this.resizeObserver.observe(t)}this.observingMenuContainer=!0}disconnectResizeObserver(){this.observingMenuContainer&&(this.resizeObserver.disconnect(),this.observingMenuContainer=!1)}observeMenuChildren(){if(this.usesIntrinsicNavigation){this.menuChildObserver?.disconnect(),this.menuChildObserver=null;return}!this.menu||this.menuChildObserver||(this.menuChildObserver=new MutationObserver(()=>{this.syncMenuLayout(),this.requestUpdate()}),this.menuChildObserver.observe(this.menu,{childList:!0,subtree:!0}))}syncMobileMenuQuery(){if("matchMedia"in window){if(!this.mobileMenuQuery){this.mobileMenuQuery=window.matchMedia(se),this.mobileMenu=this.mobileMenuQuery.matches,this.mobileMenuQuery.addEventListener("change",this.handleMobileMenuQueryChange);return}this.mobileMenu=this.mobileMenuQuery.matches}}getThemeRoot(){return this.traverseToClosest("esp-root")}syncExternalDrawerTarget(){const e=this.getExternalDrawerTarget(),t=e===this.menu?null:e;t!==this.externalDrawerTarget&&(this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.externalDrawerTarget instanceof T&&(this.externalDrawerTarget.hasExternalDrawerControl=!1),this.externalDrawerTarget=t,this.externalDrawerTarget?.addEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.externalDrawerTarget?.addEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed)),this.syncExternalDrawerControl()}burgerVisibleForTarget(){if(this.menuDisplay==="inline")return!1;const e=this.showBurger||this.menuDisplay==="drawer"||this.layout==="minimal"||this.previewCollapseRequested;return this.menuTooLarge||this.mobileMenu||e}syncExternalDrawerControl(){this.externalDrawerTarget instanceof T&&(this.externalDrawerTarget.hasExternalDrawerControl=this.burgerVisibleForTarget())}openNav(){const e=this.getBurgerFocusTarget(),t=this.getExternalDrawerTarget();if(this.burger&&(this.burger.menuOpen=!0),t){this.menuOpen=!0,t.openDrawer(e),document.body.classList.add("menu-open");return}if(this.menu){this.menu.sliding=!0,this.menuOpen=!0,this.menu.isFullScreenDrawer&&this.canPromoteMenuToggle()&&(this.menu.liftedCloseControl=this.getMenuToggleElement()),this.menu.openDrawer(e),document.body.classList.add("menu-open");return}this.burger&&(this.burger.menuOpen=!1)}closeNav(){this.menuOpen=!1,this.burger&&(this.burger.menuOpen=!1),this.demoteMenuToggle();const e=this.getExternalDrawerTarget();if(e){e.closeDrawer(),document.body.classList.remove("menu-open");return}this.menu&&(this.menu.closeDrawer(),document.body.classList.remove("menu-open"))}getMenuToggleElement(){return this.shadowRoot?.querySelector("esp-header-button.menu-toggle")??null}canPromoteMenuToggle(){const e=this.getMenuToggleElement();return!!e&&typeof e?.showPopover=="function"}setHeaderChromeInert(e){if(!e){for(const i of this.inertedHeaderChrome)i.inert=!1;this.inertedHeaderChrome=[];return}const t=this.menuContainer.value?.parentElement,r=this.getMenuToggleElement();if(!t||!r)return;const n=[];for(const i of t.querySelectorAll(":scope > section.brand, :scope > section.topbar"))n.push(i);const s=t.querySelector(":scope > section.buttons");for(const i of s?.children??[])if(!(!(i instanceof HTMLElement)||i===r)){if(i instanceof HTMLSlotElement){for(const d of i.assignedElements())d instanceof HTMLElement&&n.push(d);continue}n.push(i)}for(const i of n)i.inert||(i.inert=!0,this.inertedHeaderChrome.push(i))}promoteMenuToggle(){const e=this.getMenuToggleElement();if(!e||this.menuTogglePromoted||typeof e.showPopover!="function")return;const t=e.getBoundingClientRect();e.setAttribute("popover","manual"),Object.assign(e.style,{position:"fixed",inset:"auto",margin:"0",padding:"0",border:"0",background:"transparent",overflow:"visible"}),this.setPromotedTogglePosition(e,t.width);try{e.showPopover()}catch{e.removeAttribute("popover"),e.removeAttribute("style"),this.menu&&(this.menu.liftedCloseControl=null);return}this.menuTogglePromoted=!0,window.addEventListener("resize",this.handlePromotedViewportResize),this.menu&&(this.menu.liftedCloseControl=e),this.setHeaderChromeInert(!0)}positionPromotedToggle(){if(!this.menuTogglePromoted)return;const e=this.getMenuToggleElement();if(!e)return;const t=e.getBoundingClientRect();this.setPromotedTogglePosition(e,t.width)}setPromotedTogglePosition(e,t){const r=re(),n=getComputedStyle(e).direction==="rtl";e.style.left=`${n?0:Math.max(0,r.width-t)}px`,e.style.top="0px"}demoteMenuToggle(){if(window.removeEventListener("resize",this.handlePromotedViewportResize),this.promotedToggleFrame.cancel(),this.menu?.liftedCloseControl&&(this.menu.liftedCloseControl=null),!this.menuTogglePromoted)return;this.menuTogglePromoted=!1,this.setHeaderChromeInert(!1);const e=this.getMenuToggleElement();if(e){try{e.hidePopover()}catch{}e.removeAttribute("popover"),e.removeAttribute("style")}}syncDrawerBrand(){if(!this.menu)return;const e=this.resolveBrand(),t=e.brandLogo||this.brandText?{brandLogo:e.brandLogo,brandText:this.brandText,brandHref:this.brandHref,brandAlt:this.brandAlt,brandColor:e.brandColor}:null,r=JSON.stringify(t);r!==this.lastDrawerBrandKey&&(this.lastDrawerBrandKey=r,this.menu.drawerBrand=t)}get burger(){return this.menuButton.value??void 0}willUpdate(e){super.willUpdate(e),j.has(this.heightMultiplier)||(this.heightMultiplier=1),j.has(this.minHeightMultiplier)||(this.minHeightMultiplier=1),k.allowedValues.has(this.compactSize)||(this.compactSize=k.defaultValue),["heightMultiplier","minHeightMultiplier","compactSize","compactBrandLogo","lightCompactBrandLogo","darkCompactBrandLogo"].some(t=>e.has(t))&&this.geometry.configure(),["scheme","brandLogo","lightBrandLogo","darkBrandLogo","compactBrandLogo","lightCompactBrandLogo","darkCompactBrandLogo"].some(t=>e.has(t))&&(this.readyCompactLogo=""),e.has("layout")&&!M.allowedValues.has(this.layout)&&(this.layout=M.defaultValue),e.has("brandAlign")&&!D.allowedValues.has(this.brandAlign)&&(this.brandAlign=D.defaultValue),e.has("brandWrap")&&!B.allowedValues.has(this.brandWrap)&&(this.brandWrap=B.defaultValue),e.has("menuDisplay")&&!z.allowedValues.has(this.menuDisplay)&&(this.menuDisplay=z.defaultValue),e.has("themeToggle")&&!P.allowedValues.has(this.themeToggle)&&(this.themeToggle=P.defaultValue)}firstUpdated(e){super.firstUpdated(e),this.shadowRoot?.addEventListener("load",this.syncCompactLogoReadiness,!0),this.shadowRoot?.addEventListener("error",this.syncCompactLogoReadiness,!0),this.menuContainer.value&&(this.syncPrimaryMenu(),this.observeMenuContainer(),this.syncExternalDrawerTarget(),this.syncMobileMenuQuery(),this.syncScrollListeners(),this.syncMenuLayout())}updated(e){super.updated(e),this.syncCompactLogoReadiness(),this.syncDrawerBrand(),this.syncEndProbeObserver(),(e.has("scheme")||e.has("layout")||e.has("brandLogo")||e.has("brandText")||e.has("lightBrandLogo")||e.has("darkBrandLogo"))&&this.geometry.invalidate(),(!e.size||[...e.keys()].some(t=>t!=="scrollProgress"&&t!=="hiddenByScroll"))&&this.geometry.measure(),this.observeMenuChildren(),(e.has("showBurger")||e.has("drawerTarget")||e.has("menuDisplay")||e.has("layout")||e.has("previewCollapseRequested"))&&(this.syncExternalDrawerTarget(),this.syncMenuLayout()),(e.has("mobileMenu")||e.has("menuTooLarge"))&&this.syncExternalDrawerControl(),e.has("scrollBehavior")?this.syncScrollListeners():(e.has("scrollThreshold")||e.has("dockOffset"))&&this.updateScrollState()}connectedCallback(){super.connectedCallback(),this.geometry.connect(),this.shadowRoot?.addEventListener("load",this.syncCompactLogoReadiness,!0),this.shadowRoot?.addEventListener("error",this.syncCompactLogoReadiness,!0),this.addEventListener(x.POPOVER_OPENED,this.onHeaderPopoverOpened),this.addEventListener(x.POPOVER_CLOSED,this.onHeaderPopoverClosed),this.addEventListener(x.MENU_GROUP_TOGGLE,this.onHeaderGroupToggle),this.addEventListener("keydown",this.onGeometryKeyboard),this.addEventListener("pointerdown",this.onGeometryPointer,!0),this.addEventListener("dragstart",this.onGeometryDrag,!0),window.addEventListener("pointerup",this.onGeometryPointerEnd,!0),window.addEventListener("pointercancel",this.onGeometryPointerEnd,!0),window.addEventListener("click",this.onGeometryClick,!0),window.addEventListener("blur",this.onGeometryBlur),this.addEventListener("focusin",this.onGeometryFocus),this.addEventListener("focusout",this.onGeometryFocusOut),this.addEventListener("slotchange",this.onGeometryContentChanged),this.syncScrollListeners(),this.syncMobileMenuQuery(),this.addMenuDrawerListeners(),this.syncExternalDrawerTarget(),this.observeMenuContainer(),this.hasUpdated&&this.syncPrimaryMenu(),this.observeMenuChildren()}disconnectedCallback(){this.geometry.disconnect(),this.shadowRoot?.removeEventListener("load",this.syncCompactLogoReadiness,!0),this.shadowRoot?.removeEventListener("error",this.syncCompactLogoReadiness,!0),this.readyCompactLogo="",this.removeEventListener(x.POPOVER_OPENED,this.onHeaderPopoverOpened),this.removeEventListener(x.POPOVER_CLOSED,this.onHeaderPopoverClosed),this.removeEventListener(x.MENU_GROUP_TOGGLE,this.onHeaderGroupToggle),this.openHeaderPopovers.clear(),this.pointerActivation=null,this.keyboardFocusHeld=!1,this.pointerFocusPending=!1,this.removeEventListener("keydown",this.onGeometryKeyboard),this.removeEventListener("pointerdown",this.onGeometryPointer,!0),this.removeEventListener("dragstart",this.onGeometryDrag,!0),window.removeEventListener("pointerup",this.onGeometryPointerEnd,!0),window.removeEventListener("pointercancel",this.onGeometryPointerEnd,!0),window.removeEventListener("click",this.onGeometryClick,!0),window.removeEventListener("blur",this.onGeometryBlur),this.removeEventListener("focusin",this.onGeometryFocus),this.removeEventListener("focusout",this.onGeometryFocusOut),this.removeEventListener("slotchange",this.onGeometryContentChanged),this.menu?.removeEventListener(S,this.onPrimaryPresentationChanged),this.menu?.removeEventListener(R,this.onPrimaryLayoutChanged),this.menu&&(this.menu.headerEndOwner=null),this.removeMenuDrawerListeners(),this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.externalDrawerTarget instanceof T&&(this.externalDrawerTarget.hasExternalDrawerControl=!1),this.externalDrawerTarget=null,this.mobileMenuQuery?.removeEventListener("change",this.handleMobileMenuQueryChange),this.mobileMenuQuery=null,this.removeScrollListeners(),this.cancelScrollUpdate(),this.disconnectResizeObserver(),this.endProbeObserver?.disconnect(),this.observedEndProbe=null,this.menuChildObserver?.disconnect(),this.menuChildObserver=null,this.demoteMenuToggle(),super.disconnectedCallback()}renderHeaderEnd(e,t,r){return b`<nav
|
|
7
|
+
`;function L(f,e){const t=new Set(f);return{allowedValues:t,converter:{fromAttribute(n){return n??e},toAttribute(n){return t.has(n)?n:e}},defaultValue:e}}const le=["standard","centered-brand","centered-menu","extended","extended-centered","minimal"],he=["start","center","end"],ce=["truncate","wrap","nowrap"],ue=["auto","inline","drawer"],pe=["hidden","visible"],me=["compact","standard"],j=new Set(Array.from({length:41},(f,e)=>(e+10)/10)),M=L(le,"standard"),D=L(he,"start"),B=L(ce,"truncate"),z=L(ue,"auto"),P=L(pe,"hidden"),k=L(me,"compact");let o=class extends V{constructor(){super(...arguments),this.menuOpen=!1,this.navigationConstrained=!1,this.menuTooLarge=!1,this.mobileMenu=!1,this.scrolled=!1,this.hiddenByScroll=!1,this.scrollProgress=0,this.showBurger=!1,this.layout=M.defaultValue,this.brandText="",this.brandLogo="",this.lightBrandLogo="",this.darkBrandLogo="",this.compactBrandLogo="",this.lightCompactBrandLogo="",this.darkCompactBrandLogo="",this.heightMultiplier=1,this.minHeightMultiplier=1,this.compactSize=k.defaultValue,this.brandHref="",this.brandAlt="",this.brandColor="",this.lightBrandColor="",this.darkBrandColor="",this.brandAlign=D.defaultValue,this.brandWrap=B.defaultValue,this.menuDisplay=z.defaultValue,this.themeToggle=P.defaultValue,this.scrollBehavior="none",this.scrollThreshold=16,this.dockOffset=0,this.drawerTarget="",this.previewCollapseRequested=!1,this.fullBleedContent=!1,this.geometry=new se(this,()=>({heightMultiplier:this.heightMultiplier,minHeightMultiplier:this.minHeightMultiplier,compactSize:this.compactSize,compactLogo:!!(this.compactBrandLogo||this.lightCompactBrandLogo||this.darkCompactBrandLogo)}),()=>this.syncBrandFitWidth(),()=>this.runScrollStateUpdate(!0)),this.readyCompactLogo="",this.naturalBrandWidth=0,this.syncCompactLogoReadiness=()=>{const e=this.shadowRoot?.querySelector(".compact-brand-fit .brand-logo"),t=this.compactLogoSource,r=t&&e?.getAttribute("src")===t&&e.complete&&e.naturalWidth>0?t:"";r!==this.readyCompactLogo&&(this.readyCompactLogo=r)},this.keyboardFocusHeld=!1,this.pointerFocusPending=!1,this.pointerActivation=null,this.onGeometryKeyboard=()=>{this.pointerFocusPending=!1,this.keyboardFocusHeld=!0,this.updateScrollState()},this.onGeometryPointer=e=>{if(!e.isPrimary||e.button!==0||this.pointerActivation)return;this.pointerFocusPending=!0;const t=e.composedPath();this.geometryPointerBlocked(t)||(this.pointerActivation={pointerId:e.pointerId,path:t}),this.keyboardFocusHeld=!1,this.updateScrollState()},this.releaseGeometryPointer=()=>{this.pointerActivation&&(this.pointerActivation=null,this.updateScrollState())},this.onGeometryPointerEnd=e=>{if(!e.isPrimary||this.pointerActivation&&e.pointerId!==this.pointerActivation.pointerId)return;this.pointerFocusPending=!1;const t=e.composedPath();(e.type==="pointercancel"||!t.includes(this)||this.geometryPointerBlocked(t)||this.pointerActivation&&this.geometryPointerBlocked(this.pointerActivation.path))&&this.releaseGeometryPointer()},this.onGeometryClick=e=>{e instanceof PointerEvent&&e.pointerId!==this.pointerActivation?.pointerId||this.releaseGeometryPointer()},this.onGeometryDrag=()=>{this.pointerFocusPending=!1,this.releaseGeometryPointer()},this.onGeometryBlur=()=>{this.keyboardFocusHeld=!1,this.pointerFocusPending=!1,this.releaseGeometryPointer(),this.updateScrollState()},this.openHeaderPopovers=new Set,this.onHeaderPopoverOpened=e=>{e.target&&this.openHeaderPopovers.add(e.target),this.updateScrollState()},this.onHeaderPopoverClosed=e=>{e.target&&this.openHeaderPopovers.delete(e.target),this.updateScrollState()},this.onHeaderGroupToggle=e=>{e.detail.open?this.onHeaderPopoverOpened(e):this.onHeaderPopoverClosed(e)},this.onGeometryFocus=e=>{const t=e.composedPath();this.keyboardFocusHeld=!this.pointerFocusPending&&t.some(r=>r instanceof Element&&r.matches(":focus-visible")),this.updateScrollState()},this.onGeometryFocusOut=()=>{queueMicrotask(()=>{this.isConnected&&(this.matches(":focus-within")||(this.keyboardFocusHeld=!1,this.pointerFocusPending=!1),this.updateScrollState())})},this.menuContainer=A(),this.menuButton=A(),this.menu=void 0,this.externalDrawerTarget=null,this.lastScrollY=0,this.lastInlineMenuWidth=0,this.mobileMenuQuery=null,this.menuDrawerListenersAttached=!1,this.observingMenuContainer=!1,this.scrollListenersAttached=!1,this.scrollFrame=new q(()=>this.runScrollStateUpdate()),this.resizeObserver=new ResizeObserver(()=>this.syncMenuLayout()),this.menuChildObserver=null,this.endProbe=A(),this.observedEndProbe=null,this.endProbeObserver=null,this.invalidMenuSlot=null,this.actionsWidth=0,this.syncPrimaryMenu=()=>{const r=(this.menuContainer.value?.querySelector('slot[name="menu"]')?.assignedElements()??[])[0],n=r instanceof T&&r.parentElement===this?r:void 0,s=r&&!n?r:null;s&&s!==this.invalidMenuSlot&&console.warn("<esp-header>: the menu slot expects an <esp-menu> element, received",s),this.invalidMenuSlot=s,this.geometry.setPrimaryMenu(n),n!==this.menu&&(this.demoteMenuToggle(),this.removeMenuDrawerListeners(),this.menu?.removeEventListener(S,this.onPrimaryPresentationChanged),this.menu?.removeEventListener(R,this.onPrimaryLayoutChanged),this.menu&&(this.menu.headerEndOwner=null,this.menu.sliding=!1),this.menuChildObserver?.disconnect(),this.menuChildObserver=null,this.menu=n,this.lastInlineMenuWidth=0,this.lastDrawerBrandKey="",this.addMenuDrawerListeners(),this.menu?.addEventListener(S,this.onPrimaryPresentationChanged),this.observeMenuChildren(),this.syncDrawerBrand(),this.requestUpdate()),this.menu?.addEventListener(S,this.onPrimaryPresentationChanged),this.menu?.addEventListener(R,this.onPrimaryLayoutChanged),this.menu&&(this.menu.headerEndOwner=this.menu.mode==="horizontal"?this:null),this.syncExternalDrawerTarget(),this.syncMenuLayout()},this.onPrimaryPresentationChanged=()=>{this.menu?.headerDrawerActive&&this.returnEndFocusToBurger(),this.requestUpdate()},this.onPrimaryLayoutChanged=()=>{if(!this.menu)return;this.geometry.invalidate();const e=this.menu.mode==="horizontal"&&this.menu.parentElement===this?this:null;this.menu.headerEndOwner!==e&&(this.menu.headerEndOwner=e),this.menu.headerDrawerActive&&this.returnEndFocusToBurger(),this.observeMenuChildren(),this.requestUpdate(),this.syncMenuLayout()},this.updateScrollState=()=>this.scrollFrame.schedule(),this.handleMobileMenuQueryChange=e=>{this.mobileMenu=e.matches,this.syncMenuLayout(),this.syncExternalDrawerControl()},this.toggleTheme=()=>{const e=Q(this);if(!e)return;e.scheme=e.scheme==="dark"?"light":"dark";const t=e.scheme==="dark"?"dark":"light";this.dispatchEvent(new CustomEvent(x.HEADER_THEME_TOGGLE,{detail:{scheme:t},bubbles:!0,composed:!0}))},this.handleMenuToggleClicked=()=>{if(this.menuOpen){this.closeNav();return}this.openNav()},this.onMenuDrawerOpened=()=>{this.menuOpen=!0,document.body.classList.add("menu-open"),this.burger&&(this.burger.menuOpen=!0)},this.onMenuDrawerClosed=()=>{this.menuOpen=!1,document.body.classList.remove("menu-open"),this.burger&&(this.burger.menuOpen=!1),this.demoteMenuToggle(),this.updateScrollState()},this.onMenuDrawerPresented=e=>{e.target!==this.menu||!this.menu?.isFullScreenDrawer||this.promoteMenuToggle()},this.menuTogglePromoted=!1,this.promotedToggleFrame=new q(()=>this.positionPromotedToggle()),this.handlePromotedViewportResize=()=>this.promotedToggleFrame.schedule(),this.lastDrawerBrandKey="",this.inertedHeaderChrome=[],this.onGeometryContentChanged=()=>this.geometry.invalidate()}resolveBrand(){return ie({scheme:this.scheme,brandLogo:this.brandLogo,brandColor:this.brandColor,lightBrandLogo:this.lightBrandLogo,darkBrandLogo:this.darkBrandLogo,lightBrandColor:this.lightBrandColor,darkBrandColor:this.darkBrandColor})}get compactLogoSource(){if(!this.resolveBrand().brandLogo)return"";const e=this.scheme==="dark"?this.darkCompactBrandLogo:this.lightCompactBrandLogo,t=this.scheme==="dark"?this.lightCompactBrandLogo:this.darkCompactBrandLogo;return e||this.compactBrandLogo||t}syncBrandFitWidth(){const e=this.menuContainer.value?.parentElement;if(!e)return;const t=e.querySelector(".brand-fit-probe");this.naturalBrandWidth=t?.getBoundingClientRect().width??0;const r=e.querySelector('slot[name="brand"]')?.assignedElements().length,n=[...t?.querySelectorAll(".brand-logo")??[]].map(d=>d.getBoundingClientRect().width),s=getComputedStyle(e),i=[s.paddingTop,s.paddingBottom,s.borderTopWidth,s.borderBottomWidth].reduce((d,h)=>d+(parseFloat(h)||0),0);for(const[d,h]of[["--_esp-header-stable-brand-width",this.geometry.active&&!r?this.naturalBrandWidth:null],["--_esp-header-logo-reservation-width",Math.max(0,...n)],["--_esp-header-bar-block-insets",i]])if(h===null)e.style.removeProperty(d);else{const c=`${h}px`;e.style.getPropertyValue(d)!==c&&e.style.setProperty(d,c)}}geometryPointerBlocked(e){return e.some(t=>t instanceof Element&&(!t.isConnected||t.matches(":disabled, [aria-disabled=true], [inert]")))}get headerOverlayHeld(){for(const e of this.openHeaderPopovers)e instanceof Element&&!e.isConnected&&this.openHeaderPopovers.delete(e);return this.menuOpen||this.openHeaderPopovers.size>0}get usesIntrinsicNavigation(){return!!this.menu?.headerNavigationOwned}syncEndProbeObserver(){const e=this.endProbe.value??null;e!==this.observedEndProbe&&(this.endProbeObserver?.disconnect(),this.observedEndProbe=e,e&&(this.endProbeObserver??=new ResizeObserver(()=>this.syncMenuLayout()),this.endProbeObserver.observe(e,{box:"border-box"})),this.syncMenuLayout())}returnEndFocusToBurger(){const e=this.shadowRoot?.querySelector(".header-end"),t=this.shadowRoot?.activeElement;t&&e?.contains(t)&&this.updateComplete.then(()=>this.getBurgerFocusTarget()?.focus({preventScroll:!0}))}readHeaderEndFit(){const e=this.menuContainer.value?.parentElement;if(!e||!this.menu)return null;const t=getComputedStyle(e),r=e.clientWidth-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0),n=parseFloat(t.columnGap)||0,s=e.querySelector(":scope > .brand"),d=s?.querySelector("slot")?.assignedElements().length?Math.max(s?.scrollWidth??0,s?.getBoundingClientRect().width??0):this.naturalBrandWidth,h=e.querySelector(":scope > .buttons"),c=Array.from(h?.children??[]).flatMap(g=>g.matches(".header-end, .header-end-measurement, .menu-toggle")?[]:g instanceof HTMLSlotElement?g.assignedElements():[g]).filter(g=>getComputedStyle(g).display!=="none");let u=c.reduce((g,N)=>{const $=getComputedStyle(N);return g+N.getBoundingClientRect().width+(parseFloat($.marginLeft)||0)+(parseFloat($.marginRight)||0)},0);const E=this.endProbe.value?.getBoundingClientRect().width??0,m=h&&parseFloat(getComputedStyle(h).columnGap)||0;u+=m*Math.max(0,c.length-1+(E>0?1:0));const y=this.menu.getHeaderNavigationWidths().main,w=E+u,_=this.layout==="extended"?y>r||d+w+n>r:this.layout==="extended-centered"?y>r||d+2*w+2*n>r:this.layout==="centered-brand"?d+2*Math.max(y,w)+2*n>r:d+y+w+2*n>r,C=this.getExternalDrawerTarget()?h?.querySelector(".menu-toggle"):null,O=u+(C&&getComputedStyle(C).display!=="none"?C.getBoundingClientRect().width+(c.length||E?m:0):0);return{width:r,brandWidth:d,main:y,endWidth:E,actions:u,actionFloor:O,gap:n,tooWide:_}}syncMenuLayout(){if(this.syncBrandFitWidth(),!this.menuContainer.value||!this.menu||!this.menu.getWidth)return;this.positionPromotedToggle();const e=this.menu.getWidth();e>0&&(this.lastInlineMenuWidth=e);const t=this.lastInlineMenuWidth||e,r=this.getExternalDrawerTarget(),n=this.menuDisplay!=="inline",s=this.showBurger||this.menuDisplay==="drawer"||this.layout==="minimal"||this.previewCollapseRequested,i=n&&this.menuDisplay==="auto",d=i?this.layout==="centered-menu"?this.centeredMenuCapacity():this.menuContainer.value.clientWidth:0,h=this.usesIntrinsicNavigation?this.readHeaderEndFit():null;h&&this.actionsWidth!==h.actionFloor&&(this.actionsWidth=h.actionFloor,this.requestUpdate()),this.menuTooLarge=i&&(h?h.tooWide:t>d);const c=n&&!r&&this.hasDrawerableContent()&&(this.menuTooLarge||s||this.mobileMenu);c&&this.returnEndFocusToBurger(),this.menu.sliding=c,this.navigationConstrained=h?.tooWide??!1}centeredMenuCapacity(){const e=this.menuContainer.value?.parentElement;if(!(e instanceof HTMLElement))return 0;const t=d=>d?d.getBoundingClientRect().width:0,r=getComputedStyle(e),n=e.clientWidth-(Number.parseFloat(r.paddingLeft)||0)-(Number.parseFloat(r.paddingRight)||0),s=e.querySelector(":scope > section.brand"),i=e.querySelector(":scope > section.buttons");return n-t(s)-t(i)+t(i?.querySelector("esp-header-button.menu-toggle"))}menuHasContent(){return!!(this.menu??this.querySelector(':scope > [slot="menu"]'))?.querySelector("esp-menu-item, esp-menu-group")}hasDrawerableContent(){return this.showBurger||!!this.getExternalDrawerTarget()||this.menuHasContent()}getExternalDrawerTarget(){if(!this.drawerTarget)return null;const e=document.getElementById(this.drawerTarget);return e===this.menu?null:e&&"openDrawer"in e&&typeof e.openDrawer=="function"&&"closeDrawer"in e&&typeof e.closeDrawer=="function"?e:null}getBurgerFocusTarget(){const t=this.shadowRoot?.querySelector("esp-header-button.menu-toggle")?.shadowRoot?.querySelector("button"),r=this.menuButton.value?.shadowRoot?.querySelector("button");return t??r??null}getScrollTokens(){const e=this.scrollBehavior.split(/\s+/).map(t=>t.trim().toLowerCase()).filter(Boolean);return new Set(e.filter(t=>t!=="none"))}getEffectiveScrollThreshold(){return Number.isFinite(this.scrollThreshold)?Math.max(0,this.scrollThreshold):0}clearScrollState(){this.geometry.requestScroll(0,!1,!1,this.getEffectiveScrollThreshold(),!1),this.scrolled=!1,this.hiddenByScroll=!1,this.scrollProgress=0}runScrollStateUpdate(e=!1){const t=this.getScrollTokens();if(!t.size){e||this.clearScrollState();return}const r=Math.max(0,window.scrollY||document.documentElement.scrollTop||0),n=this.getEffectiveScrollThreshold(),s=Number.isFinite(this.dockOffset)?Math.max(0,this.dockOffset):n,i=r>(t.has("dock")?s:n),d=r>this.lastScrollY,h=t.has("reveal")&&d&&r>n&&!this.menuOpen;if(this.geometry.requestScroll(r,t.has("compact"),t.has("collapse-topbar")&&i,n,this.headerOverlayHeld||this.keyboardFocusHeld||this.pointerActivation!==null),!e){if(this.scrolled=i,this.hiddenByScroll=h,t.has("progress")){const c=document.documentElement,u=Math.max(1,c.scrollHeight-window.innerHeight);this.scrollProgress=Math.min(1,r/u)}else this.scrollProgress=0;this.lastScrollY=r}}cancelScrollUpdate(){this.scrollFrame.cancel()}syncScrollListeners(){const e=this.getScrollTokens().size>0;if(e&&!this.scrollListenersAttached?(window.addEventListener("scroll",this.updateScrollState,{passive:!0}),window.addEventListener("resize",this.updateScrollState,{passive:!0}),this.scrollListenersAttached=!0):!e&&this.scrollListenersAttached&&this.removeScrollListeners(),e){this.updateScrollState();return}this.cancelScrollUpdate(),this.clearScrollState()}removeScrollListeners(){this.scrollListenersAttached&&(window.removeEventListener("scroll",this.updateScrollState),window.removeEventListener("resize",this.updateScrollState),this.scrollListenersAttached=!1)}addMenuDrawerListeners(){!this.menu||this.menuDrawerListenersAttached||(this.menu.addEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.menu.addEventListener("esp-menu-drawer-presented",this.onMenuDrawerPresented),this.menu.addEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.menuDrawerListenersAttached=!0)}removeMenuDrawerListeners(){!this.menu||!this.menuDrawerListenersAttached||(this.menu.removeEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.menu.removeEventListener("esp-menu-drawer-presented",this.onMenuDrawerPresented),this.menu.removeEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.menuDrawerListenersAttached=!1)}observeMenuContainer(){if(!this.menuContainer.value||this.observingMenuContainer)return;this.resizeObserver.observe(this.menuContainer.value);const e=this.menuContainer.value.parentElement;if(e){this.resizeObserver.observe(e);for(const t of e.querySelectorAll(":scope > section.brand, :scope > section.buttons, :scope > .brand-fit-probe"))this.resizeObserver.observe(t)}this.observingMenuContainer=!0}disconnectResizeObserver(){this.observingMenuContainer&&(this.resizeObserver.disconnect(),this.observingMenuContainer=!1)}observeMenuChildren(){if(this.usesIntrinsicNavigation){this.menuChildObserver?.disconnect(),this.menuChildObserver=null;return}!this.menu||this.menuChildObserver||(this.menuChildObserver=new MutationObserver(()=>{this.syncMenuLayout(),this.requestUpdate()}),this.menuChildObserver.observe(this.menu,{childList:!0,subtree:!0}))}syncMobileMenuQuery(){if("matchMedia"in window){if(!this.mobileMenuQuery){this.mobileMenuQuery=window.matchMedia(de),this.mobileMenu=this.mobileMenuQuery.matches,this.mobileMenuQuery.addEventListener("change",this.handleMobileMenuQueryChange);return}this.mobileMenu=this.mobileMenuQuery.matches}}syncExternalDrawerTarget(){const e=this.getExternalDrawerTarget(),t=e===this.menu?null:e;t!==this.externalDrawerTarget&&(this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.externalDrawerTarget instanceof T&&(this.externalDrawerTarget.hasExternalDrawerControl=!1),this.externalDrawerTarget=t,this.externalDrawerTarget?.addEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.externalDrawerTarget?.addEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed)),this.syncExternalDrawerControl()}burgerVisibleForTarget(){if(this.menuDisplay==="inline")return!1;const e=this.showBurger||this.menuDisplay==="drawer"||this.layout==="minimal"||this.previewCollapseRequested;return this.menuTooLarge||this.mobileMenu||e}syncExternalDrawerControl(){this.externalDrawerTarget instanceof T&&(this.externalDrawerTarget.hasExternalDrawerControl=this.burgerVisibleForTarget())}openNav(){const e=this.getBurgerFocusTarget(),t=this.getExternalDrawerTarget();if(this.burger&&(this.burger.menuOpen=!0),t){this.menuOpen=!0,t.openDrawer(e),document.body.classList.add("menu-open");return}if(this.menu){this.menu.sliding=!0,this.menuOpen=!0,this.menu.isFullScreenDrawer&&this.canPromoteMenuToggle()&&(this.menu.liftedCloseControl=this.getMenuToggleElement()),this.menu.openDrawer(e),document.body.classList.add("menu-open");return}this.burger&&(this.burger.menuOpen=!1)}closeNav(){this.menuOpen=!1,this.burger&&(this.burger.menuOpen=!1),this.demoteMenuToggle();const e=this.getExternalDrawerTarget();if(e){e.closeDrawer(),document.body.classList.remove("menu-open");return}this.menu&&(this.menu.closeDrawer(),document.body.classList.remove("menu-open"))}getMenuToggleElement(){return this.shadowRoot?.querySelector("esp-header-button.menu-toggle")??null}canPromoteMenuToggle(){const e=this.getMenuToggleElement();return!!e&&typeof e?.showPopover=="function"}setHeaderChromeInert(e){if(!e){for(const i of this.inertedHeaderChrome)i.inert=!1;this.inertedHeaderChrome=[];return}const t=this.menuContainer.value?.parentElement,r=this.getMenuToggleElement();if(!t||!r)return;const n=[];for(const i of t.querySelectorAll(":scope > section.brand, :scope > section.topbar"))n.push(i);const s=t.querySelector(":scope > section.buttons");for(const i of s?.children??[])if(!(!(i instanceof HTMLElement)||i===r)){if(i instanceof HTMLSlotElement){for(const d of i.assignedElements())d instanceof HTMLElement&&n.push(d);continue}n.push(i)}for(const i of n)i.inert||(i.inert=!0,this.inertedHeaderChrome.push(i))}promoteMenuToggle(){const e=this.getMenuToggleElement();if(!e||this.menuTogglePromoted||typeof e.showPopover!="function")return;const t=e.getBoundingClientRect();e.setAttribute("popover","manual"),Object.assign(e.style,{position:"fixed",inset:"auto",margin:"0",padding:"0",border:"0",background:"transparent",overflow:"visible"}),this.setPromotedTogglePosition(e,t.width);try{e.showPopover()}catch{e.removeAttribute("popover"),e.removeAttribute("style"),this.menu&&(this.menu.liftedCloseControl=null);return}this.menuTogglePromoted=!0,window.addEventListener("resize",this.handlePromotedViewportResize),this.menu&&(this.menu.liftedCloseControl=e),this.setHeaderChromeInert(!0)}positionPromotedToggle(){if(!this.menuTogglePromoted)return;const e=this.getMenuToggleElement();if(!e)return;const t=e.getBoundingClientRect();this.setPromotedTogglePosition(e,t.width)}setPromotedTogglePosition(e,t){const r=ne(),n=getComputedStyle(e).direction==="rtl";e.style.left=`${n?0:Math.max(0,r.width-t)}px`,e.style.top="0px"}demoteMenuToggle(){if(window.removeEventListener("resize",this.handlePromotedViewportResize),this.promotedToggleFrame.cancel(),this.menu?.liftedCloseControl&&(this.menu.liftedCloseControl=null),!this.menuTogglePromoted)return;this.menuTogglePromoted=!1,this.setHeaderChromeInert(!1);const e=this.getMenuToggleElement();if(e){try{e.hidePopover()}catch{}e.removeAttribute("popover"),e.removeAttribute("style")}}syncDrawerBrand(){if(!this.menu)return;const e=this.resolveBrand(),t=e.brandLogo||this.brandText?{brandLogo:e.brandLogo,brandText:this.brandText,brandHref:this.brandHref,brandAlt:this.brandAlt,brandColor:e.brandColor}:null,r=JSON.stringify(t);r!==this.lastDrawerBrandKey&&(this.lastDrawerBrandKey=r,this.menu.drawerBrand=t)}get burger(){return this.menuButton.value??void 0}willUpdate(e){super.willUpdate(e),j.has(this.heightMultiplier)||(this.heightMultiplier=1),j.has(this.minHeightMultiplier)||(this.minHeightMultiplier=1),k.allowedValues.has(this.compactSize)||(this.compactSize=k.defaultValue),["heightMultiplier","minHeightMultiplier","compactSize","compactBrandLogo","lightCompactBrandLogo","darkCompactBrandLogo"].some(t=>e.has(t))&&this.geometry.configure(),["scheme","brandLogo","lightBrandLogo","darkBrandLogo","compactBrandLogo","lightCompactBrandLogo","darkCompactBrandLogo"].some(t=>e.has(t))&&(this.readyCompactLogo=""),e.has("layout")&&!M.allowedValues.has(this.layout)&&(this.layout=M.defaultValue),e.has("brandAlign")&&!D.allowedValues.has(this.brandAlign)&&(this.brandAlign=D.defaultValue),e.has("brandWrap")&&!B.allowedValues.has(this.brandWrap)&&(this.brandWrap=B.defaultValue),e.has("menuDisplay")&&!z.allowedValues.has(this.menuDisplay)&&(this.menuDisplay=z.defaultValue),e.has("themeToggle")&&!P.allowedValues.has(this.themeToggle)&&(this.themeToggle=P.defaultValue)}firstUpdated(e){super.firstUpdated(e),this.shadowRoot?.addEventListener("load",this.syncCompactLogoReadiness,!0),this.shadowRoot?.addEventListener("error",this.syncCompactLogoReadiness,!0),this.menuContainer.value&&(this.syncPrimaryMenu(),this.observeMenuContainer(),this.syncExternalDrawerTarget(),this.syncMobileMenuQuery(),this.syncScrollListeners(),this.syncMenuLayout())}updated(e){super.updated(e),this.syncCompactLogoReadiness(),this.syncDrawerBrand(),this.syncEndProbeObserver(),(e.has("scheme")||e.has("layout")||e.has("brandLogo")||e.has("brandText")||e.has("lightBrandLogo")||e.has("darkBrandLogo"))&&this.geometry.invalidate(),(!e.size||[...e.keys()].some(t=>t!=="scrollProgress"&&t!=="hiddenByScroll"))&&this.geometry.measure(),this.observeMenuChildren(),(e.has("showBurger")||e.has("drawerTarget")||e.has("menuDisplay")||e.has("layout")||e.has("previewCollapseRequested"))&&(this.syncExternalDrawerTarget(),this.syncMenuLayout()),(e.has("mobileMenu")||e.has("menuTooLarge"))&&this.syncExternalDrawerControl(),e.has("scrollBehavior")?this.syncScrollListeners():(e.has("scrollThreshold")||e.has("dockOffset"))&&this.updateScrollState()}connectedCallback(){super.connectedCallback(),this.geometry.connect(),this.shadowRoot?.addEventListener("load",this.syncCompactLogoReadiness,!0),this.shadowRoot?.addEventListener("error",this.syncCompactLogoReadiness,!0),this.addEventListener(x.POPOVER_OPENED,this.onHeaderPopoverOpened),this.addEventListener(x.POPOVER_CLOSED,this.onHeaderPopoverClosed),this.addEventListener(x.MENU_GROUP_TOGGLE,this.onHeaderGroupToggle),this.addEventListener("keydown",this.onGeometryKeyboard),this.addEventListener("pointerdown",this.onGeometryPointer,!0),this.addEventListener("dragstart",this.onGeometryDrag,!0),window.addEventListener("pointerup",this.onGeometryPointerEnd,!0),window.addEventListener("pointercancel",this.onGeometryPointerEnd,!0),window.addEventListener("click",this.onGeometryClick,!0),window.addEventListener("blur",this.onGeometryBlur),this.addEventListener("focusin",this.onGeometryFocus),this.addEventListener("focusout",this.onGeometryFocusOut),this.addEventListener("slotchange",this.onGeometryContentChanged),this.syncScrollListeners(),this.syncMobileMenuQuery(),this.addMenuDrawerListeners(),this.syncExternalDrawerTarget(),this.observeMenuContainer(),this.hasUpdated&&this.syncPrimaryMenu(),this.observeMenuChildren()}disconnectedCallback(){this.geometry.disconnect(),this.shadowRoot?.removeEventListener("load",this.syncCompactLogoReadiness,!0),this.shadowRoot?.removeEventListener("error",this.syncCompactLogoReadiness,!0),this.readyCompactLogo="",this.removeEventListener(x.POPOVER_OPENED,this.onHeaderPopoverOpened),this.removeEventListener(x.POPOVER_CLOSED,this.onHeaderPopoverClosed),this.removeEventListener(x.MENU_GROUP_TOGGLE,this.onHeaderGroupToggle),this.openHeaderPopovers.clear(),this.pointerActivation=null,this.keyboardFocusHeld=!1,this.pointerFocusPending=!1,this.removeEventListener("keydown",this.onGeometryKeyboard),this.removeEventListener("pointerdown",this.onGeometryPointer,!0),this.removeEventListener("dragstart",this.onGeometryDrag,!0),window.removeEventListener("pointerup",this.onGeometryPointerEnd,!0),window.removeEventListener("pointercancel",this.onGeometryPointerEnd,!0),window.removeEventListener("click",this.onGeometryClick,!0),window.removeEventListener("blur",this.onGeometryBlur),this.removeEventListener("focusin",this.onGeometryFocus),this.removeEventListener("focusout",this.onGeometryFocusOut),this.removeEventListener("slotchange",this.onGeometryContentChanged),this.menu?.removeEventListener(S,this.onPrimaryPresentationChanged),this.menu?.removeEventListener(R,this.onPrimaryLayoutChanged),this.menu&&(this.menu.headerEndOwner=null),this.removeMenuDrawerListeners(),this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-opened",this.onMenuDrawerOpened),this.externalDrawerTarget?.removeEventListener("esp-menu-drawer-closed",this.onMenuDrawerClosed),this.externalDrawerTarget instanceof T&&(this.externalDrawerTarget.hasExternalDrawerControl=!1),this.externalDrawerTarget=null,this.mobileMenuQuery?.removeEventListener("change",this.handleMobileMenuQueryChange),this.mobileMenuQuery=null,this.removeScrollListeners(),this.cancelScrollUpdate(),this.disconnectResizeObserver(),this.endProbeObserver?.disconnect(),this.observedEndProbe=null,this.menuChildObserver?.disconnect(),this.menuChildObserver=null,this.demoteMenuToggle(),super.disconnectedCallback()}renderHeaderEnd(e,t,r){return b`<nav
|
|
8
8
|
class=${W({"header-end":!t,"header-end-probe":t})}
|
|
9
9
|
${t?H(this.endProbe):p}
|
|
10
10
|
aria-label=${t?p:`${this.menu?.ariaLabel??"Navigation"} links`}
|
|
11
11
|
aria-hidden=${t?"true":p}
|
|
12
12
|
?hidden=${r}
|
|
13
13
|
?inert=${t||r}
|
|
14
|
-
style=${
|
|
14
|
+
style=${ee(this.menu)}
|
|
15
15
|
>
|
|
16
|
-
${e.map(n=>
|
|
16
|
+
${e.map(n=>te(n,{mode:"horizontal",sourceStyle:!0}))}
|
|
17
17
|
</nav>`}render(){const{menuOpen:e,menuTooLarge:t,mobileMenu:r}=this,n=this.menuDisplay!=="inline",s=n&&(this.showBurger||this.menuDisplay==="drawer"||this.layout==="minimal"||this.previewCollapseRequested),i=this.getScrollTokens(),d=i.has("progress"),h=this.resolveBrand(),c={"--_esp-header-brand-color":h.brandColor||null,"--_esp-header-scroll-progress":String(this.scrollProgress),"--_esp-header-actions-width":`${this.actionsWidth}px`,"--_esp-header-height-multiplier":String(this.geometry.multiplier),"--_esp-header-min-height-multiplier":String(this.geometry.minimumMultiplier),"--_esp-header-scroll-row-size":this.geometry.scrollDriven?`${this.geometry.primarySize}px`:null,"--_esp-header-collapse-progress":String(this.geometry.progress),"--_esp-header-own-menu-offset":this.geometry.active?`${this.geometry.record.visibleBlockSize}px`:null},u=this.compactLogoSource,E=this.geometry.compact&&u&&this.readyCompactLogo===u,m=this.menu?.headerEndNodes??[],y=!m.length||!!this.menu?.headerDrawerActive,w=!!this.menu?.headerDrawerActive,_=this.menuDisplay==="inline"||this.usesIntrinsicNavigation&&!w&&!!this.getExternalDrawerTarget(),C={"primary-drawer":w,"has-header-end":m.length>0,"explicit-inline":_,"navigation-constrained":this.navigationConstrained,"menu-open":e,"too-wide":n&&this.hasDrawerableContent()&&(t||r||s),[`layout-${this.layout==="minimal"&&_?"standard":this.layout}`]:!0,"is-scrolled":this.scrolled,"geometry-topbar-collapsed":this.geometry.topbarCollapsed,"geometry-active":this.geometry.active,"scaled-header":this.heightMultiplier>1,"geometry-compact":this.geometry.compact,"geometry-scroll-driven":this.geometry.scrollDriven,"geometry-complete":this.geometry.complete,"geometry-tall-chrome":this.geometry.tallChrome,"geometry-standard":this.geometry.standard,"geometry-initial":this.geometry.pending,"hide-on-scroll":this.hiddenByScroll,"scroll-compact":i.has("compact"),"scroll-elevate":i.has("elevate"),"scroll-transparent":i.has("transparent")||i.has("transparent-to-solid"),"scroll-collapse-topbar":i.has("collapse-topbar")};this.toggleAttribute("data-esp-compact",this.geometry.compact);const O=this.scheme==="dark"?"light":"dark";return b`
|
|
18
|
-
<header class=${W(C)} style=${
|
|
18
|
+
<header class=${W(C)} style=${J(c)}>
|
|
19
19
|
<section class="topbar">
|
|
20
20
|
<slot name="topbar" @slotchange=${this.onGeometryContentChanged}></slot>
|
|
21
21
|
</section>
|
|
@@ -68,7 +68,7 @@ var a=function(f,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnP
|
|
|
68
68
|
</div>
|
|
69
69
|
${d?b`<div class="scroll-progress" aria-hidden="true"></div>`:p}
|
|
70
70
|
</header>
|
|
71
|
-
`}};o.styles=[...V.styles,
|
|
71
|
+
`}};o.styles=[...V.styles,X,Y(2,"header"),oe,I`
|
|
72
72
|
:host {
|
|
73
73
|
--_esp-header-base-height: var(--esp-header-height, calc(4.5 * var(--esp-size-small)));
|
|
74
74
|
--_esp-header-current-height: var(--_esp-header-base-height);
|
|
@@ -219,7 +219,7 @@ var a=function(f,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnP
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
a.configured-brand:focus-visible {
|
|
222
|
-
${
|
|
222
|
+
${re}
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.brand-logo {
|
|
@@ -671,7 +671,7 @@ var a=function(f,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnP
|
|
|
671
671
|
:host([data-esp-geometry-transaction]) header,
|
|
672
672
|
:host([data-esp-geometry-transaction]) header > section,
|
|
673
673
|
:host([data-esp-geometry-transaction]) header .brand-logo {
|
|
674
|
-
transition-property: ${
|
|
674
|
+
transition-property: ${K(ae.join(", "))} !important;
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
:host([data-esp-geometry-measuring]) header.geometry-active {
|
|
@@ -796,4 +796,4 @@ var a=function(f,e,t,r){var n=arguments.length,s=n<3?e:r===null?r=Object.getOwnP
|
|
|
796
796
|
transition: none;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
`],a([v()],o.prototype,"menuOpen",void 0),a([v()],o.prototype,"navigationConstrained",void 0),a([v()],o.prototype,"menuTooLarge",void 0),a([v()],o.prototype,"mobileMenu",void 0),a([v()],o.prototype,"scrolled",void 0),a([v()],o.prototype,"hiddenByScroll",void 0),a([v()],o.prototype,"scrollProgress",void 0),a([l({attribute:"show-burger",type:Boolean})],o.prototype,"showBurger",void 0),a([l({converter:M.converter,reflect:!0})],o.prototype,"layout",void 0),a([l({attribute:"brand-text",type:String})],o.prototype,"brandText",void 0),a([l({attribute:"brand-logo",type:String})],o.prototype,"brandLogo",void 0),a([l({attribute:"light-brand-logo",type:String})],o.prototype,"lightBrandLogo",void 0),a([l({attribute:"dark-brand-logo",type:String})],o.prototype,"darkBrandLogo",void 0),a([l({attribute:"compact-brand-logo",type:String})],o.prototype,"compactBrandLogo",void 0),a([l({attribute:"light-compact-brand-logo",type:String})],o.prototype,"lightCompactBrandLogo",void 0),a([l({attribute:"dark-compact-brand-logo",type:String})],o.prototype,"darkCompactBrandLogo",void 0),a([l({attribute:"height-multiplier",type:Number,reflect:!0})],o.prototype,"heightMultiplier",void 0),a([l({attribute:"min-height-multiplier",type:Number,reflect:!0})],o.prototype,"minHeightMultiplier",void 0),a([l({attribute:"compact-size",converter:k.converter,reflect:!0})],o.prototype,"compactSize",void 0),a([l({attribute:"brand-href",type:String})],o.prototype,"brandHref",void 0),a([l({attribute:"brand-alt",type:String})],o.prototype,"brandAlt",void 0),a([l({attribute:"brand-color",type:String})],o.prototype,"brandColor",void 0),a([l({attribute:"light-brand-color",type:String})],o.prototype,"lightBrandColor",void 0),a([l({attribute:"dark-brand-color",type:String})],o.prototype,"darkBrandColor",void 0),a([l({attribute:"brand-align",converter:D.converter,reflect:!0})],o.prototype,"brandAlign",void 0),a([l({attribute:"brand-wrap",converter:B.converter,reflect:!0})],o.prototype,"brandWrap",void 0),a([l({attribute:"menu-display",converter:z.converter,reflect:!0})],o.prototype,"menuDisplay",void 0),a([l({attribute:"theme-toggle",converter:P.converter,reflect:!0})],o.prototype,"themeToggle",void 0),a([l({attribute:"scroll-behavior",type:String})],o.prototype,"scrollBehavior",void 0),a([l({attribute:"scroll-threshold",type:Number})],o.prototype,"scrollThreshold",void 0),a([l({attribute:"dock-offset",type:Number})],o.prototype,"dockOffset",void 0),a([l({attribute:"drawer-target",type:String})],o.prototype,"drawerTarget",void 0),a([l({attribute:!1})],o.prototype,"previewCollapseRequested",void 0),a([l({attribute:"full-bleed-content",type:Boolean,reflect:!0})],o.prototype,"fullBleedContent",void 0),a([v()],o.prototype,"readyCompactLogo",void 0),o=a([
|
|
799
|
+
`],a([v()],o.prototype,"menuOpen",void 0),a([v()],o.prototype,"navigationConstrained",void 0),a([v()],o.prototype,"menuTooLarge",void 0),a([v()],o.prototype,"mobileMenu",void 0),a([v()],o.prototype,"scrolled",void 0),a([v()],o.prototype,"hiddenByScroll",void 0),a([v()],o.prototype,"scrollProgress",void 0),a([l({attribute:"show-burger",type:Boolean})],o.prototype,"showBurger",void 0),a([l({converter:M.converter,reflect:!0})],o.prototype,"layout",void 0),a([l({attribute:"brand-text",type:String})],o.prototype,"brandText",void 0),a([l({attribute:"brand-logo",type:String})],o.prototype,"brandLogo",void 0),a([l({attribute:"light-brand-logo",type:String})],o.prototype,"lightBrandLogo",void 0),a([l({attribute:"dark-brand-logo",type:String})],o.prototype,"darkBrandLogo",void 0),a([l({attribute:"compact-brand-logo",type:String})],o.prototype,"compactBrandLogo",void 0),a([l({attribute:"light-compact-brand-logo",type:String})],o.prototype,"lightCompactBrandLogo",void 0),a([l({attribute:"dark-compact-brand-logo",type:String})],o.prototype,"darkCompactBrandLogo",void 0),a([l({attribute:"height-multiplier",type:Number,reflect:!0})],o.prototype,"heightMultiplier",void 0),a([l({attribute:"min-height-multiplier",type:Number,reflect:!0})],o.prototype,"minHeightMultiplier",void 0),a([l({attribute:"compact-size",converter:k.converter,reflect:!0})],o.prototype,"compactSize",void 0),a([l({attribute:"brand-href",type:String})],o.prototype,"brandHref",void 0),a([l({attribute:"brand-alt",type:String})],o.prototype,"brandAlt",void 0),a([l({attribute:"brand-color",type:String})],o.prototype,"brandColor",void 0),a([l({attribute:"light-brand-color",type:String})],o.prototype,"lightBrandColor",void 0),a([l({attribute:"dark-brand-color",type:String})],o.prototype,"darkBrandColor",void 0),a([l({attribute:"brand-align",converter:D.converter,reflect:!0})],o.prototype,"brandAlign",void 0),a([l({attribute:"brand-wrap",converter:B.converter,reflect:!0})],o.prototype,"brandWrap",void 0),a([l({attribute:"menu-display",converter:z.converter,reflect:!0})],o.prototype,"menuDisplay",void 0),a([l({attribute:"theme-toggle",converter:P.converter,reflect:!0})],o.prototype,"themeToggle",void 0),a([l({attribute:"scroll-behavior",type:String})],o.prototype,"scrollBehavior",void 0),a([l({attribute:"scroll-threshold",type:Number})],o.prototype,"scrollThreshold",void 0),a([l({attribute:"dock-offset",type:Number})],o.prototype,"dockOffset",void 0),a([l({attribute:"drawer-target",type:String})],o.prototype,"drawerTarget",void 0),a([l({attribute:!1})],o.prototype,"previewCollapseRequested",void 0),a([l({attribute:"full-bleed-content",type:Boolean,reflect:!0})],o.prototype,"fullBleedContent",void 0),a([v()],o.prototype,"readyCompactLogo",void 0),o=a([Z("esp-header")],o);export{o as EspalierHeader};
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./radio-button/esp-radio-button.js";
|
|
|
11
11
|
export * from "./radio-button/esp-radio-button-group.js";
|
|
12
12
|
export * from "./repeater/esp-repeater.js";
|
|
13
13
|
export * from "./breadcrumbs/esp-breadcrumbs.js";
|
|
14
|
+
export * from "./breadcrumbs/breadcrumb-separators.js";
|
|
14
15
|
export * from "./button/esp-button.js";
|
|
15
16
|
export * from "./button/esp-button-group.js";
|
|
16
17
|
export * from "./color-picker/esp-color-picker.js";
|
|
@@ -76,13 +77,13 @@ export * from "./shared/events.js";
|
|
|
76
77
|
export { getImageDetails, releasePreviewUrl, type EspalierUploadImage, type ImageDetailsOptions, type ImagePreviewAction, type SelectedUploadImage, type ExistingUploadImage, type ExistingImage, type ResponsiveImageUrl, type UploadCallbacks, type UploadEventDetail, } from "./image-upload/image-helpers.js";
|
|
77
78
|
export { calculateAlbumLayout, DEFAULT_ALBUM_MAX_ROW_HEIGHT_VH, normalizeAlbumMaxRowHeightVh, normalizeMaxImagesPerRow, type AlbumLayoutItem, type AlbumLayoutOptions, type AlbumLayoutRow, type LayoutImage, } from "./shared/justified-layout.js";
|
|
78
79
|
export { type TypeaheadFetchItems } from "./pickers/types.js";
|
|
79
|
-
export { type EspalierTheme, type LightnessKey, type LightnessReference, type PartialTheme, type PartialThemeContexts, type PartialThemeTones, type ThemeContext, type ThemeContexts, type ThemeTones, type ToneReference, type VariantColorSource, encodeTheme, parseTheme, mergePartials, layerThemes, validateThemePair, resolveContextTheme, isObjectRecord, isSemanticColorName, buildTaprootLightTheme, buildTaprootDarkTheme, NESTED_THEME_KEYS, } from "./shared/theme.js";
|
|
80
|
+
export { type ComponentPropertyFinding, type EspalierTheme, type LightnessKey, type LightnessReference, type PartialTheme, type PartialThemeContexts, type PartialThemeTones, type ThemeContext, type ThemeContexts, type ThemeTones, type ToneReference, type VariantColorSource, encodeTheme, parseTheme, mergePartials, layerThemes, validateComponentProperties, validateThemePair, resolveContextTheme, isObjectRecord, isSemanticColorName, buildTaprootLightTheme, buildTaprootDarkTheme, NESTED_THEME_KEYS, } from "./shared/theme.js";
|
|
80
81
|
export { auditDataPalette, describePaletteCollision, generateSequentialRamp, generateDivergingRamp, COLOR_VISION_SIMULATIONS, DATA_SERIES_KEYS, DEFAULT_DATA_PALETTE, DEFAULT_DATA_RAMP_STEPS, DEFAULT_DIVERGING_NEUTRAL, MAX_DATA_RAMP_STEPS, MIN_DATA_COLOR_DISTANCE, MIN_DATA_RAMP_LIGHTNESS_STEP, MIN_DATA_RAMP_STEPS, type ColorVisionSimulation, type DataPalette, type DataPaletteIssue, type DataRamp, type DataRamps, type DataSeriesKey, type DivergingDataRamp, type DivergingRampOptions, type PartialDataRamp, type PartialDataRamps, type SequentialDataRamp, type SequentialRampOptions, } from "./shared/data-colors.js";
|
|
81
82
|
export { canonicalFontStack, classifyFontStack, customWebSafeFont, isDeviceFontStack, matchWebSafeFont, parseFontStack, webSafeFontWeights, } from "./shared/font-stacks.js";
|
|
82
83
|
export { WEIGHT_LABELS, extractWeights, normalizeWeight, bestAvailableWeight, extractFamily, getFallbackFont, googleFontStylesheetUrl, isLocalFontFamily, normalizeFontFaceWeight, removeRuntimeGoogleFontLink, removeRuntimeGoogleFontLinks, syncRuntimeGoogleFontLink, RUNTIME_GOOGLE_FONT_OWNER_ATTR, type RuntimeGoogleFontLinkOptions, } from "./shared/font-helpers.js";
|
|
83
84
|
export { compileFontPlan, fontFallbackAliases, fontFallbackBaseIndexes, fontFaceRequestKey, type CompileFontPlanOptions, type CompiledFontPlan, type FontFaceRequest, type FontFallbackCatalog, type FontFallbackProfile, type FontPlanProfileMiss, type FontPlanScheme, type FontPlanSlot, type FontPlanStyle, type FontPlanTheme, type ResolvedFontSource, } from "./shared/font-plan.js";
|
|
84
85
|
export { getGoogleFonts } from "./font-picker/esp-font-picker.js";
|
|
85
|
-
export { ROOT_SURFACE, THEME_FIT_ANCHOR_FIELDS, THEME_FIT_APCA_FIELDS, THEME_FIT_DATA_PALETTE_LINT_FIELDS, THEME_FIT_DATA_PALETTE_LINT_IDS, THEME_FIT_EXPLICIT_VALUES, THEME_FIT_LINT_FIELDS, THEME_FIT_LINT_IDS, THEME_FIT_LINT_SEVERITIES, THEME_FIT_PAIRING_VALUES, THEME_FIT_REPORT_FIELDS, THEME_FIT_SUITE_FIELDS, THEME_FIT_TOKEN_FIELDS, themeFitReport, themeFitRows, themeFitLints, themeFitReportSuite, printThemeFitReport, type ThemeFitReport, type ThemeFitReportOptions, type ThemeFitToken, type ThemeFitApcaAction, type ThemeFitAnchor, type ThemeFitRow, type ThemeFitLint, type ThemeFitDataPaletteLint, type ThemeFitFieldDescriptor, type ThemeFitFieldKind, type ThemeFitSurfaceReport, type ThemeFitSuite, type ThemeFitSuiteOptions, } from "./shared/theme-fit-report.js";
|
|
86
|
+
export { ROOT_SURFACE, THEME_FIT_ANCHOR_FIELDS, THEME_FIT_APCA_FIELDS, THEME_FIT_COMPONENT_APCA_FIELDS, THEME_FIT_COMPONENT_PROPERTY_FIELDS, THEME_FIT_DATA_PALETTE_LINT_FIELDS, THEME_FIT_DATA_PALETTE_LINT_IDS, THEME_FIT_EXPLICIT_VALUES, THEME_FIT_LINT_FIELDS, THEME_FIT_LINT_IDS, THEME_FIT_LINT_SEVERITIES, THEME_FIT_PAIRING_VALUES, THEME_FIT_REPORT_FIELDS, THEME_FIT_SUITE_FIELDS, THEME_FIT_TOKEN_FIELDS, themeFitReport, themeFitRows, themeFitLints, themeFitReportSuite, printThemeFitReport, type ThemeFitReport, type ThemeFitReportOptions, type ThemeFitToken, type ThemeFitApcaAction, type ThemeFitComponentApca, type ThemeFitComponentProperty, type ThemeFitAnchor, type ThemeFitRow, type ThemeFitLint, type ThemeFitDataPaletteLint, type ThemeFitFieldDescriptor, type ThemeFitFieldKind, type ThemeFitSurfaceReport, type ThemeFitSuite, type ThemeFitSuiteOptions, } from "./shared/theme-fit-report.js";
|
|
86
87
|
export type { PaintFitPair, PaintFitReport, PaintFitSurface, PaintFitSurfaceReport, PaintScheme, } from "./shared/paint-types.js";
|
|
87
88
|
export { ICON_SPRITE, ICON_SPRITE_ID, installIconSprite } from "./icons/index.js";
|
|
88
89
|
export { deriveLightnessRamp, themeFromSwatches, type ThemeFromSwatchesOptions, type ThemeFromSwatchesResult, } from "./shared/theme-swatches.js";
|