@taprootio/espalier 6.15.1 → 7.0.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.
@@ -3,13 +3,13 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
3
3
  * A layout-only column for creator-controlled link-group stacking inside
4
4
  * [`<esp-footer>`](/components/footer/).
5
5
  *
6
- * Use bare `esp-footer-link-group` children when groups should auto-flow
7
- * independently through the footer grid. Wrap ordered groups in
8
- * `esp-footer-column` when they must remain together as one grid item:
6
+ * Use bare `esp-footer-link-group` children when each group should occupy
7
+ * one track in the footer row. Wrap ordered groups in
8
+ * `esp-footer-column` when they must remain together as one region. Set `span="2"` for two tracks:
9
9
  *
10
10
  * ```html
11
- * <esp-footer columns="3">
12
- * <esp-footer-column>
11
+ * <esp-footer brand-span="2">
12
+ * <esp-footer-column span="2">
13
13
  * <esp-footer-link-group heading="Product">
14
14
  * <a href="/features">Features</a>
15
15
  * <a href="/pricing">Pricing</a>
@@ -28,7 +28,7 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
28
28
  *
29
29
  * @customElement esp-footer-column
30
30
  * @slot - Ordered `esp-footer-link-group` children belonging to this column.
31
- * @cssprop --esp-footer-row-gap - Vertical gap between footer grid rows and
31
+ * @cssprop --esp-footer-row-gap - Vertical gap between footer rows and
32
32
  * link groups stacked in `esp-footer-column`. Defaults to `var(--esp-size-big)`.
33
33
  * @docPageTitle Footer Column
34
34
  * @docUrl /components/footer/column
@@ -37,6 +37,11 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
37
37
  * @menuIcon columns
38
38
  */
39
39
  export declare class EspalierFooterColumn extends EspalierElementBase {
40
+ /** Tracks occupied in the footer row (1–2); invalid values read as 1. Ignored when stacked.
41
+ * @default 1
42
+ */
43
+ get span(): number;
44
+ set span(value: number);
40
45
  protected render(): import("lit-html").TemplateResult<1>;
41
46
  static styles: import("lit").CSSResult[];
42
47
  }
@@ -1,8 +1,8 @@
1
- var m=function(r,o,t,l){var n=arguments.length,e=n<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,t):l,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,o,t,l);else for(var f=r.length-1;f>=0;f--)(s=r[f])&&(e=(n<3?s(e):n>3?s(o,t,e):s(o,t))||e);return n>3&&e&&Object.defineProperty(o,t,e),e};import{css as c,html as a}from"lit";import{customElement as u}from"lit/decorators.js";import{EspalierElementBase as p}from"../shared/esp-element-base.js";let i=class extends p{render(){return a`<slot></slot>`}};i.styles=[...p.styles,c`
1
+ var a=function(n,e,r,o){var p=arguments.length,t=p<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,r,o);else for(var l=n.length-1;l>=0;l--)(i=n[l])&&(t=(p<3?i(t):p>3?i(e,r,t):i(e,r))||t);return p>3&&t&&Object.defineProperty(e,r,t),t};import{css as m,html as f}from"lit";import{customElement as u,property as h}from"lit/decorators.js";import{syncNormalizedAttribute as d}from"../shared/attribute-helpers.js";import{EspalierElementBase as c}from"../shared/esp-element-base.js";let s=class extends c{constructor(){super(...arguments),this.spanBacker=1}get span(){return this.spanBacker}set span(e){const r=this.spanBacker;this.spanBacker=Number.isInteger(e)&&e>=1&&e<=2?e:1,this.requestUpdate("span",this.hasAttribute("span")?r:void 0),d(this,"span",String(this.spanBacker))}render(){return f`<slot></slot>`}};s.styles=[...c.styles,m`
2
2
  :host {
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  gap: var(--esp-footer-row-gap, var(--esp-size-big));
6
6
  min-inline-size: 0;
7
7
  }
8
- `],i=m([u("esp-footer-column")],i);export{i as EspalierFooterColumn};
8
+ `],a([h({type:Number,reflect:!0})],s.prototype,"span",null),s=a([u("esp-footer-column")],s);export{s as EspalierFooterColumn};
@@ -1,13 +1,13 @@
1
- var f=function(t,o,r,n){var s=arguments.length,e=s<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(t,o,r,n);else for(var a=t.length-1;a>=0;a--)(l=t[a])&&(e=(s<3?l(e):s>3?l(o,r,e):l(o,r))||e);return s>3&&e&&Object.defineProperty(o,r,e),e};import{css as h,html as d,nothing as p}from"lit";import{customElement as g,property as u}from"lit/decorators.js";import{EspalierElementBase as c}from"../shared/esp-element-base.js";const v="esp-footer-link-group-heading";let i=class extends c{constructor(){super(...arguments),this.heading=""}render(){return d`
1
+ var f=function(t,o,r,n){var s=arguments.length,e=s<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(t,o,r,n);else for(var a=t.length-1;a>=0;a--)(l=t[a])&&(e=(s<3?l(e):s>3?l(o,r,e):l(o,r))||e);return s>3&&e&&Object.defineProperty(o,r,e),e};import{css as h,html as d,nothing as p}from"lit";import{customElement as g,property as u}from"lit/decorators.js";import{EspalierElementBase as v}from"../shared/esp-element-base.js";const c="esp-footer-link-group-heading";let i=class extends v{constructor(){super(...arguments),this.heading=""}render(){return d`
2
2
  <nav
3
3
  part="nav"
4
- aria-labelledby=${this.heading?v:p}
4
+ aria-labelledby=${this.heading?c:p}
5
5
  aria-label=${this.heading?p:"Footer links"}
6
6
  >
7
- ${this.heading?d`<h2 part="heading" id=${v}>${this.heading}</h2>`:p}
7
+ ${this.heading?d`<h2 part="heading" id=${c}>${this.heading}</h2>`:p}
8
8
  <div part="links" class="links"><slot></slot></div>
9
9
  </nav>
10
- `}};i.styles=[...c.styles,h`
10
+ `}};i.styles=[...v.styles,h`
11
11
  :host {
12
12
  display: block;
13
13
  min-inline-size: 0;
@@ -33,6 +33,7 @@ var f=function(t,o,r,n){var s=arguments.length,e=s<3?o:n===null?n=Object.getOwnP
33
33
  font-size: var(--esp-type-normal);
34
34
  font-weight: var(--esp-font-weight-headings);
35
35
  line-height: 1.25;
36
+ overflow-wrap: anywhere;
36
37
  }
37
38
 
38
39
  .links {
@@ -57,7 +58,10 @@ var f=function(t,o,r,n){var s=arguments.length,e=s<3?o:n===null?n=Object.getOwnP
57
58
 
58
59
  ::slotted(a:focus-visible) {
59
60
  border-radius: var(--esp-size-border-radius);
60
- outline: var(--esp-footer-focus-outline, 2px solid var(--esp-footer-link-color, var(--esp-color-link)));
61
+ outline: var(
62
+ --esp-footer-focus-outline,
63
+ 2px solid var(--esp-footer-link-color, var(--esp-color-link))
64
+ );
61
65
  outline-offset: 3px;
62
66
  }
63
67
  `],f([u({type:String})],i.prototype,"heading",void 0),i=f([g("esp-footer-link-group")],i);export{i as EspalierFooterLinkGroup};
@@ -2,15 +2,22 @@ import { type PropertyValues } from "lit";
2
2
  import { EspalierElementBase } from "../shared/esp-element-base.js";
3
3
  import "./esp-footer-column.js";
4
4
  import "./esp-footer-link-group.js";
5
- export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
6
5
  /**
7
6
  * A responsive site footer with structured spaces for branding, feature
8
7
  * artwork, link groups, supporting actions, and legal or utility content.
9
8
  * Its background remains full-bleed while its content automatically aligns
10
9
  * to the surface of a containing [`<esp-page>`](/components/page/).
11
10
  * Use bare [`<esp-footer-link-group>`](/components/footer/link-group/) children
12
- * when navigation groups should auto-flow independently through the grid.
13
- * `columns` is a maximum: the grid always drops columns when they no longer fit.
11
+ * when each group should occupy one track. Only link groups and footer columns
12
+ * belong in the default slot; put utility content in `bottom`.
13
+ *
14
+ * Above 64rem of the `.content` content box, brand, columns and aside share
15
+ * one row of equal tracks. `brand-span` (1–3), column `span` (1–2), and
16
+ * `aside-span` (1–2) default to 1. Every span adds a track; a region spanning
17
+ * two tracks also includes the gap between them. There is no total-track cap.
18
+ * Narrow tracks wrap long words mid-word. Above 48rem through 64rem, the
19
+ * brand takes its own row. At 48rem and below, every column and bare group
20
+ * stacks full width, spans have no effect, and compact brand tokens apply.
14
21
  *
15
22
  * A field fills one layer above the surface it sits on.
16
23
  * Use `surface-layer="1|2|3|4"` to select the default painted layer.
@@ -24,7 +31,7 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
24
31
  * brand-alt="Espalier logo"
25
32
  * light-brand-color="oklch(0.35 0.12 216)"
26
33
  * dark-brand-color="oklch(0.9 0.08 216)"
27
- * columns="3">
34
+ * brand-span="2">
28
35
  * <esp-footer-link-group heading="Explore">
29
36
  * <a href="/components">Components</a>
30
37
  * <a href="/api">API</a>
@@ -39,14 +46,12 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
39
46
  * ```
40
47
  *
41
48
  * For creator-controlled columns, wrap each ordered stack of groups in
42
- * [`<esp-footer-column>`](/components/footer/column/). Each wrapper is one grid
43
- * item at wide sizes; below the footer's compact container breakpoint, the
44
- * columns become full-width rows in their slotted order. `columns` remains the
45
- * maximum number of grid items per row:
49
+ * [`<esp-footer-column>`](/components/footer/column/). Each wrapper keeps its groups
50
+ * together as one region. Set `span="2"` to give that region two tracks:
46
51
  *
47
52
  * ```html
48
- * <esp-footer columns="3">
49
- * <esp-footer-column>
53
+ * <esp-footer>
54
+ * <esp-footer-column span="2">
50
55
  * <esp-footer-link-group heading="Product">
51
56
  * <a href="/features">Features</a>
52
57
  * <a href="/pricing">Pricing</a>
@@ -71,7 +76,7 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
71
76
  * edge-to-edge artwork:
72
77
  *
73
78
  * ```html
74
- * <esp-footer columns="4">
79
+ * <esp-footer>
75
80
  * <picture slot="media">
76
81
  * <source media="(prefers-color-scheme: dark)" srcset="/assets/canvas-bg-dark.jpg" />
77
82
  * <img
@@ -89,12 +94,15 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
89
94
  * ```
90
95
  *
91
96
  * Decorative art uses an image layer independent of the base color. The same
92
- * API supports a repeating landscape band or one large cover image:
97
+ * API supports a repeating landscape band or one large cover image. Choose
98
+ * foreground ink for the custom background, and add a scrim when bright
99
+ * artwork would otherwise reduce text contrast:
93
100
  *
94
101
  * ```html
95
102
  * <style>
96
103
  * esp-footer.mountains {
97
104
  * --esp-footer-background: oklch(0.48 0.12 145);
105
+ * --esp-footer-heading-color: white;
98
106
  * --esp-footer-background-image-opacity: 0.55;
99
107
  * --esp-footer-background-image:
100
108
  * linear-gradient(to bottom, transparent 8rem, oklch(0.48 0.12 145)),
@@ -126,7 +134,7 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
126
134
  * ```html
127
135
  * <esp-page align="center" style="--esp-page-main-max-width: 36rem;">
128
136
  * <main>Surface-aligned page content</main>
129
- * <esp-footer slot="footer" brand-text="Aligned Studio" columns="3">
137
+ * <esp-footer slot="footer" brand-text="Aligned Studio">
130
138
  * <esp-footer-link-group heading="Explore">
131
139
  * <a href="/work">Work</a>
132
140
  * <a href="/about">About</a>
@@ -166,7 +174,7 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
166
174
  * </esp-footer>
167
175
  * ```
168
176
  *
169
- * @slot - Bare `esp-footer-link-group` children for automatic flow, or
177
+ * @slot - Only bare `esp-footer-link-group` children for one track each, or
170
178
  * `esp-footer-column` children for creator-controlled group stacks.
171
179
  * @slot aside - Supporting content such as a newsletter, call to action,
172
180
  * contact details, social links, or locale controls.
@@ -176,9 +184,8 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
176
184
  * @csspart background - The independent decorative image layer.
177
185
  * @csspart content - The surface-aligned content wrapper.
178
186
  * @csspart media - The media region spanning the aligned content well.
179
- * @csspart primary - The grid containing brand, link groups, and aside content.
187
+ * @csspart primary - The row containing brand, link columns, and aside content.
180
188
  * @csspart brand - The brand region.
181
- * @csspart groups - The link-group grid.
182
189
  * @csspart aside - The supporting-content region.
183
190
  * @csspart bottom - The final legal/utility region.
184
191
  * @cssprop --esp-footer-background - Base footer color. Defaults to `var(--esp-color-layer-2)`.
@@ -193,12 +200,15 @@ export type FooterColumns = "auto" | "1" | "2" | "3" | "4" | "5" | "6";
193
200
  * @cssprop --esp-footer-padding-inline - Content inline padding. Defaults to `var(--esp-size-padding-page)`.
194
201
  * @cssprop --esp-footer-section-gap - Gap between media, primary, and bottom regions. Defaults to `var(--esp-size-big)`.
195
202
  * @cssprop --esp-footer-column-gap - Gap between link-group columns and major primary regions. Defaults to `var(--esp-size-padding-page)`.
196
- * @cssprop --esp-footer-row-gap - Vertical gap between footer grid rows and
203
+ * @cssprop --esp-footer-row-gap - Vertical gap between footer rows and
197
204
  * link groups stacked in `esp-footer-column`. Defaults to `var(--esp-size-big)`.
198
- * @cssprop --esp-footer-link-group-min-width - Intrinsic minimum link-group column width. Defaults to `10rem`.
199
205
  * @cssprop --esp-footer-link-group-gap - Space between a link-group heading and its links. Defaults to `var(--esp-size-small)`.
200
206
  * @cssprop --esp-footer-brand-logo-size - Configured logo block size. Defaults to `3rem`.
201
207
  * @cssprop --esp-footer-brand-logo-max-width - Configured logo maximum inline size. Defaults to `12rem`.
208
+ * @cssprop --esp-footer-brand-text-size - Configured brand text size. Defaults to `var(--esp-type-medium)`.
209
+ * @cssprop --esp-footer-brand-logo-size-compact - Configured logo block size at 48rem and below. Defaults to `var(--esp-footer-brand-logo-size, 3rem)`.
210
+ * @cssprop --esp-footer-brand-logo-max-width-compact - Configured logo maximum inline size at 48rem and below. Defaults to `var(--esp-footer-brand-logo-max-width, 12rem)`.
211
+ * @cssprop --esp-footer-brand-text-size-compact - Configured brand text size at 48rem and below. Defaults to `var(--esp-footer-brand-text-size, var(--esp-type-medium))`.
202
212
  * @cssprop --esp-footer-brand-logo-aspect-ratio - The ratio the configured logo's box is reserved at while the image is still loading or has failed, so alt text never decides the brand region's width. A logo that loads is always laid out at its own ratio, whatever this is set to. Defaults to `3 / 1`.
203
213
  * @cssprop --esp-footer-background-image - Decorative image or gradient layer. Defaults to `none`.
204
214
  * @cssprop --esp-footer-background-image-opacity - Decorative layer opacity. Defaults to `1`.
@@ -251,11 +261,16 @@ export declare class EspalierFooter extends EspalierElementBase {
251
261
  * `--esp-footer-heading-color`.
252
262
  */
253
263
  darkBrandColor: string;
254
- /**
255
- * Maximum number of link-group columns. Numeric values cap the wide layout;
256
- * the intrinsic grid still renders fewer columns when space is limited.
264
+ /** Tracks occupied by the brand (1–3); invalid values read as 1. Ignored when stacked.
265
+ * @default 1
266
+ */
267
+ get brandSpan(): number;
268
+ set brandSpan(value: number);
269
+ /** Tracks occupied by the aside (1–2); invalid values read as 1. Ignored when stacked.
270
+ * @default 1
257
271
  */
258
- columns: FooterColumns;
272
+ get asideSpan(): number;
273
+ set asideSpan(value: number);
259
274
  /**
260
275
  * Opt out of the `esp-page` surface-alignment contract and allow footer
261
276
  * content to use the full bar width. The background is always full-bleed.
@@ -263,7 +278,6 @@ export declare class EspalierFooter extends EspalierElementBase {
263
278
  fullBleedContent: boolean;
264
279
  /** Optional accessible label for pages containing multiple footer landmarks. */
265
280
  landmarkLabel: string;
266
- protected willUpdate(changedProperties: PropertyValues): void;
267
281
  protected firstUpdated(changedProperties: PropertyValues): void;
268
282
  protected render(): import("lit-html").TemplateResult<1>;
269
283
  static styles: import("lit").CSSResult[];
@@ -1,39 +1,47 @@
1
- var t=function(i,e,a,r){var s=arguments.length,d=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,a):r,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(i,e,a,r);else for(var p=i.length-1;p>=0;p--)(l=i[p])&&(d=(s<3?l(d):s>3?l(e,a,d):l(e,a))||d);return s>3&&d&&Object.defineProperty(e,a,d),d};import{paintedSurface as b}from"../shared/surface-layer.js";import{css as v,html as y,nothing as _}from"lit";import{customElement as x,property as n,state as k}from"lit/decorators.js";import{classMap as C}from"lit/directives/class-map.js";import{styleMap as z}from"lit/directives/style-map.js";import{CONFIGURED_BRAND_LOGO_ASPECT_RATIO as B,configuredBrandLogoGeometry as S,renderConfiguredBrand as L,resolveConfiguredBrand as w}from"../shared/configured-brand.js";import{EspalierElementBase as g}from"../shared/esp-element-base.js";import{slotHasContent as h}from"../shared/slot-content.js";import{renderVisualOverlay as $,visualOverlayStyles as O}from"../shared/visual-overlay.js";import"./esp-footer-column.js";import"./esp-footer-link-group.js";const m=new Set(["auto","1","2","3","4","5","6"]),c={media:!1,brand:!1,groups:!1,aside:!1,bottom:!1},T={fromAttribute(i){return i&&m.has(i)?i:"auto"},toAttribute(i){return m.has(i)?i:"auto"}};let o=class extends g{constructor(){super(...arguments),this.slotContent={...c},this.brandText="",this.brandLogo="",this.lightBrandLogo="",this.darkBrandLogo="",this.brandHref="",this.brandAlt="",this.brandColor="",this.lightBrandColor="",this.darkBrandColor="",this.columns="auto",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=h(e.target);this.slotContent[a]!==r&&(this.slotContent={...this.slotContent,[a]:r})}}willUpdate(e){super.willUpdate(e),e.has("columns")&&!m.has(this.columns)&&(this.columns="auto")}slotRegion(e){return e.name?["media","brand","aside","bottom"].includes(e.name)?e.name:null:"groups"}firstUpdated(e){super.firstUpdated(e);const a={...c};for(const r of this.shadowRoot?.querySelectorAll("slot")??[]){const s=this.slotRegion(r);s&&(a[s]=h(r))}Object.entries(a).some(([r,s])=>this.slotContent[r]!==s)&&(this.slotContent=a)}render(){const{media:e,brand:a,groups:r,aside:s,bottom:d}=this.slotContent,l=w({scheme:this.scheme,brandLogo:this.brandLogo,brandColor:this.brandColor,lightBrandLogo:this.lightBrandLogo,darkBrandLogo:this.darkBrandLogo,lightBrandColor:this.lightBrandColor,darkBrandColor:this.darkBrandColor}),p=a||!!(l.brandLogo||this.brandText),u=p||r||s,f={primary:!0,"has-brand":p,"has-groups":r,"has-aside":s};return y`
1
+ var r=function(p,e,o,a){var i=arguments.length,s=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,o):a,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,e,o,a);else for(var l=p.length-1;l>=0;l--)(d=p[l])&&(s=(i<3?d(s):i>3?d(e,o,s):d(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s};import{paintedSurface as v}from"../shared/surface-layer.js";import{css as u,html as y,nothing as k}from"lit";import{customElement as S,property as n,state as x}from"lit/decorators.js";import{styleMap as c}from"lit/directives/style-map.js";import{CONFIGURED_BRAND_LOGO_ASPECT_RATIO as z,configuredBrandLogoGeometry as B,renderConfiguredBrand as C,resolveConfiguredBrand as _}from"../shared/configured-brand.js";import{syncNormalizedAttribute as f}from"../shared/attribute-helpers.js";import{EspalierElementBase as b}from"../shared/esp-element-base.js";import{slotHasContent as g}from"../shared/slot-content.js";import{renderVisualOverlay as w,visualOverlayStyles as L}from"../shared/visual-overlay.js";import"./esp-footer-column.js";import"./esp-footer-link-group.js";const m={media:!1,brand:!1,groups:!1,aside:!1,bottom:!1};let t=class extends b{constructor(){super(...arguments),this.slotContent={...m},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 o=this.slotRegion(e.target);if(!o)return;const a=g(e.target);this.slotContent[o]!==a&&(this.slotContent={...this.slotContent,[o]:a})}}get brandSpan(){return this.brandSpanBacker}set brandSpan(e){const o=this.brandSpanBacker;this.brandSpanBacker=Number.isInteger(e)&&e>=1&&e<=3?e:1,this.requestUpdate("brandSpan",this.hasAttribute("brand-span")?o:void 0),f(this,"brand-span",String(this.brandSpanBacker))}get asideSpan(){return this.asideSpanBacker}set asideSpan(e){const o=this.asideSpanBacker;this.asideSpanBacker=Number.isInteger(e)&&e>=1&&e<=2?e:1,this.requestUpdate("asideSpan",this.hasAttribute("aside-span")?o:void 0),f(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 o={...m};for(const a of this.shadowRoot?.querySelectorAll("slot")??[]){const i=this.slotRegion(a);i&&(o[i]=g(a))}Object.entries(o).some(([a,i])=>this.slotContent[a]!==i)&&(this.slotContent=o)}render(){const{media:e,brand:o,groups:a,aside:i,bottom:s}=this.slotContent,d=_({scheme:this.scheme,brandLogo:this.brandLogo,brandColor:this.brandColor,lightBrandLogo:this.lightBrandLogo,darkBrandLogo:this.darkBrandLogo,lightBrandColor:this.lightBrandColor,darkBrandColor:this.darkBrandColor}),l=o||!!(d.brandLogo||this.brandText),h=l||a||i;return y`
2
2
  <footer
3
3
  part="footer"
4
- aria-label=${this.landmarkLabel||_}
5
- style=${z({"--_esp-footer-brand-color":l.brandColor||null})}
4
+ aria-label=${this.landmarkLabel||k}
5
+ style=${c({"--_esp-footer-brand-color":d.brandColor||null})}
6
6
  >
7
- ${$({className:"background",rootPart:"background"})}
7
+ ${w({className:"background",rootPart:"background"})}
8
8
  <div part="content" class="content-frame">
9
9
  <div class="content">
10
10
  <div part="media" class="media" ?hidden=${!e}>
11
11
  <slot name="media" @slotchange=${this.handleSlotChange}></slot>
12
12
  </div>
13
13
 
14
- <div part="primary" class=${C(f)} ?hidden=${!u}>
15
- <div part="brand" class="brand" ?hidden=${!p}>
14
+ <div part="primary" class="primary" ?hidden=${!h}>
15
+ <div
16
+ part="brand"
17
+ class="brand"
18
+ style=${c({"--_esp-footer-span":String(this.brandSpan)})}
19
+ ?hidden=${!l}
20
+ >
16
21
  <slot name="brand" @slotchange=${this.handleSlotChange}
17
- >${L({brandLogo:l.brandLogo,brandText:this.brandText,brandHref:this.brandHref,brandAlt:this.brandAlt})}</slot
22
+ >${C({brandLogo:d.brandLogo,brandText:this.brandText,brandHref:this.brandHref,brandAlt:this.brandAlt})}</slot
18
23
  >
19
24
  </div>
20
25
 
21
- <div part="groups" class="groups" ?hidden=${!r}>
22
- <slot @slotchange=${this.handleSlotChange}></slot>
23
- </div>
26
+ <slot @slotchange=${this.handleSlotChange}></slot>
24
27
 
25
- <div part="aside" class="aside" ?hidden=${!s}>
28
+ <div
29
+ part="aside"
30
+ class="aside"
31
+ style=${c({"--_esp-footer-span":String(this.asideSpan)})}
32
+ ?hidden=${!i}
33
+ >
26
34
  <slot name="aside" @slotchange=${this.handleSlotChange}></slot>
27
35
  </div>
28
36
  </div>
29
37
 
30
- <div part="bottom" class="bottom" ?hidden=${!d}>
38
+ <div part="bottom" class="bottom" ?hidden=${!s}>
31
39
  <slot name="bottom" @slotchange=${this.handleSlotChange}></slot>
32
40
  </div>
33
41
  </div>
34
42
  </div>
35
43
  </footer>
36
- `}};o.styles=[...g.styles,b(2),S,v`
44
+ `}};t.styles=[...b.styles,v(2),B,u`
37
45
  :host {
38
46
  display: block;
39
47
  min-inline-size: 0;
@@ -93,7 +101,6 @@ var t=function(i,e,a,r){var s=arguments.length,d=s<3?e:r===null?r=Object.getOwnP
93
101
  .media,
94
102
  .primary,
95
103
  .brand,
96
- .groups,
97
104
  .aside,
98
105
  .bottom {
99
106
  min-inline-size: 0;
@@ -107,107 +114,37 @@ var t=function(i,e,a,r){var s=arguments.length,d=s<3?e:r===null?r=Object.getOwnP
107
114
  max-inline-size: 100%;
108
115
  }
109
116
 
110
- .primary {
111
- display: grid;
112
- grid-template-columns: minmax(10rem, 1fr) minmax(0, 3fr) minmax(10rem, 1fr);
113
- grid-template-areas: "brand groups aside";
114
- gap: var(--esp-footer-row-gap, var(--esp-size-big))
115
- var(--esp-footer-column-gap, var(--esp-size-padding-page));
116
- align-items: start;
117
- }
118
-
119
- .primary.has-brand.has-groups:not(.has-aside),
120
- .primary.has-groups.has-aside:not(.has-brand) {
121
- grid-template-columns: minmax(10rem, 1fr) minmax(0, 3fr);
122
- }
123
-
124
- .primary.has-brand.has-groups:not(.has-aside) {
125
- grid-template-areas: "brand groups";
117
+ .primary > slot {
118
+ display: contents;
126
119
  }
127
120
 
128
- .primary.has-groups.has-aside:not(.has-brand) {
129
- grid-template-areas: "groups aside";
130
- }
131
-
132
- .primary.has-brand.has-aside:not(.has-groups) {
133
- grid-template-columns: repeat(2, minmax(0, 1fr));
134
- grid-template-areas: "brand aside";
135
- }
136
-
137
- .primary.has-brand:not(.has-groups):not(.has-aside) {
138
- grid-template-columns: minmax(0, 1fr);
139
- grid-template-areas: "brand";
140
- }
141
-
142
- .primary.has-groups:not(.has-brand):not(.has-aside) {
143
- grid-template-columns: minmax(0, 1fr);
144
- grid-template-areas: "groups";
145
- }
146
-
147
- .primary.has-aside:not(.has-brand):not(.has-groups) {
148
- grid-template-columns: minmax(0, 1fr);
149
- grid-template-areas: "aside";
150
- }
151
-
152
- .brand {
153
- grid-area: brand;
154
- }
155
-
156
- .groups {
121
+ .primary {
157
122
  --_esp-footer-column-gap: var(--esp-footer-column-gap, var(--esp-size-padding-page));
158
- --_esp-footer-column-min: var(--esp-footer-link-group-min-width, 10rem);
159
- --_esp-footer-column-basis: var(--_esp-footer-column-min);
160
123
 
161
- grid-area: groups;
162
- display: grid;
163
- grid-template-columns: repeat(
164
- auto-fit,
165
- minmax(min(100%, var(--_esp-footer-column-basis)), 1fr)
166
- );
124
+ display: flex;
125
+ flex-wrap: nowrap;
167
126
  gap: var(--esp-footer-row-gap, var(--esp-size-big)) var(--_esp-footer-column-gap);
127
+ align-items: start;
168
128
  }
169
129
 
170
- :host([columns="1"]) .groups {
171
- --_esp-footer-column-basis: 100%;
172
- }
173
-
174
- :host([columns="2"]) .groups {
175
- --_esp-footer-column-basis: max(
176
- var(--_esp-footer-column-min),
177
- calc(50% - var(--_esp-footer-column-gap))
178
- );
179
- }
180
-
181
- :host([columns="3"]) .groups {
182
- --_esp-footer-column-basis: max(
183
- var(--_esp-footer-column-min),
184
- calc(33.3333% - var(--_esp-footer-column-gap))
185
- );
186
- }
187
-
188
- :host([columns="4"]) .groups {
189
- --_esp-footer-column-basis: max(
190
- var(--_esp-footer-column-min),
191
- calc(25% - var(--_esp-footer-column-gap))
192
- );
193
- }
130
+ .brand,
131
+ .aside,
132
+ .primary ::slotted(esp-footer-column),
133
+ .primary ::slotted(esp-footer-link-group) {
134
+ --_esp-footer-span: 1;
194
135
 
195
- :host([columns="5"]) .groups {
196
- --_esp-footer-column-basis: max(
197
- var(--_esp-footer-column-min),
198
- calc(20% - var(--_esp-footer-column-gap))
199
- );
136
+
137
+ flex: var(--_esp-footer-span) 1
138
+ calc((var(--_esp-footer-span) - 1) * var(--_esp-footer-column-gap));
139
+ min-inline-size: 0;
200
140
  }
201
141
 
202
- :host([columns="6"]) .groups {
203
- --_esp-footer-column-basis: max(
204
- var(--_esp-footer-column-min),
205
- calc(16.6667% - var(--_esp-footer-column-gap))
206
- );
142
+ .primary ::slotted(esp-footer-column[span="2"]) {
143
+ --_esp-footer-span: 2;
207
144
  }
208
145
 
209
146
  .aside {
210
- grid-area: aside;
147
+ overflow-wrap: anywhere;
211
148
  }
212
149
 
213
150
  .configured-brand {
@@ -235,7 +172,7 @@ var t=function(i,e,a,r){var s=arguments.length,d=s<3?e:r===null?r=Object.getOwnP
235
172
  )
236
173
  )
237
174
  );
238
- font-size: var(--esp-type-medium);
175
+ font-size: var(--esp-footer-brand-text-size, var(--esp-type-medium));
239
176
  font-weight: var(--esp-font-weight-brand, var(--esp-font-weight-headings));
240
177
  line-height: 1.1;
241
178
  overflow-wrap: anywhere;
@@ -251,14 +188,17 @@ var t=function(i,e,a,r){var s=arguments.length,d=s<3?e:r===null?r=Object.getOwnP
251
188
 
252
189
  a.configured-brand:focus-visible {
253
190
  border-radius: var(--esp-size-border-radius);
254
- outline: var(--esp-footer-focus-outline, 2px solid var(--esp-footer-link-color, var(--esp-color-link)));
191
+ outline: var(
192
+ --esp-footer-focus-outline,
193
+ 2px solid var(--esp-footer-link-color, var(--esp-color-link))
194
+ );
255
195
  outline-offset: 3px;
256
196
  }
257
197
 
258
198
  .brand-logo {
259
199
 
260
200
  aspect-ratio: auto
261
- var(--esp-footer-brand-logo-aspect-ratio, ${B});
201
+ var(--esp-footer-brand-logo-aspect-ratio, ${z});
262
202
  display: block;
263
203
  inline-size: auto;
264
204
  max-inline-size: min(var(--esp-footer-brand-logo-max-width, 12rem), 100%);
@@ -270,56 +210,43 @@ var t=function(i,e,a,r){var s=arguments.length,d=s<3?e:r===null?r=Object.getOwnP
270
210
  min-inline-size: 0;
271
211
  }
272
212
 
273
- @container esp-footer (max-width: 48rem) {
274
- .groups ::slotted(esp-footer-column) {
275
- grid-column: 1 / -1;
276
- }
277
-
278
- .primary,
279
- .primary.has-brand.has-groups:not(.has-aside),
280
- .primary.has-groups.has-aside:not(.has-brand),
281
- .primary.has-brand.has-aside:not(.has-groups),
282
- .primary.has-brand:not(.has-groups):not(.has-aside),
283
- .primary.has-groups:not(.has-brand):not(.has-aside),
284
- .primary.has-aside:not(.has-brand):not(.has-groups) {
285
- grid-template-columns: minmax(0, 1fr);
286
- }
287
-
288
- .primary.has-brand.has-groups.has-aside {
289
- grid-template-areas:
290
- "brand"
291
- "groups"
292
- "aside";
293
- }
294
-
295
- .primary.has-brand.has-groups:not(.has-aside) {
296
- grid-template-areas:
297
- "brand"
298
- "groups";
299
- }
300
-
301
- .primary.has-groups.has-aside:not(.has-brand) {
302
- grid-template-areas:
303
- "groups"
304
- "aside";
213
+ @container esp-footer (max-width: 64rem) {
214
+ .primary {
215
+ flex-wrap: wrap;
305
216
  }
306
217
 
307
- .primary.has-brand.has-aside:not(.has-groups) {
308
- grid-template-areas:
309
- "brand"
310
- "aside";
218
+ .brand {
219
+ flex: 1 1 100%;
311
220
  }
221
+ }
312
222
 
313
- .primary.has-brand:not(.has-groups):not(.has-aside) {
314
- grid-template-areas: "brand";
223
+ @container esp-footer (max-width: 48rem) {
224
+ .brand,
225
+ .aside,
226
+ .primary ::slotted(esp-footer-column),
227
+ .primary ::slotted(esp-footer-link-group) {
228
+ flex: 1 1 100%;
315
229
  }
316
230
 
317
- .primary.has-groups:not(.has-brand):not(.has-aside) {
318
- grid-template-areas: "groups";
231
+ .configured-brand {
232
+ font-size: var(
233
+ --esp-footer-brand-text-size-compact,
234
+ var(--esp-footer-brand-text-size, var(--esp-type-medium))
235
+ );
319
236
  }
320
237
 
321
- .primary.has-aside:not(.has-brand):not(.has-groups) {
322
- grid-template-areas: "aside";
238
+ .brand-logo {
239
+ block-size: var(
240
+ --esp-footer-brand-logo-size-compact,
241
+ var(--esp-footer-brand-logo-size, 3rem)
242
+ );
243
+ max-inline-size: min(
244
+ var(
245
+ --esp-footer-brand-logo-max-width-compact,
246
+ var(--esp-footer-brand-logo-max-width, 12rem)
247
+ ),
248
+ 100%
249
+ );
323
250
  }
324
251
  }
325
- `,O],t([k()],o.prototype,"slotContent",void 0),t([n({attribute:"brand-text",type:String})],o.prototype,"brandText",void 0),t([n({attribute:"brand-logo",type:String})],o.prototype,"brandLogo",void 0),t([n({attribute:"light-brand-logo",type:String})],o.prototype,"lightBrandLogo",void 0),t([n({attribute:"dark-brand-logo",type:String})],o.prototype,"darkBrandLogo",void 0),t([n({attribute:"brand-href",type:String})],o.prototype,"brandHref",void 0),t([n({attribute:"brand-alt",type:String})],o.prototype,"brandAlt",void 0),t([n({attribute:"brand-color",type:String})],o.prototype,"brandColor",void 0),t([n({attribute:"light-brand-color",type:String})],o.prototype,"lightBrandColor",void 0),t([n({attribute:"dark-brand-color",type:String})],o.prototype,"darkBrandColor",void 0),t([n({converter:T,reflect:!0})],o.prototype,"columns",void 0),t([n({attribute:"full-bleed-content",type:Boolean,reflect:!0})],o.prototype,"fullBleedContent",void 0),t([n({attribute:"landmark-label",type:String})],o.prototype,"landmarkLabel",void 0),o=t([x("esp-footer")],o);export{o as EspalierFooter};
252
+ `,L],r([x()],t.prototype,"slotContent",void 0),r([n({attribute:"brand-text",type:String})],t.prototype,"brandText",void 0),r([n({attribute:"brand-logo",type:String})],t.prototype,"brandLogo",void 0),r([n({attribute:"light-brand-logo",type:String})],t.prototype,"lightBrandLogo",void 0),r([n({attribute:"dark-brand-logo",type:String})],t.prototype,"darkBrandLogo",void 0),r([n({attribute:"brand-href",type:String})],t.prototype,"brandHref",void 0),r([n({attribute:"brand-alt",type:String})],t.prototype,"brandAlt",void 0),r([n({attribute:"brand-color",type:String})],t.prototype,"brandColor",void 0),r([n({attribute:"light-brand-color",type:String})],t.prototype,"lightBrandColor",void 0),r([n({attribute:"dark-brand-color",type:String})],t.prototype,"darkBrandColor",void 0),r([n({attribute:"brand-span",type:Number,reflect:!0})],t.prototype,"brandSpan",null),r([n({attribute:"aside-span",type:Number,reflect:!0})],t.prototype,"asideSpan",null),r([n({attribute:"full-bleed-content",type:Boolean,reflect:!0})],t.prototype,"fullBleedContent",void 0),r([n({attribute:"landmark-label",type:String})],t.prototype,"landmarkLabel",void 0),t=r([S("esp-footer")],t);export{t as EspalierFooter};
@@ -649,10 +649,26 @@
649
649
  "name": "--esp-footer-brand-logo-max-width",
650
650
  "description": "Configured logo maximum inline size. Defaults to `12rem`."
651
651
  },
652
+ {
653
+ "name": "--esp-footer-brand-logo-max-width-compact",
654
+ "description": "Configured logo maximum inline size at 48rem and below. Defaults to `var(--esp-footer-brand-logo-max-width, 12rem)`."
655
+ },
652
656
  {
653
657
  "name": "--esp-footer-brand-logo-size",
654
658
  "description": "Configured logo block size. Defaults to `3rem`."
655
659
  },
660
+ {
661
+ "name": "--esp-footer-brand-logo-size-compact",
662
+ "description": "Configured logo block size at 48rem and below. Defaults to `var(--esp-footer-brand-logo-size, 3rem)`."
663
+ },
664
+ {
665
+ "name": "--esp-footer-brand-text-size",
666
+ "description": "Configured brand text size. Defaults to `var(--esp-type-medium)`."
667
+ },
668
+ {
669
+ "name": "--esp-footer-brand-text-size-compact",
670
+ "description": "Configured brand text size at 48rem and below. Defaults to `var(--esp-footer-brand-text-size, var(--esp-type-medium))`."
671
+ },
656
672
  {
657
673
  "name": "--esp-footer-color",
658
674
  "description": "Body text color. Defaults to `var(--esp-color-text)`."
@@ -685,10 +701,6 @@
685
701
  "name": "--esp-footer-link-group-gap",
686
702
  "description": "Space between a link-group heading and its links. Defaults to `var(--esp-size-small)`."
687
703
  },
688
- {
689
- "name": "--esp-footer-link-group-min-width",
690
- "description": "Intrinsic minimum link-group column width. Defaults to `10rem`."
691
- },
692
704
  {
693
705
  "name": "--esp-footer-link-hover-bg",
694
706
  "description": "Hovered link background. Defaults to `var(--esp-color-link-hover-bg)`."
@@ -707,7 +719,7 @@
707
719
  },
708
720
  {
709
721
  "name": "--esp-footer-row-gap",
710
- "description": "Vertical gap between footer grid rows and link groups stacked in `esp-footer-column`. Defaults to `var(--esp-size-big)`."
722
+ "description": "Vertical gap between footer rows and link groups stacked in `esp-footer-column`. Defaults to `var(--esp-size-big)`."
711
723
  },
712
724
  {
713
725
  "name": "--esp-footer-section-gap",