@atomic-ui/blocks 0.13.2 → 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.
Files changed (83) hide show
  1. package/README.md +15 -15
  2. package/custom-elements.json +2961 -9573
  3. package/dist/{chunk-B6I3GVJ5.js → chunk-3G3NP4UC.js} +9 -4
  4. package/dist/chunk-3G3NP4UC.js.map +1 -0
  5. package/dist/{chunk-H262HKSL.js → chunk-7OFH762N.js} +53 -23
  6. package/dist/chunk-7OFH762N.js.map +1 -0
  7. package/dist/{chunk-WTVF3JRL.js → chunk-GDATDR2Q.js} +24 -7
  8. package/dist/chunk-GDATDR2Q.js.map +1 -0
  9. package/dist/chunk-GQ2I44OU.js +226 -0
  10. package/dist/chunk-GQ2I44OU.js.map +1 -0
  11. package/dist/chunk-HISF6RYK.js +199 -0
  12. package/dist/chunk-HISF6RYK.js.map +1 -0
  13. package/dist/{chunk-53V2GY6L.js → chunk-LJGOTYDJ.js} +76 -69
  14. package/dist/chunk-LJGOTYDJ.js.map +1 -0
  15. package/dist/{chunk-WIVKJL64.js → chunk-OBBPBN4S.js} +73 -164
  16. package/dist/chunk-OBBPBN4S.js.map +1 -0
  17. package/dist/chunk-OHXEZPBB.js +109 -0
  18. package/dist/chunk-OHXEZPBB.js.map +1 -0
  19. package/dist/{chunk-FNGN2F6Y.js → chunk-VOONXP5H.js} +30 -59
  20. package/dist/chunk-VOONXP5H.js.map +1 -0
  21. package/dist/chunk-XSKGWT2D.js +84 -0
  22. package/dist/chunk-XSKGWT2D.js.map +1 -0
  23. package/dist/components/changelog.d.ts +0 -288
  24. package/dist/components/changelog.js +3 -12
  25. package/dist/components/estimator.js +1 -1
  26. package/dist/components/g2-case.d.ts +8 -1
  27. package/dist/components/g2-case.js +1 -1
  28. package/dist/components/g2-site.d.ts +49 -41
  29. package/dist/components/g2-site.js +1 -3
  30. package/dist/components/journey.d.ts +13 -2
  31. package/dist/components/journey.js +1 -1
  32. package/dist/components/marketing.d.ts +0 -283
  33. package/dist/components/marketing.js +3 -13
  34. package/dist/components/organisms.d.ts +0 -489
  35. package/dist/components/organisms.js +3 -19
  36. package/dist/components/selling.d.ts +0 -255
  37. package/dist/components/selling.js +3 -15
  38. package/dist/components/site.d.ts +8 -53
  39. package/dist/components/site.js +3 -5
  40. package/dist/components/studio.d.ts +42 -98
  41. package/dist/components/studio.js +1 -3
  42. package/dist/index.d.ts +9 -13
  43. package/dist/index.js +25 -103
  44. package/dist/index.js.map +1 -1
  45. package/dist/standalone/atomic-ui-blocks.js +832 -1622
  46. package/dist/standalone/atomic-ui-blocks.js.map +4 -4
  47. package/dist/standalone/index.html +18 -26
  48. package/package.json +3 -3
  49. package/specimen/index.html +18 -26
  50. package/dist/chunk-53V2GY6L.js.map +0 -1
  51. package/dist/chunk-B6I3GVJ5.js.map +0 -1
  52. package/dist/chunk-FNGN2F6Y.js.map +0 -1
  53. package/dist/chunk-H262HKSL.js.map +0 -1
  54. package/dist/chunk-IT2NA25D.js +0 -571
  55. package/dist/chunk-IT2NA25D.js.map +0 -1
  56. package/dist/chunk-MMADM6OW.js +0 -782
  57. package/dist/chunk-MMADM6OW.js.map +0 -1
  58. package/dist/chunk-NHWD2LUR.js +0 -255
  59. package/dist/chunk-NHWD2LUR.js.map +0 -1
  60. package/dist/chunk-R7SSIE2E.js +0 -362
  61. package/dist/chunk-R7SSIE2E.js.map +0 -1
  62. package/dist/chunk-WIVKJL64.js.map +0 -1
  63. package/dist/chunk-WTVF3JRL.js.map +0 -1
  64. package/dist/chunk-XB6FD4SF.js +0 -438
  65. package/dist/chunk-XB6FD4SF.js.map +0 -1
  66. package/dist/chunk-YXMXLVK7.js +0 -230
  67. package/dist/chunk-YXMXLVK7.js.map +0 -1
  68. package/dist/chunk-ZD75GU6J.js +0 -75
  69. package/dist/chunk-ZD75GU6J.js.map +0 -1
  70. package/dist/chunk-ZODL5HD4.js +0 -535
  71. package/dist/chunk-ZODL5HD4.js.map +0 -1
  72. package/dist/components/card-grid.d.ts +0 -72
  73. package/dist/components/card-grid.js +0 -7
  74. package/dist/components/card-grid.js.map +0 -1
  75. package/dist/components/property.d.ts +0 -389
  76. package/dist/components/property.js +0 -17
  77. package/dist/components/property.js.map +0 -1
  78. package/dist/components/scene.d.ts +0 -138
  79. package/dist/components/scene.js +0 -7
  80. package/dist/components/scene.js.map +0 -1
  81. package/dist/components/scrubber.d.ts +0 -86
  82. package/dist/components/scrubber.js +0 -7
  83. package/dist/components/scrubber.js.map +0 -1
@@ -1,782 +0,0 @@
1
- // packages/blocks/src/components/organisms.ts
2
- import { css, html, nothing } from "lit";
3
- import { say, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from "@atomic-ui/ui";
4
- var token_accent = token("color.accent.default", "#c8a15a");
5
- var reducedMotion = () => typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
6
- var roundButton = css`
7
- .round { ${targetSize} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.rule}; border-radius: 50%; box-shadow: ${t.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }
8
- .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }
9
- .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
10
- `;
11
- var headingStyles = css`
12
- .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight("semibold")}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
13
- .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }
14
- .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }
15
- `;
16
- var ImpaktCarousel = class extends ImpaktElement {
17
- constructor() {
18
- super();
19
- this.index = 0;
20
- this.count = 0;
21
- /** How many slides fit right now, which the width decides. */
22
- this.visible = null;
23
- /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */
24
- this.heading = null;
25
- this.paused = false;
26
- this.held = false;
27
- this.label = "Slides";
28
- this.perView = "1";
29
- this.arrows = "below";
30
- this.autoplay = false;
31
- this.seconds = 6;
32
- this.spaceAbove = "none";
33
- this.spaceBelow = "none";
34
- }
35
- static {
36
- this.properties = {
37
- label: { type: String },
38
- perView: { type: String, reflect: true, attribute: "per-view" },
39
- arrows: { type: String, reflect: true },
40
- autoplay: { type: Boolean, reflect: true },
41
- seconds: { type: Number },
42
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
43
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
44
- };
45
- }
46
- static {
47
- this.styles = [
48
- ...ImpaktElement.styles,
49
- focusRing,
50
- spaceAround,
51
- roundButton,
52
- css`
53
- :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }
54
- :host([per-view='2']) { --most: 2; }
55
- :host([per-view='3']) { --most: 3; }
56
- .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${space(1)} ${space(2)}; border-radius: ${t.radiusLg}; }
57
- .track::-webkit-scrollbar { display: none; }
58
- ::slotted(*) { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-inline-size: 0; scroll-snap-align: start; box-sizing: border-box; }
59
- /* Whole slides only: a slice of the next one reads as content spilling out of the page. */
60
- @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
61
- @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }
62
- .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }
63
- .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }
64
- .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }
65
- .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }
66
- .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }
67
- .buttons { display: flex; gap: ${space(2)}; }
68
- section { position: relative; }
69
- @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }
70
- .sr-only { ${visuallyHidden} }
71
- @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
72
- `
73
- ];
74
- }
75
- get track() {
76
- return this.renderRoot.querySelector(".track");
77
- }
78
- get slides() {
79
- return Array.from(this.children);
80
- }
81
- /** The last slide that can sit at the start of the row. */
82
- get last() {
83
- return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));
84
- }
85
- /** Count what actually fits, and keep the row on a real stop when that changes. */
86
- measure() {
87
- const track = this.track;
88
- const first = this.slides[0];
89
- if (!track || !first) return;
90
- const width = first.getBoundingClientRect().width;
91
- if (width <= 0) return;
92
- const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;
93
- const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));
94
- if (fits === this.visible) return;
95
- this.visible = fits;
96
- this.index = Math.min(this.index, this.last);
97
- const slide = this.slides[this.index];
98
- if (slide && typeof track.scrollTo === "function") track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: "auto" });
99
- this.requestUpdate();
100
- }
101
- onSlots() {
102
- const slides = this.slides;
103
- this.count = slides.length;
104
- slides.forEach((slide, i) => {
105
- slide.setAttribute("role", "group");
106
- slide.setAttribute("aria-roledescription", say("slide"));
107
- slide.setAttribute("aria-label", say("{slide} of {slides}", { slide: i + 1, slides: slides.length }));
108
- });
109
- this.measure();
110
- this.requestUpdate();
111
- }
112
- go(to) {
113
- const target = Math.min(this.last, Math.max(0, to));
114
- this.index = target;
115
- this.heading = target;
116
- clearTimeout(this.settle);
117
- this.settle = setTimeout(() => {
118
- const arrived = this.heading === null;
119
- this.heading = null;
120
- const track2 = this.track;
121
- const slide2 = this.slides[this.index];
122
- if (!arrived && track2 && slide2 && typeof track2.scrollTo === "function") track2.scrollTo({ left: slide2.offsetLeft - track2.offsetLeft, behavior: "auto" });
123
- }, 900);
124
- this.requestUpdate();
125
- const track = this.track;
126
- const slide = this.slides[target];
127
- if (track && slide && typeof track.scrollTo === "function") {
128
- track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? "auto" : "smooth" });
129
- }
130
- }
131
- onScroll() {
132
- const track = this.track;
133
- const slides = this.slides;
134
- if (!track || !slides.length) return;
135
- let nearest = 0;
136
- let distance = Infinity;
137
- slides.forEach((slide, i) => {
138
- const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);
139
- if (d < distance) {
140
- distance = d;
141
- nearest = i;
142
- }
143
- });
144
- if (this.heading !== null) {
145
- if (nearest === this.heading && distance < 2) {
146
- this.heading = null;
147
- clearTimeout(this.settle);
148
- }
149
- return;
150
- }
151
- if (nearest !== this.index) {
152
- this.index = Math.min(nearest, this.last);
153
- this.requestUpdate();
154
- }
155
- }
156
- onKey(event) {
157
- if (event.key === "ArrowRight") {
158
- event.preventDefault();
159
- this.go(this.index + 1);
160
- }
161
- if (event.key === "ArrowLeft") {
162
- event.preventDefault();
163
- this.go(this.index - 1);
164
- }
165
- }
166
- get canPlay() {
167
- return this.autoplay && !reducedMotion();
168
- }
169
- restart() {
170
- clearInterval(this.timer);
171
- this.timer = void 0;
172
- if (!this.canPlay || this.paused || this.held) return;
173
- this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1e3);
174
- }
175
- hold(held) {
176
- this.held = held;
177
- this.restart();
178
- }
179
- togglePause() {
180
- this.paused = !this.paused;
181
- this.restart();
182
- this.requestUpdate();
183
- }
184
- firstUpdated() {
185
- if (typeof ResizeObserver === "function" && this.track) {
186
- this.observer = new ResizeObserver(() => this.measure());
187
- this.observer.observe(this.track);
188
- }
189
- }
190
- updated(changed) {
191
- if (changed.has("autoplay") || changed.has("seconds")) this.restart();
192
- if (changed.has("perView")) this.measure();
193
- }
194
- connectedCallback() {
195
- super.connectedCallback();
196
- if (this.track) this.observer?.observe(this.track);
197
- this.restart();
198
- }
199
- disconnectedCallback() {
200
- super.disconnectedCallback();
201
- this.observer?.disconnect();
202
- clearInterval(this.timer);
203
- clearTimeout(this.settle);
204
- }
205
- render() {
206
- const stops = Array.from({ length: this.last + 1 }, (_, i) => i);
207
- return html`<section aria-roledescription=${say("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
208
- @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>
209
- <div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
210
- <div class="controls" part="controls">
211
- <div class="dots">${stops.length > 1 ? stops.map((i) => html`<button class="dot" type="button" aria-label=${say("Go to slide {slide}", { slide: i + 1 })} aria-current=${i === this.index ? "true" : "false"} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>
212
- <div class="buttons">
213
- ${this.canPlay ? html`<button class="round" type="button" aria-label=${say(this.paused ? "Play the slides" : "Pause the slides")} @click=${this.togglePause}>${this.paused ? iconSvg("arrow-right", "18px") : html`<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg>`}</button>` : nothing}
214
- <button class="round" type="button" aria-label=${say("Previous slide")} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg("arrow-left", "18px")}</button>
215
- <button class="round" type="button" aria-label=${say("Next slide")} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg("arrow-right", "18px")}</button>
216
- </div>
217
- </div>
218
- <p class="sr-only" aria-live="polite">${say("Slide {slide} of {slides}", { slide: this.index + 1, slides: this.count })}</p>
219
- </section>`;
220
- }
221
- };
222
- function gallerySpan(index, count, layout) {
223
- const last = index === count - 1;
224
- const span = { wide: 1, narrow: 1, rows: 1 };
225
- if (layout === "grid") {
226
- if (last) {
227
- span.wide = count % 3 ? 4 - count % 3 : 1;
228
- span.narrow = count % 2 ? 2 : 1;
229
- }
230
- return span;
231
- }
232
- if (index === 0) return span;
233
- if (count === 2) return { wide: 2, narrow: 2, rows: 2 };
234
- if (count === 3) return { ...span, wide: 2 };
235
- if (last) {
236
- const extra = (count - 5) % 4;
237
- span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;
238
- span.narrow = count % 2 ? 1 : 2;
239
- }
240
- return span;
241
- }
242
- var ImpaktGallery = class extends ImpaktElement {
243
- constructor() {
244
- super();
245
- this.shown = -1;
246
- this.opener = null;
247
- this.items = [];
248
- this.layout = "feature";
249
- this.label = "Gallery";
250
- this.spaceAbove = "none";
251
- this.spaceBelow = "none";
252
- }
253
- static {
254
- this.properties = {
255
- items: { type: Array },
256
- layout: { type: String, reflect: true },
257
- label: { type: String },
258
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
259
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
260
- };
261
- }
262
- static {
263
- this.styles = [
264
- ...ImpaktElement.styles,
265
- focusRing,
266
- spaceAround,
267
- roundButton,
268
- css`
269
- :host { display: block; container-type: inline-size; }
270
- ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }
271
- :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
272
- li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
273
- :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
274
- .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${t.surfaceInset}; border-radius: ${t.radiusXl}; overflow: hidden; cursor: zoom-in; }
275
- .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }
276
- .open:hover img { transform: scale(1.03); }
277
- @container (max-width: 40rem) { ul, :host([layout='grid']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } li { grid-column: span var(--span-narrow, 1); } }
278
- dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
279
- dialog::backdrop { background: rgb(10 14 12 / 0.9); }
280
- .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${space(4)}; gap: ${space(3)}; color: #fff; }
281
- .bar { display: flex; align-items: center; justify-content: space-between; ${type("sm")} }
282
- .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }
283
- .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }
284
- figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
285
- .caption { margin: 0; text-align: center; ${type("sm")} }
286
- `
287
- ];
288
- }
289
- get dialog() {
290
- return this.renderRoot.querySelector("dialog");
291
- }
292
- open(index, event) {
293
- this.opener = event.currentTarget;
294
- this.shown = index;
295
- this.requestUpdate();
296
- void this.updateComplete.then(() => {
297
- const d = this.dialog;
298
- if (d && !d.open) {
299
- if (typeof d.showModal === "function") d.showModal();
300
- else d.setAttribute("open", "");
301
- }
302
- });
303
- }
304
- close() {
305
- const d = this.dialog;
306
- if (d?.open) {
307
- if (typeof d.close === "function") d.close();
308
- else d.removeAttribute("open");
309
- }
310
- this.onClosed();
311
- }
312
- onClosed() {
313
- if (this.shown === -1) return;
314
- this.shown = -1;
315
- this.requestUpdate();
316
- this.opener?.focus();
317
- }
318
- step(by) {
319
- const n = (this.items ?? []).length;
320
- if (!n || this.shown < 0) return;
321
- this.shown = (this.shown + by + n) % n;
322
- this.requestUpdate();
323
- }
324
- onKey(event) {
325
- if (event.key === "ArrowRight") {
326
- event.preventDefault();
327
- this.step(1);
328
- }
329
- if (event.key === "ArrowLeft") {
330
- event.preventDefault();
331
- this.step(-1);
332
- }
333
- }
334
- render() {
335
- const items = this.items ?? [];
336
- const current = this.shown >= 0 ? items[this.shown] : void 0;
337
- return html`<ul aria-label=${this.label} part="list">${items.map((item, i) => {
338
- const span = gallerySpan(i, items.length, this.layout);
339
- return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>
340
- <button class="open" type="button" aria-label=${say("View larger: {picture}", { picture: item.alt })} @click=${(e) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading="lazy" /></button>
341
- </li>`;
342
- })}</ul>
343
- <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
344
- ${current ? html`<div class="stage">
345
- <div class="bar"><span>${this.shown + 1} of ${items.length}</span><button class="round" type="button" aria-label=${say("Close")} @click=${this.close}>${iconSvg("close", "18px")}</button></div>
346
- <div class="middle">
347
- <button class="round" type="button" aria-label=${say("Previous picture")} @click=${() => this.step(-1)}>${iconSvg("arrow-left", "18px")}</button>
348
- <figure><img src=${current.src} alt=${current.alt} /></figure>
349
- <button class="round" type="button" aria-label=${say("Next picture")} @click=${() => this.step(1)}>${iconSvg("arrow-right", "18px")}</button>
350
- </div>
351
- <p class="caption">${current.caption ?? current.alt}</p>
352
- </div>` : nothing}
353
- </dialog>`;
354
- }
355
- };
356
- var ImpaktLogoCloud = class extends ImpaktElement {
357
- static {
358
- this.properties = {
359
- heading: { type: String },
360
- items: { type: Array },
361
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
362
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
363
- };
364
- }
365
- constructor() {
366
- super();
367
- this.heading = "";
368
- this.items = [];
369
- this.spaceAbove = "none";
370
- this.spaceBelow = "none";
371
- }
372
- static {
373
- this.styles = [
374
- ...ImpaktElement.styles,
375
- focusRing,
376
- spaceAround,
377
- css`
378
- :host { display: block; }
379
- p { margin: 0 0 ${space(6)}; text-align: center; color: ${t.textMuted}; ${type("sm")} font-weight: ${fontWeight("medium")}; }
380
- ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${space(8)} ${space(12)}; }
381
- img { display: block; block-size: 40px; inline-size: auto; max-inline-size: 160px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease-in-out, opacity 200ms ease-in-out; }
382
- li:hover img { filter: none; opacity: 1; }
383
- a { display: block; border-radius: ${t.radiusSm}; }
384
- `
385
- ];
386
- }
387
- render() {
388
- return html`${this.heading ? html`<p part="heading">${this.heading}</p>` : nothing}
389
- <ul part="list">${(this.items ?? []).map((logo) => html`<li>${logo.href ? html`<a href=${logo.href}><img src=${logo.src} alt=${logo.alt} /></a>` : html`<img src=${logo.src} alt=${logo.alt} />`}</li>`)}</ul>`;
390
- }
391
- };
392
- var ImpaktSteps = class extends ImpaktElement {
393
- static {
394
- this.properties = {
395
- items: { type: Array },
396
- orientation: { type: String, reflect: true },
397
- look: { type: String, reflect: true },
398
- tones: { type: Boolean, reflect: true },
399
- current: { type: Number },
400
- headingLevel: { type: Number, attribute: "heading-level" },
401
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
402
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
403
- };
404
- }
405
- constructor() {
406
- super();
407
- this.items = [];
408
- this.orientation = "horizontal";
409
- this.look = "numbered";
410
- this.tones = false;
411
- this.current = -1;
412
- this.headingLevel = 3;
413
- this.spaceAbove = "none";
414
- this.spaceBelow = "none";
415
- }
416
- static {
417
- this.styles = [
418
- ...ImpaktElement.styles,
419
- spaceAround,
420
- headingStyles,
421
- css`
422
- :host { display: block; container-type: inline-size; }
423
- ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${space(6)}; }
424
- li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }
425
- li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type("sm")} font-weight: ${fontWeight("bold")}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }
426
- li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }
427
- .h { ${type("lg")} letter-spacing: 0; }
428
- .meta { margin: 0; ${type("sm")} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }
429
- .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight("normal")}; text-wrap: pretty; }
430
- :host([orientation='vertical']) ol { grid-auto-flow: row; }
431
- :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
432
- :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
433
- :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
434
- @container (max-width: 40rem) {
435
- ol { grid-auto-flow: row; }
436
- li { padding-inline-start: 56px; min-block-size: 56px; }
437
- li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
438
- li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
439
- }
440
- /* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */
441
- :host([look='ruled']) li { --rule: currentColor; padding-block-start: ${space(5)}; border-block-start: 1px solid var(--rule); }
442
- :host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }
443
- /* The Step component (10:512): 16px under the rule, 8px apart, the meta in G2 Mono S, the title in G2 Label L (Archivo medium 20px at 1.2) and the text in G2 Body S (14px at 1.4). */
444
- :host([look='ruled']:not([tones])) li { padding-block-start: ${space(4)}; }
445
- :host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
446
- :host([look='ruled']:not([tones])) .h { font-size: 1.25rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; letter-spacing: -0.01em; }
447
- :host([look='ruled']:not([tones])) .body { font-size: 0.875rem; line-height: 1.4; }
448
- :host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' · '; }
449
- :host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${space(4)} - 1px); }
450
- :host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }
451
- :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
452
- :host([look='ruled']) ol { gap: ${space(5)}; }
453
- /* On a phone the ruled steps hang off a rail: a 1.5px line down the left and a hollow 10px ring at each step, the current one filled. */
454
- @container (max-width: 40rem) {
455
- :host([look='ruled']) ol { gap: 0; }
456
- :host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }
457
- :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 4px; inline-size: 1.5px; block-size: auto; border-radius: 0; margin: 0; background: currentColor; }
458
- :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${space(6)} + 2px); inset-inline-start: 0; inline-size: 10px; block-size: 10px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; background: ${t.surfaceCard}; }
459
- :host([look='ruled']) li:first-child::before { inset-block-start: calc(${space(6)} + 7px); }
460
- :host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${space(6)} + 7px); }
461
- :host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }
462
- /* The phone rail (15:891): each step 26px in from the rail, 28px under its text, its parts 6px apart; a 10px ring 4px down and the 1.5px line from under it to the next. */
463
- :host([look='ruled']:not([tones])) li, :host([look='ruled']:not([tones])) li[aria-current] { gap: 6px; padding: 0 0 28px 26px; }
464
- :host([look='ruled']:not([tones])) li::before { inset-block: 14px 0; inset-inline-start: 4.25px; }
465
- :host([look='ruled']:not([tones])) li::after { inset-block-start: 4px; border-width: 1.5px; }
466
- :host([look='ruled']:not([tones])) li:first-child::before { inset-block-start: 14px; }
467
- :host([look='ruled']:not([tones])) li:last-child::before { display: none; }
468
- /* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */
469
- :host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${t.text}; }
470
- :host([look='ruled'][tones]) li::after { inset-block: ${space(3)}; inset-inline-start: 2px; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }
471
- }
472
- @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } :host([look='ruled']) li[aria-current]::after { background: Highlight; } }
473
- `
474
- ];
475
- }
476
- render() {
477
- return html`<ol part="list">${(this.items ?? []).map(
478
- (step, i) => html`<li part="step" aria-current=${i === this.current ? "step" : nothing} style=${this.look === "ruled" ? `--chart:var(--impakt-color-chart-${i % 5 + 1}, ${"var(--impakt-color-brand-default, #1f4ed8)"})` : nothing}>
479
- ${step.meta ? html`<p class="meta">${step.meta}</p>` : nothing}
480
- <div class="h" role="heading" aria-level=${this.headingLevel}>${step.heading}</div>
481
- ${step.text ? html`<p class="body">${step.text}</p>` : nothing}
482
- </li>`
483
- )}</ol>`;
484
- }
485
- };
486
- var ImpaktMediaSplit = class extends ImpaktElement {
487
- static {
488
- this.properties = {
489
- eyebrow: { type: String },
490
- heading: { type: String },
491
- lead: { type: String },
492
- points: { type: Array },
493
- level: { type: Number, reflect: true },
494
- imageSrc: { type: String, attribute: "image-src" },
495
- imageAlt: { type: String, attribute: "image-alt" },
496
- imageSide: { type: String, reflect: true, attribute: "image-side" },
497
- insetSrc: { type: String, attribute: "inset-src" },
498
- insetAlt: { type: String, attribute: "inset-alt" },
499
- ratio: { type: String, reflect: true },
500
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
501
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
502
- };
503
- }
504
- constructor() {
505
- super();
506
- this.eyebrow = "";
507
- this.heading = "";
508
- this.lead = "";
509
- this.points = [];
510
- this.level = 2;
511
- this.imageSrc = "";
512
- this.imageAlt = "";
513
- this.imageSide = "end";
514
- this.insetSrc = "";
515
- this.insetAlt = "";
516
- this.ratio = "4:3";
517
- this.spaceAbove = "none";
518
- this.spaceBelow = "none";
519
- }
520
- static {
521
- this.styles = [
522
- ...ImpaktElement.styles,
523
- spaceAround,
524
- headingStyles,
525
- css`
526
- :host { display: block; container-type: inline-size; --ratio: 4 / 3; }
527
- :host([ratio='1:1']) { --ratio: 1 / 1; }
528
- :host([ratio='3:2']) { --ratio: 3 / 2; }
529
- :host([ratio='16:9']) { --ratio: 16 / 9; }
530
- .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }
531
- :host([image-side='start']) .picture { order: -1; }
532
- .words { display: flex; flex-direction: column; gap: ${space(4)}; }
533
- .h { ${type("4xl")} }
534
- .lead { ${type("lg")} }
535
- ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }
536
- li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight("normal")}; }
537
- .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${t.brandSubtle}; color: ${t.brand}; }
538
- .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }
539
- img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }
540
- .picture { position: relative; }
541
- .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
542
- .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-sizing: border-box; }
543
- @container (max-width: 48rem) {
544
- .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }
545
- :host([image-side='start']) .picture { order: 0; }
546
- .h { ${type("3xl")} }
547
- }
548
- `
549
- ];
550
- }
551
- render() {
552
- return html`<div class="split" part="split">
553
- <div class="words">
554
- ${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
555
- <div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
556
- ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
557
- ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class="tick">${iconSvg("check", "14px")}</span><span>${p}</span></li>`)}</ul>` : nothing}
558
- <div class="actions"><slot name="actions"></slot></div>
559
- </div>
560
- ${this.imageSrc ? html`<div class="picture ${this.insetSrc ? "has-inset" : ""}"><img src=${this.imageSrc} alt=${this.imageAlt} loading="lazy" part="image" />${this.insetSrc ? html`<img class="inset" src=${this.insetSrc} alt=${this.insetAlt} loading="lazy" />` : nothing}</div>` : nothing}
561
- </div>`;
562
- }
563
- };
564
- var ImpaktCtaBanner = class extends ImpaktElement {
565
- static {
566
- this.properties = {
567
- heading: { type: String },
568
- lead: { type: String },
569
- tone: { type: String, reflect: true },
570
- align: { type: String, reflect: true },
571
- imageSrc: { type: String, attribute: "image-src" },
572
- imageAlt: { type: String, attribute: "image-alt" },
573
- headingLevel: { type: Number, attribute: "heading-level" },
574
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
575
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
576
- };
577
- }
578
- constructor() {
579
- super();
580
- this.heading = "";
581
- this.lead = "";
582
- this.tone = "brand";
583
- this.align = "split";
584
- this.imageSrc = "";
585
- this.imageAlt = "";
586
- this.headingLevel = 2;
587
- this.spaceAbove = "none";
588
- this.spaceBelow = "none";
589
- }
590
- static {
591
- this.styles = [
592
- ...ImpaktElement.styles,
593
- spaceAround,
594
- headingStyles,
595
- css`
596
- :host { display: block; container-type: inline-size; }
597
- .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${space(8)}; padding: ${space(16)}; border-radius: ${t.radius2xl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }
598
- :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }
599
- :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowMd};
600
- /* A primary button on the brand panel turns over, as it does on an ink band, so it keeps an edge against the panel. */
601
- --impakt-button-primary: ${t.onBrand}; --impakt-button-on-primary: ${t.brand}; --impakt-button-primary-hover: color-mix(in srgb, ${t.onBrand} 86%, ${t.brand}); --impakt-color-text-inverse: ${t.brand}; }
602
- /* Only the words take the light colours: a button in the actions keeps its own. */
603
- :host([tone='brand']) .words { --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; }
604
- /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */
605
- :host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${t.onBrand} 18%, transparent), transparent); pointer-events: none; }
606
- .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
607
- .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }
608
- .panel.pictured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.8) 0%, rgb(18 31 26 / 0.1) 75%); }
609
- .panel.pictured .words, .panel.pictured .actions { z-index: 1; }
610
- @container (max-width: 48rem) { .panel.pictured { justify-content: flex-end; } .panel.pictured::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.15) 0%, rgb(18 31 26 / 0.85) 100%); } }
611
- .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }
612
- .h { ${type("4xl")} }
613
- .lead { ${type("lg")} }
614
- .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }
615
- :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
616
- :host([align='center']) .panel { flex-direction: column; text-align: center; }
617
- :host([align='center']) .words { align-items: center; }
618
- @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${space(8)} ${space(6)}; } .h { ${type("3xl")} } :host([align='center']) .panel { align-items: center; } }
619
- @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
620
- `
621
- ];
622
- }
623
- render() {
624
- return html`<div class="panel ${this.imageSrc ? "pictured" : ""}" part="panel">
625
- ${this.imageSrc ? html`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}
626
- <div class="words">
627
- <div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
628
- ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
629
- </div>
630
- <div class="actions"><slot name="actions"></slot></div>
631
- </div>`;
632
- }
633
- };
634
- var stars = (rating) => html`<span class="stars" role="img" aria-label=${say("Rated {rating} out of 5", { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill=${n <= rating ? "currentColor" : "none"} stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z"/></svg>`)}</span>`;
635
- var initials = (name) => name.split(/\s+/).filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== "and").slice(0, 2).map((w) => w[0].toUpperCase()).join("");
636
- var ImpaktReviews = class extends ImpaktElement {
637
- static {
638
- this.properties = {
639
- summary: { type: String },
640
- rating: { type: Number },
641
- items: { type: Array },
642
- columns: { type: String, reflect: true },
643
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
644
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
645
- };
646
- }
647
- constructor() {
648
- super();
649
- this.summary = "";
650
- this.rating = void 0;
651
- this.items = [];
652
- this.columns = "three";
653
- this.spaceAbove = "none";
654
- this.spaceBelow = "none";
655
- }
656
- static {
657
- this.styles = [
658
- ...ImpaktElement.styles,
659
- spaceAround,
660
- css`
661
- :host { display: block; container-type: inline-size; }
662
- .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type("sm")} font-weight: ${fontWeight("medium")}; }
663
- .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }
664
- ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
665
- :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
666
- li { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }
667
- blockquote { margin: 0; flex: 1; ${type("md")} text-wrap: pretty; }
668
- .who { display: flex; align-items: center; gap: ${space(3)}; }
669
- .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${t.brandSubtle}; color: ${t.brand}; ${type("sm")} font-weight: ${fontWeight("bold")}; }
670
- .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
671
- .name { font-weight: ${fontWeight("semibold")}; ${type("sm")} }
672
- .about { color: ${t.textMuted}; ${type("sm")} }
673
- @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
674
- `
675
- ];
676
- }
677
- render() {
678
- return html`${this.summary || this.rating ? html`<p class="top" part="summary" style="margin-block-start:0">${this.rating ? stars(Math.round(this.rating)) : nothing}<span>${this.summary}</span></p>` : nothing}
679
- <ul part="list">${(this.items ?? []).map(
680
- (r) => html`<li part="review">
681
- ${r.rating ? stars(r.rating) : nothing}
682
- <blockquote>${r.quote}</blockquote>
683
- <div class="who"><span class="face" aria-hidden="true">${r.avatarSrc ? html`<img src=${r.avatarSrc} alt="" />` : initials(r.person)}</span><span><span class="name">${r.person}</span>${r.about ? html`<br /><span class="about">${r.about}</span>` : nothing}</span></div>
684
- </li>`
685
- )}</ul>`;
686
- }
687
- };
688
- var ImpaktNewsletter = class extends ImpaktElement {
689
- constructor() {
690
- super();
691
- this.done = false;
692
- this.heading = "";
693
- this.lead = "";
694
- this.label = "Email address";
695
- this.buttonText = "Sign up";
696
- this.smallPrint = "";
697
- this.doneText = "Thank you. You\u2019re on the list.";
698
- this.headingLevel = 2;
699
- this.spaceAbove = "none";
700
- this.spaceBelow = "none";
701
- }
702
- static {
703
- this.properties = {
704
- heading: { type: String },
705
- lead: { type: String },
706
- label: { type: String },
707
- buttonText: { type: String, attribute: "button-text" },
708
- smallPrint: { type: String, attribute: "small-print" },
709
- doneText: { type: String, attribute: "done-text" },
710
- headingLevel: { type: Number, attribute: "heading-level" },
711
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
712
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
713
- };
714
- }
715
- static {
716
- this.styles = [
717
- ...ImpaktElement.styles,
718
- focusRing,
719
- spaceAround,
720
- headingStyles,
721
- css`
722
- :host { display: block; container-type: inline-size; }
723
- .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }
724
- .words { display: flex; flex-direction: column; gap: ${space(2)}; }
725
- .h { ${type("2xl")} }
726
- form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }
727
- label { grid-column: 1 / -1; ${type("sm")} font-weight: ${fontWeight("semibold")}; }
728
- input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${space(2.5)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; }
729
- button { ${targetSize} min-block-size: 44px; padding: ${space(2)} ${space(5)}; font: inherit; ${type("sm")} font-weight: ${fontWeight("semibold")}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }
730
- button:hover { background: ${t.brandHover}; }
731
- .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type("sm")} }
732
- .done { margin: 0; ${type("md")} font-weight: ${fontWeight("semibold")}; }
733
- @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
734
- `
735
- ];
736
- }
737
- submit(event) {
738
- event.preventDefault();
739
- const form = event.currentTarget;
740
- if (typeof form.reportValidity === "function" && !form.reportValidity()) return;
741
- const email = form.querySelector("input").value.trim();
742
- this.dispatchEvent(new CustomEvent("impakt-submit", { detail: { email }, bubbles: true, composed: true }));
743
- this.done = true;
744
- this.requestUpdate();
745
- }
746
- render() {
747
- const field = this.id_("email");
748
- return html`<div class="wrap" part="wrap">
749
- <div class="words">
750
- ${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
751
- ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
752
- </div>
753
- <div aria-live="polite">${this.done ? html`<p class="done">${this.doneText}</p>` : html`<form @submit=${this.submit}>
754
- <label for=${field}>${this.label}</label>
755
- <input id=${field} type="email" name="email" autocomplete="email" required />
756
- <button type="submit">${this.buttonText}</button>
757
- ${this.smallPrint ? html`<p class="note">${this.smallPrint}</p>` : nothing}
758
- </form>`}</div>
759
- </div>`;
760
- }
761
- };
762
- customElements.define("impakt-carousel", ImpaktCarousel);
763
- customElements.define("impakt-gallery", ImpaktGallery);
764
- customElements.define("impakt-logo-cloud", ImpaktLogoCloud);
765
- customElements.define("impakt-steps", ImpaktSteps);
766
- customElements.define("impakt-media-split", ImpaktMediaSplit);
767
- customElements.define("impakt-cta-banner", ImpaktCtaBanner);
768
- customElements.define("impakt-reviews", ImpaktReviews);
769
- customElements.define("impakt-newsletter", ImpaktNewsletter);
770
-
771
- export {
772
- ImpaktCarousel,
773
- gallerySpan,
774
- ImpaktGallery,
775
- ImpaktLogoCloud,
776
- ImpaktSteps,
777
- ImpaktMediaSplit,
778
- ImpaktCtaBanner,
779
- ImpaktReviews,
780
- ImpaktNewsletter
781
- };
782
- //# sourceMappingURL=chunk-MMADM6OW.js.map