@atomic-ui/ui 0.1.4 → 0.1.7

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 (141) hide show
  1. package/README.md +30 -6
  2. package/dist/base/FieldElement.d.ts +7 -0
  3. package/dist/base/tokens.d.ts +23 -1
  4. package/dist/chunk-2YQA3VBY.js +85 -0
  5. package/dist/chunk-2YQA3VBY.js.map +1 -0
  6. package/dist/{chunk-LFOWTFMR.js → chunk-4HU4Y23Q.js} +3 -3
  7. package/dist/chunk-5EA4IDUD.js +177 -0
  8. package/dist/chunk-5EA4IDUD.js.map +1 -0
  9. package/dist/{chunk-3OSL2HMN.js → chunk-6ICOJPMD.js} +7 -5
  10. package/dist/chunk-6ICOJPMD.js.map +1 -0
  11. package/dist/{chunk-ZXCSQ6MK.js → chunk-7BIQ3K6H.js} +10 -2
  12. package/dist/chunk-7BIQ3K6H.js.map +1 -0
  13. package/dist/chunk-7Y6UCSUS.js +361 -0
  14. package/dist/chunk-7Y6UCSUS.js.map +1 -0
  15. package/dist/chunk-BTGCUONV.js +56 -0
  16. package/dist/chunk-BTGCUONV.js.map +1 -0
  17. package/dist/{chunk-QYHWR6C5.js → chunk-C36CZRHK.js} +20 -7
  18. package/dist/chunk-C36CZRHK.js.map +1 -0
  19. package/dist/{chunk-MAMBT7BZ.js → chunk-CMAU4DSB.js} +21 -7
  20. package/dist/chunk-CMAU4DSB.js.map +1 -0
  21. package/dist/{chunk-HWNY6U5F.js → chunk-G6OVKNL7.js} +2 -2
  22. package/dist/{chunk-6UDDZQDK.js → chunk-GO2IBRFP.js} +3 -3
  23. package/dist/chunk-GO2IBRFP.js.map +1 -0
  24. package/dist/{chunk-PDXOPY22.js → chunk-GSCVG2ER.js} +3 -3
  25. package/dist/{chunk-IBTOZOGI.js → chunk-HWWA27DN.js} +2 -2
  26. package/dist/chunk-MLVUMCQ2.js +167 -0
  27. package/dist/chunk-MLVUMCQ2.js.map +1 -0
  28. package/dist/{chunk-A4CJ2F3J.js → chunk-MOEMFL4K.js} +21 -7
  29. package/dist/chunk-MOEMFL4K.js.map +1 -0
  30. package/dist/{chunk-OBCSDZHP.js → chunk-NQKYHILD.js} +3 -3
  31. package/dist/{chunk-5NUF7ZQA.js → chunk-NTNXHLTM.js} +24 -3
  32. package/dist/chunk-NTNXHLTM.js.map +1 -0
  33. package/dist/{chunk-4Y3HJBJY.js → chunk-OB7LC6NJ.js} +3 -2
  34. package/dist/chunk-OB7LC6NJ.js.map +1 -0
  35. package/dist/chunk-QCNT7D5V.js +549 -0
  36. package/dist/chunk-QCNT7D5V.js.map +1 -0
  37. package/dist/{chunk-CGMDIZPO.js → chunk-QDNI54ON.js} +3 -3
  38. package/dist/chunk-T6L3USBZ.js +245 -0
  39. package/dist/chunk-T6L3USBZ.js.map +1 -0
  40. package/dist/{chunk-TZD7IVVQ.js → chunk-TPF4MOMF.js} +8 -3
  41. package/dist/chunk-TPF4MOMF.js.map +1 -0
  42. package/dist/{chunk-S3EQO33M.js → chunk-VTFCTWSX.js} +6 -4
  43. package/dist/chunk-VTFCTWSX.js.map +1 -0
  44. package/dist/{chunk-2RBYVWZT.js → chunk-VWNBB7FW.js} +5 -3
  45. package/dist/chunk-VWNBB7FW.js.map +1 -0
  46. package/dist/{chunk-DIZCGSJA.js → chunk-WECSVHIM.js} +15 -3
  47. package/dist/chunk-WECSVHIM.js.map +1 -0
  48. package/dist/chunk-X7IPZPTG.js +710 -0
  49. package/dist/chunk-X7IPZPTG.js.map +1 -0
  50. package/dist/{chunk-TIKX5POO.js → chunk-XJP45LFA.js} +55 -28
  51. package/dist/chunk-XJP45LFA.js.map +1 -0
  52. package/dist/{chunk-6MLXFFH4.js → chunk-XVKEM5JY.js} +3 -3
  53. package/dist/chunk-XVKEM5JY.js.map +1 -0
  54. package/dist/chunk-ZBLTU67D.js +424 -0
  55. package/dist/chunk-ZBLTU67D.js.map +1 -0
  56. package/dist/{chunk-4KFHQBH2.js → chunk-ZGAOMRYD.js} +17 -4
  57. package/dist/chunk-ZGAOMRYD.js.map +1 -0
  58. package/dist/chunk-ZQJD4YEJ.js +195 -0
  59. package/dist/chunk-ZQJD4YEJ.js.map +1 -0
  60. package/dist/components/accordion.js +2 -2
  61. package/dist/components/alert.js +2 -2
  62. package/dist/components/app-ui.d.ts +421 -0
  63. package/dist/components/app-ui.js +26 -0
  64. package/dist/components/app-ui.js.map +1 -0
  65. package/dist/components/blocks.d.ts +174 -0
  66. package/dist/components/blocks.js +17 -0
  67. package/dist/components/blocks.js.map +1 -0
  68. package/dist/components/button.d.ts +33 -0
  69. package/dist/components/button.js +3 -2
  70. package/dist/components/checkbox-group.js +3 -3
  71. package/dist/components/checkbox.js +3 -3
  72. package/dist/components/date-input.js +3 -3
  73. package/dist/components/dialog.js +2 -2
  74. package/dist/components/fieldset.d.ts +49 -0
  75. package/dist/components/fieldset.js +8 -0
  76. package/dist/components/fieldset.js.map +1 -0
  77. package/dist/components/grid.d.ts +3 -3
  78. package/dist/components/grid.js +2 -2
  79. package/dist/components/help.js +2 -2
  80. package/dist/components/icon.d.ts +89 -0
  81. package/dist/components/icon.js +14 -0
  82. package/dist/components/icon.js.map +1 -0
  83. package/dist/components/layout.d.ts +75 -7
  84. package/dist/components/layout.js +2 -2
  85. package/dist/components/link.d.ts +11 -0
  86. package/dist/components/link.js +3 -2
  87. package/dist/components/marketing.d.ts +370 -0
  88. package/dist/components/marketing.js +21 -0
  89. package/dist/components/marketing.js.map +1 -0
  90. package/dist/components/media.d.ts +12 -0
  91. package/dist/components/media.js +2 -2
  92. package/dist/components/navigation.d.ts +98 -0
  93. package/dist/components/navigation.js +11 -0
  94. package/dist/components/navigation.js.map +1 -0
  95. package/dist/components/organisms.d.ts +547 -0
  96. package/dist/components/organisms.js +25 -0
  97. package/dist/components/organisms.js.map +1 -0
  98. package/dist/components/page.d.ts +130 -0
  99. package/dist/components/page.js +10 -0
  100. package/dist/components/page.js.map +1 -0
  101. package/dist/components/price.d.ts +5 -0
  102. package/dist/components/price.js +2 -2
  103. package/dist/components/progress.js +2 -2
  104. package/dist/components/property.d.ts +389 -0
  105. package/dist/components/property.js +19 -0
  106. package/dist/components/property.js.map +1 -0
  107. package/dist/components/radio-group.js +3 -3
  108. package/dist/components/select.d.ts +6 -0
  109. package/dist/components/select.js +3 -3
  110. package/dist/components/summary-list.js +2 -2
  111. package/dist/components/table.js +2 -2
  112. package/dist/components/text-input.d.ts +6 -0
  113. package/dist/components/text-input.js +3 -3
  114. package/dist/components/textarea.d.ts +6 -0
  115. package/dist/components/textarea.js +3 -3
  116. package/dist/index.d.ts +9 -0
  117. package/dist/index.js +140 -36
  118. package/package.json +2 -2
  119. package/dist/chunk-2RBYVWZT.js.map +0 -1
  120. package/dist/chunk-3OSL2HMN.js.map +0 -1
  121. package/dist/chunk-4KFHQBH2.js.map +0 -1
  122. package/dist/chunk-4Y3HJBJY.js.map +0 -1
  123. package/dist/chunk-5NUF7ZQA.js.map +0 -1
  124. package/dist/chunk-6MLXFFH4.js.map +0 -1
  125. package/dist/chunk-6UDDZQDK.js.map +0 -1
  126. package/dist/chunk-A4CJ2F3J.js.map +0 -1
  127. package/dist/chunk-DIZCGSJA.js.map +0 -1
  128. package/dist/chunk-GGODB3GY.js +0 -172
  129. package/dist/chunk-GGODB3GY.js.map +0 -1
  130. package/dist/chunk-MAMBT7BZ.js.map +0 -1
  131. package/dist/chunk-QYHWR6C5.js.map +0 -1
  132. package/dist/chunk-S3EQO33M.js.map +0 -1
  133. package/dist/chunk-TIKX5POO.js.map +0 -1
  134. package/dist/chunk-TZD7IVVQ.js.map +0 -1
  135. package/dist/chunk-ZXCSQ6MK.js.map +0 -1
  136. /package/dist/{chunk-LFOWTFMR.js.map → chunk-4HU4Y23Q.js.map} +0 -0
  137. /package/dist/{chunk-HWNY6U5F.js.map → chunk-G6OVKNL7.js.map} +0 -0
  138. /package/dist/{chunk-PDXOPY22.js.map → chunk-GSCVG2ER.js.map} +0 -0
  139. /package/dist/{chunk-IBTOZOGI.js.map → chunk-HWWA27DN.js.map} +0 -0
  140. /package/dist/{chunk-OBCSDZHP.js.map → chunk-NQKYHILD.js.map} +0 -0
  141. /package/dist/{chunk-CGMDIZPO.js.map → chunk-QDNI54ON.js.map} +0 -0
@@ -0,0 +1,710 @@
1
+ import {
2
+ iconSvg
3
+ } from "./chunk-2YQA3VBY.js";
4
+ import {
5
+ ImpktElement,
6
+ focusRing,
7
+ fontWeight,
8
+ lineHeight,
9
+ space,
10
+ spaceAround,
11
+ t,
12
+ targetSize,
13
+ token,
14
+ type,
15
+ visuallyHidden
16
+ } from "./chunk-NTNXHLTM.js";
17
+
18
+ // packages/ui/src/components/organisms.ts
19
+ import { css, html, nothing } from "lit";
20
+ var token_accent = token("color.accent.default", "#c8a15a");
21
+ var reducedMotion = () => typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
22
+ var roundButton = css`
23
+ .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; }
24
+ .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }
25
+ .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
26
+ `;
27
+ var headingStyles = css`
28
+ .eyebrow { margin: 0; color: var(--impkt-eyebrow, ${t.brand}); ${type("sm")} font-weight: ${fontWeight("semibold")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
29
+ .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }
30
+ .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }
31
+ `;
32
+ var ImpktCarousel = class extends ImpktElement {
33
+ constructor() {
34
+ super();
35
+ this.index = 0;
36
+ this.count = 0;
37
+ /** How many slides fit right now, which the width decides. */
38
+ this.visible = null;
39
+ /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */
40
+ this.heading = null;
41
+ this.paused = false;
42
+ this.held = false;
43
+ this.label = "Slides";
44
+ this.perView = "1";
45
+ this.arrows = "below";
46
+ this.autoplay = false;
47
+ this.seconds = 6;
48
+ this.spaceAbove = "none";
49
+ this.spaceBelow = "none";
50
+ }
51
+ static {
52
+ this.properties = {
53
+ label: { type: String },
54
+ perView: { type: String, reflect: true, attribute: "per-view" },
55
+ arrows: { type: String, reflect: true },
56
+ autoplay: { type: Boolean, reflect: true },
57
+ seconds: { type: Number },
58
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
59
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
60
+ };
61
+ }
62
+ static {
63
+ this.styles = [...ImpktElement.styles, focusRing, spaceAround, roundButton, css`
64
+ :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }
65
+ :host([per-view='2']) { --most: 2; }
66
+ :host([per-view='3']) { --most: 3; }
67
+ .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}; }
68
+ .track::-webkit-scrollbar { display: none; }
69
+ ::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; }
70
+ /* Whole slides only: a slice of the next one reads as content spilling out of the page. */
71
+ @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
72
+ @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }
73
+ .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }
74
+ .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }
75
+ .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }
76
+ .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 999px; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }
77
+ .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }
78
+ .buttons { display: flex; gap: ${space(2)}; }
79
+ section { position: relative; }
80
+ @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }
81
+ .sr-only { ${visuallyHidden} }
82
+ @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
83
+ `];
84
+ }
85
+ get track() {
86
+ return this.renderRoot.querySelector(".track");
87
+ }
88
+ get slides() {
89
+ return Array.from(this.children);
90
+ }
91
+ /** The last slide that can sit at the start of the row. */
92
+ get last() {
93
+ return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));
94
+ }
95
+ /** Count what actually fits, and keep the row on a real stop when that changes. */
96
+ measure() {
97
+ const track = this.track;
98
+ const first = this.slides[0];
99
+ if (!track || !first) return;
100
+ const width = first.getBoundingClientRect().width;
101
+ if (width <= 0) return;
102
+ const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;
103
+ const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));
104
+ if (fits === this.visible) return;
105
+ this.visible = fits;
106
+ this.index = Math.min(this.index, this.last);
107
+ const slide = this.slides[this.index];
108
+ if (slide && typeof track.scrollTo === "function") track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: "auto" });
109
+ this.requestUpdate();
110
+ }
111
+ onSlots() {
112
+ const slides = this.slides;
113
+ this.count = slides.length;
114
+ slides.forEach((slide, i) => {
115
+ slide.setAttribute("role", "group");
116
+ slide.setAttribute("aria-roledescription", "slide");
117
+ slide.setAttribute("aria-label", `${i + 1} of ${slides.length}`);
118
+ });
119
+ this.measure();
120
+ this.requestUpdate();
121
+ }
122
+ go(to) {
123
+ const target = Math.min(this.last, Math.max(0, to));
124
+ this.index = target;
125
+ this.heading = target;
126
+ clearTimeout(this.settle);
127
+ this.settle = setTimeout(() => {
128
+ const arrived = this.heading === null;
129
+ this.heading = null;
130
+ const track2 = this.track;
131
+ const slide2 = this.slides[this.index];
132
+ if (!arrived && track2 && slide2 && typeof track2.scrollTo === "function") track2.scrollTo({ left: slide2.offsetLeft - track2.offsetLeft, behavior: "auto" });
133
+ }, 900);
134
+ this.requestUpdate();
135
+ const track = this.track;
136
+ const slide = this.slides[target];
137
+ if (track && slide && typeof track.scrollTo === "function") {
138
+ track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? "auto" : "smooth" });
139
+ }
140
+ }
141
+ onScroll() {
142
+ const track = this.track;
143
+ const slides = this.slides;
144
+ if (!track || !slides.length) return;
145
+ let nearest = 0;
146
+ let distance = Infinity;
147
+ slides.forEach((slide, i) => {
148
+ const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);
149
+ if (d < distance) {
150
+ distance = d;
151
+ nearest = i;
152
+ }
153
+ });
154
+ if (this.heading !== null) {
155
+ if (nearest === this.heading && distance < 2) {
156
+ this.heading = null;
157
+ clearTimeout(this.settle);
158
+ }
159
+ return;
160
+ }
161
+ if (nearest !== this.index) {
162
+ this.index = Math.min(nearest, this.last);
163
+ this.requestUpdate();
164
+ }
165
+ }
166
+ onKey(event) {
167
+ if (event.key === "ArrowRight") {
168
+ event.preventDefault();
169
+ this.go(this.index + 1);
170
+ }
171
+ if (event.key === "ArrowLeft") {
172
+ event.preventDefault();
173
+ this.go(this.index - 1);
174
+ }
175
+ }
176
+ get canPlay() {
177
+ return this.autoplay && !reducedMotion();
178
+ }
179
+ restart() {
180
+ clearInterval(this.timer);
181
+ this.timer = void 0;
182
+ if (!this.canPlay || this.paused || this.held) return;
183
+ this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1e3);
184
+ }
185
+ hold(held) {
186
+ this.held = held;
187
+ this.restart();
188
+ }
189
+ togglePause() {
190
+ this.paused = !this.paused;
191
+ this.restart();
192
+ this.requestUpdate();
193
+ }
194
+ firstUpdated() {
195
+ if (typeof ResizeObserver === "function" && this.track) {
196
+ this.observer = new ResizeObserver(() => this.measure());
197
+ this.observer.observe(this.track);
198
+ }
199
+ }
200
+ updated(changed) {
201
+ if (changed.has("autoplay") || changed.has("seconds")) this.restart();
202
+ if (changed.has("perView")) this.measure();
203
+ }
204
+ connectedCallback() {
205
+ super.connectedCallback();
206
+ if (this.track) this.observer?.observe(this.track);
207
+ this.restart();
208
+ }
209
+ disconnectedCallback() {
210
+ super.disconnectedCallback();
211
+ this.observer?.disconnect();
212
+ clearInterval(this.timer);
213
+ clearTimeout(this.settle);
214
+ }
215
+ render() {
216
+ const stops = Array.from({ length: this.last + 1 }, (_, i) => i);
217
+ return html`<section aria-roledescription="carousel" aria-label=${this.label} part="carousel" @keydown=${this.onKey}
218
+ @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>
219
+ <div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
220
+ <div class="controls" part="controls">
221
+ <div class="dots">${stops.length > 1 ? stops.map((i) => html`<button class="dot" type="button" aria-label=${`Go to slide ${i + 1}`} aria-current=${i === this.index ? "true" : "false"} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>
222
+ <div class="buttons">
223
+ ${this.canPlay ? html`<button class="round" type="button" aria-label=${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}
224
+ <button class="round" type="button" aria-label="Previous slide" ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg("arrow-left", "18px")}</button>
225
+ <button class="round" type="button" aria-label="Next slide" ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg("arrow-right", "18px")}</button>
226
+ </div>
227
+ </div>
228
+ <p class="sr-only" aria-live="polite">Slide ${this.index + 1} of ${this.count}</p>
229
+ </section>`;
230
+ }
231
+ };
232
+ function gallerySpan(index, count, layout) {
233
+ const last = index === count - 1;
234
+ const span = { wide: 1, narrow: 1, rows: 1 };
235
+ if (layout === "grid") {
236
+ if (last) {
237
+ span.wide = count % 3 ? 4 - count % 3 : 1;
238
+ span.narrow = count % 2 ? 2 : 1;
239
+ }
240
+ return span;
241
+ }
242
+ if (index === 0) return span;
243
+ if (count === 2) return { wide: 2, narrow: 2, rows: 2 };
244
+ if (count === 3) return { ...span, wide: 2 };
245
+ if (last) {
246
+ const extra = (count - 5) % 4;
247
+ span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;
248
+ span.narrow = count % 2 ? 1 : 2;
249
+ }
250
+ return span;
251
+ }
252
+ var ImpktGallery = class extends ImpktElement {
253
+ constructor() {
254
+ super();
255
+ this.shown = -1;
256
+ this.opener = null;
257
+ this.items = [];
258
+ this.layout = "feature";
259
+ this.label = "Gallery";
260
+ this.spaceAbove = "none";
261
+ this.spaceBelow = "none";
262
+ }
263
+ static {
264
+ this.properties = {
265
+ items: { type: Array },
266
+ layout: { type: String, reflect: true },
267
+ label: { type: String },
268
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
269
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
270
+ };
271
+ }
272
+ static {
273
+ this.styles = [...ImpktElement.styles, focusRing, spaceAround, roundButton, css`
274
+ :host { display: block; container-type: inline-size; }
275
+ 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; }
276
+ :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
277
+ li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
278
+ :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
279
+ .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; }
280
+ .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }
281
+ .open:hover img { transform: scale(1.03); }
282
+ @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); } }
283
+ dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
284
+ dialog::backdrop { background: rgb(10 14 12 / 0.9); }
285
+ .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; }
286
+ .bar { display: flex; align-items: center; justify-content: space-between; ${type("sm")} }
287
+ .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }
288
+ .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }
289
+ figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
290
+ .caption { margin: 0; text-align: center; ${type("sm")} }
291
+ `];
292
+ }
293
+ get dialog() {
294
+ return this.renderRoot.querySelector("dialog");
295
+ }
296
+ open(index, event) {
297
+ this.opener = event.currentTarget;
298
+ this.shown = index;
299
+ this.requestUpdate();
300
+ void this.updateComplete.then(() => {
301
+ const d = this.dialog;
302
+ if (d && !d.open) {
303
+ if (typeof d.showModal === "function") d.showModal();
304
+ else d.setAttribute("open", "");
305
+ }
306
+ });
307
+ }
308
+ close() {
309
+ const d = this.dialog;
310
+ if (d?.open) {
311
+ if (typeof d.close === "function") d.close();
312
+ else d.removeAttribute("open");
313
+ }
314
+ this.onClosed();
315
+ }
316
+ onClosed() {
317
+ if (this.shown === -1) return;
318
+ this.shown = -1;
319
+ this.requestUpdate();
320
+ this.opener?.focus();
321
+ }
322
+ step(by) {
323
+ const n = (this.items ?? []).length;
324
+ if (!n || this.shown < 0) return;
325
+ this.shown = (this.shown + by + n) % n;
326
+ this.requestUpdate();
327
+ }
328
+ onKey(event) {
329
+ if (event.key === "ArrowRight") {
330
+ event.preventDefault();
331
+ this.step(1);
332
+ }
333
+ if (event.key === "ArrowLeft") {
334
+ event.preventDefault();
335
+ this.step(-1);
336
+ }
337
+ }
338
+ render() {
339
+ const items = this.items ?? [];
340
+ const current = this.shown >= 0 ? items[this.shown] : void 0;
341
+ return html`<ul aria-label=${this.label} part="list">${items.map((item, i) => {
342
+ const span = gallerySpan(i, items.length, this.layout);
343
+ return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>
344
+ <button class="open" type="button" aria-label=${`View larger: ${item.alt}`} @click=${(e) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading="lazy" /></button>
345
+ </li>`;
346
+ })}</ul>
347
+ <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
348
+ ${current ? html`<div class="stage">
349
+ <div class="bar"><span>${this.shown + 1} of ${items.length}</span><button class="round" type="button" aria-label="Close" @click=${this.close}>${iconSvg("close", "18px")}</button></div>
350
+ <div class="middle">
351
+ <button class="round" type="button" aria-label="Previous picture" @click=${() => this.step(-1)}>${iconSvg("arrow-left", "18px")}</button>
352
+ <figure><img src=${current.src} alt=${current.alt} /></figure>
353
+ <button class="round" type="button" aria-label="Next picture" @click=${() => this.step(1)}>${iconSvg("arrow-right", "18px")}</button>
354
+ </div>
355
+ <p class="caption">${current.caption ?? current.alt}</p>
356
+ </div>` : nothing}
357
+ </dialog>`;
358
+ }
359
+ };
360
+ var ImpktLogoCloud = class extends ImpktElement {
361
+ static {
362
+ this.properties = {
363
+ heading: { type: String },
364
+ items: { type: Array },
365
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
366
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
367
+ };
368
+ }
369
+ constructor() {
370
+ super();
371
+ this.heading = "";
372
+ this.items = [];
373
+ this.spaceAbove = "none";
374
+ this.spaceBelow = "none";
375
+ }
376
+ static {
377
+ this.styles = [...ImpktElement.styles, focusRing, spaceAround, 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
+ render() {
387
+ return html`${this.heading ? html`<p part="heading">${this.heading}</p>` : nothing}
388
+ <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>`;
389
+ }
390
+ };
391
+ var ImpktSteps = class extends ImpktElement {
392
+ static {
393
+ this.properties = {
394
+ items: { type: Array },
395
+ orientation: { type: String, reflect: true },
396
+ headingLevel: { type: Number, attribute: "heading-level" },
397
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
398
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
399
+ };
400
+ }
401
+ constructor() {
402
+ super();
403
+ this.items = [];
404
+ this.orientation = "horizontal";
405
+ this.headingLevel = 3;
406
+ this.spaceAbove = "none";
407
+ this.spaceBelow = "none";
408
+ }
409
+ static {
410
+ this.styles = [...ImpktElement.styles, spaceAround, headingStyles, css`
411
+ :host { display: block; container-type: inline-size; }
412
+ 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)}; }
413
+ li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }
414
+ 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)}; }
415
+ 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}; }
416
+ .h { ${type("lg")} letter-spacing: 0; }
417
+ .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight("normal")}; text-wrap: pretty; }
418
+ :host([orientation='vertical']) ol { grid-auto-flow: row; }
419
+ :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
420
+ :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
421
+ :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; }
422
+ @container (max-width: 40rem) {
423
+ ol { grid-auto-flow: row; }
424
+ li { padding-inline-start: 56px; min-block-size: 56px; }
425
+ li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
426
+ 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; }
427
+ }
428
+ @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } }
429
+ `];
430
+ }
431
+ render() {
432
+ return html`<ol part="list">${(this.items ?? []).map((step) => html`<li part="step">
433
+ <div class="h" role="heading" aria-level=${this.headingLevel}>${step.heading}</div>
434
+ ${step.text ? html`<p class="body">${step.text}</p>` : nothing}
435
+ </li>`)}</ol>`;
436
+ }
437
+ };
438
+ var ImpktMediaSplit = class extends ImpktElement {
439
+ static {
440
+ this.properties = {
441
+ eyebrow: { type: String },
442
+ heading: { type: String },
443
+ lead: { type: String },
444
+ points: { type: Array },
445
+ level: { type: Number, reflect: true },
446
+ imageSrc: { type: String, attribute: "image-src" },
447
+ imageAlt: { type: String, attribute: "image-alt" },
448
+ imageSide: { type: String, reflect: true, attribute: "image-side" },
449
+ insetSrc: { type: String, attribute: "inset-src" },
450
+ insetAlt: { type: String, attribute: "inset-alt" },
451
+ ratio: { type: String, reflect: true },
452
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
453
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
454
+ };
455
+ }
456
+ constructor() {
457
+ super();
458
+ this.eyebrow = "";
459
+ this.heading = "";
460
+ this.lead = "";
461
+ this.points = [];
462
+ this.level = 2;
463
+ this.imageSrc = "";
464
+ this.imageAlt = "";
465
+ this.imageSide = "end";
466
+ this.insetSrc = "";
467
+ this.insetAlt = "";
468
+ this.ratio = "4:3";
469
+ this.spaceAbove = "none";
470
+ this.spaceBelow = "none";
471
+ }
472
+ static {
473
+ this.styles = [...ImpktElement.styles, spaceAround, headingStyles, css`
474
+ :host { display: block; container-type: inline-size; --ratio: 4 / 3; }
475
+ :host([ratio='1:1']) { --ratio: 1 / 1; }
476
+ :host([ratio='3:2']) { --ratio: 3 / 2; }
477
+ :host([ratio='16:9']) { --ratio: 16 / 9; }
478
+ .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }
479
+ :host([image-side='start']) .picture { order: -1; }
480
+ .words { display: flex; flex-direction: column; gap: ${space(4)}; }
481
+ .h { ${type("4xl")} }
482
+ .lead { ${type("lg")} }
483
+ ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }
484
+ li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight("normal")}; }
485
+ .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}; }
486
+ .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }
487
+ img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }
488
+ .picture { position: relative; }
489
+ .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
490
+ .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; }
491
+ @container (max-width: 48rem) {
492
+ .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }
493
+ :host([image-side='start']) .picture { order: 0; }
494
+ .h { ${type("3xl")} }
495
+ }
496
+ `];
497
+ }
498
+ render() {
499
+ return html`<div class="split" part="split">
500
+ <div class="words">
501
+ ${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
502
+ <div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
503
+ ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
504
+ ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class="tick">${iconSvg("check", "14px")}</span><span>${p}</span></li>`)}</ul>` : nothing}
505
+ <div class="actions"><slot name="actions"></slot></div>
506
+ </div>
507
+ ${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}
508
+ </div>`;
509
+ }
510
+ };
511
+ var ImpktCtaBanner = class extends ImpktElement {
512
+ static {
513
+ this.properties = {
514
+ heading: { type: String },
515
+ lead: { type: String },
516
+ tone: { type: String, reflect: true },
517
+ align: { type: String, reflect: true },
518
+ imageSrc: { type: String, attribute: "image-src" },
519
+ imageAlt: { type: String, attribute: "image-alt" },
520
+ headingLevel: { type: Number, attribute: "heading-level" },
521
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
522
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
523
+ };
524
+ }
525
+ constructor() {
526
+ super();
527
+ this.heading = "";
528
+ this.lead = "";
529
+ this.tone = "brand";
530
+ this.align = "split";
531
+ this.imageSrc = "";
532
+ this.imageAlt = "";
533
+ this.headingLevel = 2;
534
+ this.spaceAbove = "none";
535
+ this.spaceBelow = "none";
536
+ }
537
+ static {
538
+ this.styles = [...ImpktElement.styles, spaceAround, headingStyles, css`
539
+ :host { display: block; container-type: inline-size; }
540
+ .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}; }
541
+ :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }
542
+ :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowLg}; }
543
+ /* Only the words take the light colours: a button in the actions keeps its own. */
544
+ :host([tone='brand']) .words { --impkt-color-text-heading: ${t.onBrand}; --impkt-color-text-default: ${t.onBrand}; --impkt-color-text-muted: ${t.onBrand}; --impkt-color-text-link: ${t.onBrand}; }
545
+ /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */
546
+ :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; }
547
+ .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
548
+ .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impkt-color-text-heading: #fff; }
549
+ .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%); }
550
+ .panel.pictured .words, .panel.pictured .actions { z-index: 1; }
551
+ @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%); } }
552
+ .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }
553
+ .h { ${type("4xl")} }
554
+ .lead { ${type("lg")} }
555
+ .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }
556
+ :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
557
+ :host([align='center']) .panel { flex-direction: column; text-align: center; }
558
+ :host([align='center']) .words { align-items: center; }
559
+ @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; } }
560
+ @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
561
+ `];
562
+ }
563
+ render() {
564
+ return html`<div class="panel ${this.imageSrc ? "pictured" : ""}" part="panel">
565
+ ${this.imageSrc ? html`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}
566
+ <div class="words">
567
+ <div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
568
+ ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
569
+ </div>
570
+ <div class="actions"><slot name="actions"></slot></div>
571
+ </div>`;
572
+ }
573
+ };
574
+ var stars = (rating) => html`<span class="stars" role="img" aria-label=${`Rated ${rating} out of 5`}>${[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>`;
575
+ 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("");
576
+ var ImpktReviews = class extends ImpktElement {
577
+ static {
578
+ this.properties = {
579
+ summary: { type: String },
580
+ rating: { type: Number },
581
+ items: { type: Array },
582
+ columns: { type: String, reflect: true },
583
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
584
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
585
+ };
586
+ }
587
+ constructor() {
588
+ super();
589
+ this.summary = "";
590
+ this.rating = void 0;
591
+ this.items = [];
592
+ this.columns = "three";
593
+ this.spaceAbove = "none";
594
+ this.spaceBelow = "none";
595
+ }
596
+ static {
597
+ this.styles = [...ImpktElement.styles, spaceAround, css`
598
+ :host { display: block; container-type: inline-size; }
599
+ .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type("sm")} font-weight: ${fontWeight("medium")}; }
600
+ .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }
601
+ ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
602
+ :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
603
+ 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}; }
604
+ blockquote { margin: 0; flex: 1; ${type("md")} text-wrap: pretty; }
605
+ .who { display: flex; align-items: center; gap: ${space(3)}; }
606
+ .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")}; }
607
+ .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
608
+ .name { font-weight: ${fontWeight("semibold")}; ${type("sm")} }
609
+ .about { color: ${t.textMuted}; ${type("sm")} }
610
+ @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
611
+ `];
612
+ }
613
+ render() {
614
+ 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}
615
+ <ul part="list">${(this.items ?? []).map((r) => html`<li part="review">
616
+ ${r.rating ? stars(r.rating) : nothing}
617
+ <blockquote>${r.quote}</blockquote>
618
+ <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>
619
+ </li>`)}</ul>`;
620
+ }
621
+ };
622
+ var ImpktNewsletter = class extends ImpktElement {
623
+ constructor() {
624
+ super();
625
+ this.done = false;
626
+ this.heading = "";
627
+ this.lead = "";
628
+ this.label = "Email address";
629
+ this.buttonText = "Sign up";
630
+ this.smallPrint = "";
631
+ this.doneText = "Thank you. You\u2019re on the list.";
632
+ this.headingLevel = 2;
633
+ this.spaceAbove = "none";
634
+ this.spaceBelow = "none";
635
+ }
636
+ static {
637
+ this.properties = {
638
+ heading: { type: String },
639
+ lead: { type: String },
640
+ label: { type: String },
641
+ buttonText: { type: String, attribute: "button-text" },
642
+ smallPrint: { type: String, attribute: "small-print" },
643
+ doneText: { type: String, attribute: "done-text" },
644
+ headingLevel: { type: Number, attribute: "heading-level" },
645
+ spaceAbove: { type: String, reflect: true, attribute: "space-above" },
646
+ spaceBelow: { type: String, reflect: true, attribute: "space-below" }
647
+ };
648
+ }
649
+ static {
650
+ this.styles = [...ImpktElement.styles, focusRing, spaceAround, headingStyles, css`
651
+ :host { display: block; container-type: inline-size; }
652
+ .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }
653
+ .words { display: flex; flex-direction: column; gap: ${space(2)}; }
654
+ .h { ${type("2xl")} }
655
+ form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }
656
+ label { grid-column: 1 / -1; ${type("sm")} font-weight: ${fontWeight("semibold")}; }
657
+ 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}; }
658
+ 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; }
659
+ button:hover { background: ${t.brandHover}; }
660
+ .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type("sm")} }
661
+ .done { margin: 0; ${type("md")} font-weight: ${fontWeight("semibold")}; }
662
+ @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
663
+ `];
664
+ }
665
+ submit(event) {
666
+ event.preventDefault();
667
+ const form = event.currentTarget;
668
+ if (typeof form.reportValidity === "function" && !form.reportValidity()) return;
669
+ const email = form.querySelector("input").value.trim();
670
+ this.dispatchEvent(new CustomEvent("impkt-submit", { detail: { email }, bubbles: true, composed: true }));
671
+ this.done = true;
672
+ this.requestUpdate();
673
+ }
674
+ render() {
675
+ const field = this.id_("email");
676
+ return html`<div class="wrap" part="wrap">
677
+ <div class="words">
678
+ ${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
679
+ ${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
680
+ </div>
681
+ <div aria-live="polite">${this.done ? html`<p class="done">${this.doneText}</p>` : html`<form @submit=${this.submit}>
682
+ <label for=${field}>${this.label}</label>
683
+ <input id=${field} type="email" name="email" autocomplete="email" required />
684
+ <button type="submit">${this.buttonText}</button>
685
+ ${this.smallPrint ? html`<p class="note">${this.smallPrint}</p>` : nothing}
686
+ </form>`}</div>
687
+ </div>`;
688
+ }
689
+ };
690
+ customElements.define("impkt-carousel", ImpktCarousel);
691
+ customElements.define("impkt-gallery", ImpktGallery);
692
+ customElements.define("impkt-logo-cloud", ImpktLogoCloud);
693
+ customElements.define("impkt-steps", ImpktSteps);
694
+ customElements.define("impkt-media-split", ImpktMediaSplit);
695
+ customElements.define("impkt-cta-banner", ImpktCtaBanner);
696
+ customElements.define("impkt-reviews", ImpktReviews);
697
+ customElements.define("impkt-newsletter", ImpktNewsletter);
698
+
699
+ export {
700
+ ImpktCarousel,
701
+ gallerySpan,
702
+ ImpktGallery,
703
+ ImpktLogoCloud,
704
+ ImpktSteps,
705
+ ImpktMediaSplit,
706
+ ImpktCtaBanner,
707
+ ImpktReviews,
708
+ ImpktNewsletter
709
+ };
710
+ //# sourceMappingURL=chunk-X7IPZPTG.js.map