@sankhyatronics/sankhya-cms 0.1.18 → 0.3.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 (216) hide show
  1. package/custom-elements.json +11634 -3153
  2. package/dist/attention-panel/index.js +2 -2
  3. package/dist/bar-chart/index.js +2 -2
  4. package/dist/bento-grid/index.d.ts +33 -1
  5. package/dist/bento-grid/index.js +4 -3
  6. package/dist/booking/index.d.ts +309 -0
  7. package/dist/booking/index.js +20 -0
  8. package/dist/booking/index.js.map +1 -0
  9. package/dist/card/index.d.ts +3 -4
  10. package/dist/card/index.js +2 -2
  11. package/dist/carousel/index.d.ts +20 -6
  12. package/dist/carousel/index.js +3 -3
  13. package/dist/chip/index.js +2 -2
  14. package/dist/{chunk-JQY2G4QK.js → chunk-2GTR37PU.js} +2 -2
  15. package/dist/chunk-2GTR37PU.js.map +1 -0
  16. package/dist/{chunk-FLY7TNRT.js → chunk-2HMOX253.js} +128 -25
  17. package/dist/chunk-2HMOX253.js.map +1 -0
  18. package/dist/{chunk-DH53HZPB.js → chunk-37KFBKPD.js} +32 -4
  19. package/dist/chunk-37KFBKPD.js.map +1 -0
  20. package/dist/{chunk-ALI26WOB.js → chunk-4XPKKYVZ.js} +54 -15
  21. package/dist/chunk-4XPKKYVZ.js.map +1 -0
  22. package/dist/chunk-535QAZ6A.js +236 -0
  23. package/dist/chunk-535QAZ6A.js.map +1 -0
  24. package/dist/{chunk-AKJQ345O.js → chunk-5AWGZQWU.js} +2 -2
  25. package/dist/chunk-6OZKZG5J.js +300 -0
  26. package/dist/chunk-6OZKZG5J.js.map +1 -0
  27. package/dist/chunk-AYNT7G3J.js +805 -0
  28. package/dist/chunk-AYNT7G3J.js.map +1 -0
  29. package/dist/chunk-BEWX3E6P.js +32 -0
  30. package/dist/chunk-BEWX3E6P.js.map +1 -0
  31. package/dist/chunk-CZUGPKXV.js +275 -0
  32. package/dist/chunk-CZUGPKXV.js.map +1 -0
  33. package/dist/{chunk-LEXZKGQX.js → chunk-DJFWZOZM.js} +107 -11
  34. package/dist/chunk-DJFWZOZM.js.map +1 -0
  35. package/dist/chunk-DPANTC3O.js +1714 -0
  36. package/dist/chunk-DPANTC3O.js.map +1 -0
  37. package/dist/chunk-EKZFFY45.js +426 -0
  38. package/dist/chunk-EKZFFY45.js.map +1 -0
  39. package/dist/chunk-ER7MCPDV.js +7 -0
  40. package/dist/chunk-ER7MCPDV.js.map +1 -0
  41. package/dist/chunk-EW2RK5Y6.js +383 -0
  42. package/dist/chunk-EW2RK5Y6.js.map +1 -0
  43. package/dist/{chunk-BLQV2YMO.js → chunk-EZOKT7NJ.js} +2 -2
  44. package/dist/chunk-FF2LWEF3.js +386 -0
  45. package/dist/chunk-FF2LWEF3.js.map +1 -0
  46. package/dist/chunk-FOUK3NHR.js +7 -0
  47. package/dist/chunk-FOUK3NHR.js.map +1 -0
  48. package/dist/chunk-GB4NGCZI.js +181 -0
  49. package/dist/chunk-GB4NGCZI.js.map +1 -0
  50. package/dist/{chunk-7NLZND6Q.js → chunk-GOFSMD6W.js} +35 -11
  51. package/dist/chunk-GOFSMD6W.js.map +1 -0
  52. package/dist/{chunk-6D6ROU7X.js → chunk-IGMVF3KK.js} +2 -2
  53. package/dist/{chunk-INMSEYT6.js → chunk-IVPVYVWG.js} +2 -2
  54. package/dist/chunk-JURCF4OD.js +381 -0
  55. package/dist/chunk-JURCF4OD.js.map +1 -0
  56. package/dist/{chunk-FZ36KL73.js → chunk-KZ7PMFWS.js} +11 -1
  57. package/dist/chunk-KZ7PMFWS.js.map +1 -0
  58. package/dist/{chunk-EMCQBT3S.js → chunk-LO6TZBGD.js} +129 -35
  59. package/dist/chunk-LO6TZBGD.js.map +1 -0
  60. package/dist/chunk-MFRGAT6D.js +860 -0
  61. package/dist/chunk-MFRGAT6D.js.map +1 -0
  62. package/dist/chunk-MIBVQXRU.js +1098 -0
  63. package/dist/chunk-MIBVQXRU.js.map +1 -0
  64. package/dist/{chunk-35TX3AOA.js → chunk-NABSRUXG.js} +2 -2
  65. package/dist/{chunk-R5G6KFTJ.js → chunk-NXKDZWS7.js} +44 -6
  66. package/dist/chunk-NXKDZWS7.js.map +1 -0
  67. package/dist/{chunk-KMU6ABQF.js → chunk-NXUS2CH7.js} +14 -1
  68. package/dist/chunk-NXUS2CH7.js.map +1 -0
  69. package/dist/{chunk-GJO3RGOB.js → chunk-OCPGOLVF.js} +56 -11
  70. package/dist/chunk-OCPGOLVF.js.map +1 -0
  71. package/dist/chunk-OEOE6IFY.js +628 -0
  72. package/dist/chunk-OEOE6IFY.js.map +1 -0
  73. package/dist/{chunk-SMLR736E.js → chunk-PV6OCXXN.js} +2 -2
  74. package/dist/chunk-PV6OCXXN.js.map +1 -0
  75. package/dist/chunk-Q66CJO3P.js +534 -0
  76. package/dist/chunk-Q66CJO3P.js.map +1 -0
  77. package/dist/{chunk-MG2VTZA4.js → chunk-QS3ANOWN.js} +2 -2
  78. package/dist/{chunk-ZN4LIKVG.js → chunk-QSJ543V2.js} +2 -2
  79. package/dist/chunk-QSJ543V2.js.map +1 -0
  80. package/dist/{chunk-FML6AG2V.js → chunk-RANC3OI6.js} +2 -2
  81. package/dist/chunk-T4BIN37Q.js +32 -0
  82. package/dist/chunk-T4BIN37Q.js.map +1 -0
  83. package/dist/{chunk-YVTFQHVY.js → chunk-TEAZZPDQ.js} +2 -2
  84. package/dist/chunk-TJK55CJ2.js +49 -0
  85. package/dist/chunk-TJK55CJ2.js.map +1 -0
  86. package/dist/chunk-UKIVLF7S.js +32 -0
  87. package/dist/chunk-UKIVLF7S.js.map +1 -0
  88. package/dist/chunk-V4R7PYP5.js +905 -0
  89. package/dist/chunk-V4R7PYP5.js.map +1 -0
  90. package/dist/{chunk-AG2COC64.js → chunk-VVYQ2DDS.js} +2 -2
  91. package/dist/chunk-WAMOAAMN.js +16 -0
  92. package/dist/chunk-WAMOAAMN.js.map +1 -0
  93. package/dist/chunk-WAYHHL4J.js +1234 -0
  94. package/dist/chunk-WAYHHL4J.js.map +1 -0
  95. package/dist/{chunk-YQ42EBK5.js → chunk-WH6HE6SY.js} +10 -4
  96. package/dist/chunk-WH6HE6SY.js.map +1 -0
  97. package/dist/chunk-XP6DI3VY.js +180 -0
  98. package/dist/chunk-XP6DI3VY.js.map +1 -0
  99. package/dist/{chunk-5EBWMPJS.js → chunk-XS6LNTSH.js} +76 -14
  100. package/dist/chunk-XS6LNTSH.js.map +1 -0
  101. package/dist/{chunk-WT4OATGP.js → chunk-ZKFCDVB4.js} +16 -7
  102. package/dist/chunk-ZKFCDVB4.js.map +1 -0
  103. package/dist/cms-theme.css +29 -0
  104. package/dist/contact-form/index.d.ts +220 -0
  105. package/dist/contact-form/index.js +16 -0
  106. package/dist/contact-form/index.js.map +1 -0
  107. package/dist/content-block/index.d.ts +39 -4
  108. package/dist/content-block/index.js +8 -4
  109. package/dist/cookie-consent/index.d.ts +60 -12
  110. package/dist/cookie-consent/index.js +3 -2
  111. package/dist/date-tile/index.js +2 -2
  112. package/dist/dropdown/index.d.ts +29 -11
  113. package/dist/dropdown/index.js +4 -2
  114. package/dist/feature-split/index.d.ts +6 -1
  115. package/dist/feature-split/index.js +5 -4
  116. package/dist/features-section/index.d.ts +53 -9
  117. package/dist/features-section/index.js +6 -5
  118. package/dist/flow/index.d.ts +35 -0
  119. package/dist/flow/index.js +9 -0
  120. package/dist/flow/index.js.map +1 -0
  121. package/dist/footer/index.d.ts +13 -0
  122. package/dist/footer/index.js +2 -2
  123. package/dist/header/index.d.ts +135 -16
  124. package/dist/header/index.js +3 -2
  125. package/dist/hero/index.d.ts +92 -8
  126. package/dist/hero/index.js +6 -3
  127. package/dist/icon-button/index.d.ts +7 -7
  128. package/dist/icon-button/index.js +2 -2
  129. package/dist/index.d.ts +12 -3
  130. package/dist/index.js +121 -47
  131. package/dist/items-accordion/index.d.ts +9 -0
  132. package/dist/items-accordion/index.js +4 -3
  133. package/dist/kpi-card/index.js +2 -2
  134. package/dist/markdown/index.d.ts +19 -2
  135. package/dist/markdown/index.js +3 -2
  136. package/dist/mega-menu/index.d.ts +95 -7
  137. package/dist/mega-menu/index.js +7 -2
  138. package/dist/menu-grid/index.d.ts +2 -3
  139. package/dist/menu-grid/index.js +2 -2
  140. package/dist/menu-grid-item/index.d.ts +6 -8
  141. package/dist/menu-grid-item/index.js +2 -2
  142. package/dist/menu-item/index.d.ts +11 -7
  143. package/dist/menu-item/index.js +3 -2
  144. package/dist/plan-cards/index.d.ts +69 -0
  145. package/dist/plan-cards/index.js +13 -0
  146. package/dist/plan-cards/index.js.map +1 -0
  147. package/dist/product-nav/index.d.ts +127 -0
  148. package/dist/product-nav/index.js +11 -0
  149. package/dist/product-nav/index.js.map +1 -0
  150. package/dist/promo-banner/index.d.ts +42 -4
  151. package/dist/promo-banner/index.js +6 -3
  152. package/dist/quote-dialog/index.d.ts +174 -0
  153. package/dist/quote-dialog/index.js +22 -0
  154. package/dist/quote-dialog/index.js.map +1 -0
  155. package/dist/schema/index.d.ts +11 -0
  156. package/dist/schema/index.js +9 -0
  157. package/dist/schema/index.js.map +1 -1
  158. package/dist/screenshot-tour/index.d.ts +54 -0
  159. package/dist/screenshot-tour/index.js +9 -0
  160. package/dist/screenshot-tour/index.js.map +1 -0
  161. package/dist/section/index.d.ts +3 -0
  162. package/dist/section/index.js +3 -3
  163. package/dist/segmented-control/index.js +2 -2
  164. package/dist/select/index.js +2 -2
  165. package/dist/shared/styles.d.ts +7 -1
  166. package/dist/shared/styles.js +3 -1
  167. package/dist/stats/index.js +2 -2
  168. package/dist/steps/index.d.ts +45 -0
  169. package/dist/steps/index.js +11 -0
  170. package/dist/steps/index.js.map +1 -0
  171. package/dist/tag-strip/index.d.ts +33 -0
  172. package/dist/tag-strip/index.js +9 -0
  173. package/dist/tag-strip/index.js.map +1 -0
  174. package/dist/testimonials/index.d.ts +9 -1
  175. package/dist/testimonials/index.js +3 -3
  176. package/dist/tooltip/index.js +2 -2
  177. package/package.json +38 -2
  178. package/dist/chunk-5EBWMPJS.js.map +0 -1
  179. package/dist/chunk-76AVBQUA.js +0 -252
  180. package/dist/chunk-76AVBQUA.js.map +0 -1
  181. package/dist/chunk-7NLZND6Q.js.map +0 -1
  182. package/dist/chunk-ALI26WOB.js.map +0 -1
  183. package/dist/chunk-BMHMNXIA.js +0 -158
  184. package/dist/chunk-BMHMNXIA.js.map +0 -1
  185. package/dist/chunk-DH53HZPB.js.map +0 -1
  186. package/dist/chunk-EMCQBT3S.js.map +0 -1
  187. package/dist/chunk-FLY7TNRT.js.map +0 -1
  188. package/dist/chunk-FZ36KL73.js.map +0 -1
  189. package/dist/chunk-GJO3RGOB.js.map +0 -1
  190. package/dist/chunk-J6EO4R73.js +0 -633
  191. package/dist/chunk-J6EO4R73.js.map +0 -1
  192. package/dist/chunk-JKBWZLG4.js +0 -348
  193. package/dist/chunk-JKBWZLG4.js.map +0 -1
  194. package/dist/chunk-JQY2G4QK.js.map +0 -1
  195. package/dist/chunk-KMU6ABQF.js.map +0 -1
  196. package/dist/chunk-LEXZKGQX.js.map +0 -1
  197. package/dist/chunk-MSSH3HFK.js +0 -205
  198. package/dist/chunk-MSSH3HFK.js.map +0 -1
  199. package/dist/chunk-R5G6KFTJ.js.map +0 -1
  200. package/dist/chunk-SMLR736E.js.map +0 -1
  201. package/dist/chunk-VWS53WY4.js +0 -157
  202. package/dist/chunk-VWS53WY4.js.map +0 -1
  203. package/dist/chunk-WT4OATGP.js.map +0 -1
  204. package/dist/chunk-XWB4CKDU.js +0 -708
  205. package/dist/chunk-XWB4CKDU.js.map +0 -1
  206. package/dist/chunk-YQ42EBK5.js.map +0 -1
  207. package/dist/chunk-ZN4LIKVG.js.map +0 -1
  208. /package/dist/{chunk-AKJQ345O.js.map → chunk-5AWGZQWU.js.map} +0 -0
  209. /package/dist/{chunk-BLQV2YMO.js.map → chunk-EZOKT7NJ.js.map} +0 -0
  210. /package/dist/{chunk-6D6ROU7X.js.map → chunk-IGMVF3KK.js.map} +0 -0
  211. /package/dist/{chunk-INMSEYT6.js.map → chunk-IVPVYVWG.js.map} +0 -0
  212. /package/dist/{chunk-35TX3AOA.js.map → chunk-NABSRUXG.js.map} +0 -0
  213. /package/dist/{chunk-MG2VTZA4.js.map → chunk-QS3ANOWN.js.map} +0 -0
  214. /package/dist/{chunk-FML6AG2V.js.map → chunk-RANC3OI6.js.map} +0 -0
  215. /package/dist/{chunk-YVTFQHVY.js.map → chunk-TEAZZPDQ.js.map} +0 -0
  216. /package/dist/{chunk-AG2COC64.js.map → chunk-VVYQ2DDS.js.map} +0 -0
@@ -0,0 +1,236 @@
1
+ import {
2
+ fontFamilyStyles
3
+ } from "./chunk-NXUS2CH7.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-EUXUH3YW.js";
7
+
8
+ // src/screenshot-tour/ScreenshotTour.ts
9
+ import { LitElement, css, html, nothing } from "lit";
10
+ import { customElement, property, state } from "lit/decorators.js";
11
+ var ScreenshotTour = class extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.items = [];
15
+ this.label = "Tour screens";
16
+ this.active = 0;
17
+ }
18
+ /** The selected index, kept inside the range of `items`. */
19
+ get current() {
20
+ return Math.min(Math.max(this.active, 0), Math.max(this.items.length - 1, 0));
21
+ }
22
+ tabButtons() {
23
+ return Array.from(this.renderRoot.querySelectorAll('button[part="tab"]'));
24
+ }
25
+ select(index, focus = false) {
26
+ this.active = index;
27
+ const tab = this.tabButtons()[index];
28
+ if (focus) tab?.focus({ preventScroll: true });
29
+ void this.updateComplete.then(() => {
30
+ this.tabButtons()[index]?.scrollIntoView({ block: "nearest", inline: "nearest" });
31
+ });
32
+ }
33
+ onKeydown(event) {
34
+ const count = this.items.length;
35
+ if (!count) return;
36
+ const index = this.current;
37
+ let next = null;
38
+ if (event.key === "ArrowRight" || event.key === "ArrowDown") next = (index + 1) % count;
39
+ if (event.key === "ArrowLeft" || event.key === "ArrowUp") next = (index - 1 + count) % count;
40
+ if (event.key === "Home") next = 0;
41
+ if (event.key === "End") next = count - 1;
42
+ if (next === null) return;
43
+ event.preventDefault();
44
+ this.select(next, true);
45
+ }
46
+ render() {
47
+ const index = this.current;
48
+ const item = this.items[index];
49
+ return html`
50
+ <div class="tabs" part="tabs" role="group" aria-label=${this.label} @keydown=${this.onKeydown}>
51
+ ${this.items.map(
52
+ (tab, i) => html`<button
53
+ type="button"
54
+ class="tab"
55
+ part="tab"
56
+ aria-pressed=${i === index ? "true" : "false"}
57
+ @click=${() => this.select(i)}
58
+ >${tab.label}</button>`
59
+ )}
60
+ </div>
61
+ ${item ? html`<figure class="figure" part="figure">
62
+ <div class="frame" part="frame">
63
+ <img class="image" part="image" src=${item.src} alt=${item.alt} loading="lazy" decoding="async" />
64
+ </div>
65
+ <figcaption class="caption" part="caption" aria-live="polite">
66
+ ${item.step ? html`<p class="step" part="step">${item.step}</p>` : nothing}
67
+ <h3 class="title" part="title">${item.title}</h3>
68
+ ${item.caption ? html`<p class="text" part="text">${item.caption}</p>` : nothing}
69
+ </figcaption>
70
+ </figure>` : nothing}
71
+ `;
72
+ }
73
+ };
74
+ ScreenshotTour.styles = css`
75
+ /* fontFamilyStyles is a bare declaration: it must sit inside a rule, or it swallows the next one. */
76
+ :host {
77
+ ${fontFamilyStyles}
78
+ }
79
+
80
+ :host {
81
+ display: block;
82
+ box-sizing: border-box;
83
+ }
84
+
85
+ .tabs {
86
+ display: flex;
87
+ flex-wrap: wrap;
88
+ gap: 8px;
89
+ margin-bottom: 32px;
90
+ }
91
+
92
+ .tab {
93
+ display: inline-flex;
94
+ align-items: center;
95
+ box-sizing: border-box;
96
+ min-height: 44px;
97
+ padding: 0 18px;
98
+ border: 1px solid var(--st-cms-primary-200, #c9d7fe);
99
+ border-radius: 9999px;
100
+ background: var(--st-color-surface, #fff);
101
+ color: var(--st-cms-text-strong, #011d41);
102
+ font: inherit;
103
+ font-size: 14px;
104
+ font-weight: 600;
105
+ line-height: 1.2;
106
+ white-space: normal;
107
+ cursor: pointer;
108
+ transition:
109
+ background-color 150ms ease,
110
+ border-color 150ms ease,
111
+ color 150ms ease;
112
+ }
113
+
114
+ .tab[aria-pressed='false']:hover {
115
+ border-color: var(--st-cms-brand-navy, #2144aa);
116
+ }
117
+
118
+ .tab[aria-pressed='true'] {
119
+ background: var(--st-cms-brand-navy, #2144aa);
120
+ border-color: var(--st-cms-brand-navy, #2144aa);
121
+ color: #fff;
122
+ }
123
+
124
+ .tab:focus-visible {
125
+ outline: var(--st-focus-ring, 2px solid #1b91dd);
126
+ outline-offset: 2px;
127
+ }
128
+
129
+ .figure {
130
+ display: flex;
131
+ flex-wrap: wrap;
132
+ align-items: center;
133
+ gap: 32px;
134
+ margin: 0;
135
+ }
136
+
137
+ .frame {
138
+ flex: 999 1 560px;
139
+ min-width: 0;
140
+ overflow: hidden;
141
+ background: var(--st-color-surface, #fff);
142
+ border: 1px solid var(--st-cms-primary-100, #e4ebff);
143
+ border-radius: 16px;
144
+ box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.1);
145
+ }
146
+
147
+ .image {
148
+ display: block;
149
+ width: 100%;
150
+ height: auto;
151
+ }
152
+
153
+ .caption {
154
+ flex: 1 1 260px;
155
+ display: flex;
156
+ flex-direction: column;
157
+ gap: 12px;
158
+ min-width: 0;
159
+ }
160
+
161
+ .step {
162
+ margin: 0;
163
+ font-size: 12px;
164
+ font-weight: 600;
165
+ letter-spacing: 0.05em;
166
+ text-transform: uppercase;
167
+ color: var(--st-cms-eyebrow, #0c64c5);
168
+ }
169
+
170
+ .title {
171
+ margin: 0;
172
+ font-size: 24px;
173
+ font-weight: 700;
174
+ line-height: 1.3;
175
+ color: var(--st-cms-text-strong, #011d41);
176
+ }
177
+
178
+ .text {
179
+ margin: 0;
180
+ font-size: 16px;
181
+ line-height: 1.6;
182
+ color: var(--st-cms-text, #03346b);
183
+ }
184
+
185
+ @media (max-width: 768px) {
186
+ .tabs {
187
+ flex-wrap: nowrap;
188
+ overflow-x: auto;
189
+ scroll-snap-type: x proximity;
190
+ scrollbar-width: none;
191
+ -webkit-overflow-scrolling: touch;
192
+ /* Padding keeps focus rings from being clipped by the scroll box. */
193
+ padding: 4px 2px;
194
+ margin: -4px -2px 24px;
195
+ }
196
+
197
+ .tabs::-webkit-scrollbar {
198
+ display: none;
199
+ }
200
+
201
+ .tab {
202
+ flex: none;
203
+ scroll-snap-align: start;
204
+ white-space: nowrap;
205
+ }
206
+
207
+ .figure {
208
+ flex-direction: column;
209
+ align-items: stretch;
210
+ gap: 20px;
211
+ }
212
+ }
213
+
214
+ @media (prefers-reduced-motion: reduce) {
215
+ .tab {
216
+ transition: none;
217
+ }
218
+ }
219
+ `;
220
+ __decorateClass([
221
+ property({ attribute: false })
222
+ ], ScreenshotTour.prototype, "items", 2);
223
+ __decorateClass([
224
+ property({ type: String })
225
+ ], ScreenshotTour.prototype, "label", 2);
226
+ __decorateClass([
227
+ state()
228
+ ], ScreenshotTour.prototype, "active", 2);
229
+ ScreenshotTour = __decorateClass([
230
+ customElement("st-screenshot-tour")
231
+ ], ScreenshotTour);
232
+
233
+ export {
234
+ ScreenshotTour
235
+ };
236
+ //# sourceMappingURL=chunk-535QAZ6A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/screenshot-tour/ScreenshotTour.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { fontFamilyStyles } from '../shared/styles';\n\nexport interface ScreenshotTourItem {\n /** Text on the tab button that selects this screen. */\n label: string;\n /** Small uppercase line above the title (e.g. \"Step 2\"). */\n step?: string;\n /** Heading shown under the screenshot. */\n title: string;\n /** Body text shown under the heading. */\n caption?: string;\n /** Screenshot URL. */\n src: string;\n /** Alternative text for the screenshot. */\n alt: string;\n}\n\n/**\n * A product tour: a row of tab buttons, one per screenshot, and below it the selected screenshot\n * in a framed figure with its step, title and caption. Only the selected screen is shown; the\n * others are not rendered in the document flow.\n *\n * Keyboard (on the tab row): Arrow Right/Down moves to the next tab and Arrow Left/Up to the\n * previous one, both wrapping at the ends; Home and End jump to the first and last tab. Each of\n * these moves focus to the tab and selects it. Tab and Shift+Tab move through the tabs as usual.\n * On narrow screens the tab row scrolls sideways (it never scrolls the page vertically).\n *\n * @csspart tabs - The row of tab buttons (`role=\"group\"`).\n * @csspart tab - Each tab button. Selected tabs carry `aria-pressed=\"true\"`.\n * @csspart figure - The `figure` holding the screenshot and its caption.\n * @csspart frame - The bordered frame around the screenshot.\n * @csspart image - The screenshot `img`.\n * @csspart caption - The `figcaption` with the text beside (or below, on narrow screens) the image.\n * @csspart step - The small eyebrow line above the title.\n * @csspart title - The screen's heading.\n * @csspart text - The caption paragraph.\n */\n@customElement('st-screenshot-tour')\nexport class ScreenshotTour extends LitElement {\n static styles = css`\n /* fontFamilyStyles is a bare declaration: it must sit inside a rule, or it swallows the next one. */\n :host {\n ${fontFamilyStyles}\n }\n\n :host {\n display: block;\n box-sizing: border-box;\n }\n\n .tabs {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 32px;\n }\n\n .tab {\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n min-height: 44px;\n padding: 0 18px;\n border: 1px solid var(--st-cms-primary-200, #c9d7fe);\n border-radius: 9999px;\n background: var(--st-color-surface, #fff);\n color: var(--st-cms-text-strong, #011d41);\n font: inherit;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n white-space: normal;\n cursor: pointer;\n transition:\n background-color 150ms ease,\n border-color 150ms ease,\n color 150ms ease;\n }\n\n .tab[aria-pressed='false']:hover {\n border-color: var(--st-cms-brand-navy, #2144aa);\n }\n\n .tab[aria-pressed='true'] {\n background: var(--st-cms-brand-navy, #2144aa);\n border-color: var(--st-cms-brand-navy, #2144aa);\n color: #fff;\n }\n\n .tab:focus-visible {\n outline: var(--st-focus-ring, 2px solid #1b91dd);\n outline-offset: 2px;\n }\n\n .figure {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 32px;\n margin: 0;\n }\n\n .frame {\n flex: 999 1 560px;\n min-width: 0;\n overflow: hidden;\n background: var(--st-color-surface, #fff);\n border: 1px solid var(--st-cms-primary-100, #e4ebff);\n border-radius: 16px;\n box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.1);\n }\n\n .image {\n display: block;\n width: 100%;\n height: auto;\n }\n\n .caption {\n flex: 1 1 260px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n }\n\n .step {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n color: var(--st-cms-eyebrow, #0c64c5);\n }\n\n .title {\n margin: 0;\n font-size: 24px;\n font-weight: 700;\n line-height: 1.3;\n color: var(--st-cms-text-strong, #011d41);\n }\n\n .text {\n margin: 0;\n font-size: 16px;\n line-height: 1.6;\n color: var(--st-cms-text, #03346b);\n }\n\n @media (max-width: 768px) {\n .tabs {\n flex-wrap: nowrap;\n overflow-x: auto;\n scroll-snap-type: x proximity;\n scrollbar-width: none;\n -webkit-overflow-scrolling: touch;\n /* Padding keeps focus rings from being clipped by the scroll box. */\n padding: 4px 2px;\n margin: -4px -2px 24px;\n }\n\n .tabs::-webkit-scrollbar {\n display: none;\n }\n\n .tab {\n flex: none;\n scroll-snap-align: start;\n white-space: nowrap;\n }\n\n .figure {\n flex-direction: column;\n align-items: stretch;\n gap: 20px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .tab {\n transition: none;\n }\n }\n `;\n\n /** The screens, in tab order. */\n @property({ attribute: false })\n items: ScreenshotTourItem[] = [];\n\n /** Accessible name for the tab group. */\n @property({ type: String })\n label = 'Tour screens';\n\n /** Index of the selected screen. Clamped to the range of `items`. */\n @state()\n private active = 0;\n\n /** The selected index, kept inside the range of `items`. */\n private get current(): number {\n return Math.min(Math.max(this.active, 0), Math.max(this.items.length - 1, 0));\n }\n\n private tabButtons(): HTMLButtonElement[] {\n return Array.from(this.renderRoot.querySelectorAll<HTMLButtonElement>('button[part=\"tab\"]'));\n }\n\n private select(index: number, focus = false) {\n this.active = index;\n const tab = this.tabButtons()[index];\n if (focus) tab?.focus({ preventScroll: true });\n // Scroll only the tab row: `nearest` on both axes never moves the page itself for a visible tab.\n void this.updateComplete.then(() => {\n this.tabButtons()[index]?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n });\n }\n\n private onKeydown(event: KeyboardEvent) {\n const count = this.items.length;\n if (!count) return;\n const index = this.current;\n let next: number | null = null;\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = (index + 1) % count;\n if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = (index - 1 + count) % count;\n if (event.key === 'Home') next = 0;\n if (event.key === 'End') next = count - 1;\n if (next === null) return;\n event.preventDefault();\n this.select(next, true);\n }\n\n render() {\n const index = this.current;\n const item = this.items[index];\n return html`\n <div class=\"tabs\" part=\"tabs\" role=\"group\" aria-label=${this.label} @keydown=${this.onKeydown}>\n ${this.items.map(\n (tab, i) => html`<button\n type=\"button\"\n class=\"tab\"\n part=\"tab\"\n aria-pressed=${i === index ? 'true' : 'false'}\n @click=${() => this.select(i)}\n >${tab.label}</button>`\n )}\n </div>\n ${item\n ? html`<figure class=\"figure\" part=\"figure\">\n <div class=\"frame\" part=\"frame\">\n <img class=\"image\" part=\"image\" src=${item.src} alt=${item.alt} loading=\"lazy\" decoding=\"async\" />\n </div>\n <figcaption class=\"caption\" part=\"caption\" aria-live=\"polite\">\n ${item.step ? html`<p class=\"step\" part=\"step\">${item.step}</p>` : nothing}\n <h3 class=\"title\" part=\"title\">${item.title}</h3>\n ${item.caption ? html`<p class=\"text\" part=\"text\">${item.caption}</p>` : nothing}\n </figcaption>\n </figure>`\n : nothing}\n `;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,UAAU,aAAa;AAwCxC,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC;AAAA;AAsJL,iBAA8B,CAAC;AAI/B,iBAAQ;AAIR,SAAQ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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkJtB;AAAA,EADC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GArJnB,eAsJX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAzJf,eA0JX;AAIQ;AAAA,EADP,MAAM;AAAA,GA7JI,eA8JH;AA9JG,iBAAN;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fontFamilyStyles
3
- } from "./chunk-KMU6ABQF.js";
3
+ } from "./chunk-NXUS2CH7.js";
4
4
  import {
5
5
  __decorateClass
6
6
  } from "./chunk-EUXUH3YW.js";
@@ -106,4 +106,4 @@ Chip = __decorateClass([
106
106
  export {
107
107
  Chip
108
108
  };
109
- //# sourceMappingURL=chunk-AKJQ345O.js.map
109
+ //# sourceMappingURL=chunk-5AWGZQWU.js.map
@@ -0,0 +1,300 @@
1
+ import {
2
+ ctaAriaLabel,
3
+ ctaLabelStyles,
4
+ renderCtaLabel
5
+ } from "./chunk-BEWX3E6P.js";
6
+ import {
7
+ externalLinkAttrs,
8
+ externalLinkExtras,
9
+ isExternalHref
10
+ } from "./chunk-T4BIN37Q.js";
11
+ import {
12
+ ctaLinkStyles,
13
+ sectionEyebrowStyles,
14
+ sectionSubtitleStyles,
15
+ sectionTitleStyles
16
+ } from "./chunk-KZ7PMFWS.js";
17
+ import {
18
+ controlBaseStyles,
19
+ fontFamilyStyles
20
+ } from "./chunk-NXUS2CH7.js";
21
+ import {
22
+ __decorateClass
23
+ } from "./chunk-EUXUH3YW.js";
24
+
25
+ // src/content-block/ContentBlock.ts
26
+ import { LitElement, css, html, nothing } from "lit";
27
+ import { customElement, property } from "lit/decorators.js";
28
+ var ContentBlock = class extends LitElement {
29
+ constructor() {
30
+ super(...arguments);
31
+ this.eyebrow = "";
32
+ this.title = "";
33
+ this.subtitle = "";
34
+ this.headingLevel = 2;
35
+ this.textAlignment = "left";
36
+ this.contentSrc = "";
37
+ this.content = "";
38
+ this.imageSrc = "";
39
+ this.imageAlt = "";
40
+ this.imageCaption = "";
41
+ this.inverted = false;
42
+ this.listStyle = "default";
43
+ this.actionLabel = "";
44
+ this.actionLabelShort = "";
45
+ this.href = "";
46
+ this.actionVariant = "primary";
47
+ this.maxWidth = "none";
48
+ }
49
+ renderAction() {
50
+ if (!this.actionLabel || !this.href) return nothing;
51
+ const { target, rel } = externalLinkAttrs(this.href);
52
+ const ariaLabel = ctaAriaLabel(this.actionLabel, this.actionLabelShort, isExternalHref(this.href) ? " (opens in new tab)" : "");
53
+ return html`<a class="action ${this.actionVariant}" part="action" href=${this.href} target=${target} rel=${rel} aria-label=${ariaLabel}
54
+ >${renderCtaLabel(this.actionLabel, this.actionLabelShort)}${externalLinkExtras(this.href)}</a
55
+ >`;
56
+ }
57
+ renderTitle() {
58
+ if (!this.title) return nothing;
59
+ return this.headingLevel === 3 ? html`<h3 class="title title-3" part="title">${this.title}</h3>` : html`<h2 class="title" part="title">${this.title}</h2>`;
60
+ }
61
+ render() {
62
+ const hasHeader = Boolean(this.eyebrow || this.title || this.subtitle);
63
+ return html`
64
+ <section class="container" part="container">
65
+ ${hasHeader ? html`<div class="header" part="header">
66
+ ${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
67
+ ${this.renderTitle()}
68
+ ${this.subtitle ? html`<div class="subtitle" part="subtitle">${this.subtitle}</div>` : nothing}
69
+ </div>` : nothing}
70
+ ${this.imageSrc ? html`
71
+ <figure class="featured-image" part="image">
72
+ <img src=${this.imageSrc} alt=${this.imageAlt || this.title} />
73
+ ${this.imageCaption ? html`<figcaption>${this.imageCaption}</figcaption>` : nothing}
74
+ </figure>
75
+ ` : nothing}
76
+ <st-markdown part="body" .src=${this.contentSrc} .content=${this.content} .listStyle=${this.listStyle}></st-markdown>
77
+ ${this.renderAction()}
78
+ </section>
79
+ `;
80
+ }
81
+ };
82
+ ContentBlock.styles = css`
83
+ ${ctaLabelStyles}
84
+ ${controlBaseStyles}
85
+
86
+ :host {
87
+ display: block;
88
+ ${fontFamilyStyles}
89
+ /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's
90
+ padding; override with --st-content-block-padding instead. */
91
+ padding: var(--st-content-block-padding, var(--st-space-24)) !important;
92
+ /* Transparent: the block sits on whatever band or page surrounds it. A fill here made a box that
93
+ did not match the section (lighter navy in the dark theme) and had no padding around its text. */
94
+ background: transparent;
95
+ color: var(--st-color-text-strong);
96
+ }
97
+
98
+ :host([inverted]) {
99
+ background: var(--st-color-text-strong);
100
+ color: var(--st-color-on-solid);
101
+ }
102
+
103
+ .container {
104
+ max-width: var(--st-cms-container-max);
105
+ padding: 0 var(--st-space-48);
106
+ margin: 0 auto;
107
+ text-align: left;
108
+ }
109
+
110
+ :host([text-alignment='center']) .container {
111
+ text-align: center;
112
+ }
113
+
114
+ .header {
115
+ margin-bottom: var(--st-space-48);
116
+ }
117
+
118
+ .eyebrow {
119
+ ${sectionEyebrowStyles}
120
+ }
121
+
122
+ .title {
123
+ ${sectionTitleStyles}
124
+ line-height: 1.1;
125
+ }
126
+
127
+ /* heading-level="3": a sub-section title, a step below the section title's size and weight. */
128
+ .title.title-3 {
129
+ font-size: var(--st-cms-text-3xl);
130
+ font-weight: var(--st-font-weight-semibold);
131
+ line-height: 1.2;
132
+ }
133
+
134
+ .subtitle {
135
+ ${sectionSubtitleStyles}
136
+ }
137
+
138
+ :host([text-alignment='center']) .subtitle {
139
+ margin-inline: auto;
140
+ }
141
+
142
+ :host([inverted]) .eyebrow {
143
+ color: var(--st-cms-highlight);
144
+ }
145
+
146
+ :host([inverted]) .title,
147
+ :host([inverted]) .subtitle {
148
+ color: inherit;
149
+ }
150
+
151
+ .featured-image {
152
+ margin: 0 0 var(--st-space-48);
153
+ border-radius: var(--st-radius-lg);
154
+ overflow: hidden;
155
+ }
156
+
157
+ .featured-image img {
158
+ width: 100%;
159
+ height: auto;
160
+ display: block;
161
+ }
162
+
163
+ figcaption {
164
+ padding: var(--st-space-12);
165
+ text-align: center;
166
+ color: var(--st-color-text-muted);
167
+ font-size: var(--st-text-xs);
168
+ }
169
+
170
+ st-markdown {
171
+ color: var(--st-color-text);
172
+ font-size: var(--st-text-xl);
173
+ }
174
+
175
+ :host([inverted]) st-markdown {
176
+ color: inherit;
177
+ }
178
+
179
+ /* list-style="check": the check marks are navy on light pages and cyan on the dark band. */
180
+ :host([inverted][list-style='check']) st-markdown {
181
+ --st-markdown-list-check-color: var(--st-cms-highlight);
182
+ }
183
+
184
+ /* max-width="prose": a 720px reading column; the header follows the same width. */
185
+ :host([max-width='prose']) .container {
186
+ max-width: 720px;
187
+ }
188
+
189
+ .action {
190
+ ${ctaLinkStyles}
191
+ display: inline-flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ min-height: 52px;
195
+ margin-top: var(--st-space-16);
196
+ padding: 0 var(--st-space-28);
197
+ border: 0;
198
+ border-radius: var(--st-radius-full);
199
+ font-size: var(--st-text-md);
200
+ font-weight: var(--st-font-weight-semibold);
201
+ text-decoration: none;
202
+ }
203
+
204
+ .action.primary {
205
+ background: var(--st-cms-navy);
206
+ color: var(--st-cms-on-dark);
207
+ }
208
+
209
+ .action.highlight {
210
+ background: var(--st-cms-highlight);
211
+ color: var(--st-cms-navy);
212
+ }
213
+
214
+ .action.light {
215
+ background: var(--st-cms-on-dark);
216
+ color: var(--st-cms-navy);
217
+ }
218
+
219
+ .action:hover {
220
+ transform: scale(1.03);
221
+ }
222
+
223
+ .action:focus-visible {
224
+ outline: var(--st-focus-ring);
225
+ outline-offset: 2px;
226
+ }
227
+
228
+ :host([text-alignment='center']) .action {
229
+ margin-inline: auto;
230
+ }
231
+
232
+ @media (max-width: 768px) {
233
+ :host {
234
+ padding: var(--st-content-block-padding, var(--st-space-48) var(--st-space-24)) !important;
235
+ }
236
+
237
+ .container {
238
+ padding: 0;
239
+ }
240
+ }
241
+ `;
242
+ __decorateClass([
243
+ property({ type: String })
244
+ ], ContentBlock.prototype, "eyebrow", 2);
245
+ __decorateClass([
246
+ property({ type: String })
247
+ ], ContentBlock.prototype, "title", 2);
248
+ __decorateClass([
249
+ property({ type: String })
250
+ ], ContentBlock.prototype, "subtitle", 2);
251
+ __decorateClass([
252
+ property({ type: Number, attribute: "heading-level" })
253
+ ], ContentBlock.prototype, "headingLevel", 2);
254
+ __decorateClass([
255
+ property({ type: String, reflect: true, attribute: "text-alignment" })
256
+ ], ContentBlock.prototype, "textAlignment", 2);
257
+ __decorateClass([
258
+ property({ type: String, attribute: "content-src" })
259
+ ], ContentBlock.prototype, "contentSrc", 2);
260
+ __decorateClass([
261
+ property({ type: String })
262
+ ], ContentBlock.prototype, "content", 2);
263
+ __decorateClass([
264
+ property({ type: String, attribute: "image-src" })
265
+ ], ContentBlock.prototype, "imageSrc", 2);
266
+ __decorateClass([
267
+ property({ type: String, attribute: "image-alt" })
268
+ ], ContentBlock.prototype, "imageAlt", 2);
269
+ __decorateClass([
270
+ property({ type: String, attribute: "image-caption" })
271
+ ], ContentBlock.prototype, "imageCaption", 2);
272
+ __decorateClass([
273
+ property({ type: Boolean, reflect: true })
274
+ ], ContentBlock.prototype, "inverted", 2);
275
+ __decorateClass([
276
+ property({ type: String, reflect: true, attribute: "list-style" })
277
+ ], ContentBlock.prototype, "listStyle", 2);
278
+ __decorateClass([
279
+ property({ type: String, attribute: "action-label" })
280
+ ], ContentBlock.prototype, "actionLabel", 2);
281
+ __decorateClass([
282
+ property({ type: String, attribute: "action-label-short" })
283
+ ], ContentBlock.prototype, "actionLabelShort", 2);
284
+ __decorateClass([
285
+ property({ type: String })
286
+ ], ContentBlock.prototype, "href", 2);
287
+ __decorateClass([
288
+ property({ type: String, reflect: true, attribute: "action-variant" })
289
+ ], ContentBlock.prototype, "actionVariant", 2);
290
+ __decorateClass([
291
+ property({ type: String, reflect: true, attribute: "max-width" })
292
+ ], ContentBlock.prototype, "maxWidth", 2);
293
+ ContentBlock = __decorateClass([
294
+ customElement("st-content-block")
295
+ ], ContentBlock);
296
+
297
+ export {
298
+ ContentBlock
299
+ };
300
+ //# sourceMappingURL=chunk-6OZKZG5J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/content-block/ContentBlock.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport { ctaLinkStyles, sectionEyebrowStyles, sectionSubtitleStyles, sectionTitleStyles } from '../shared/section-styles';\nimport { ctaAriaLabel, ctaLabelStyles, renderCtaLabel } from '../shared/cta-label';\nimport { externalLinkAttrs, externalLinkExtras, isExternalHref } from '../shared/external-link';\nimport '../markdown';\n\n/**\n * A long-form article section: an optional eyebrow, a title, a subtitle, an optional featured image\n * with caption, then Markdown body text. The body comes from `content-src` (a Markdown URL) or an\n * inline `content` string (so the block works without a fetch); `content-src` wins when both are set.\n *\n * `list-style=\"check\"` shows check marks instead of bullets on the body's lists. `action-label` with\n * an `href` adds a pill link under the body, styled by `action-variant`. `max-width=\"prose\"` narrows\n * the body to a 720px reading column.\n *\n * The title is a real heading: `<h2>` by default, `<h3>` with `heading-level=\"3\"` for a sub-section\n * inside a larger page (smaller, lighter type, so it never outweighs a section title). Eyebrow,\n * title, subtitle and body share one alignment: left by default, centred with `text-alignment=\"center\"`.\n *\n * @cssprop --st-content-block-padding - Overrides the block's padding.\n * @csspart container - The width-limited content box.\n * @csspart header - The eyebrow, title and subtitle block.\n * @csspart eyebrow - The small uppercase label above the title.\n * @csspart title - The heading (`<h2>` or `<h3>`).\n * @csspart subtitle - The line under the title.\n * @csspart image - The featured image and its caption.\n * @csspart body - The Markdown body.\n * @csspart action - The pill link under the body (when `action-label` and `href` are set).\n */\n@customElement('st-content-block')\nexport class ContentBlock extends LitElement {\n static styles = css`\n ${ctaLabelStyles}\n ${controlBaseStyles}\n\n :host {\n display: block;\n ${fontFamilyStyles}\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n padding; override with --st-content-block-padding instead. */\n padding: var(--st-content-block-padding, var(--st-space-24)) !important;\n /* Transparent: the block sits on whatever band or page surrounds it. A fill here made a box that\n did not match the section (lighter navy in the dark theme) and had no padding around its text. */\n background: transparent;\n color: var(--st-color-text-strong);\n }\n\n :host([inverted]) {\n background: var(--st-color-text-strong);\n color: var(--st-color-on-solid);\n }\n\n .container {\n max-width: var(--st-cms-container-max);\n padding: 0 var(--st-space-48);\n margin: 0 auto;\n text-align: left;\n }\n\n :host([text-alignment='center']) .container {\n text-align: center;\n }\n\n .header {\n margin-bottom: var(--st-space-48);\n }\n\n .eyebrow {\n ${sectionEyebrowStyles}\n }\n\n .title {\n ${sectionTitleStyles}\n line-height: 1.1;\n }\n\n /* heading-level=\"3\": a sub-section title, a step below the section title's size and weight. */\n .title.title-3 {\n font-size: var(--st-cms-text-3xl);\n font-weight: var(--st-font-weight-semibold);\n line-height: 1.2;\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n }\n\n :host([text-alignment='center']) .subtitle {\n margin-inline: auto;\n }\n\n :host([inverted]) .eyebrow {\n color: var(--st-cms-highlight);\n }\n\n :host([inverted]) .title,\n :host([inverted]) .subtitle {\n color: inherit;\n }\n\n .featured-image {\n margin: 0 0 var(--st-space-48);\n border-radius: var(--st-radius-lg);\n overflow: hidden;\n }\n\n .featured-image img {\n width: 100%;\n height: auto;\n display: block;\n }\n\n figcaption {\n padding: var(--st-space-12);\n text-align: center;\n color: var(--st-color-text-muted);\n font-size: var(--st-text-xs);\n }\n\n st-markdown {\n color: var(--st-color-text);\n font-size: var(--st-text-xl);\n }\n\n :host([inverted]) st-markdown {\n color: inherit;\n }\n\n /* list-style=\"check\": the check marks are navy on light pages and cyan on the dark band. */\n :host([inverted][list-style='check']) st-markdown {\n --st-markdown-list-check-color: var(--st-cms-highlight);\n }\n\n /* max-width=\"prose\": a 720px reading column; the header follows the same width. */\n :host([max-width='prose']) .container {\n max-width: 720px;\n }\n\n .action {\n ${ctaLinkStyles}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 52px;\n margin-top: var(--st-space-16);\n padding: 0 var(--st-space-28);\n border: 0;\n border-radius: var(--st-radius-full);\n font-size: var(--st-text-md);\n font-weight: var(--st-font-weight-semibold);\n text-decoration: none;\n }\n\n .action.primary {\n background: var(--st-cms-navy);\n color: var(--st-cms-on-dark);\n }\n\n .action.highlight {\n background: var(--st-cms-highlight);\n color: var(--st-cms-navy);\n }\n\n .action.light {\n background: var(--st-cms-on-dark);\n color: var(--st-cms-navy);\n }\n\n .action:hover {\n transform: scale(1.03);\n }\n\n .action:focus-visible {\n outline: var(--st-focus-ring);\n outline-offset: 2px;\n }\n\n :host([text-alignment='center']) .action {\n margin-inline: auto;\n }\n\n @media (max-width: 768px) {\n :host {\n padding: var(--st-content-block-padding, var(--st-space-48) var(--st-space-24)) !important;\n }\n\n .container {\n padding: 0;\n }\n }\n `;\n\n /** Small uppercase label above the title (e.g. \"Our story\"). */\n @property({ type: String })\n eyebrow = '';\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n /** `2` (default) renders the title as `<h2>`; `3` as a smaller `<h3>` for a sub-section. */\n @property({ type: Number, attribute: 'heading-level' })\n headingLevel: 2 | 3 = 2;\n\n /** Alignment of the eyebrow, title, subtitle and body. `left` (default) or `center`. */\n @property({ type: String, reflect: true, attribute: 'text-alignment' })\n textAlignment: 'left' | 'center' = 'left';\n\n /** URL of a Markdown file. */\n @property({ type: String, attribute: 'content-src' })\n contentSrc = '';\n\n /** Inline Markdown, used when `content-src` is not set. */\n @property({ type: String })\n content = '';\n\n @property({ type: String, attribute: 'image-src' })\n imageSrc = '';\n\n @property({ type: String, attribute: 'image-alt' })\n imageAlt = '';\n\n @property({ type: String, attribute: 'image-caption' })\n imageCaption = '';\n\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n /** `default` keeps bullets; `check` shows a check mark on each bullet of the body's lists. */\n @property({ type: String, reflect: true, attribute: 'list-style' })\n listStyle: 'default' | 'check' = 'default';\n\n /** Label of a pill link under the body. Shown only together with `href`. */\n @property({ type: String, attribute: 'action-label' })\n actionLabel = '';\n\n /** Shorter `action-label` for phones (< 480px); the full label stays the accessible name. */\n @property({ type: String, attribute: 'action-label-short' })\n actionLabelShort = '';\n\n /** Target of the pill link under the body. */\n @property({ type: String })\n href = '';\n\n /** Colour of the pill link: `primary` (navy), `highlight` (cyan) or `light` (white). */\n @property({ type: String, reflect: true, attribute: 'action-variant' })\n actionVariant: 'primary' | 'highlight' | 'light' = 'primary';\n\n /** `none` (default) uses the full container width; `prose` limits the block to a 720px column. */\n @property({ type: String, reflect: true, attribute: 'max-width' })\n maxWidth: 'none' | 'prose' = 'none';\n\n private renderAction() {\n if (!this.actionLabel || !this.href) return nothing;\n const { target, rel } = externalLinkAttrs(this.href);\n const ariaLabel = ctaAriaLabel(this.actionLabel, this.actionLabelShort, isExternalHref(this.href) ? ' (opens in new tab)' : '');\n return html`<a class=\"action ${this.actionVariant}\" part=\"action\" href=${this.href} target=${target} rel=${rel} aria-label=${ariaLabel}\n >${renderCtaLabel(this.actionLabel, this.actionLabelShort)}${externalLinkExtras(this.href)}</a\n >`;\n }\n\n private renderTitle() {\n if (!this.title) return nothing;\n return this.headingLevel === 3\n ? html`<h3 class=\"title title-3\" part=\"title\">${this.title}</h3>`\n : html`<h2 class=\"title\" part=\"title\">${this.title}</h2>`;\n }\n\n render() {\n const hasHeader = Boolean(this.eyebrow || this.title || this.subtitle);\n return html`\n <section class=\"container\" part=\"container\">\n ${hasHeader\n ? html`<div class=\"header\" part=\"header\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.renderTitle()}\n ${this.subtitle ? html`<div class=\"subtitle\" part=\"subtitle\">${this.subtitle}</div>` : nothing}\n </div>`\n : nothing}\n ${this.imageSrc\n ? html`\n <figure class=\"featured-image\" part=\"image\">\n <img src=${this.imageSrc} alt=${this.imageAlt || this.title} />\n ${this.imageCaption ? html`<figcaption>${this.imageCaption}</figcaption>` : nothing}\n </figure>\n `\n : nothing}\n <st-markdown part=\"body\" .src=${this.contentSrc} .content=${this.content} .listStyle=${this.listStyle}></st-markdown>\n ${this.renderAction()}\n </section>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAgCjC,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC;AAAA;AAoKL,mBAAU;AAGV,iBAAQ;AAGR,oBAAW;AAIX,wBAAsB;AAItB,yBAAmC;AAInC,sBAAa;AAIb,mBAAU;AAGV,oBAAW;AAGX,oBAAW;AAGX,wBAAe;AAGf,oBAAW;AAIX,qBAAiC;AAIjC,uBAAc;AAId,4BAAmB;AAInB,gBAAO;AAIP,yBAAmD;AAInD,oBAA6B;AAAA;AAAA,EAErB,eAAe;AACrB,QAAI,CAAC,KAAK,eAAe,CAAC,KAAK,KAAM,QAAO;AAC5C,UAAM,EAAE,QAAQ,IAAI,IAAI,kBAAkB,KAAK,IAAI;AACnD,UAAM,YAAY,aAAa,KAAK,aAAa,KAAK,kBAAkB,eAAe,KAAK,IAAI,IAAI,wBAAwB,EAAE;AAC9H,WAAO,wBAAwB,KAAK,aAAa,wBAAwB,KAAK,IAAI,WAAW,MAAM,QAAQ,GAAG,eAAe,SAAS;AAAA,SACjI,eAAe,KAAK,aAAa,KAAK,gBAAgB,CAAC,GAAG,mBAAmB,KAAK,IAAI,CAAC;AAAA;AAAA,EAE9F;AAAA,EAEQ,cAAc;AACpB,QAAI,CAAC,KAAK,MAAO,QAAO;AACxB,WAAO,KAAK,iBAAiB,IACzB,8CAA8C,KAAK,KAAK,UACxD,sCAAsC,KAAK,KAAK;AAAA,EACtD;AAAA,EAEA,SAAS;AACP,UAAM,YAAY,QAAQ,KAAK,WAAW,K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