@brad-frost-web/eddie-recipes 0.48.0 → 0.49.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/cdn/chunks/{button.COKzxeaS.js → button.UtF8xc8z.js} +27 -2
- package/cdn/chunks/{single-field-form.BbGoPDle.js → single-field-form.BX6ynWNg.js} +1 -1
- package/cdn/chunks/{text-passage.DW6q78mi.js → text-passage.BEu9bNtm.js} +7 -1
- package/cdn/recipes/common/example-form/example-form.js +1 -1
- package/cdn/recipes/common/newsletter-signup/newsletter-signup.js +1 -1
- package/cdn/recipes/common/project-card/project-card.js +1 -1
- package/cdn/recipes/common/search-form/search-form.js +1 -1
- package/cdn/recipes/common/site-header/site-header.js +1 -1
- package/cdn/recipes/common/stat-card/stat-card.js +1 -1
- package/cdn/recipes/common/transport-button/transport-button.js +1 -1
- package/cdn/recipes/common/vertical-site-header/vertical-site-header.js +28 -24
- package/cdn/recipes/tools/theme-customizer/theme-customizer.js +1 -1
- package/cdn/recipes/we-are-here/wah-site-header/wah-site-header.js +1 -1
- package/package.json +1 -1
- package/recipes/common/vertical-site-header/vertical-site-header.d.ts +31 -8
- package/recipes/common/vertical-site-header/vertical-site-header.d.ts.map +1 -1
- package/recipes/common/vertical-site-header/vertical-site-header.js +26 -21
|
@@ -17,6 +17,18 @@ class t extends s {
|
|
|
17
17
|
static get styles() {
|
|
18
18
|
return h(g);
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Normalize one host `aria-*` value for the inner control.
|
|
22
|
+
*
|
|
23
|
+
* Two shapes have to be handled beyond a plain pass-through. Lit commits `undefined` as an
|
|
24
|
+
* empty string, so a consumer binding an optional value (`aria-pressed=${spec.ariaPressed}`)
|
|
25
|
+
* hands us `""` — an invalid ARIA value that axe flags, and worse than no attribute at all.
|
|
26
|
+
* And a boolean bound from state (`aria-expanded=${this.isOpen}`) has to reach the DOM as the
|
|
27
|
+
* strings `"true"`/`"false"`. Anything else (`mixed`, `menu`, `dialog`) passes through.
|
|
28
|
+
*/
|
|
29
|
+
ariaState(e) {
|
|
30
|
+
return e == null || e === "" ? n : e === !0 ? "true" : e === !1 ? "false" : String(e);
|
|
31
|
+
}
|
|
20
32
|
clickHandler(e) {
|
|
21
33
|
if (this.isLoading) {
|
|
22
34
|
e.preventDefault();
|
|
@@ -42,7 +54,9 @@ class t extends s {
|
|
|
42
54
|
const d = this.getIconElement(), i = this.getSpinnerElement();
|
|
43
55
|
return c`
|
|
44
56
|
<button type="${this.type}" class="${e}" ?disabled=${this.disabled || this.isLoading}
|
|
45
|
-
aria-busy=${this.isLoading ? "true" : n}
|
|
57
|
+
aria-busy=${this.isLoading ? "true" : n} aria-expanded=${this.ariaState(this.expanded)}
|
|
58
|
+
aria-pressed=${this.ariaState(this.pressed)} aria-haspopup=${this.ariaState(this.hasPopup)}
|
|
59
|
+
@click=${this.clickHandler}>
|
|
46
60
|
${this.isLoading ? i : this.iconPosition === "before" ? d : n}
|
|
47
61
|
<span class="${this.hideText ? "ed-u-is-vishidden ed-c-button__text" : "ed-c-button__text"}"><slot>${this.text}</slot></span>
|
|
48
62
|
${!this.isLoading && this.iconPosition === "after" ? d : n}
|
|
@@ -53,7 +67,9 @@ class t extends s {
|
|
|
53
67
|
const d = this.getIconElement(), i = this.getSpinnerElement();
|
|
54
68
|
return c`
|
|
55
69
|
<a href="${m(this.href)}" class="${e}" target=${this.target}
|
|
56
|
-
aria-busy=${this.isLoading ? "true" : n} aria-disabled=${this.isLoading ? "true" : n}
|
|
70
|
+
aria-busy=${this.isLoading ? "true" : n} aria-disabled=${this.isLoading ? "true" : n}
|
|
71
|
+
aria-expanded=${this.ariaState(this.expanded)} aria-pressed=${this.ariaState(this.pressed)}
|
|
72
|
+
aria-haspopup=${this.ariaState(this.hasPopup)} @click=${this.clickHandler}>
|
|
57
73
|
${this.isLoading ? i : this.iconPosition === "before" ? d : n}
|
|
58
74
|
<span class="${this.hideText ? "ed-u-is-vishidden ed-c-button__text" : "ed-c-button__text"}"><slot>${this.text}</slot></span>
|
|
59
75
|
${!this.isLoading && this.iconPosition === "after" ? d : n}
|
|
@@ -120,6 +136,15 @@ o([
|
|
|
120
136
|
o([
|
|
121
137
|
r({ type: String })
|
|
122
138
|
], t.prototype, "type");
|
|
139
|
+
o([
|
|
140
|
+
r({ attribute: "aria-expanded" })
|
|
141
|
+
], t.prototype, "expanded");
|
|
142
|
+
o([
|
|
143
|
+
r({ attribute: "aria-pressed" })
|
|
144
|
+
], t.prototype, "pressed");
|
|
145
|
+
o([
|
|
146
|
+
r({ attribute: "aria-haspopup" })
|
|
147
|
+
], t.prototype, "hasPopup");
|
|
123
148
|
o([
|
|
124
149
|
p("button")
|
|
125
150
|
], t.prototype, "field");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as h, A as f, o as d, b as c, n as t, e as m } from "./lit.EWazi_Sp.js";
|
|
2
2
|
import { n as u } from "./index.browser.D527xXcp.js";
|
|
3
3
|
import { E as p } from "./EdElement.Dqh0Nrbq.js";
|
|
4
|
-
import "./button.
|
|
4
|
+
import "./button.UtF8xc8z.js";
|
|
5
5
|
const b = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-u-is-hidden{display:none!important;visibility:hidden!important}.ed-u-is-vishidden{position:absolute!important;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px)}@media all and (min-width:23.4375rem){.ed-u-hide-sm{display:none!important}}@media all and (min-width:48rem){.ed-u-hide-md{display:none!important}}@media all and (min-width:60rem){.ed-u-hide-lg{display:none!important}}@media all and (min-width:75rem){.ed-u-hide-xl{display:none!important}}@media all and (max-width:23.4375rem){.ed-u-show-sm{display:none!important}}@media all and (max-width:48rem){.ed-u-show-md{display:none!important}}@media all and (max-width:60rem){.ed-u-show-lg{display:none!important}}@media all and (max-width:75rem){.ed-u-show-xl{display:none!important}}.ed-c-single-field-form{width:100%}@media all and (min-width:48rem){.ed-c-single-field-form__body{display:flex}}.ed-c-single-field-form__body-inner{position:relative;flex:1}.ed-c-single-field-form__clear-button{--ed-theme-color-content-default: var(--ed-theme-form-color-content-default);--ed-theme-color-content-hover: var(--ed-theme-form-color-content-hover, var(--ed-theme-form-color-content-default));display:inline-flex;position:absolute;inset-block-start:50%;inset-inline-end:1rem;transform:translateY(-50%)}.ed-c-single-field-form__label{font-family:var(--ed-theme-typography-label-default-font-family);font-weight:var(--ed-theme-typography-label-default-font-weight);font-size:var(--ed-theme-typography-label-default-font-size);line-height:var(--ed-theme-typography-label-default-line-height);letter-spacing:var(--ed-theme-typography-label-default-letter-spacing);text-transform:var(--ed-theme-typography-label-default-text-transform);display:block;margin-block-end:.5rem}.ed-c-single-field-form__input{-webkit-appearance:none;width:100%;border-width:var(--ed-theme-border-width-sm);border-style:solid;border-color:var(--ed-theme-form-color-border-default);border-radius:var(--ed-theme-border-radius-sm);outline:none;padding:.8125rem .5rem;font-family:var(--ed-theme-typography-body-default-font-family);font-weight:var(--ed-theme-typography-body-default-font-weight);font-size:var(--ed-theme-typography-body-default-font-size);line-height:var(--ed-theme-typography-body-default-line-height);letter-spacing:var(--ed-theme-typography-body-default-letter-spacing);text-transform:var(--ed-theme-typography-body-default-text-transform);color:var(--ed-theme-form-color-content-default);background-color:var(--ed-theme-form-color-background-default);transition:border-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),background-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),box-shadow var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-single-field-form__input:hover{border-color:var(--ed-theme-color-border-brand);background-color:var(--ed-theme-form-color-background-hover)}.ed-c-single-field-form__input:focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus)}.ed-c-single-field-form__input:not(:placeholder-shown):focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus);background-color:var(--ed-theme-form-color-background-hover)}.ed-is-error .ed-c-single-field-form__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-error)}.ed-is-success .ed-c-single-field-form__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-success)}.ed-c-single-field-form__input:active:not(:disabled){border-color:var(--ed-theme-form-color-border)}.ed-c-single-field-form__input:disabled{background-color:var(--ed-theme-color-background-subtle);border-color:var(--ed-theme-color-border-disabled);color:var(--ed-theme-color-content-disabled);cursor:not-allowed}.ed-c-single-field-form__input:disabled~.ed-c-text-field__label,.ed-c-single-field-form__input:disabled:hover~.ed-c-text-field__label,.ed-c-single-field-form__input:disabled::placeholder{color:var(--ed-theme-color-content-disabled)}.ed-c-single-field-form__input:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-default);outline-offset:var(--ed-theme-offset-focus-ring, .25rem)}.ed-c-single-field-form__input::placeholder{font-family:var(--ed-theme-typography-body-sm-font-family);font-weight:var(--ed-theme-typography-body-sm-font-weight);font-size:var(--ed-theme-typography-body-sm-font-size);line-height:var(--ed-theme-typography-body-sm-line-height);letter-spacing:var(--ed-theme-typography-body-sm-letter-spacing);text-transform:var(--ed-theme-typography-body-sm-text-transform);color:var(--ed-theme-form-color-content-subtle);transition:color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-is-error .ed-c-single-field-form__input::placeholder{color:var(--ed-theme-color-content-utility-error)}.ed-is-error .ed-c-single-field-form__input:hover::placeholder{color:var(--ed-theme-color-content-utility-error-hover)}.ed-is-error .ed-c-single-field-form__input{color:var(--ed-theme-color-content-default);border-color:var(--ed-theme-color-border-utility-error);background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-single-field-form__input:hover,.ed-is-error .ed-c-single-field-form__input:focus{background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-single-field-form__input:not(:focus){color:var(--ed-theme-color-content-default)}.ed-is-success .ed-c-single-field-form__input{color:var(--ed-theme-color-content-default);border-color:var(--ed-theme-color-border-utility-success);background-color:var(--ed-theme-color-background-utility-success)}.ed-is-success .ed-c-single-field-form__input:hover,.ed-is-success .ed-c-single-field-form__input:focus{background-color:var(--ed-theme-color-background-utility-success)}.ed-c-single-field-form__input{display:block;width:100%}.ed-c-single-field-form--has-clear .ed-c-single-field-form__input{padding-inline-end:6rem}.ed-c-single-field-form__button{display:block;margin-block-start:1rem}@media all and (min-width:48rem){.ed-c-single-field-form__button{margin-block-start:0;margin-inline-start:1rem}}.ed-c-single-field-form--knockout .ed-c-single-field-form__label{color:var(--ed-theme-color-content-knockout)}.ed-c-single-field-form--knockout .ed-c-single-field-form__input{border-color:var(--ed-theme-color-border-subtle)}.ed-c-single-field-form--knockout .ed-c-single-field-form__input:focus:not(:disabled){outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-knockout);outline-offset:var(--ed-theme-offset-focus-ring, .25rem)}';
|
|
6
6
|
var g = Object.defineProperty, o = (l, r, n, y) => {
|
|
7
7
|
for (var i = void 0, a = l.length - 1, s; a >= 0; a--)
|
|
@@ -14,7 +14,13 @@ class i extends g {
|
|
|
14
14
|
return d(m);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Add the light dom styles when this component is connected to a page
|
|
17
|
+
* Add the light dom styles when this component is connected to a page.
|
|
18
|
+
*
|
|
19
|
+
* This runs client-side only, so a page with JS off — or one painted before
|
|
20
|
+
* hydration — shows unstyled prose. Consumers that care about first paint
|
|
21
|
+
* should also link or inline the static artifact the package ships at
|
|
22
|
+
* `components/text-passage/text-passage-light-dom.css` (#1468). The id guard
|
|
23
|
+
* below makes loading both harmless: same rules, injected at most once.
|
|
18
24
|
*/
|
|
19
25
|
connectedCallback() {
|
|
20
26
|
if (super.connectedCallback(), !document.head.querySelector("#ed-text-passage-styles")) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as O } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
2
|
import { r as D, b as s, n as e, o as l, e as F, a as j, A as I } from "../../../chunks/lit.EWazi_Sp.js";
|
|
3
|
-
import "../../../chunks/button.
|
|
3
|
+
import "../../../chunks/button.UtF8xc8z.js";
|
|
4
4
|
import { E as N } from "../../../chunks/EdFormElement.DxDbDIOi.js";
|
|
5
5
|
import { n as $ } from "../../../chunks/index.browser.D527xXcp.js";
|
|
6
6
|
import "../../../chunks/icon.mc7zUxp5.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as d } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
|
-
import "../../../chunks/single-field-form.
|
|
2
|
+
import "../../../chunks/single-field-form.BX6ynWNg.js";
|
|
3
3
|
import { r as h, o as n, b as m, n as t } from "../../../chunks/lit.EWazi_Sp.js";
|
|
4
4
|
const u = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-r-newsletter-signup{display:block}';
|
|
5
5
|
var c = Object.defineProperty, o = (i, r, a, b) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as h } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
2
|
import "../../../chunks/heading.Ca_LYMne.js";
|
|
3
|
-
import "../../../chunks/text-passage.
|
|
3
|
+
import "../../../chunks/text-passage.BEu9bNtm.js";
|
|
4
4
|
import { r as p, A as c, b as d, n as t } from "../../../chunks/lit.EWazi_Sp.js";
|
|
5
5
|
const m = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-r-project-card{display:flex;flex-direction:column;height:100%;border-width:var(--ed-theme-border-width-sm);border-style:solid;border-color:var(--ed-theme-color-border-subtle);border-radius:var(--ed-theme-border-radius-md);box-shadow:var(--ed-theme-box-shadow-md);background:var(--ed-theme-color-background-default);overflow:hidden}.ed-r-project-card__media{flex:none}.ed-r-project-card__img{display:block;width:100%;height:auto;object-fit:cover}.ed-r-project-card__body{display:flex;flex-direction:column;flex:1 0 auto;padding:1.5rem;gap:.5rem}.ed-r-project-card__title{display:block}.ed-r-project-card__link{color:inherit;text-decoration:none;border-block-end:var(--ed-theme-border-width-sm) solid transparent;transition:border-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-r-project-card__link:hover,.ed-r-project-card__link:focus-visible{color:inherit;border-block-end-color:var(--ed-heading-link-color-border, var(--ed-theme-color-border-brand))}.ed-r-project-card__link:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-default);outline-offset:var(--ed-theme-offset-focus-ring, .25rem)}.ed-r-project-card__description{display:block}';
|
|
6
6
|
var b = Object.defineProperty, o = (a, i, l, f) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as d } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
|
-
import "../../../chunks/single-field-form.
|
|
2
|
+
import "../../../chunks/single-field-form.BX6ynWNg.js";
|
|
3
3
|
import { r as c, o as i, b as p, n as t } from "../../../chunks/lit.EWazi_Sp.js";
|
|
4
4
|
const u = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-r-search-form{display:block}';
|
|
5
5
|
var m = Object.defineProperty, o = (l, s, n, f) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as o } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
|
-
import "../../../chunks/button.
|
|
2
|
+
import "../../../chunks/button.UtF8xc8z.js";
|
|
3
3
|
import "../../../chunks/header.CoOwmnr7.js";
|
|
4
4
|
import "../../../chunks/layout-container.C8MYJcgw.js";
|
|
5
5
|
import { r, b as a, a as m } from "../../../chunks/lit.EWazi_Sp.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as h } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
2
|
import "../../../chunks/card.peqD1u-M.js";
|
|
3
3
|
import "../../../chunks/heading.Ca_LYMne.js";
|
|
4
|
-
import "../../../chunks/text-passage.
|
|
4
|
+
import "../../../chunks/text-passage.BEu9bNtm.js";
|
|
5
5
|
import { r as m, A as c, b as o, n as s } from "../../../chunks/lit.EWazi_Sp.js";
|
|
6
6
|
const u = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-r-stat-card__label{display:block;margin-block-end:.25rem}.ed-r-stat-card__value{display:block;margin:0;font-variant-numeric:tabular-nums}.ed-r-stat-card__value:not(:last-child){margin-block-end:.25rem}.ed-r-stat-card__meta{display:block}.ed-r-stat-card--positive .ed-r-stat-card__value{color:var(--ed-theme-color-content-utility-success)}.ed-r-stat-card--warning .ed-r-stat-card__value{color:var(--ed-theme-color-content-utility-warning)}.ed-r-stat-card--danger .ed-r-stat-card__value{color:var(--ed-theme-color-content-utility-error)}';
|
|
7
7
|
var g = Object.defineProperty, d = (l, e, r, v) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as u } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
2
|
import { r as b, b as c, n as o } from "../../../chunks/lit.EWazi_Sp.js";
|
|
3
|
-
import "../../../chunks/button.
|
|
3
|
+
import "../../../chunks/button.UtF8xc8z.js";
|
|
4
4
|
const m = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}:host{display:inline-block}.ed-r-transport-button{position:relative;display:inline-block}.ed-r-transport-button--sm .ed-r-transport-button__button{--ed-c-button-size-override: 2.5rem}.ed-r-transport-button--md .ed-r-transport-button__button{--ed-c-button-size-override: 3.5rem}.ed-r-transport-button--lg .ed-r-transport-button__button{--ed-c-button-size-override: 5rem}.ed-r-transport-button--xl .ed-r-transport-button__button{--ed-c-button-size-override: 9rem}.ed-r-transport-button__button{width:var(--ed-c-button-size-override, auto);height:var(--ed-c-button-size-override, auto)}.ed-r-transport-button--pulsing:before{content:"";position:absolute;inset:0;border-radius:var(--ed-theme-border-radius-round);pointer-events:none;box-shadow:0 0 0 0 var(--ed-theme-color-content-danger);animation:ed-r-transport-button-pulse 1.4s ease-out infinite}@keyframes ed-r-transport-button-pulse{0%{box-shadow:0 0 color-mix(in srgb,var(--ed-theme-color-content-danger) 60%,transparent)}70%{box-shadow:0 0 0 1.25rem color-mix(in srgb,var(--ed-theme-color-content-danger) 0%,transparent)}to{box-shadow:0 0 color-mix(in srgb,var(--ed-theme-color-content-danger) 0%,transparent)}}@media(prefers-reduced-motion:reduce){.ed-r-transport-button--pulsing:before{animation:none}}.ed-r-transport-button.ed-is-disabled{opacity:.5;pointer-events:none}';
|
|
5
5
|
var h = Object.defineProperty, n = (a, t, s, d) => {
|
|
6
6
|
for (var e = void 0, i = a.length - 1, l; i >= 0; i--)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import "../../../chunks/button.
|
|
1
|
+
import { E as c } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
|
+
import "../../../chunks/button.UtF8xc8z.js";
|
|
3
3
|
import "../../../chunks/header.CoOwmnr7.js";
|
|
4
|
-
import { a as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
7
|
-
for (var e = void 0,
|
|
8
|
-
(
|
|
9
|
-
return e &&
|
|
4
|
+
import { a as h, r as v, o as m, b as a, n as u } from "../../../chunks/lit.EWazi_Sp.js";
|
|
5
|
+
const b = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}:host{display:block}@media all and (min-width:60rem){.ed-r-vertical-site-header__logo{margin-block:1rem}}.ed-r-vertical-site-header__menu-button{margin-inline-start:auto}@media all and (min-width:60rem){.ed-r-vertical-site-header__menu-button{display:none}}.ed-r-vertical-site-header__nav{position:absolute;inset-inline-start:0;inset-block-start:100%;z-index:3;display:none;width:100%;height:100vh;padding:1rem;overflow:auto;background:var(--ed-theme-color-background-knockout)}.ed-r-vertical-site-header.ed-is-active .ed-r-vertical-site-header__nav{display:block}@media all and (min-width:60rem){.ed-r-vertical-site-header__nav{position:static;display:block;width:auto;height:auto;padding:0;overflow:visible;background:none}}.ed-r-vertical-site-header--bare .ed-r-vertical-site-header__nav{background:var(--ed-theme-color-background-default)}@media all and (min-width:60rem){.ed-r-vertical-site-header--bare .ed-r-vertical-site-header__nav{background:none}}';
|
|
6
|
+
var p = Object.defineProperty, l = (r, t, i, s) => {
|
|
7
|
+
for (var e = void 0, d = r.length - 1, n; d >= 0; d--)
|
|
8
|
+
(n = r[d]) && (e = n(t, i, e) || e);
|
|
9
|
+
return e && p(t, i, e), e;
|
|
10
10
|
};
|
|
11
|
-
class
|
|
11
|
+
class o extends c {
|
|
12
12
|
static get styles() {
|
|
13
|
-
return
|
|
13
|
+
return v(b);
|
|
14
14
|
}
|
|
15
15
|
constructor() {
|
|
16
16
|
super(), this.clickHandler = this.clickHandler.bind(this);
|
|
@@ -19,26 +19,27 @@ class d extends n {
|
|
|
19
19
|
this.isActive = !this.isActive, this.isActive === !0 ? this.parentNode?.getRootNode()?.host?.classList.add("ed-body-is-disabled") : this.parentNode?.getRootNode()?.host?.classList.remove("ed-body-is-disabled");
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
const i = this.componentClassNames("ed-r-vertical-site-header", {
|
|
23
|
-
"ed-is-active": this.isActive === !0
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
const t = this.variant === "bare", i = this.componentClassNames("ed-r-vertical-site-header", {
|
|
23
|
+
"ed-is-active": this.isActive === !0,
|
|
24
|
+
"ed-r-vertical-site-header--bare": t
|
|
25
|
+
}), s = this.slotNotEmpty("nav");
|
|
26
|
+
return a`
|
|
27
|
+
<ed-header class="${i}" orientation="vertical" variant=${m(this.variant)}>
|
|
28
|
+
${this.slotNotEmpty("logo") && a`<div class="ed-r-vertical-site-header__logo">
|
|
28
29
|
<slot name="logo"></slot>
|
|
29
30
|
</div>`}
|
|
30
|
-
${
|
|
31
|
+
${s && a`<ed-button
|
|
31
32
|
class="ed-r-vertical-site-header__menu-button"
|
|
32
33
|
size="lg"
|
|
33
34
|
aria-expanded=${this.isActive === !0}
|
|
34
35
|
@click=${this.clickHandler}
|
|
35
36
|
variant="bare"
|
|
36
|
-
?knockout=${!
|
|
37
|
+
?knockout=${!t}
|
|
37
38
|
text="Menu"
|
|
38
39
|
iconPosition="before"
|
|
39
40
|
iconName="menu"
|
|
40
41
|
></ed-button>`}
|
|
41
|
-
${
|
|
42
|
+
${s && a`<div class="ed-r-vertical-site-header__nav">
|
|
42
43
|
<slot name="nav"></slot>
|
|
43
44
|
</div>`}
|
|
44
45
|
<slot></slot>
|
|
@@ -46,10 +47,13 @@ class d extends n {
|
|
|
46
47
|
`;
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],
|
|
52
|
-
|
|
50
|
+
l([
|
|
51
|
+
u()
|
|
52
|
+
], o.prototype, "variant");
|
|
53
|
+
l([
|
|
54
|
+
h()
|
|
55
|
+
], o.prototype, "isActive");
|
|
56
|
+
customElements.get("ed-r-vertical-site-header") === void 0 && customElements.define("ed-r-vertical-site-header", o);
|
|
53
57
|
export {
|
|
54
|
-
|
|
58
|
+
o as EdRVerticalSiteHeader
|
|
55
59
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as B } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
|
-
import "../../../chunks/button.
|
|
2
|
+
import "../../../chunks/button.UtF8xc8z.js";
|
|
3
3
|
import "../../../chunks/icon.mc7zUxp5.js";
|
|
4
4
|
import { a as p, r as D, b as f, n as R } from "../../../chunks/lit.EWazi_Sp.js";
|
|
5
5
|
import { STATIC_CATALOG as N, CATALOG_API_URL as G } from "./google-fonts-catalog.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as h } from "../../../chunks/EdElement.Dqh0Nrbq.js";
|
|
2
|
-
import "../../../chunks/button.
|
|
2
|
+
import "../../../chunks/button.UtF8xc8z.js";
|
|
3
3
|
import "../../../chunks/layout-container.C8MYJcgw.js";
|
|
4
4
|
import "../wah-logo/wah-logo.js";
|
|
5
5
|
import { a as m, r as c, b as s, n as d } from "../../../chunks/lit.EWazi_Sp.js";
|
package/package.json
CHANGED
|
@@ -13,28 +13,35 @@ import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdEle
|
|
|
13
13
|
* logo stacked above the navigation, always visible.
|
|
14
14
|
*
|
|
15
15
|
* Slot an `ed-primary-nav orientation="vertical" size="sm"` into the nav slot so
|
|
16
|
-
* the rail reads as a stacked list at the lighter typography
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* render source.
|
|
16
|
+
* the rail reads as a stacked list at the lighter typography — in `enhance` mode,
|
|
17
|
+
* so the list semantics stay in one tree (#1404). Nothing is hardcoded, so the
|
|
18
|
+
* recipe is reusable without forking. The Storybook story demonstrates the
|
|
19
|
+
* canonical composition; copy its shape rather than reading the render source.
|
|
20
|
+
*
|
|
21
|
+
* The rail's color treatment is separate from its responsive behavior: leave
|
|
22
|
+
* `variant` unset for the default knockout rail, or set `variant="bare"` for a
|
|
23
|
+
* transparent one (#1415).
|
|
20
24
|
*
|
|
21
25
|
* @recipe composition
|
|
22
26
|
*
|
|
23
27
|
* @use As the left-rail global header in a two-column / sidebar app layout (e.g. a dashboard)
|
|
24
28
|
* @use When the primary navigation has enough items that a horizontal header row would crowd
|
|
25
29
|
* @use Providing persistent stacked navigation on wide screens that collapses to a menu toggle on small screens
|
|
30
|
+
* @use When you want the collapse-to-flyout responsive behavior but not the dark rail — set `variant="bare"` and slot non-knockout content (#1415)
|
|
26
31
|
*
|
|
27
32
|
* @dontuse As a full-width top header on wide screens — use `ed-r-site-header` for the horizontal pattern
|
|
28
33
|
* @dontuse Duplicated on a single page — there should be only one site header per page
|
|
29
34
|
* @dontuse With generic placeholder nav labels ("Nav Item", "Link") — navigation links must have descriptive, unique labels
|
|
30
35
|
*
|
|
31
|
-
* @slot logo - The site brand mark. Slot an `ed-logo
|
|
32
|
-
* @slot nav - The primary navigation. Slot an `ed-primary-nav orientation="vertical" size="sm"
|
|
36
|
+
* @slot logo - The site brand mark. Slot an `ed-logo`. By default the rail is a dark/knockout surface, so render it `knockout`; with `variant="bare"` the rail is transparent, so render it *without* `knockout` so it meets contrast against the page background.
|
|
37
|
+
* @slot nav - The primary navigation. Slot an `ed-primary-nav orientation="vertical" size="sm"`; the recipe wraps it in the flyout/rail region and shows/hides it via the mobile menu toggle. **Prefer `enhance` mode** — author the real `<nav> > <ul> > <li> > <a>` chain inside it and mark the current page with `aria-current="page"`. Classic mode (`ed-primary-nav-item` children) splits the `<ul>` and `<li>` across shadow roots and fails axe `list`/`listitem` on every consuming page (#1404); reach for it only when you need megamenu panels, which enhance mode does not provide.
|
|
33
38
|
* @slot - (default) Escape hatch for additional rail content (utility links, actions) below the nav.
|
|
34
39
|
*
|
|
35
40
|
* @a11y The menu toggle's `aria-expanded` reflects the flyout's open/closed state — keep it in sync if you modify the toggle logic
|
|
36
|
-
* @a11y Mark the current page's nav item
|
|
41
|
+
* @a11y Mark the current page's nav item so users get a clear "you are here" signal — `aria-current="page"` on the anchor in enhance mode (it drives the highlight styling too, so the visual and programmatic states cannot drift), or `isHighlighted` in classic mode
|
|
42
|
+
* @a11y Slot the nav in `enhance` mode. Classic mode splits `<ul>` and `<li>` across shadow roots, so the flattened tree has a list with no list items — axe `list`/`listitem`, WCAG 1.3.1, once per page and once per item (#1404). Note `render-check` exempts those rules (it cannot see across shadow boundaries), so a passing render-check does not clear this
|
|
37
43
|
* @a11y In the sidebar layout the header appears before `<main>` in the DOM — pair with a skip link so keyboard users can bypass the nav
|
|
44
|
+
* @a11y `variant` changes what the slotted content is contrast-checked *against*. On the default (or any filled) rail, slot `knockout` content; with `variant="bare"` there is no fill, so slotted content must meet WCAG AA against the page background instead — knockout content on a bare rail will fail
|
|
38
45
|
*
|
|
39
46
|
* @anatomy A sidebar-style global `ed-header` (orientation="vertical"): brand (logo slot) stacked above the primary navigation (nav slot) in a left rail that collapses to a compact bar + flyout below `lg`. The recipe owns the menu toggle.
|
|
40
47
|
*
|
|
@@ -44,10 +51,26 @@ import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdEle
|
|
|
44
51
|
*
|
|
45
52
|
* @content For app/dashboard shells with a persistent left rail. Keep nav labels short. The recipe owns the structure — you own the words.
|
|
46
53
|
*
|
|
47
|
-
* @state expanded rail (lg+) / collapsed bar + flyout (below lg, toggled).
|
|
54
|
+
* @state expanded rail (lg+) / collapsed bar + flyout (below lg, toggled) / `variant` (rail fill: default knockout, `bare`, brand, accent-*).
|
|
48
55
|
*/
|
|
49
56
|
export declare class EdRVerticalSiteHeader extends EdElement {
|
|
50
57
|
static get styles(): import('lit').CSSResult;
|
|
58
|
+
/**
|
|
59
|
+
* Background color variant, forwarded to the inner `ed-header`. Leave unset
|
|
60
|
+
* for the default knockout (dark) rail.
|
|
61
|
+
*
|
|
62
|
+
* The rail's *responsive behavior* and its *color treatment* are independent
|
|
63
|
+
* concerns — set this when you want the collapse-to-flyout layout without the
|
|
64
|
+
* dark surface (#1415).
|
|
65
|
+
*
|
|
66
|
+
* - `bare` — no background fill; the rail sits transparently over the page
|
|
67
|
+
* background. Slot a **non-knockout** logo and nav, since content now has to
|
|
68
|
+
* meet contrast against the page rather than against a dark fill. The
|
|
69
|
+
* recipe's own chrome (menu toggle, small-screen flyout) follows suit.
|
|
70
|
+
* - `brand` / `brand-knockout` / `accent-1`–`accent-8` — a filled rail; slot
|
|
71
|
+
* knockout content as with the default.
|
|
72
|
+
*/
|
|
73
|
+
variant?: 'bare' | 'brand' | 'brand-knockout' | 'accent-1' | 'accent-2' | 'accent-3' | 'accent-4' | 'accent-5' | 'accent-6' | 'accent-7' | 'accent-8';
|
|
51
74
|
/**
|
|
52
75
|
* Open state of the small-screen navigation flyout.
|
|
53
76
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertical-site-header.d.ts","sourceRoot":"","sources":["../../../../../packages/eddie-recipes/recipes/common/vertical-site-header/vertical-site-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8DAA8D,CAAC;AACzF,OAAO,kEAAkE,CAAC;AAC1E,OAAO,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"vertical-site-header.d.ts","sourceRoot":"","sources":["../../../../../packages/eddie-recipes/recipes/common/vertical-site-header/vertical-site-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8DAA8D,CAAC;AACzF,OAAO,kEAAkE,CAAC;AAC1E,OAAO,kEAAkE,CAAC;AAM1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;;;;;;;;OAcG;IAEH,OAAO,CAAC,EACJ,MAAM,GACN,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;IAEf;;OAEG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;;IAOnB,YAAY;IASZ,MAAM;CAuCP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,qBAAqB,CAAC;KACpD;CACF"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { EdElement as
|
|
1
|
+
import { EdElement as c } from "@brad-frost-web/eddie-web-components/components/EdElement.js";
|
|
2
2
|
import "@brad-frost-web/eddie-web-components/components/button/button.js";
|
|
3
3
|
import "@brad-frost-web/eddie-web-components/components/header/header.js";
|
|
4
|
-
import { unsafeCSS as
|
|
5
|
-
import { state as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { unsafeCSS as h, html as a } from "lit";
|
|
5
|
+
import { property as v, state as m } from "lit/decorators.js";
|
|
6
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
|
7
|
+
const b = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}:host{display:block}@media all and (min-width:60rem){.ed-r-vertical-site-header__logo{margin-block:1rem}}.ed-r-vertical-site-header__menu-button{margin-inline-start:auto}@media all and (min-width:60rem){.ed-r-vertical-site-header__menu-button{display:none}}.ed-r-vertical-site-header__nav{position:absolute;inset-inline-start:0;inset-block-start:100%;z-index:3;display:none;width:100%;height:100vh;padding:1rem;overflow:auto;background:var(--ed-theme-color-background-knockout)}.ed-r-vertical-site-header.ed-is-active .ed-r-vertical-site-header__nav{display:block}@media all and (min-width:60rem){.ed-r-vertical-site-header__nav{position:static;display:block;width:auto;height:auto;padding:0;overflow:visible;background:none}}.ed-r-vertical-site-header--bare .ed-r-vertical-site-header__nav{background:var(--ed-theme-color-background-default)}@media all and (min-width:60rem){.ed-r-vertical-site-header--bare .ed-r-vertical-site-header__nav{background:none}}';
|
|
8
|
+
var p = Object.defineProperty, l = (r, t, i, s) => {
|
|
9
|
+
for (var e = void 0, o = r.length - 1, n; o >= 0; o--)
|
|
10
|
+
(n = r[o]) && (e = n(t, i, e) || e);
|
|
11
|
+
return e && p(t, i, e), e;
|
|
11
12
|
};
|
|
12
|
-
class d extends
|
|
13
|
+
class d extends c {
|
|
13
14
|
static get styles() {
|
|
14
|
-
return
|
|
15
|
+
return h(b);
|
|
15
16
|
}
|
|
16
17
|
constructor() {
|
|
17
18
|
super(), this.clickHandler = this.clickHandler.bind(this);
|
|
@@ -20,26 +21,27 @@ class d extends n {
|
|
|
20
21
|
this.isActive = !this.isActive, this.isActive === !0 ? this.parentNode?.getRootNode()?.host?.classList.add("ed-body-is-disabled") : this.parentNode?.getRootNode()?.host?.classList.remove("ed-body-is-disabled");
|
|
21
22
|
}
|
|
22
23
|
render() {
|
|
23
|
-
const i = this.componentClassNames("ed-r-vertical-site-header", {
|
|
24
|
-
"ed-is-active": this.isActive === !0
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const t = this.variant === "bare", i = this.componentClassNames("ed-r-vertical-site-header", {
|
|
25
|
+
"ed-is-active": this.isActive === !0,
|
|
26
|
+
"ed-r-vertical-site-header--bare": t
|
|
27
|
+
}), s = this.slotNotEmpty("nav");
|
|
28
|
+
return a`
|
|
29
|
+
<ed-header class="${i}" orientation="vertical" variant=${u(this.variant)}>
|
|
30
|
+
${this.slotNotEmpty("logo") && a`<div class="ed-r-vertical-site-header__logo">
|
|
29
31
|
<slot name="logo"></slot>
|
|
30
32
|
</div>`}
|
|
31
|
-
${
|
|
33
|
+
${s && a`<ed-button
|
|
32
34
|
class="ed-r-vertical-site-header__menu-button"
|
|
33
35
|
size="lg"
|
|
34
36
|
aria-expanded=${this.isActive === !0}
|
|
35
37
|
@click=${this.clickHandler}
|
|
36
38
|
variant="bare"
|
|
37
|
-
?knockout=${!
|
|
39
|
+
?knockout=${!t}
|
|
38
40
|
text="Menu"
|
|
39
41
|
iconPosition="before"
|
|
40
42
|
iconName="menu"
|
|
41
43
|
></ed-button>`}
|
|
42
|
-
${
|
|
44
|
+
${s && a`<div class="ed-r-vertical-site-header__nav">
|
|
43
45
|
<slot name="nav"></slot>
|
|
44
46
|
</div>`}
|
|
45
47
|
<slot></slot>
|
|
@@ -47,8 +49,11 @@ class d extends n {
|
|
|
47
49
|
`;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
l([
|
|
53
|
+
v()
|
|
54
|
+
], d.prototype, "variant");
|
|
55
|
+
l([
|
|
56
|
+
m()
|
|
52
57
|
], d.prototype, "isActive");
|
|
53
58
|
customElements.get("ed-r-vertical-site-header") === void 0 && customElements.define("ed-r-vertical-site-header", d);
|
|
54
59
|
export {
|