@atomic-ui/blocks 0.14.0 → 0.15.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/README.md +15 -15
- package/custom-elements.json +2978 -9654
- package/dist/chunk-GQ2I44OU.js +226 -0
- package/dist/chunk-GQ2I44OU.js.map +1 -0
- package/dist/chunk-HISF6RYK.js +199 -0
- package/dist/chunk-HISF6RYK.js.map +1 -0
- package/dist/{chunk-Q366ZM2X.js → chunk-LJGOTYDJ.js} +17 -41
- package/dist/chunk-LJGOTYDJ.js.map +1 -0
- package/dist/{chunk-BW5ZMKES.js → chunk-OBBPBN4S.js} +17 -144
- package/dist/chunk-OBBPBN4S.js.map +1 -0
- package/dist/chunk-OHXEZPBB.js +109 -0
- package/dist/chunk-OHXEZPBB.js.map +1 -0
- package/dist/{chunk-NZQZRBKV.js → chunk-VOONXP5H.js} +15 -57
- package/dist/chunk-VOONXP5H.js.map +1 -0
- package/dist/chunk-XSKGWT2D.js +84 -0
- package/dist/chunk-XSKGWT2D.js.map +1 -0
- package/dist/components/changelog.d.ts +0 -288
- package/dist/components/changelog.js +3 -12
- package/dist/components/g2-site.d.ts +27 -40
- package/dist/components/g2-site.js +1 -3
- package/dist/components/marketing.d.ts +0 -283
- package/dist/components/marketing.js +3 -13
- package/dist/components/organisms.d.ts +0 -489
- package/dist/components/organisms.js +3 -19
- package/dist/components/selling.d.ts +0 -255
- package/dist/components/selling.js +3 -15
- package/dist/components/site.d.ts +6 -52
- package/dist/components/site.js +3 -5
- package/dist/components/studio.d.ts +10 -95
- package/dist/components/studio.js +1 -3
- package/dist/index.d.ts +9 -13
- package/dist/index.js +23 -101
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +751 -1642
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/dist/standalone/index.html +18 -26
- package/package.json +3 -3
- package/specimen/index.html +18 -26
- package/dist/chunk-BW5ZMKES.js.map +0 -1
- package/dist/chunk-GZTBAT6P.js +0 -574
- package/dist/chunk-GZTBAT6P.js.map +0 -1
- package/dist/chunk-NHWD2LUR.js +0 -255
- package/dist/chunk-NHWD2LUR.js.map +0 -1
- package/dist/chunk-NZQZRBKV.js.map +0 -1
- package/dist/chunk-Q366ZM2X.js.map +0 -1
- package/dist/chunk-R7SSIE2E.js +0 -362
- package/dist/chunk-R7SSIE2E.js.map +0 -1
- package/dist/chunk-XB6FD4SF.js +0 -438
- package/dist/chunk-XB6FD4SF.js.map +0 -1
- package/dist/chunk-YXMXLVK7.js +0 -230
- package/dist/chunk-YXMXLVK7.js.map +0 -1
- package/dist/chunk-ZD75GU6J.js +0 -75
- package/dist/chunk-ZD75GU6J.js.map +0 -1
- package/dist/chunk-ZM2HLQOG.js +0 -783
- package/dist/chunk-ZM2HLQOG.js.map +0 -1
- package/dist/chunk-ZODL5HD4.js +0 -535
- package/dist/chunk-ZODL5HD4.js.map +0 -1
- package/dist/components/card-grid.d.ts +0 -72
- package/dist/components/card-grid.js +0 -7
- package/dist/components/card-grid.js.map +0 -1
- package/dist/components/property.d.ts +0 -389
- package/dist/components/property.js +0 -17
- package/dist/components/property.js.map +0 -1
- package/dist/components/scene.d.ts +0 -138
- package/dist/components/scene.js +0 -7
- package/dist/components/scene.js.map +0 -1
- package/dist/components/scrubber.d.ts +0 -86
- package/dist/components/scrubber.js +0 -7
- package/dist/components/scrubber.js.map +0 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// packages/blocks/src/components/selling.ts
|
|
2
|
+
import { css, html, nothing } from "lit";
|
|
3
|
+
import { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from "@atomic-ui/ui";
|
|
4
|
+
var card = css`
|
|
5
|
+
.card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }
|
|
6
|
+
.h { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
|
|
7
|
+
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight("semibold")}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
8
|
+
.btn:hover { background: ${t.brandHover}; }
|
|
9
|
+
.btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }
|
|
10
|
+
.small { margin: 0; ${type("xs")} color: ${t.textMuted}; }
|
|
11
|
+
.visually-hidden { ${visuallyHidden} }
|
|
12
|
+
`;
|
|
13
|
+
var arrow = html`<svg viewBox="0 0 20 12" width="20" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false"><path d="M0 6h18M13 1l5 5-5 5" /></svg>`;
|
|
14
|
+
var ImpaktPlanComparison = class extends ImpaktElement {
|
|
15
|
+
static {
|
|
16
|
+
this.properties = {
|
|
17
|
+
heading: { type: String },
|
|
18
|
+
plans: { type: Array },
|
|
19
|
+
rows: { type: Array },
|
|
20
|
+
buttonText: { type: String, attribute: "button-text" },
|
|
21
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
22
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
23
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
this.heading = "Compare cover";
|
|
29
|
+
this.plans = [];
|
|
30
|
+
this.rows = [];
|
|
31
|
+
this.buttonText = "Choose";
|
|
32
|
+
this.headingLevel = 2;
|
|
33
|
+
this.spaceAbove = "none";
|
|
34
|
+
this.spaceBelow = "none";
|
|
35
|
+
}
|
|
36
|
+
static {
|
|
37
|
+
this.styles = [
|
|
38
|
+
...ImpaktElement.styles,
|
|
39
|
+
focusRing,
|
|
40
|
+
targetSize,
|
|
41
|
+
spaceAround,
|
|
42
|
+
card,
|
|
43
|
+
css`
|
|
44
|
+
:host { display: block; container-type: inline-size; }
|
|
45
|
+
.h { margin-block-end: ${space(5)}; }
|
|
46
|
+
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }
|
|
47
|
+
.plan { --plan-accent: ${token("color.accent.default", "#ffd43b")}; --plan-on-accent: ${token("color.accent.on", "#111111")}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }
|
|
48
|
+
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
49
|
+
.plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }
|
|
50
|
+
.badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
51
|
+
.name { margin: 0; ${type("lg")} font-weight: ${fontWeight("medium")}; color: inherit; }
|
|
52
|
+
.price { margin: 0; font-family: ${t.fontHeading}; ${type("4xl")} font-weight: ${fontWeight("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
53
|
+
/* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */
|
|
54
|
+
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
55
|
+
.period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight("regular")}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }
|
|
56
|
+
.note { margin: 0; ${type("sm")} color: var(--plan-muted, ${t.textMuted}); }
|
|
57
|
+
ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }
|
|
58
|
+
li { display: flex; gap: ${space(2)}; ${type("sm")} }
|
|
59
|
+
li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }
|
|
60
|
+
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
61
|
+
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
62
|
+
.plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }
|
|
63
|
+
.plan .btn:hover { background: ${t.brandHover}; }
|
|
64
|
+
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
65
|
+
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }
|
|
66
|
+
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
67
|
+
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }
|
|
68
|
+
`
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
has(plan, row) {
|
|
72
|
+
return plan.includes.split(",").map((s) => s.trim().toLowerCase()).includes(row.label.trim().toLowerCase());
|
|
73
|
+
}
|
|
74
|
+
choose(plan, event) {
|
|
75
|
+
const go = this.dispatchEvent(new CustomEvent("impakt-select", { detail: { plan }, bubbles: true, composed: true, cancelable: true }));
|
|
76
|
+
if (!go) event.preventDefault();
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return html`
|
|
80
|
+
${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
|
|
81
|
+
<div class="grid" style=${`--cols: ${Math.max(1, this.plans.length)}`}>
|
|
82
|
+
${this.plans.map(
|
|
83
|
+
(p) => html`<section class="card plan ${p.badge ? "top" : ""}" aria-labelledby=${this.id_(`n-${p.id}`)}>
|
|
84
|
+
${p.badge ? html`<span class="badge">${p.badge}</span>` : nothing}
|
|
85
|
+
<h3 class="name" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>
|
|
86
|
+
<p class="price">${p.price}${p.period ? html` <span class="period">${p.period}</span>` : nothing}</p>
|
|
87
|
+
${p.note ? html`<p class="note">${p.note}</p>` : nothing}
|
|
88
|
+
<ul>${this.rows.map((r) => {
|
|
89
|
+
const has = this.has(p, r);
|
|
90
|
+
return html`<li data-has=${String(has)}><span class="mark" aria-hidden="true">${has ? "\u221A" : "\u2013"}</span><span>${r.label}${has ? html`<span class="visually-hidden">: ${say("included")}</span>` : html`<span class="not"> · ${say("not included")}</span>`}</span></li>`;
|
|
91
|
+
})}</ul>
|
|
92
|
+
${p.href ? html`<a class="btn" href=${p.href} @click=${(e) => this.choose(p, e)}><span>${this.buttonText}<span class="visually-hidden"> ${p.name}</span></span>${arrow}</a>` : html`<button class="btn" type="button" @click=${(e) => this.choose(p, e)}><span>${this.buttonText}<span class="visually-hidden"> ${p.name}</span></span>${arrow}</button>`}
|
|
93
|
+
</section>`
|
|
94
|
+
)}
|
|
95
|
+
</div>`;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
function embedOf(src, locale) {
|
|
99
|
+
const yt = /(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(src);
|
|
100
|
+
const hl = locale && !/^en\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split("-")[0])}&cc_lang_pref=${encodeURIComponent(locale.split("-")[0])}` : "";
|
|
101
|
+
if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;
|
|
102
|
+
const vimeo = /vimeo\.com\/(?:video\/)?(\d+)/.exec(src);
|
|
103
|
+
if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
var ImpaktVideo = class extends ImpaktElement {
|
|
107
|
+
static {
|
|
108
|
+
this.properties = {
|
|
109
|
+
videoSrc: { type: String, attribute: "video-src" },
|
|
110
|
+
label: { type: String },
|
|
111
|
+
posterSrc: { type: String, attribute: "poster-src" },
|
|
112
|
+
captionsSrc: { type: String, attribute: "captions-src" },
|
|
113
|
+
transcriptHref: { type: String, attribute: "transcript-href" },
|
|
114
|
+
playText: { type: String, attribute: "play-text" },
|
|
115
|
+
ratio: { type: String, reflect: true },
|
|
116
|
+
look: { type: String, reflect: true },
|
|
117
|
+
caption: { type: String },
|
|
118
|
+
duration: { type: String },
|
|
119
|
+
transcript: { type: String },
|
|
120
|
+
transcriptText: { type: String, attribute: "transcript-text" },
|
|
121
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
122
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
constructor() {
|
|
126
|
+
super();
|
|
127
|
+
this.videoSrc = "";
|
|
128
|
+
this.label = "Video";
|
|
129
|
+
this.posterSrc = "";
|
|
130
|
+
this.captionsSrc = "";
|
|
131
|
+
this.transcriptHref = "";
|
|
132
|
+
this.playText = "Play video";
|
|
133
|
+
this.ratio = "16:9";
|
|
134
|
+
this.look = "plain";
|
|
135
|
+
this.caption = "";
|
|
136
|
+
this.duration = "";
|
|
137
|
+
this.transcript = "";
|
|
138
|
+
this.transcriptText = "";
|
|
139
|
+
this.playing = false;
|
|
140
|
+
this.spaceAbove = "none";
|
|
141
|
+
this.spaceBelow = "none";
|
|
142
|
+
}
|
|
143
|
+
static {
|
|
144
|
+
this.styles = [
|
|
145
|
+
...ImpaktElement.styles,
|
|
146
|
+
focusRing,
|
|
147
|
+
spaceAround,
|
|
148
|
+
card,
|
|
149
|
+
css`
|
|
150
|
+
:host { display: block; }
|
|
151
|
+
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }
|
|
152
|
+
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
153
|
+
:host([ratio='1:1']) .frame { aspect-ratio: 1; }
|
|
154
|
+
:host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }
|
|
155
|
+
iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }
|
|
156
|
+
.play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }
|
|
157
|
+
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }
|
|
158
|
+
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
159
|
+
.label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type("lg")} font-weight: ${fontWeight("semibold")}; text-align: start; }
|
|
160
|
+
.foot { margin: ${space(2)} 0 0; ${type("sm")} }
|
|
161
|
+
.foot a { color: ${t.link}; }
|
|
162
|
+
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
163
|
+
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
164
|
+
.window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${t.borderThin} solid var(--stage-rule); }
|
|
165
|
+
.bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
166
|
+
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
167
|
+
.bar .dot:first-child { background: ${token("color.accent.default", "#ffd43b")}; }
|
|
168
|
+
.bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
169
|
+
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
170
|
+
:host([look='window']) .play { background: none; color: inherit; }
|
|
171
|
+
:host([look='window']) .disc { display: none; }
|
|
172
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type("md")} font-weight: ${fontWeight("medium")}; color: ${token("color.accent.on", "#111111")}; background: ${token("color.accent.default", "#ffd43b")}; }
|
|
173
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token("color.accent.default", "#ffd43b")} 88%, #ffffff); }
|
|
174
|
+
:host([look='window']) .play:focus-visible { outline: none; }
|
|
175
|
+
:host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }
|
|
176
|
+
.length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
177
|
+
.transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }
|
|
178
|
+
.transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight("medium")}; list-style: none; }
|
|
179
|
+
.transcript summary::-webkit-details-marker { display: none; }
|
|
180
|
+
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }
|
|
181
|
+
.transcript[open] summary::before { content: '−'; }
|
|
182
|
+
.transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }
|
|
183
|
+
.transcript p { margin: 0; }
|
|
184
|
+
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
185
|
+
`
|
|
186
|
+
];
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
const embed = embedOf(this.videoSrc, pageLocale(this));
|
|
190
|
+
let player;
|
|
191
|
+
if (!this.videoSrc) player = html`<div class="empty">${say("Add a video address")}</div>`;
|
|
192
|
+
else if (embed && this.playing)
|
|
193
|
+
player = html`<iframe src=${embed} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`;
|
|
194
|
+
else if (embed)
|
|
195
|
+
player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt="" />` : nothing}
|
|
196
|
+
<button class="play" type="button" @click=${() => {
|
|
197
|
+
this.playing = true;
|
|
198
|
+
}}>
|
|
199
|
+
<span class="disc" aria-hidden="true"><svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></span>
|
|
200
|
+
<span class="label">${this.playText}${this.duration ? html` <span class="length">${this.duration}</span>` : nothing}<span class="visually-hidden">: ${this.label}</span></span>
|
|
201
|
+
</button>`;
|
|
202
|
+
else
|
|
203
|
+
player = html`<video controls preload="metadata" poster=${this.posterSrc || nothing} aria-label=${this.label}>
|
|
204
|
+
<source src=${this.videoSrc} />
|
|
205
|
+
${this.captionsSrc ? html`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />` : nothing}
|
|
206
|
+
</video>`;
|
|
207
|
+
const frame = html`<div class="frame" part="frame">${player}</div>`;
|
|
208
|
+
const paragraphs = (this.transcript ?? "").split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
|
|
209
|
+
return html`${this.look === "window" ? html`<div class="window" part="window">
|
|
210
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption ? html`<span class="caption">${this.caption}</span>` : nothing}</div>
|
|
211
|
+
${frame}
|
|
212
|
+
</div>` : frame}
|
|
213
|
+
${paragraphs.length ? html`<details class="transcript" part="transcript"><summary>${this.transcriptText || say("Read the transcript")}</summary><div class="words">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>` : nothing}
|
|
214
|
+
${this.transcriptHref ? html`<p class="foot"><a href=${this.transcriptHref}>${say("Read the transcript")}<span class="visually-hidden">${say(" of {video}", { video: this.label })}</span></a></p>` : nothing}`;
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
ImpaktVideo.createProperty("playing", { state: true });
|
|
218
|
+
customElements.define("impakt-plan-comparison", ImpaktPlanComparison);
|
|
219
|
+
customElements.define("impakt-video", ImpaktVideo);
|
|
220
|
+
|
|
221
|
+
export {
|
|
222
|
+
ImpaktPlanComparison,
|
|
223
|
+
embedOf,
|
|
224
|
+
ImpaktVideo
|
|
225
|
+
};
|
|
226
|
+
//# sourceMappingURL=chunk-GQ2I44OU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/selling.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\n/** The arrow after a button's words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h18M13 1l5 5-5 5\" /></svg>`;\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as £12. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader, and a line a plan does not have also says \"· not included\"\n * in muted words on the screen. On a narrow screen the plans stack, each with\n * its own list.\n *\n * Each plan is a card with a 1px border in the text colour and no shadow. The\n * plan with a `badge` is filled with the text colour, its badge in monospace\n * capitals and its price, ticks and button in the accent, a pair the tokens\n * already hold at 4.5:1 on ink (1.4.3).\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { --plan-accent: ${token('color.accent.default', '#ffd43b')}; --plan-on-accent: ${token('color.accent.on', '#111111')}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n /* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */\n .plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }\n .badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('medium')}; color: inherit; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; letter-spacing: -0.03em; color: inherit; }\n /* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */\n .top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }\n .period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }\n .note { margin: 0; ${type('sm')} color: var(--plan-muted, ${t.textMuted}); }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }\n .mark { flex-shrink: 0; inline-size: 1em; text-align: start; }\n .top li[data-has='true'] .mark { color: var(--plan-accent); }\n .plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n .plan .btn:hover { background: ${t.brandHover}; }\n .plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }\n .plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }\n @media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n // A line the plan has is ticked and says so to a screen reader; one it lacks says \"not included\" on the screen too.\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '√' : '–'}</span><span>${r.label}${\n has ? html`<span class=\"visually-hidden\">: ${say('included')}</span>` : html`<span class=\"not\"> · ${say('not included')}</span>`\n }</span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</a>`\n : html`<button class=\"btn\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * `look=\"window\"` draws it in a window on an ink stage, as a product\n * walkthrough is shown: a bar with three dots and a caption in monospace\n * capitals, and an accent Play button with the video's length beside its\n * words. The stage stays ink in both themes. `transcript` puts what the video\n * shows on the page itself, in a section that opens under it, as an\n * alternative to a link to it (1.2.1, 1.2.3).\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n look: { type: String, reflect: true },\n caption: { type: String },\n duration: { type: String },\n transcript: { type: String },\n transcriptText: { type: String, attribute: 'transcript-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n /** `plain` is the video alone. `window` draws it in a window with a bar and a caption, on an ink stage. */\n declare look: 'plain' | 'window';\n /** With `window`: the words in the window's bar, such as \"Walkthrough video\". Decoration: `label` is what is read. */\n declare caption: string;\n /** How long the video is, such as \"2 min\", shown beside the Play button's words and read with them. */\n declare duration: string;\n /** What the video shows, as words, shown in a section that opens under it. Blank lines start a new paragraph. */\n declare transcript: string;\n /** The words on the line that opens the transcript, such as \"Read what the video shows\". */\n declare transcriptText: string;\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.look = 'plain';\n this.caption = '';\n this.duration = '';\n this.transcript = '';\n this.transcriptText = '';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n /* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */\n .window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${t.borderThin} solid var(--stage-rule); }\n .bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }\n .bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }\n .bar .dot:first-child { background: ${token('color.accent.default', '#ffd43b')}; }\n .bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n :host([look='window']) .frame { border-radius: 0; background: var(--stage); }\n :host([look='window']) .play { background: none; color: inherit; }\n :host([look='window']) .disc { display: none; }\n :host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: ${token('color.accent.on', '#111111')}; background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token('color.accent.default', '#ffd43b')} 88%, #ffffff); }\n :host([look='window']) .play:focus-visible { outline: none; }\n :host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }\n .length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }\n .transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight('medium')}; list-style: none; }\n .transcript summary::-webkit-details-marker { display: none; }\n .transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }\n .transcript[open] summary::before { content: '−'; }\n .transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }\n .transcript p { margin: 0; }\n @media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <span class=\"disc\" aria-hidden=\"true\"><svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M8 5v14l11-7z\"/></svg></span>\n <span class=\"label\">${this.playText}${this.duration ? html` <span class=\"length\">${this.duration}</span>` : nothing}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n const frame = html`<div class=\"frame\" part=\"frame\">${player}</div>`;\n const paragraphs = (this.transcript ?? '')\n .split(/\\n\\s*\\n/)\n .map((p) => p.trim())\n .filter(Boolean);\n return html`${\n this.look === 'window'\n ? html`<div class=\"window\" part=\"window\">\n <div class=\"bar\" aria-hidden=\"true\"><span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>${this.caption ? html`<span class=\"caption\">${this.caption}</span>` : nothing}</div>\n ${frame}\n </div>`\n : frame\n }\n ${\n paragraphs.length\n ? html`<details class=\"transcript\" part=\"transcript\"><summary>${this.transcriptText || say('Read the transcript')}</summary><div class=\"words\">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>`\n : nothing\n }\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n }\n}\n"],"mappings":";AAAA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,KAAK,YAAY,eAAe,WAAW,YAAY,gBAAgB,YAAY,OAAO,aAAa,GAAG,OAAO,YAAY;AAItI,IAAM,OAAO;AAAA,wBACW,EAAE,WAAW,oBAAoB,EAAE,QAAQ,iBAAiB,EAAE,QAAQ,eAAe,EAAE,QAAQ;AAAA,iCACtF,EAAE,WAAW,KAAK,KAAK,KAAK,CAAC,iBAAiB,WAAW,MAAM,CAAC,YAAY,EAAE,WAAW;AAAA,8GACZ,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,iCAAiC,WAAW,UAAU,CAAC,YAAY,EAAE,OAAO,wCAAwC,EAAE,KAAK,+BAA+B,EAAE,QAAQ;AAAA,6BAC3Q,EAAE,UAAU;AAAA,wBACjB,EAAE,IAAI,sDAAsD,EAAE,UAAU,IAAI,EAAE,MAAM;AAAA,wBACpF,KAAK,IAAI,CAAC,WAAW,EAAE,SAAS;AAAA,uBACjC,cAAc;AAAA;AAIrC,IAAM,QAAQ;AA0CP,IAAM,uBAAN,cAAmC,cAAc;AAAA,EACtD;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,MAAM,EAAE,MAAM,MAAM;AAAA,MACpB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,YAAY,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,cAAc;AAAA,MACpE,YAAY,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,cAAc;AAAA,IACtE;AA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;AAAA,8BAEuB,KAAK,QAAQ,GAAG,KAAK,WAAW,6BAA6B,KAAK,QAAQ,YAAY,OAAO,mCAAmC,KAAK,KAAK;AAAA;AAAA;AAGlK,eAAS,iDAAiD,KAAK,aAAa,OAAO,eAAe,KAAK,KAAK;AAAA,oBAC9F,KAAK,QAAQ;AAAA,QACzB,KAAK,cAAc,kCAAkC,KAAK,WAAW,6CAA6C,OAAO;AAAA;AAE7H,UAAM,QAAQ,uCAAuC,MAAM;AAC3D,UAAM,cAAc,KAAK,cAAc,IACpC,MAAM,SAAS,EACf,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,OAAO;AACjB,WAAO,OACL,KAAK,SAAS,WACV;AAAA,6HACmH,KAAK,UAAU,6BAA6B,KAAK,OAAO,YAAY,OAAO;AAAA,cAC1L,KAAK;AAAA,oBAET,KACN;AAAA,QAEI,WAAW,SACP,8DAA8D,KAAK,kBAAkB,IAAI,qBAAqB,CAAC,gCAAgC,WAAW,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,qBACvL,OACN;AAAA,QACE,KAAK,iBAAiB,+BAA+B,KAAK,cAAc,IAAI,IAAI,qBAAqB,CAAC,iCAAiC,IAAI,eAAe,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC,oBAAoB,OAAO;AAAA,EACjN;AACF;AAGA,YAAY,eAAe,WAAW,EAAE,OAAO,KAAK,CAAC;AAErD,eAAe,OAAO,0BAA0B,oBAAoB;AACpE,eAAe,OAAO,gBAAgB,WAAW;","names":[]}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// packages/blocks/src/components/changelog.ts
|
|
2
|
+
import { css, html, nothing, svg } from "lit";
|
|
3
|
+
import { ImpaktElement, visuallyHidden, fontSize, fontWeight, space, spaceAround, t, token, toneOf } from "@atomic-ui/ui";
|
|
4
|
+
function revealOnView(el, onShow) {
|
|
5
|
+
const show = () => {
|
|
6
|
+
el.setAttribute("shown", "");
|
|
7
|
+
onShow?.();
|
|
8
|
+
};
|
|
9
|
+
if (typeof IntersectionObserver !== "function") {
|
|
10
|
+
show();
|
|
11
|
+
return () => void 0;
|
|
12
|
+
}
|
|
13
|
+
const io = new IntersectionObserver(
|
|
14
|
+
(entries) => {
|
|
15
|
+
if (entries.some((e) => e.isIntersecting)) {
|
|
16
|
+
show();
|
|
17
|
+
io.disconnect();
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{ threshold: 0.25 }
|
|
21
|
+
);
|
|
22
|
+
io.observe(el);
|
|
23
|
+
return () => io.disconnect();
|
|
24
|
+
}
|
|
25
|
+
var mono = css`.mono { font-family: ${t.fontMono}; font-size: ${fontSize("xs")}; letter-spacing: 0.04em; }`;
|
|
26
|
+
var heading = (level, text, cls) => {
|
|
27
|
+
const l = Math.min(Math.max(level || 3, 2), 6);
|
|
28
|
+
switch (l) {
|
|
29
|
+
case 2:
|
|
30
|
+
return html`<h2 class=${cls}>${text}</h2>`;
|
|
31
|
+
case 4:
|
|
32
|
+
return html`<h4 class=${cls}>${text}</h4>`;
|
|
33
|
+
case 5:
|
|
34
|
+
return html`<h5 class=${cls}>${text}</h5>`;
|
|
35
|
+
case 6:
|
|
36
|
+
return html`<h6 class=${cls}>${text}</h6>`;
|
|
37
|
+
default:
|
|
38
|
+
return html`<h3 class=${cls}>${text}</h3>`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var words = css`
|
|
42
|
+
.h { margin: 0; color: var(--impakt-heading, ${t.textHeading}); font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }
|
|
43
|
+
.body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
|
|
44
|
+
.meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
|
|
45
|
+
.sr-only { ${visuallyHidden} }
|
|
46
|
+
`;
|
|
47
|
+
var ImpaktBranchList = class extends ImpaktElement {
|
|
48
|
+
constructor() {
|
|
49
|
+
super();
|
|
50
|
+
this.unwatch = () => void 0;
|
|
51
|
+
this.items = [];
|
|
52
|
+
this.trunk = "";
|
|
53
|
+
this.look = "tones";
|
|
54
|
+
this.current = -1;
|
|
55
|
+
this.currentText = "";
|
|
56
|
+
this.headingLevel = 3;
|
|
57
|
+
this.spaceAbove = "none";
|
|
58
|
+
this.spaceBelow = "none";
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
this.properties = {
|
|
62
|
+
items: { type: Array },
|
|
63
|
+
trunk: { type: String },
|
|
64
|
+
look: { type: String, reflect: true },
|
|
65
|
+
current: { type: Number },
|
|
66
|
+
currentText: { type: String, attribute: "current-text" },
|
|
67
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
68
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
69
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
static {
|
|
73
|
+
this.styles = [
|
|
74
|
+
...ImpaktElement.styles,
|
|
75
|
+
spaceAround,
|
|
76
|
+
mono,
|
|
77
|
+
words,
|
|
78
|
+
css`
|
|
79
|
+
:host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
|
|
80
|
+
ul { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
81
|
+
ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
|
|
82
|
+
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${space(6)}; }
|
|
83
|
+
.graph { position: relative; }
|
|
84
|
+
.graph svg { position: absolute; inset-block-start: -${space(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${space(12)}); overflow: visible; }
|
|
85
|
+
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(4)} ${space(10)}; align-items: start; }
|
|
86
|
+
.path { margin: 0 0 ${space(2)}; opacity: 0.72; }
|
|
87
|
+
.h { font-size: ${fontSize("3xl")}; line-height: 1.05; }
|
|
88
|
+
.h a { color: inherit; text-decoration: none; }
|
|
89
|
+
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
90
|
+
.h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }
|
|
91
|
+
.detail { display: flex; flex-direction: column; gap: ${space(3)}; padding-block-start: ${space(1)}; }
|
|
92
|
+
.tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
|
|
93
|
+
.end { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block-start: ${space(4)}; }
|
|
94
|
+
.end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }
|
|
95
|
+
@container (max-width: 44rem) {
|
|
96
|
+
li { grid-template-columns: 56px minmax(0, 1fr); }
|
|
97
|
+
.graph svg { inline-size: 56px; }
|
|
98
|
+
.row { grid-template-columns: minmax(0, 1fr); }
|
|
99
|
+
.h { font-size: ${fontSize("2xl")}; }
|
|
100
|
+
}
|
|
101
|
+
/*
|
|
102
|
+
* The mono look, as the Branches component (12:683) draws it: rows 120px apart, a 1.5px trunk at 10px, and
|
|
103
|
+
* each branch a fixed S-curve out to 60px by 28px down, straight to 78 and back by 110, so its shape does not
|
|
104
|
+
* change with the row's height. The path and heading sit on the left and the line and tags in a 490px column
|
|
105
|
+
* on the right, level with the path; a hairline closes each row 114px down. On a phone (14:989) the trunk is
|
|
106
|
+
* at 8px, the branch reaches 40px and the words stack in one column.
|
|
107
|
+
*/
|
|
108
|
+
:host([look='mono']) { --trunk: currentColor; }
|
|
109
|
+
:host([look='mono']) ul::before { inset-inline-start: 10px; inline-size: 1.5px; border-radius: 0; }
|
|
110
|
+
:host([look='mono']) li { grid-template-columns: 86px minmax(0, 1fr); padding-block: 24px 5px; }
|
|
111
|
+
:host([look='mono']) .graph svg { inset-block-start: -24px; inline-size: 96px; block-size: 110px; }
|
|
112
|
+
:host([look='mono']) .graph svg path { stroke-width: 1.5; }
|
|
113
|
+
:host([look='mono']) .ring { position: absolute; inset-inline-start: 55px; inset-block-start: 20px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; background: ${t.surfaceCard}; }
|
|
114
|
+
:host([look='mono']) .ring.current { background: ${token("color.accent.default", "#ffd43b")}; }
|
|
115
|
+
:host([look='mono']) .text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 490px); grid-template-areas: 'path detail' 'h detail'; grid-template-rows: auto 1fr; column-gap: ${space(10)}; align-content: start; padding-block-end: 20px; border-block-end: ${t.borderThin} solid ${t.rule}; }
|
|
116
|
+
:host([look='mono']) .row { display: contents; }
|
|
117
|
+
:host([look='mono']) .path { grid-area: path; margin: 0 0 4.6px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }
|
|
118
|
+
:host([look='mono']) .h { grid-area: h; margin: 0; font-size: 2rem; line-height: 1.1; font-weight: ${fontWeight("semibold")}; letter-spacing: -0.03em; }
|
|
119
|
+
:host([look='mono']) .detail { grid-area: detail; gap: 8px; padding: 0; }
|
|
120
|
+
:host([look='mono']) .body { margin: 0; font-size: 1rem; line-height: 1.45; color: ${t.textMuted}; opacity: 1; }
|
|
121
|
+
:host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${t.trackingWide}; opacity: 1; color: ${t.textMuted}; }
|
|
122
|
+
/* The main line's label sits 14px under the last rule and the block ends 17px under it, 520px for four rows (12:716). */
|
|
123
|
+
:host([look='mono']) .end { gap: 0; margin: 0; padding-block: 8px 17px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }
|
|
124
|
+
/* The trunk runs on, unbroken, into its end dot, which sits on the trunk; the words line up with the rows' words. */
|
|
125
|
+
:host([look='mono']) .end::before { flex: none; inline-size: 10px; block-size: 10px; margin-inline: 5.75px calc(86px - 15.75px); background: ${t.text}; }
|
|
126
|
+
:host([look='mono']) .end::after { content: ''; position: absolute; inset-block-start: 0; inset-inline-start: 10px; inline-size: 1.5px; block-size: 15.7px; background: var(--trunk); }
|
|
127
|
+
:host([look='mono']) li:last-child .graph svg { block-size: 110px; }
|
|
128
|
+
@container (max-width: 44rem) {
|
|
129
|
+
/* Set on the list, since a container query cannot restyle the container itself. */
|
|
130
|
+
:host([look='mono']) ul::before { inset-inline-start: 8px; }
|
|
131
|
+
:host([look='mono']) li { grid-template-columns: 60px minmax(0, 1fr); padding-block: 18px 5px; }
|
|
132
|
+
:host([look='mono']) .graph svg { inset-block-start: -18px; inline-size: 60px; block-size: 132px; }
|
|
133
|
+
:host([look='mono']) .ring { inset-inline-start: 35px; inset-block-start: 38px; }
|
|
134
|
+
/* On a phone the rows are 150px apart whatever their words, as they are 120px apart on a wide screen (14:989). */
|
|
135
|
+
:host([look='mono']) .text { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'path' 'h' 'detail'; box-sizing: border-box; min-block-size: 127px; padding-block-end: 12px; }
|
|
136
|
+
:host([look='mono']) .h { font-size: 1.5rem; line-height: 1.15; }
|
|
137
|
+
:host([look='mono']) .detail { margin-block-start: 6px; }
|
|
138
|
+
:host([look='mono']) .body { font-size: 0.875rem; line-height: 1.43; }
|
|
139
|
+
:host([look='mono']) .tags { display: none; }
|
|
140
|
+
:host([look='mono']) .end { padding-block-end: 13px; }
|
|
141
|
+
:host([look='mono']) .end::before { margin-inline: 3.75px calc(60px - 13.75px); }
|
|
142
|
+
:host([look='mono']) .end::after { inset-inline-start: 8px; }
|
|
143
|
+
}
|
|
144
|
+
:host([look='mono']) .graph .narrow { display: none; }
|
|
145
|
+
@container (max-width: 44rem) { :host([look='mono']) .graph .wide { display: none; } :host([look='mono']) .graph .narrow { display: inline; } }
|
|
146
|
+
@media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }
|
|
147
|
+
/* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */
|
|
148
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
149
|
+
.graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }
|
|
150
|
+
.graph circle, .ring { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }
|
|
151
|
+
:host([shown]) .graph svg { clip-path: inset(0); }
|
|
152
|
+
:host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }
|
|
153
|
+
}
|
|
154
|
+
`
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
connectedCallback() {
|
|
158
|
+
super.connectedCallback();
|
|
159
|
+
this.unwatch = revealOnView(this);
|
|
160
|
+
}
|
|
161
|
+
disconnectedCallback() {
|
|
162
|
+
super.disconnectedCallback();
|
|
163
|
+
this.unwatch();
|
|
164
|
+
}
|
|
165
|
+
render() {
|
|
166
|
+
const mono2 = this.look === "mono";
|
|
167
|
+
const branch = (colour) => mono2 ? svg`<svg aria-hidden="true" focusable="false">
|
|
168
|
+
<path class="wide" d="M10.75 0C10.75 16 60.75 6 60.75 28V78C60.75 100 10.75 92 10.75 110" fill="none" stroke=${colour} />
|
|
169
|
+
<path class="narrow" d="M8.75 0C8.75 16 40.75 6 40.75 28V104C40.75 126 8.75 118 8.75 132" fill="none" stroke=${colour} />
|
|
170
|
+
</svg>` : svg`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
171
|
+
<path d="M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200" fill="none" stroke=${colour} stroke-width="3" vector-effect="non-scaling-stroke" />
|
|
172
|
+
<circle cx="60" cy="86" r="8" fill=${colour} />
|
|
173
|
+
</svg>`;
|
|
174
|
+
return html`<ul part="list">${(this.items ?? []).map((item, i) => {
|
|
175
|
+
const current = i === this.current;
|
|
176
|
+
const words2 = html`${item.heading}${current && this.currentText ? html`<span class="sr-only"> (${this.currentText})</span>` : nothing}`;
|
|
177
|
+
return html`<li part="item" style=${`--i:${i}`}>
|
|
178
|
+
<div class="graph">${branch(mono2 ? "currentColor" : toneOf(item.tone, i))}${mono2 ? html`<span class=${current ? "ring current" : "ring"} aria-hidden="true"></span>` : nothing}</div>
|
|
179
|
+
<div class="text">
|
|
180
|
+
${item.path ? html`<p class="path mono">${item.path}</p>` : nothing}
|
|
181
|
+
<div class="row">
|
|
182
|
+
${heading(this.headingLevel, item.href ? html`<a href=${item.href}>${words2}</a>` : words2, "h")}
|
|
183
|
+
<div class="detail">
|
|
184
|
+
${item.text ? html`<p class="body">${item.text}</p>` : nothing}
|
|
185
|
+
${item.tags?.length ? html`<p class="tags mono">${item.tags.join(" \xB7 ")}</p>` : nothing}
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</li>`;
|
|
190
|
+
})}</ul>
|
|
191
|
+
${this.trunk ? html`<p class="end mono" part="trunk">${this.trunk}</p>` : nothing}`;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
customElements.define("impakt-branch-list", ImpaktBranchList);
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
ImpaktBranchList
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=chunk-HISF6RYK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/changelog.ts"],"sourcesContent":["/**\n * Blocks that tell how software was made, in the language software is made\n * in: a release with what it added and removed, services as branches that\n * merge into one product, checks that passed, and a project drawn as a commit\n * graph. They came from building the Impakt site's Commit design in Strata, and\n * they are written for any studio, agency or product team that wants to show\n * its work this way.\n *\n * Every colour is a brand token. A lane's colour is a tone (brand, accent or\n * a status colour), never a hex value, so a partner's brand restyles them.\n */\n\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport { ImpaktElement, visuallyHidden, fontSize, fontWeight, space, spaceAround, t, token, toneOf, type Tone } from '@atomic-ui/ui';\n\n// The tones (`Tone`, `toneOf`) are shared with `impakt-chip`, so they live in @atomic-ui/ui.\n\n/**\n * Marks an element `shown` once a quarter of it is on screen, so it can draw\n * itself in (the Commit motion spec's branch draw, graph draw and checks run).\n * Where nothing can watch, it is shown at once; what draws in is decided by\n * CSS under `prefers-reduced-motion: no-preference`, so reduced motion never waits.\n */\nfunction revealOnView(el: HTMLElement, onShow?: () => void): () => void {\n const show = () => {\n el.setAttribute('shown', '');\n onShow?.();\n };\n if (typeof IntersectionObserver !== 'function') {\n show();\n return () => undefined;\n }\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) {\n show();\n io.disconnect();\n }\n },\n { threshold: 0.25 },\n );\n io.observe(el);\n return () => io.disconnect();\n}\n\n/** Code-like labels: a branch name, a version, a hash. The brand has no code face, so the system's is used. */\nconst mono = css`.mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }`;\n\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult => {\n const l = Math.min(Math.max(level || 3, 2), 6);\n switch (l) {\n case 2:\n return html`<h2 class=${cls}>${text}</h2>`;\n case 4:\n return html`<h4 class=${cls}>${text}</h4>`;\n case 5:\n return html`<h5 class=${cls}>${text}</h5>`;\n case 6:\n return html`<h6 class=${cls}>${text}</h6>`;\n default:\n return html`<h3 class=${cls}>${text}</h3>`;\n }\n};\n\nconst words = css`\n .h { margin: 0; color: var(--impakt-heading, ${t.textHeading}); font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }\n .meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }\n .sr-only { ${visuallyHidden} }\n`;\n\n// ── Release card ─────────────────────────────────────────────────────────\n\n/** One line of what a release changed. */\nexport interface DiffLine {\n id?: string;\n /** Added, taken away, or kept as it was. */\n change: 'added' | 'removed' | 'same';\n text: string;\n}\n\n// ── Branch list ──────────────────────────────────────────────────────────\n\n/** One branch: a service, a team, a line of work. */\nexport interface Branch {\n id?: string;\n /** A short code-like name, such as \"feature/mobile-apps\". */\n path?: string;\n heading: string;\n text?: string;\n /** A few words below the text, such as the tools it uses. */\n tags?: string[];\n tone?: Tone;\n /** Where the heading links to, such as the service's own page. */\n href?: string;\n}\n\n/**\n * Several lines of work that come together into one: each item branches off a\n * main line on the left and merges back into it, and the line ends in what\n * they make together.\n *\n * The lines are drawn; the items are a list with headings, so a screen reader\n * reads the work, not the drawing.\n *\n * `look=\"mono\"` draws it in thin ink lines with no chart colours: hollow\n * rings for the branches, one filled with the accent for the `current` item,\n * a hairline under each row, the paths in monospace capitals, and the main\n * line ending in a small ink dot beside the `trunk` words. The tags are left\n * out on a phone in that look. Which item is current is also said in words to\n * a screen reader, so it never rests on the colour alone (1.4.1).\n *\n * @category content\n * @icon git-merge\n */\nexport class ImpaktBranchList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n trunk: { type: String },\n look: { type: String, reflect: true },\n current: { type: Number },\n currentText: { type: String, attribute: 'current-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: Branch[];\n /** What the main line ends in, such as \"main ← one team owns the result\". */\n declare trunk: string;\n /** `tones` draws each branch in a chart colour. `mono` draws thin ink lines with hollow rings, as the Noire site does. */\n declare look: 'tones' | 'mono';\n /** The index of the item to mark as current, from 0: its ring is filled with the accent. -1 for none. */\n declare current: number;\n /** What a screen reader hears after the current item's heading, such as \"current\". Set it with `current`, so the mark is not colour alone. */\n declare currentText: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.trunk = '';\n this.look = 'tones';\n this.current = -1;\n this.currentText = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }\n ul { list-style: none; margin: 0; padding: 0; position: relative; }\n ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }\n li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${space(6)}; }\n .graph { position: relative; }\n .graph svg { position: absolute; inset-block-start: -${space(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${space(12)}); overflow: visible; }\n .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(4)} ${space(10)}; align-items: start; }\n .path { margin: 0 0 ${space(2)}; opacity: 0.72; }\n .h { font-size: ${fontSize('3xl')}; line-height: 1.05; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n .detail { display: flex; flex-direction: column; gap: ${space(3)}; padding-block-start: ${space(1)}; }\n .tags { margin: 0; opacity: 0.7; text-transform: uppercase; }\n .end { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block-start: ${space(4)}; }\n .end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }\n @container (max-width: 44rem) {\n li { grid-template-columns: 56px minmax(0, 1fr); }\n .graph svg { inline-size: 56px; }\n .row { grid-template-columns: minmax(0, 1fr); }\n .h { font-size: ${fontSize('2xl')}; }\n }\n /*\n * The mono look, as the Branches component (12:683) draws it: rows 120px apart, a 1.5px trunk at 10px, and\n * each branch a fixed S-curve out to 60px by 28px down, straight to 78 and back by 110, so its shape does not\n * change with the row's height. The path and heading sit on the left and the line and tags in a 490px column\n * on the right, level with the path; a hairline closes each row 114px down. On a phone (14:989) the trunk is\n * at 8px, the branch reaches 40px and the words stack in one column.\n */\n :host([look='mono']) { --trunk: currentColor; }\n :host([look='mono']) ul::before { inset-inline-start: 10px; inline-size: 1.5px; border-radius: 0; }\n :host([look='mono']) li { grid-template-columns: 86px minmax(0, 1fr); padding-block: 24px 5px; }\n :host([look='mono']) .graph svg { inset-block-start: -24px; inline-size: 96px; block-size: 110px; }\n :host([look='mono']) .graph svg path { stroke-width: 1.5; }\n :host([look='mono']) .ring { position: absolute; inset-inline-start: 55px; inset-block-start: 20px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; background: ${t.surfaceCard}; }\n :host([look='mono']) .ring.current { background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='mono']) .text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 490px); grid-template-areas: 'path detail' 'h detail'; grid-template-rows: auto 1fr; column-gap: ${space(10)}; align-content: start; padding-block-end: 20px; border-block-end: ${t.borderThin} solid ${t.rule}; }\n :host([look='mono']) .row { display: contents; }\n :host([look='mono']) .path { grid-area: path; margin: 0 0 4.6px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }\n :host([look='mono']) .h { grid-area: h; margin: 0; font-size: 2rem; line-height: 1.1; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.03em; }\n :host([look='mono']) .detail { grid-area: detail; gap: 8px; padding: 0; }\n :host([look='mono']) .body { margin: 0; font-size: 1rem; line-height: 1.45; color: ${t.textMuted}; opacity: 1; }\n :host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${t.trackingWide}; opacity: 1; color: ${t.textMuted}; }\n /* The main line's label sits 14px under the last rule and the block ends 17px under it, 520px for four rows (12:716). */\n :host([look='mono']) .end { gap: 0; margin: 0; padding-block: 8px 17px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n /* The trunk runs on, unbroken, into its end dot, which sits on the trunk; the words line up with the rows' words. */\n :host([look='mono']) .end::before { flex: none; inline-size: 10px; block-size: 10px; margin-inline: 5.75px calc(86px - 15.75px); background: ${t.text}; }\n :host([look='mono']) .end::after { content: ''; position: absolute; inset-block-start: 0; inset-inline-start: 10px; inline-size: 1.5px; block-size: 15.7px; background: var(--trunk); }\n :host([look='mono']) li:last-child .graph svg { block-size: 110px; }\n @container (max-width: 44rem) {\n /* Set on the list, since a container query cannot restyle the container itself. */\n :host([look='mono']) ul::before { inset-inline-start: 8px; }\n :host([look='mono']) li { grid-template-columns: 60px minmax(0, 1fr); padding-block: 18px 5px; }\n :host([look='mono']) .graph svg { inset-block-start: -18px; inline-size: 60px; block-size: 132px; }\n :host([look='mono']) .ring { inset-inline-start: 35px; inset-block-start: 38px; }\n /* On a phone the rows are 150px apart whatever their words, as they are 120px apart on a wide screen (14:989). */\n :host([look='mono']) .text { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'path' 'h' 'detail'; box-sizing: border-box; min-block-size: 127px; padding-block-end: 12px; }\n :host([look='mono']) .h { font-size: 1.5rem; line-height: 1.15; }\n :host([look='mono']) .detail { margin-block-start: 6px; }\n :host([look='mono']) .body { font-size: 0.875rem; line-height: 1.43; }\n :host([look='mono']) .tags { display: none; }\n :host([look='mono']) .end { padding-block-end: 13px; }\n :host([look='mono']) .end::before { margin-inline: 3.75px calc(60px - 13.75px); }\n :host([look='mono']) .end::after { inset-inline-start: 8px; }\n }\n :host([look='mono']) .graph .narrow { display: none; }\n @container (max-width: 44rem) { :host([look='mono']) .graph .wide { display: none; } :host([look='mono']) .graph .narrow { display: inline; } }\n @media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }\n /* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */\n @media (prefers-reduced-motion: no-preference) {\n .graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }\n .graph circle, .ring { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }\n :host([shown]) .graph svg { clip-path: inset(0); }\n :host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n // Each branch leaves the trunk, swings out to its dot level with the\n // heading, and returns: drawn in a 96-wide box, scaled down on phones.\n // The mono look draws a fixed curve in pixels, one for a wide row and one\n // for a phone, and its rings in HTML, so neither stretches with the row.\n const mono = this.look === 'mono';\n const branch = (colour: string) =>\n mono\n ? svg`<svg aria-hidden=\"true\" focusable=\"false\">\n <path class=\"wide\" d=\"M10.75 0C10.75 16 60.75 6 60.75 28V78C60.75 100 10.75 92 10.75 110\" fill=\"none\" stroke=${colour} />\n <path class=\"narrow\" d=\"M8.75 0C8.75 16 40.75 6 40.75 28V104C40.75 126 8.75 118 8.75 132\" fill=\"none\" stroke=${colour} />\n </svg>`\n : svg`<svg viewBox=\"0 0 96 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200\" fill=\"none\" stroke=${colour} stroke-width=\"3\" vector-effect=\"non-scaling-stroke\" />\n <circle cx=\"60\" cy=\"86\" r=\"8\" fill=${colour} />\n </svg>`;\n return html`<ul part=\"list\">${(this.items ?? []).map((item, i) => {\n const current = i === this.current;\n const words = html`${item.heading}${current && this.currentText ? html`<span class=\"sr-only\"> (${this.currentText})</span>` : nothing}`;\n return html`<li part=\"item\" style=${`--i:${i}`}>\n <div class=\"graph\">${branch(mono ? 'currentColor' : toneOf(item.tone, i))}${mono ? html`<span class=${current ? 'ring current' : 'ring'} aria-hidden=\"true\"></span>` : nothing}</div>\n <div class=\"text\">\n ${item.path ? html`<p class=\"path mono\">${item.path}</p>` : nothing}\n <div class=\"row\">\n ${heading(this.headingLevel, item.href ? html`<a href=${item.href}>${words}</a>` : words, 'h')}\n <div class=\"detail\">\n ${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}\n ${item.tags?.length ? html`<p class=\"tags mono\">${item.tags.join(' · ')}</p>` : nothing}\n </div>\n </div>\n </div>\n </li>`;\n })}</ul>\n ${this.trunk ? html`<p class=\"end mono\" part=\"trunk\">${this.trunk}</p>` : nothing}`;\n }\n}\ncustomElements.define('impakt-branch-list', ImpaktBranchList);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-branch-list': ImpaktBranchList;\n }\n}\n"],"mappings":";AAYA,SAAS,KAAK,MAAM,SAAS,WAAgC;AAC7D,SAAS,eAAe,gBAAgB,UAAU,YAAY,OAAO,aAAa,GAAG,OAAO,cAAyB;AAUrH,SAAS,aAAa,IAAiB,QAAiC;AACtE,QAAM,OAAO,MAAM;AACjB,OAAG,aAAa,SAAS,EAAE;AAC3B,aAAS;AAAA,EACX;AACA,MAAI,OAAO,yBAAyB,YAAY;AAC9C,SAAK;AACL,WAAO,MAAM;AAAA,EACf;AACA,QAAM,KAAK,IAAI;AAAA,IACb,CAAC,YAAY;AACX,UAAI,QAAQ,KAAK,CAAC,MAAM,EAAE,cAAc,GAAG;AACzC,aAAK;AACL,WAAG,WAAW;AAAA,MAChB;AAAA,IACF;AAAA,IACA,EAAE,WAAW,KAAK;AAAA,EACpB;AACA,KAAG,QAAQ,EAAE;AACb,SAAO,MAAM,GAAG,WAAW;AAC7B;AAGA,IAAM,OAAO,2BAA2B,EAAE,QAAQ,gBAAgB,SAAS,IAAI,CAAC;AAEhF,IAAM,UAAU,C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