@atomic-ui/blocks 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +3157 -97
- package/dist/chunk-2URXTXNQ.js +296 -0
- package/dist/chunk-2URXTXNQ.js.map +1 -0
- package/dist/chunk-7X4WGV6K.js +97 -0
- package/dist/chunk-7X4WGV6K.js.map +1 -0
- package/dist/{chunk-QGVIJNTD.js → chunk-CCFBROX3.js} +127 -41
- package/dist/chunk-CCFBROX3.js.map +1 -0
- package/dist/{chunk-NLHFBIGQ.js → chunk-EYP5LWUR.js} +28 -10
- package/dist/chunk-EYP5LWUR.js.map +1 -0
- package/dist/chunk-GRKPKJZH.js +275 -0
- package/dist/chunk-GRKPKJZH.js.map +1 -0
- package/dist/{chunk-OR4U4UJQ.js → chunk-MX7FU5JE.js} +69 -1
- package/dist/chunk-MX7FU5JE.js.map +1 -0
- package/dist/{chunk-UVHQY3QJ.js → chunk-NHWD2LUR.js} +2 -2
- package/dist/chunk-NHWD2LUR.js.map +1 -0
- package/dist/{chunk-FLOKZ7O3.js → chunk-PIUPEB4I.js} +44 -11
- package/dist/chunk-PIUPEB4I.js.map +1 -0
- package/dist/{chunk-HNCJLMQB.js → chunk-R7SSIE2E.js} +26 -8
- package/dist/chunk-R7SSIE2E.js.map +1 -0
- package/dist/{chunk-LJ6AQO26.js → chunk-SYTQIQT2.js} +73 -18
- package/dist/chunk-SYTQIQT2.js.map +1 -0
- package/dist/chunk-WGDMORWT.js +48 -0
- package/dist/chunk-WGDMORWT.js.map +1 -0
- package/dist/{chunk-PALYJCLC.js → chunk-XB6FD4SF.js} +3 -3
- package/dist/chunk-XB6FD4SF.js.map +1 -0
- package/dist/chunk-XNRFZCNB.js +499 -0
- package/dist/chunk-XNRFZCNB.js.map +1 -0
- package/dist/{chunk-CC2U2L2H.js → chunk-YXMXLVK7.js} +3 -3
- package/dist/chunk-YXMXLVK7.js.map +1 -0
- package/dist/{chunk-YC6KXE6O.js → chunk-ZD75GU6J.js} +7 -4
- package/dist/chunk-ZD75GU6J.js.map +1 -0
- package/dist/{chunk-TT2PTEQO.js → chunk-ZODL5HD4.js} +64 -17
- package/dist/chunk-ZODL5HD4.js.map +1 -0
- package/dist/components/card-grid.js +1 -1
- package/dist/components/changelog.d.ts +24 -0
- package/dist/components/changelog.js +2 -2
- package/dist/components/estimator.d.ts +25 -0
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +225 -0
- package/dist/components/g2-case.js +16 -0
- package/dist/components/g2-case.js.map +1 -0
- package/dist/components/g2-shared.d.ts +28 -0
- package/dist/components/g2-shared.js +35 -0
- package/dist/components/g2-shared.js.map +1 -0
- package/dist/components/g2-site.d.ts +493 -0
- package/dist/components/g2-site.js +26 -0
- package/dist/components/g2-site.js.map +1 -0
- package/dist/components/g2-tools.d.ts +77 -0
- package/dist/components/g2-tools.js +8 -0
- package/dist/components/g2-tools.js.map +1 -0
- package/dist/components/journey.d.ts +79 -9
- package/dist/components/journey.js +1 -1
- package/dist/components/marketing.d.ts +23 -0
- package/dist/components/marketing.js +1 -1
- package/dist/components/organisms.d.ts +23 -2
- package/dist/components/organisms.js +1 -1
- package/dist/components/property.js +1 -1
- package/dist/components/scene.js +1 -1
- package/dist/components/scrubber.js +1 -1
- package/dist/components/selling.d.ts +42 -1
- package/dist/components/selling.js +1 -1
- package/dist/components/site.d.ts +78 -0
- package/dist/components/site.js +1 -1
- package/dist/components/studio.d.ts +87 -6
- package/dist/components/studio.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +81 -42
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +1373 -787
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-CC2U2L2H.js.map +0 -1
- package/dist/chunk-FLOKZ7O3.js.map +0 -1
- package/dist/chunk-HNCJLMQB.js.map +0 -1
- package/dist/chunk-LJ6AQO26.js.map +0 -1
- package/dist/chunk-NLHFBIGQ.js.map +0 -1
- package/dist/chunk-OR4U4UJQ.js.map +0 -1
- package/dist/chunk-PALYJCLC.js.map +0 -1
- package/dist/chunk-QGVIJNTD.js.map +0 -1
- package/dist/chunk-SOFMXF32.js +0 -142
- package/dist/chunk-SOFMXF32.js.map +0 -1
- package/dist/chunk-TT2PTEQO.js.map +0 -1
- package/dist/chunk-UVHQY3QJ.js.map +0 -1
- package/dist/chunk-YC6KXE6O.js.map +0 -1
|
@@ -1,292 +1,405 @@
|
|
|
1
|
-
/* @atomic-ui/blocks version 0.
|
|
2
|
-
import"./atomic-ui.js";import{css as
|
|
3
|
-
.h { margin: 0; color: ${
|
|
4
|
-
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${
|
|
5
|
-
.body { margin: 0; line-height: ${
|
|
6
|
-
`,
|
|
1
|
+
/* @atomic-ui/blocks version 0.12.0, standalone. Load atomic-ui.js from @atomic-ui/ui first, from the same folder. */
|
|
2
|
+
import"./atomic-ui.js";import{css as et,html as N,nothing as ie}from"./atomic-ui.js";import{ImpaktElement as ve,fontSize as Ye,fontWeight as Ce,lineHeight as Yt,space as y,spaceAround as ei,t as w,token as Mr,type as Ue,iconSvg as Gt}from"./atomic-ui.js";var ha=(s,t,e)=>N`<div class=${e} role="heading" aria-level=${s}>${t}</div>`,Ha=et`
|
|
3
|
+
.h { margin: 0; color: ${w.textHeading}; font-family: ${w.fontHeading}; font-weight: ${Ce("bold")}; line-height: ${Yt("tight")}; }
|
|
4
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${w.brand})); ${Ue("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${w.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${Ce("semibold")}); letter-spacing: ${w.trackingWide}; text-transform: uppercase; }
|
|
5
|
+
.body { margin: 0; line-height: ${Yt("normal")}; max-inline-size: 65ch; }
|
|
6
|
+
`,Xt=class extends ve{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},treatment:{type:String,reflect:!0},ratingText:{type:String,attribute:"rating-text"},eyebrowIcon:{type:String,attribute:"eyebrow-icon"},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.level=1,this.imageSrc="",this.imageAlt="",this.treatment="split",this.ratingText="",this.eyebrowIcon="none",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ve.styles,ei,Ha,et`
|
|
7
7
|
:host { display: block; container-type: inline-size; }
|
|
8
|
-
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${
|
|
8
|
+
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${y(8)}; align-items: center; }
|
|
9
9
|
.hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
|
|
10
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
10
|
+
.words { display: flex; flex-direction: column; gap: ${y(4)}; }
|
|
11
11
|
:host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }
|
|
12
|
-
.h { ${
|
|
13
|
-
.body { ${
|
|
14
|
-
@container (max-width: 40rem) { .h { ${
|
|
15
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
12
|
+
.h { ${Ue("5xl")} letter-spacing: ${w.trackingTight}; text-wrap: balance; }
|
|
13
|
+
.body { ${Ue("lg")} color: ${w.textMuted}; text-wrap: pretty; }
|
|
14
|
+
@container (max-width: 40rem) { .h { ${Ue("4xl")} } }
|
|
15
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${y(3)} ${y(4)}; align-items: center; margin-block-start: ${y(2)}; }
|
|
16
16
|
:host([align='center']) .actions { justify-content: center; }
|
|
17
|
-
img { display: block; inline-size: 100%; block-size: auto; border-radius: ${
|
|
17
|
+
img { display: block; inline-size: 100%; block-size: auto; border-radius: ${w.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${w.shadowLg}; }
|
|
18
18
|
@container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }
|
|
19
19
|
/* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */
|
|
20
|
-
.cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${
|
|
20
|
+
.cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${y(32)} max(${y(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${y(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }
|
|
21
21
|
.cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
|
|
22
22
|
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }
|
|
23
23
|
.cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
|
|
24
|
-
.cover .eyebrow { display: inline-flex; align-items: center; gap: ${
|
|
24
|
+
.cover .eyebrow { display: inline-flex; align-items: center; gap: ${y(2)}; align-self: flex-start; padding: ${y(2)} ${y(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); text-transform: none; letter-spacing: 0; }
|
|
25
25
|
.chip-line { position: relative; z-index: 1; block-size: 0; }
|
|
26
|
-
.chip { position: absolute; inset-block-start: ${
|
|
27
|
-
.finder { position: relative; z-index: 1; margin-block-start: ${
|
|
26
|
+
.chip { position: absolute; inset-block-start: ${y(14)}; inset-inline-end: ${y(9)}; display: inline-flex; align-items: center; gap: ${y(2.5)}; padding: ${y(3)} ${y(4.5)}; ${Ue("sm")} font-weight: ${Ce("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${w.radiusXl}; }
|
|
27
|
+
.finder { position: relative; z-index: 1; margin-block-start: ${y(12)}; }
|
|
28
28
|
.cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }
|
|
29
29
|
.cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }
|
|
30
30
|
@container (max-width: 64rem) { .chip { display: none; } }
|
|
31
31
|
@container (max-width: 30rem) { .finder { display: none; } }
|
|
32
|
-
@container (max-width: 48rem) { .finder { margin-block-start: ${
|
|
33
|
-
`]}render(){if(this.treatment==="cover"&&this.imageSrc)return
|
|
34
|
-
${this.ratingText?
|
|
32
|
+
@container (max-width: 48rem) { .finder { margin-block-start: ${y(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${y(32)} ${y(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }
|
|
33
|
+
`]}render(){if(this.treatment==="cover"&&this.imageSrc)return N`<div class="cover" part="hero">
|
|
34
|
+
${this.ratingText?N`<div class="chip-line"><div class="chip">${Gt("star","20px")}${this.ratingText}</div></div>`:ie}
|
|
35
35
|
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
36
36
|
<div class="words">
|
|
37
|
-
${this.eyebrow?
|
|
38
|
-
${
|
|
39
|
-
${this.lead?
|
|
37
|
+
${this.eyebrow?N`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon!=="none"?Gt(this.eyebrowIcon,"16px"):ie}${this.eyebrow}</p>`:ie}
|
|
38
|
+
${ha(this.level,N`<slot name="heading">${this.heading}</slot>`,"h")}
|
|
39
|
+
${this.lead?N`<p class="body">${this.lead}</p>`:ie}
|
|
40
40
|
<div class="actions"><slot name="actions"></slot></div>
|
|
41
41
|
</div>
|
|
42
42
|
<div class="finder"><slot name="search"></slot></div>
|
|
43
|
-
</div>`;let t=!!this.imageSrc&&this.align!=="center";return
|
|
43
|
+
</div>`;let t=!!this.imageSrc&&this.align!=="center";return N`<div class="hero ${t?"pictured":""}" part="hero">
|
|
44
44
|
<div class="words">
|
|
45
|
-
${this.eyebrow?
|
|
46
|
-
${
|
|
47
|
-
${this.lead?
|
|
45
|
+
${this.eyebrow?N`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:ie}
|
|
46
|
+
${ha(this.level,N`<slot name="heading">${this.heading}</slot>`,"h")}
|
|
47
|
+
${this.lead?N`<p class="body">${this.lead}</p>`:ie}
|
|
48
48
|
<div class="actions"><slot name="actions"></slot></div>
|
|
49
49
|
</div>
|
|
50
|
-
${t?
|
|
51
|
-
</div>`}},
|
|
50
|
+
${t?N`<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />`:ie}
|
|
51
|
+
</div>`}},Vt=class extends ve{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},layout:{type:String,reflect:!0},look:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="three",this.headingLevel=3,this.layout="stacked",this.look="icons",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ve.styles,ei,Ha,et`
|
|
52
52
|
:host { display: block; container-type: inline-size; }
|
|
53
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
53
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${y(8)} ${y(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
54
54
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
55
55
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
56
|
-
li { display: flex; flex-direction: column; gap: ${
|
|
57
|
-
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${
|
|
58
|
-
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${
|
|
59
|
-
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${
|
|
56
|
+
li { display: flex; flex-direction: column; gap: ${y(2)}; }
|
|
57
|
+
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${y(4)}; align-items: start; }
|
|
58
|
+
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${y(1)}; }
|
|
59
|
+
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${w.radiusLg}; background: ${w.brandSubtle}; color: ${w.brand}; margin-block-end: ${y(2)}; }
|
|
60
60
|
:host([layout='inline']) .icon { margin: 0; }
|
|
61
|
-
.h { font-size: ${
|
|
62
|
-
.body { color: ${
|
|
61
|
+
.h { font-size: ${Ye("lg")}; }
|
|
62
|
+
.body { color: ${w.text}; }
|
|
63
|
+
/* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */
|
|
64
|
+
:host([look='ruled']) li { gap: ${y(3)}; padding-block-start: ${y(5)}; border-block-start: ${w.borderThin} solid ${w.text}; }
|
|
65
|
+
:host(:is([look='ruled'], [look='numbered'])) .icon { display: none; }
|
|
66
|
+
:host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${Ce("semibold")}; letter-spacing: -0.02em; line-height: 1.2; }
|
|
67
|
+
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${w.textMuted}; }
|
|
68
|
+
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${y(3)}; }
|
|
69
|
+
/* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */
|
|
70
|
+
:host([look='numbered']) ul { gap: ${y(3)}; }
|
|
71
|
+
:host([look='numbered']) li { gap: ${y(4)}; padding: ${y(6)}; background: ${w.surfaceCard}; border: ${w.borderThin} solid ${w.text}; border-radius: ${w.radiusSm}; }
|
|
72
|
+
.top { display: flex; align-items: center; justify-content: space-between; font-family: ${w.fontMono}; font-size: ${Ye("sm")}; color: ${w.text}; }
|
|
73
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${w.text}; }
|
|
74
|
+
.dot.attention { background: ${Mr("color.accent.default","#ffd43b")}; box-shadow: inset 0 0 0 1px ${w.text}; }
|
|
75
|
+
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
76
|
+
@media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }
|
|
63
77
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
64
78
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
65
|
-
`]}render(){return
|
|
66
|
-
${t
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
`]}render(){let t=this.look==="numbered";return N`<ul part="list">${(this.items??[]).map((e,i)=>N`<li part="item">
|
|
80
|
+
${t?N`<div class="top" aria-hidden="true"><span>${String(i+1).padStart(2,"0")}</span><span class=${e.attention?"dot attention":"dot"}></span></div>`:ie}
|
|
81
|
+
${e.icon&&this.look!=="ruled"&&!t?N`<span class="icon">${Gt(e.icon,"24px")}</span>`:ie}
|
|
82
|
+
<div class="words">${ha(this.headingLevel,N`${e.heading}${t&&e.attention?N`<span class="sr"> (${e.attention})</span>`:ie}`,"h")}${e.text?N`<p class="body">${e.text}</p>`:ie}</div>
|
|
83
|
+
</li>`)}</ul>`}},Jt=class extends ve{static{this.properties={quote:{type:String},person:{type:String},about:{type:String},imageSrc:{type:String,attribute:"image-src"},size:{type:String,reflect:!0},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.quote="",this.person="",this.about="",this.imageSrc="",this.size="md",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ve.styles,ei,et`
|
|
69
84
|
:host { display: block; }
|
|
70
|
-
figure { margin: 0; display: flex; flex-direction: column; gap: ${
|
|
85
|
+
figure { margin: 0; display: flex; flex-direction: column; gap: ${y(4)}; max-inline-size: 48rem; }
|
|
71
86
|
:host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }
|
|
72
|
-
blockquote { margin: 0; font-family: ${
|
|
73
|
-
:host([size='lg']) blockquote { font-size: ${
|
|
87
|
+
blockquote { margin: 0; font-family: ${w.fontHeading}; font-size: ${Ye("lg")}; line-height: ${Yt("normal")}; color: inherit; }
|
|
88
|
+
:host([size='lg']) blockquote { font-size: ${Ye("2xl")}; line-height: ${Yt("tight")}; }
|
|
74
89
|
blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
|
|
75
|
-
figcaption { display: flex; align-items: center; gap: ${
|
|
90
|
+
figcaption { display: flex; align-items: center; gap: ${y(3)}; }
|
|
76
91
|
img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
|
|
77
|
-
.name { font-weight: ${
|
|
78
|
-
.detail { color: ${
|
|
79
|
-
`]}render(){return
|
|
92
|
+
.name { font-weight: ${Ce("semibold")}; }
|
|
93
|
+
.detail { color: ${w.textMuted}; font-size: ${Ye("sm")}; }
|
|
94
|
+
`]}render(){return N`<figure part="figure">
|
|
80
95
|
<blockquote part="quote">${this.quote}</blockquote>
|
|
81
|
-
${this.person?
|
|
82
|
-
</figure>`}},
|
|
96
|
+
${this.person?N`<figcaption>${this.imageSrc?N`<img src=${this.imageSrc} alt="" />`:ie}<span><span class="name">${this.person}</span>${this.about?N`<br /><span class="detail">${this.about}</span>`:ie}</span></figcaption>`:ie}
|
|
97
|
+
</figure>`}},Qt=class extends ve{static{this.properties={figure:{type:String},label:{type:String},note:{type:String},size:{type:String,reflect:!0},align:{type:String,reflect:!0}}}constructor(){super(),this.figure="",this.label="",this.note="",this.size="md",this.align="start"}static{this.styles=[...ve.styles,et`
|
|
83
98
|
:host { display: block; }
|
|
84
|
-
.stat { display: flex; flex-direction: column; gap: ${
|
|
99
|
+
.stat { display: flex; flex-direction: column; gap: ${y(1)}; }
|
|
85
100
|
:host([align='center']) .stat { align-items: center; text-align: center; }
|
|
86
|
-
.value { font-family: ${
|
|
87
|
-
:host([size='lg']) .value { font-size: ${
|
|
101
|
+
.value { font-family: ${w.fontHeading}; font-size: ${Ye("3xl")}; font-weight: ${Ce("bold")}; line-height: 1; color: ${w.textHeading}; }
|
|
102
|
+
:host([size='lg']) .value { font-size: ${Ye("5xl")}; }
|
|
88
103
|
:host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
|
|
89
|
-
.label { font-weight: ${
|
|
90
|
-
.detail { color: ${
|
|
91
|
-
`]}render(){return
|
|
104
|
+
.label { font-weight: ${Ce("semibold")}; }
|
|
105
|
+
.detail { color: ${w.textMuted}; font-size: ${Ye("sm")}; }
|
|
106
|
+
`]}render(){return N`<p class="stat" part="stat" style="margin:0"><span class="value">${this.figure}</span> <span class="label">${this.label}</span>${this.note?N` <span class="detail">${this.note}</span>`:ie}</p>`}},Kt=class extends ve{static{this.properties={message:{type:String},linkText:{type:String,attribute:"link-text"},href:{type:String}}}constructor(){super(),this.message="",this.linkText="",this.href=""}static{this.styles=[...ve.styles,et`
|
|
92
107
|
:host { display: block; }
|
|
93
|
-
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${
|
|
108
|
+
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${y(2)} ${y(3)}; padding: ${y(2.5)} ${y(5)}; ${Ue("sm")} text-align: center; color: ${w.onBrand}; background: ${w.brand}; }
|
|
94
109
|
:host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }
|
|
95
|
-
a { display: inline-flex; align-items: center; gap: ${
|
|
96
|
-
`]}render(){return
|
|
110
|
+
a { display: inline-flex; align-items: center; gap: ${y(1)}; min-block-size: ${w.targetMin}; color: inherit; font-weight: ${Ce("semibold")}; }
|
|
111
|
+
`]}render(){return N`<div class="bar" part="bar"><span>${this.message}</span>${this.linkText&&this.href?N`<a href=${this.href}>${this.linkText}${Gt("arrow-right","14px")}</a>`:ie}</div>`}},Zt=class extends ve{static{this.properties={items:{type:Array},buttonText:{type:String,attribute:"button-text"},action:{type:String},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.buttonText="Search",this.action="",this.label="Search",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ve.styles,ei,et`
|
|
97
112
|
:host { display: block; container-type: inline-size; }
|
|
98
|
-
form { display: flex; align-items: center; padding: ${
|
|
99
|
-
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${
|
|
100
|
-
label { ${
|
|
101
|
-
select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${
|
|
102
|
-
select:focus-visible, button:focus-visible { outline: 2px solid ${
|
|
103
|
-
button { flex: none; min-block-size: 48px; padding: ${
|
|
104
|
-
button:hover { background: ${
|
|
113
|
+
form { display: flex; align-items: center; padding: ${y(3)}; background: ${w.surfaceCard}; color: ${w.text}; border-radius: ${w.radius2xl}; box-shadow: ${w.shadowXl}; }
|
|
114
|
+
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${y(1)}; padding: ${y(1.5)} ${y(5)}; }
|
|
115
|
+
label { ${Ue("sm")} color: ${w.textMuted}; }
|
|
116
|
+
select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${Ue("sm")} font-weight: ${Ce("semibold")}; color: ${w.text}; background: transparent; border: 0; border-radius: ${w.radiusSm}; cursor: pointer; }
|
|
117
|
+
select:focus-visible, button:focus-visible { outline: 2px solid ${w.brand}; outline-offset: 2px; }
|
|
118
|
+
button { flex: none; min-block-size: 48px; padding: ${y(3)} ${y(6)}; font: inherit; font-weight: ${Ce("semibold")}; color: ${w.onBrand}; background: ${w.brand}; border: 0; border-radius: ${w.radiusLg}; cursor: pointer; }
|
|
119
|
+
button:hover { background: ${w.brandHover}; }
|
|
105
120
|
@container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }
|
|
106
|
-
@container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${
|
|
107
|
-
`]}submit(t){let e=new FormData(t.currentTarget),i={};e.forEach((a,r)=>{a!==""&&(i[r]=String(a))}),this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{values:i},bubbles:!0,composed:!0})),this.action||t.preventDefault()}render(){return
|
|
108
|
-
${(this.items??[]).map((t,e)=>{let i=this.id_(`field-${e}`),a=String(t.options??"").split(",").map(r=>r.trim()).filter(Boolean);return
|
|
109
|
-
<option value="">${t.placeholder||"Any"}</option>${a.map(r=>
|
|
121
|
+
@container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${y(2)}; } .field { flex: none; } }
|
|
122
|
+
`]}submit(t){let e=new FormData(t.currentTarget),i={};e.forEach((a,r)=>{a!==""&&(i[r]=String(a))}),this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{values:i},bubbles:!0,composed:!0})),this.action||t.preventDefault()}render(){return N`<form role="search" aria-label=${this.label} method="get" action=${this.action||ie} @submit=${this.submit} part="form">
|
|
123
|
+
${(this.items??[]).map((t,e)=>{let i=this.id_(`field-${e}`),a=String(t.options??"").split(",").map(r=>r.trim()).filter(Boolean);return N`<div class="field"><label for=${i}>${t.label}</label><select id=${i} name=${t.name||t.label.toLowerCase().replace(/[^a-z0-9]+/g,"-")}>
|
|
124
|
+
<option value="">${t.placeholder||"Any"}</option>${a.map(r=>N`<option value=${r}>${r}</option>`)}
|
|
110
125
|
</select></div>`})}
|
|
111
126
|
<button type="submit">${this.buttonText}</button>
|
|
112
|
-
</form>`}};customElements.define("impakt-search-bar",
|
|
127
|
+
</form>`}};customElements.define("impakt-search-bar",Zt);customElements.define("impakt-announcement",Kt);customElements.define("impakt-hero",Xt);customElements.define("impakt-feature-list",Vt);customElements.define("impakt-quote",Jt);customElements.define("impakt-stat",Qt);import{css as Cr,html as tt,nothing as ti}from"./atomic-ui.js";import{ImpaktElement as Na,focusRing as Ar,fontSize as Lr,fontWeight as ua,lineHeight as ja,space as Tt,spaceAround as Er,t as se,iconSvg as Br}from"./atomic-ui.js";var ii=class extends Na{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="three",this.headingLevel=3,this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Na.styles,Ar,Er,Cr`
|
|
113
128
|
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
114
129
|
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
115
130
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
116
131
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
117
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
132
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${Tt(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
118
133
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
119
134
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
120
|
-
|
|
121
|
-
li.
|
|
135
|
+
/* A card is drawn as impakt-card is: a 1px border in the text colour and no shadow. */
|
|
136
|
+
li { position: relative; display: flex; flex-direction: column; background: ${se.surfaceCard}; border: ${se.borderThin} solid ${se.text}; border-radius: ${se.radiusXl}; box-shadow: none; overflow: hidden; }
|
|
137
|
+
img { border-block-end: ${se.borderThin} solid ${se.text}; }
|
|
122
138
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
123
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
124
|
-
.h { margin: 0; color: ${
|
|
125
|
-
.h a { color: inherit; text-decoration: none; border-radius: ${
|
|
139
|
+
.words { display: flex; flex-direction: column; gap: ${Tt(2)}; padding: ${Tt(5)}; flex: 1; }
|
|
140
|
+
.h { margin: 0; color: ${se.textHeading}; font-family: ${se.fontHeading}; font-size: ${Lr("lg")}; font-weight: ${ua("bold")}; line-height: ${ja("tight")}; }
|
|
141
|
+
.h a { color: inherit; text-decoration: none; border-radius: ${se.radiusSm}; }
|
|
126
142
|
.h a::after { content: ''; position: absolute; inset: 0; }
|
|
127
143
|
li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
128
|
-
.body { margin: 0; line-height: ${
|
|
129
|
-
|
|
130
|
-
.
|
|
144
|
+
.body { margin: 0; line-height: ${ja("normal")}; }
|
|
145
|
+
/* A marketing badge: monospace capitals at 11px in a 1px outline. */
|
|
146
|
+
.badge { align-self: flex-start; padding: 2px ${Tt(2)}; border-radius: ${se.radiusSm}; font-family: ${se.fontMono}; font-size: 0.6875rem; font-weight: ${ua("medium")}; line-height: 1.4; letter-spacing: ${se.trackingWide}; text-transform: uppercase; color: ${se.text}; background: transparent; border: ${se.borderThin} solid ${se.text}; }
|
|
147
|
+
@media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }
|
|
148
|
+
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${Tt(1)}; color: ${se.link}; font-weight: ${ua("semibold")}; }
|
|
131
149
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
132
150
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
133
|
-
`]}render(){return
|
|
134
|
-
${t.imageSrc?
|
|
151
|
+
`]}render(){return tt`<ul part="list">${(this.items??[]).map(t=>tt`<li class=${t.href?"linked":""} part="card">
|
|
152
|
+
${t.imageSrc?tt`<img src=${t.imageSrc} alt=${t.imageAlt??""} loading="lazy" />`:ti}
|
|
135
153
|
<div class="words">
|
|
136
|
-
${t.badge?
|
|
137
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.href?
|
|
138
|
-
${t.text?
|
|
139
|
-
${t.href?
|
|
154
|
+
${t.badge?tt`<span class="badge">${t.badge}</span>`:ti}
|
|
155
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.href?tt`<a href=${t.href}>${t.heading}</a>`:t.heading}</div>
|
|
156
|
+
${t.text?tt`<p class="body">${t.text}</p>`:ti}
|
|
157
|
+
${t.href?tt`<span class="more" aria-hidden="true">${Br("arrow-right","1em")}</span>`:ti}
|
|
140
158
|
</div>
|
|
141
|
-
</li>`)}</ul>`}};customElements.define("impakt-card-grid",
|
|
159
|
+
</li>`)}</ul>`}};customElements.define("impakt-card-grid",ii);import{css as Ir,html as ke,nothing as qa,unsafeCSS as it}from"./atomic-ui.js";import{ImpaktElement as Pa,focusRing as Rr,fontWeight as Mt,say as je,space as Hr,t as j,token as Oa}from"./atomic-ui.js";var Ct=["note","wireframe","component","code","live"],ga=s=>Ct.includes(s),Wa=s=>Ct.indexOf(s),Nr=ke`<svg class="arrow" viewBox="0 0 20 12" width="20" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false">
|
|
142
160
|
<path d="M0 6h18M13 1l5 5-5 5" />
|
|
143
|
-
</svg>`,
|
|
144
|
-
|
|
145
|
-
|
|
161
|
+
</svg>`,jr=ke`<svg class="pointer" viewBox="0 0 16 20" width="16" height="20" aria-hidden="true" focusable="false">
|
|
162
|
+
<path d="M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z" stroke-width="1.2" stroke-linejoin="round" />
|
|
163
|
+
</svg>`,ai=(s,t,e)=>it(`--jt: var(--impakt-motion-journey-${s}-duration, ${t}ms); --je: var(--impakt-motion-journey-${s}-easing, ${e});`),ut=s=>`clamp(0, min(calc(1 + var(--jp) - ${s}), calc(1 - var(--jp) + ${s})), 1)`,ri=class extends Pa{constructor(){super();this.sections=[];this.frame=0;this.onScroll=()=>{this.frame||(this.frame=requestAnimationFrame(()=>{this.frame=0,this.scrub()}))};this.stage="live",this.label="",this.href="",this.decorative=!1,this.track="",this.code={},this.annotations=!1,this.captions=[],this.marginNote="",this.specs=[],this.markWidth="400",this.markHeight="96"}static{this.properties={stage:{type:String,reflect:!0},label:{type:String},href:{type:String},decorative:{type:Boolean,reflect:!0},track:{type:String},code:{type:Array},annotations:{type:Boolean,reflect:!0},captions:{type:Array},marginNote:{type:String,attribute:"margin-note"},specs:{type:Array},markWidth:{type:String,attribute:"mark-width"},markHeight:{type:String,attribute:"mark-height"}}}static{this.styles=[...Pa.styles,Rr,Ir`
|
|
164
|
+
:host {
|
|
165
|
+
display: block; inline-size: min(100%, 35rem); container-type: inline-size;
|
|
166
|
+
--impakt-journey-accent: ${Oa("color.accent.default","#ffd43b")}; --impakt-journey-on-accent: ${Oa("color.accent.on","#1a1a1a")};
|
|
167
|
+
--hand: var(--impakt-font-family-hand, ${j.fontBody});
|
|
168
|
+
${ai("flatten",640,"cubic-bezier(0.65, 0, 0.35, 1)")}
|
|
169
|
+
}
|
|
170
|
+
/* The move into a stage takes that move's timing; back out of it, the same move runs in reverse. */
|
|
171
|
+
:host([stage='component']) { ${ai("ink-in",560,"cubic-bezier(0.22, 1, 0.36, 1)")} }
|
|
172
|
+
:host([stage='code']) { ${ai("compile",720,"cubic-bezier(0.83, 0, 0.17, 1)")} }
|
|
173
|
+
:host([stage='live']) { ${ai("ship",600,"cubic-bezier(0.34, 1.56, 0.64, 1)")} }
|
|
174
|
+
/* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi). */
|
|
175
|
+
.frame { position: relative; aspect-ratio: 14 / 9; }
|
|
146
176
|
/* Each plate is one stage's shape. Only its opacity and transform ever change. */
|
|
147
|
-
.plate { position: absolute; box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity var(--
|
|
148
|
-
.bar { inset-inline:
|
|
149
|
-
.note { inset-inline-start:
|
|
150
|
-
.wire { background: ${
|
|
151
|
-
.wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${
|
|
152
|
-
.solid { background: var(--impakt-journey-accent); }
|
|
153
|
-
.shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
.window .
|
|
177
|
+
.plate { position: absolute; box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity var(--jt) var(--je), transform var(--jt) var(--je); }
|
|
178
|
+
.bar { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi); block-size: 17.14cqi; }
|
|
179
|
+
.note { inset-inline-start: 22cqi; inset-block-start: 9cqi; inline-size: 46cqi; block-size: 46cqi; background: var(--impakt-journey-accent); box-shadow: 0 1.1rem 2.2rem rgb(0 0 0 / 0.18); transform: rotate(-4deg); }
|
|
180
|
+
.wire { background: ${j.surfaceCard}; border: ${j.borderThin} dashed ${j.textMuted}; }
|
|
181
|
+
.wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${j.rule}; }
|
|
182
|
+
.solid { background: var(--impakt-journey-accent); transform: scale(0.92); }
|
|
183
|
+
.shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); transform: scale(0.9); }
|
|
184
|
+
:host(:is([stage='component'], [stage='live'])) .solid, :host([stage='live']) .shadow { transform: none; }
|
|
185
|
+
/* The code window is the raised ink and its muted words, a pair the theme measures, so it stays a dark window on paper and on an ink band alike. */
|
|
186
|
+
.window { inset-inline: 14.29cqi; inset-block: 8cqi; padding: 4cqi; background: var(--impakt-color-surface-ink-raised, ${j.text}); border: ${j.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: ${j.radius}; font-family: ${j.fontMono}; font-size: clamp(0.625rem, 2.15cqi, 0.8125rem); line-height: 1.6; color: var(--impakt-color-text-inverse-muted, color-mix(in srgb, ${j.surfaceCard} 78%, ${j.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) 44px minmax(0, 1fr); }
|
|
187
|
+
/* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */
|
|
188
|
+
.window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }
|
|
189
|
+
.window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }
|
|
190
|
+
.window .comment { font-style: italic; }
|
|
157
191
|
.window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }
|
|
158
|
-
/* A measuring line above the bar, with a tick at each end. */
|
|
159
|
-
.marks { inset-inline: 0; inset-block-start: calc(50% - 4.5rem); block-size: 0.75rem; border-inline: 1.5px solid ${q.text}; }
|
|
160
|
-
.marks::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: calc(50% - 0.75px); border-block-start: 1.5px solid ${q.text}; }
|
|
161
192
|
|
|
162
193
|
/* A stage that has passed shrinks toward the next shape as it fades; one still to come starts from the last. */
|
|
163
194
|
/* The note flattens without growing wider, so a shape that is not showing never reaches past the block (1.4.10). */
|
|
164
195
|
:host(:not([stage='note'])) .note { transform: rotate(0deg) scale(1, 0.45); }
|
|
165
196
|
:host([stage='note']) .wire { transform: rotate(-4deg) scale(0.6, 1.9); }
|
|
166
197
|
:host(:not([stage='code'])) .window { transform: scale(0.94, 0.5); }
|
|
167
|
-
:host([stage='note']) .note, :host([stage='wireframe']) .wire, :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='code']) .window, :host([stage='
|
|
198
|
+
:host([stage='note']) .note, :host([stage='wireframe']) .wire, :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='code']) .window, :host([stage='live']) .shadow { opacity: 1; }
|
|
199
|
+
|
|
200
|
+
/* Scrubbed by the scroll, a plate's opacity follows the stage as a number, --jp, and only its shape still moves on its own. */
|
|
201
|
+
:host([scrub]) .plate { transition-property: transform; }
|
|
202
|
+
:host([scrub]) .note { opacity: ${it(ut(0))}; }
|
|
203
|
+
:host([scrub]) .wire { opacity: ${it(ut(1))}; }
|
|
204
|
+
:host([scrub]) .solid { opacity: max(${it(ut(2))}, ${it(ut(4))}); }
|
|
205
|
+
:host([scrub]) .window { opacity: ${it(ut(3))}; }
|
|
206
|
+
:host([scrub]) .shadow { opacity: ${it(ut(4))}; }
|
|
168
207
|
|
|
169
208
|
/* The words. One element at every stage: a link, or a picture of one. */
|
|
170
|
-
.words { position: absolute; inset-inline:
|
|
209
|
+
.words { position: absolute; inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi); box-sizing: border-box; min-block-size: max(44px, 17.14cqi); display: flex; align-items: center; justify-content: space-between; gap: ${Hr(4)}; padding-inline: 4.3cqi; font-family: ${j.fontBody}; font-size: clamp(0.9375rem, 3.57cqi, 1.25rem); font-weight: ${Mt("medium")}; line-height: 1.2; color: var(--impakt-journey-on-accent); text-decoration: none; transition: color var(--jt) var(--je), transform var(--jt) var(--je); }
|
|
171
210
|
.arrow { flex: none; }
|
|
172
|
-
|
|
211
|
+
/* At the note stage the words are handwritten, bold, with a line drawn under them. */
|
|
212
|
+
:host([stage='note']) .words { inset-inline-start: 22cqi; inset-block-start: 9cqi; inline-size: 46cqi; min-block-size: 46cqi; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 4.5cqi; font-family: var(--hand); font-size: clamp(1.25rem, 5.4cqi, 2rem); font-weight: ${Mt("bold")}; line-height: 1.1; letter-spacing: -0.01em; transform: rotate(-4deg); }
|
|
213
|
+
:host([stage='note']) .text::after { content: ''; display: block; block-size: 0.28em; margin-block-start: 0.12em; inline-size: 92%; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
|
|
173
214
|
:host([stage='note']) .arrow { align-self: flex-end; }
|
|
174
|
-
:host([stage='wireframe']) .words { justify-content: center; font-family: ${
|
|
175
|
-
:host([stage='code']) .words { inset-inline:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
:host([stage='live']) a.words:
|
|
179
|
-
a.words:
|
|
180
|
-
|
|
215
|
+
:host([stage='wireframe']) .words { justify-content: center; font-family: ${j.fontMono}; font-size: clamp(0.6875rem, 2.5cqi, 0.875rem); font-weight: ${Mt("regular")}; color: ${j.textMuted}; }
|
|
216
|
+
:host([stage='code']) .words { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; justify-content: flex-start; min-block-size: 44px; inset-block-start: calc(50% - 22px); padding-inline: calc(4cqi + 3ch) 4cqi; font-family: ${j.fontMono}; font-size: clamp(0.625rem, 2.15cqi, 0.8125rem); font-weight: ${Mt("regular")}; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${j.surfaceCard})); }
|
|
217
|
+
:host([stage='code']) .words .arrow { display: none; }
|
|
218
|
+
/* Live, it answers a pointer: it lifts when pointed at and sits when pressed, and its fill deepens a little. */
|
|
219
|
+
:host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${j.text}); }
|
|
220
|
+
:host([stage='live']) a.words:hover { transform: translateY(-2px); transition: color 180ms, transform var(--impakt-motion-journey-lift-duration, 180ms) var(--impakt-motion-journey-lift-easing, cubic-bezier(0.2, 0, 0, 1)); }
|
|
221
|
+
:host([stage='live']) a.words:active { transform: translateY(1px); transition: color 140ms, transform var(--impakt-motion-journey-press-duration, 140ms) var(--impakt-motion-journey-press-easing, cubic-bezier(0.4, 0, 0.2, 1)); }
|
|
222
|
+
a.words:focus-visible { outline: none; box-shadow: ${j.focusShadow}; }
|
|
223
|
+
|
|
224
|
+
/* The design notes. Each shows at its own stages, and none is read. */
|
|
225
|
+
.ann { position: absolute; opacity: 0; pointer-events: none; transition: opacity var(--jt) var(--je); color: ${j.text}; }
|
|
226
|
+
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${j.fontMono}; font-size: 0.6875rem; letter-spacing: ${j.trackingWide}; text-transform: uppercase; color: ${j.textMuted}; white-space: nowrap; }
|
|
227
|
+
.caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; opacity: 0; transition: opacity var(--jt) var(--je); }
|
|
228
|
+
:host([stage='note']) .caption span:nth-child(1), :host([stage='wireframe']) .caption span:nth-child(2), :host([stage='component']) .caption span:nth-child(3), :host([stage='code']) .caption span:nth-child(4), :host([stage='live']) .caption span:nth-child(5) { opacity: 1; }
|
|
229
|
+
.caption { opacity: 1; }
|
|
230
|
+
.margin { inset-inline-start: 71cqi; inset-block-start: 10cqi; inline-size: 27cqi; font-family: var(--hand); font-size: clamp(0.75rem, 2.9cqi, 1rem); line-height: 1.25; transform: rotate(4deg); }
|
|
231
|
+
.width { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi - 5cqi); block-size: 2cqi; border-inline: 1px solid currentColor; }
|
|
232
|
+
.width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }
|
|
233
|
+
.width b, .height b { position: absolute; font-family: ${j.fontMono}; font-size: 0.6875rem; font-weight: ${Mt("regular")}; line-height: 1; background: var(--impakt-journey-mark-ground, ${j.surfaceCard}); padding-inline: 0.4em; }
|
|
234
|
+
.width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }
|
|
235
|
+
.height { inset-inline-start: calc(14.29cqi + 71.43cqi + 2.5cqi); inline-size: 2cqi; inset-block-start: calc(50% - 8.57cqi); block-size: 17.14cqi; border-block: 1px solid currentColor; }
|
|
236
|
+
.height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }
|
|
237
|
+
.height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }
|
|
238
|
+
.specs { inset-inline-start: 14.29cqi; inset-block-start: calc(50% + 8.57cqi + 3cqi); display: flex; flex-wrap: wrap; gap: 1.5cqi; inline-size: 75cqi; }
|
|
239
|
+
.specs span { padding: 0.15em 0.6em; font-family: ${j.fontMono}; font-size: clamp(0.5625rem, 1.9cqi, 0.6875rem); letter-spacing: ${j.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${j.surfaceCard}; }
|
|
240
|
+
.cursor { inset-inline-start: calc(14.29cqi + 71.43cqi - 4cqi); inset-block-start: calc(50% + 8.57cqi - 4cqi); }
|
|
241
|
+
.pointer { display: block; fill: ${j.text}; stroke: ${j.surfaceCard}; }
|
|
242
|
+
:host([stage='note']) .margin, :host(:is([stage='wireframe'], [stage='component'])) :is(.width, .height), :host([stage='component']) .specs, :host([stage='live']) .cursor { opacity: 1; }
|
|
243
|
+
|
|
244
|
+
@media (prefers-reduced-motion: reduce) {
|
|
245
|
+
.plate, .words, .ann, .caption span { transition: none; }
|
|
246
|
+
:host([stage='live']) a.words:hover, :host([stage='live']) a.words:active { transform: none; transition: none; }
|
|
247
|
+
}
|
|
181
248
|
@media (forced-colors: active) {
|
|
182
249
|
.plate { forced-color-adjust: none; }
|
|
183
250
|
.note, .solid { background: Highlight; }
|
|
184
|
-
.marks, .marks::before { border-color: CanvasText; }
|
|
185
251
|
.window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }
|
|
186
252
|
.wire { background: Canvas; border-color: CanvasText; }
|
|
187
253
|
.words, :host([stage='wireframe']) .words, :host([stage='code']) .words { color: LinkText; forced-color-adjust: none; }
|
|
188
254
|
:host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; }
|
|
255
|
+
.ann { color: CanvasText; }
|
|
189
256
|
}
|
|
190
|
-
`]}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.watch()}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),this.observer=void 0}willUpdate(
|
|
257
|
+
`]}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.watch()}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),this.observer=void 0,this.stopScrub()}willUpdate(e){e.has("stage")&&!ga(this.stage)&&(this.stage="live")}updated(e){e.has("track")&&this.watch()}watch(){if(this.observer?.disconnect(),this.observer=void 0,this.stopScrub(),this.sections=[],!this.track||!this.isConnected||typeof IntersectionObserver!="function")return;let e;try{e=Array.from(this.ownerDocument.querySelectorAll(this.track)).filter(i=>ga(i.getAttribute("data-journey-stage")))}catch{return}if(e.length){this.sections=e,this.observer=new IntersectionObserver(i=>this.crossed(i),{rootMargin:"-50% 0px -50% 0px",threshold:0});for(let i of e)this.observer.observe(i);this.startScrub()}}crossed(e){let a=e.find(r=>r.isIntersecting)?.target.getAttribute("data-journey-stage");ga(a)&&this.become(a)}become(e){e!==this.stage&&(this.stage=e,this.dispatchEvent(new CustomEvent("impakt-journey-stage",{detail:{stage:e},bubbles:!0,composed:!0})))}startScrub(){let e=this.ownerDocument.defaultView;!e||typeof e.requestAnimationFrame!="function"||e.matchMedia?.("(prefers-reduced-motion: reduce)").matches||(e.addEventListener("scroll",this.onScroll,{passive:!0}),e.addEventListener("resize",this.onScroll,{passive:!0}),this.style.setProperty("--jp",String(Wa(this.stage))),this.toggleAttribute("scrub",!0))}stopScrub(){let e=this.ownerDocument?.defaultView;e?.removeEventListener("scroll",this.onScroll),e?.removeEventListener("resize",this.onScroll),this.frame&&cancelAnimationFrame(this.frame),this.frame=0,this.removeAttribute("scrub"),this.style.removeProperty("--jp")}scrub(){let e=this.ownerDocument.defaultView;if(!e||!this.sections.length)return;let i=e.innerHeight/2,a=this.sections.map(I=>I.getBoundingClientRect().top),r=0;a.forEach((I,de)=>{I<=i&&(r=de)});let n=I=>Wa(this.sections[I].getAttribute("data-journey-stage")),c=r+1<this.sections.length?r+1:r,f=a[c]-a[r],m=c===r||f<=0?0:Math.min(1,Math.max(0,(i-a[r])/f)),h=n(r)+m*(n(c)-n(r));this.style.setProperty("--jp",h.toFixed(3)),this.become(Ct[Math.round(h)])}lines(e,i){return e?.length?e.map(a=>ke`<span class=${a.trim().startsWith("//")?"comment":""}>${a}</span>`):Array.from({length:i},(a,r)=>ke`<span class="rule" style=${`inline-size:${[58,72,44][r%3]}%`}></span>`)}notes(){let e=this.captions?.length?this.captions:[je("Note \u2014 Discover"),je("Wireframe \u2014 Design low-fi"),je("Component \u2014 Design hi-fi"),je("Code \u2014 Build"),je("Live \u2014 Launch")],i=this.specs?.length?this.specs:[je("Fill \xB7 Accent/Signal"),je("Radius \xB7 0"),je("Type \xB7 Archivo 20")];return ke`<span class="ann caption" part="caption">${Ct.map((a,r)=>ke`<span>${String(r+1).padStart(2,"0")} · ${e[r]??""}</span>`)}</span>
|
|
258
|
+
<span class="ann margin" part="margin-note">${this.marginNote||je("make it the biggest thing on the page")}</span>
|
|
259
|
+
<span class="ann width"><b>${this.markWidth}</b></span>
|
|
260
|
+
<span class="ann height"><b>${this.markHeight}</b></span>
|
|
261
|
+
<span class="ann specs" part="specs">${i.map(a=>ke`<span>${a}</span>`)}</span>
|
|
262
|
+
<span class="ann cursor">${jr}</span>`}render(){let e=ke`<span class="text">${this.label}</span>${Nr}`;return ke`<div class="frame" part="frame" aria-hidden=${this.decorative?"true":qa}>
|
|
191
263
|
<span class="plate note" aria-hidden="true"></span>
|
|
192
264
|
<span class="plate bar wire" aria-hidden="true"><svg viewBox="0 0 100 100" preserveAspectRatio="none" fill="none" stroke="currentColor" focusable="false"><path d="M0 0 100 100M0 100 100 0" vector-effect="non-scaling-stroke" /></svg></span>
|
|
193
265
|
<span class="plate bar shadow" aria-hidden="true"></span>
|
|
194
266
|
<span class="plate bar solid" aria-hidden="true"></span>
|
|
195
267
|
<span class="plate window" aria-hidden="true"><span class="before">${this.lines(this.code?.before,3)}</span><span></span><span class="after">${this.lines(this.code?.after,2)}</span></span>
|
|
196
|
-
|
|
197
|
-
${this.decorative||!this.href?
|
|
198
|
-
</div>`}};customElements.define("impakt-journey-button",
|
|
268
|
+
${this.annotations?ke`<span class="notes" aria-hidden="true">${this.notes()}</span>`:qa}
|
|
269
|
+
${this.decorative||!this.href?ke`<span class="words" part="button">${e}</span>`:ke`<a class="words" part="button" href=${this.href}>${e}</a>`}
|
|
270
|
+
</div>`}};customElements.define("impakt-journey-button",ri);import{css as at,html as v,nothing as P}from"./atomic-ui.js";import{ImpaktElement as me,focusRing as ba,fontSize as K,fontWeight as le,lineHeight as bt,lockScroll as qr,space as z,spaceAround as mi,t as o,token as gt,unlockScroll as Fa}from"./atomic-ui.js";var Pr=v`<svg viewBox="0 0 22 22" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false">
|
|
199
271
|
<path d="M5 17 17 5M8 5h9v9" />
|
|
200
|
-
</svg>`,
|
|
201
|
-
:host { display: block; container: impakt-work-list / inline-size; }
|
|
202
|
-
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${
|
|
203
|
-
|
|
204
|
-
.
|
|
205
|
-
.
|
|
272
|
+
</svg>`,si=class extends me{static{this.properties={items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},start:{type:Number},label:{type:String},columns:{type:Array},preview:{state:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.headingLevel=3,this.start=1,this.label="",this.columns=[],this.spaceAbove="none",this.spaceBelow="none",this.preview=null}static{this.styles=[...me.styles,ba,mi,at`
|
|
273
|
+
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${gt("color.accent.default","#ffd43b")}; --impakt-work-on-accent: ${gt("color.accent.on","#111111")}; }
|
|
274
|
+
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${o.borderThin} solid ${o.text}; }
|
|
275
|
+
.columns + ol { border-block-start: 0; }
|
|
276
|
+
li, .columns { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto 22px; align-items: center; column-gap: ${z(6)}; padding: ${z(5)} ${z(8)}; }
|
|
277
|
+
.texts li, .texts.columns { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr) auto 22px; }
|
|
278
|
+
li { position: relative; border-block-end: ${o.borderThin} solid ${o.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
279
|
+
.columns { padding-block: ${z(3)}; border-block-end: ${o.borderThin} solid ${o.text}; font-family: ${o.fontMono}; font-size: 0.6875rem; letter-spacing: ${o.trackingWide}; text-transform: uppercase; color: ${o.textMuted}; }
|
|
280
|
+
.columns .last { grid-column: -3; text-align: end; }
|
|
281
|
+
.number { font-family: ${o.fontMono}; font-size: ${K("sm")}; font-variant-numeric: tabular-nums; color: ${o.textMuted}; }
|
|
282
|
+
.name { font-family: ${o.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${le("semibold")}; line-height: 1; letter-spacing: -0.05em; color: ${o.text}; overflow-wrap: anywhere; }
|
|
283
|
+
.texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }
|
|
206
284
|
.name a { color: inherit; text-decoration: none; }
|
|
207
285
|
/* The link is stretched over the row, so the row is one target. */
|
|
208
|
-
.name a::after { content: ''; position: absolute; inset: 0; }
|
|
286
|
+
.name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
|
|
209
287
|
.name a:focus-visible { outline: none; }
|
|
210
|
-
.name a:focus-visible::after { box-shadow: ${
|
|
211
|
-
.
|
|
212
|
-
.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
li:
|
|
288
|
+
.name a:focus-visible::after { box-shadow: ${o.focusShadow}; }
|
|
289
|
+
.text { margin: 0; font-size: ${K("md")}; line-height: ${bt("normal")}; color: ${o.textMuted}; }
|
|
290
|
+
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${z(2)}; text-align: end; }
|
|
291
|
+
.meta, .price { font-family: ${o.fontMono}; font-size: ${K("sm")}; letter-spacing: ${o.trackingWide}; text-transform: uppercase; color: ${o.textMuted}; }
|
|
292
|
+
.price { font-size: 0.6875rem; }
|
|
293
|
+
/* Marketing badges are monospace capitals at 11px. A row that goes somewhere has a solid one; one that does not yet has an outline. */
|
|
294
|
+
.badge { display: inline-block; padding: ${z(1)} ${z(2.5)}; font-family: ${o.fontMono}; font-size: 0.6875rem; font-weight: ${le("medium")}; line-height: 1.4; letter-spacing: ${o.trackingWide}; text-transform: uppercase; white-space: nowrap; color: ${o.surfaceCard}; background: ${o.text}; border: ${o.borderThin} solid ${o.text}; border-radius: ${o.radiusSm}; }
|
|
295
|
+
li:not(:has(a)) .badge { color: ${o.text}; background: transparent; }
|
|
296
|
+
.arrow { display: flex; color: ${o.text}; }
|
|
297
|
+
/* Pointed at, focused or featured, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */
|
|
298
|
+
li:has(a):hover, li:has(a:focus-visible), li.featured { background: ${o.text}; }
|
|
299
|
+
li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${o.surfaceCard}; }
|
|
300
|
+
li:has(a):hover :is(.number, .meta, .text, .price), li:has(a:focus-visible) :is(.number, .meta, .text, .price), li.featured :is(.number, .meta, .text, .price) { color: color-mix(in srgb, ${o.surfaceCard} 78%, ${o.text}); }
|
|
301
|
+
li:has(a):hover .badge, li:has(a:focus-visible) .badge { color: ${o.text}; background: ${o.surfaceCard}; border-color: ${o.surfaceCard}; }
|
|
302
|
+
li:has(a):hover .arrow, li:has(a:focus-visible) .arrow, li.featured .arrow { color: var(--impakt-work-accent); }
|
|
303
|
+
li.featured .badge { color: var(--impakt-work-on-accent); background: var(--impakt-work-accent); border-color: var(--impakt-work-accent); }
|
|
304
|
+
/* The preview card follows the pointer. Only its transform changes, so it costs no layout. */
|
|
305
|
+
.preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${z(2)}; background: ${o.surfaceCard}; border: ${o.borderThin} solid ${o.text}; box-shadow: 0 16px 32px rgb(0 0 0 / 0.2); pointer-events: none; transform: translate(var(--x), var(--y)) translate(-50%, -50%) rotate(-3deg); }
|
|
306
|
+
.preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
|
|
307
|
+
.preview span { display: block; padding-block-end: ${z(2)}; font-family: ${o.fontMono}; font-size: 0.6875rem; letter-spacing: ${o.trackingWide}; text-transform: uppercase; color: ${o.textMuted}; }
|
|
218
308
|
@container impakt-work-list (max-width: 40rem) {
|
|
219
|
-
li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${z(3)}; padding-inline: ${z(4)}; }
|
|
220
|
-
.
|
|
309
|
+
li, .texts li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${z(3)}; padding-inline: ${z(4)}; }
|
|
310
|
+
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${z(2)}; }
|
|
311
|
+
.side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${z(2)}; }
|
|
312
|
+
li:not(:has(.text)) .side { grid-row: 2; }
|
|
221
313
|
.arrow { grid-column: 3; grid-row: 1; }
|
|
314
|
+
.columns { display: none; }
|
|
222
315
|
}
|
|
316
|
+
@media (prefers-reduced-motion: reduce) { li { transition: none; } .preview { display: none; } }
|
|
223
317
|
@media (forced-colors: active) {
|
|
224
|
-
li:has(a):hover, li:has(a:focus-visible) { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }
|
|
225
|
-
li:has(a):hover :is(.name, .number, .meta, .arrow), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow) { color: CanvasText; }
|
|
318
|
+
li:has(a):hover, li:has(a:focus-visible), li.featured { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }
|
|
319
|
+
li:has(a):hover :is(.name, .number, .meta, .arrow, .text, .price), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow, .text, .price), li.featured :is(.name, .number, .meta, .arrow, .text, .price) { color: CanvasText; }
|
|
320
|
+
.badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }
|
|
226
321
|
}
|
|
227
|
-
`]}
|
|
228
|
-
|
|
229
|
-
|
|
322
|
+
`]}point(t,e){if(!e.preview||t.pointerType!=="mouse"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){this.preview&&(this.preview=null);return}let i=this.getBoundingClientRect();this.preview={src:e.preview,label:e.previewLabel??"",x:t.clientX-i.left,y:t.clientY-i.top}}columnRow(t){let e=this.columns??[];if(!e.length)return P;let[i,a,...r]=e;return v`<div class=${t?"columns texts":"columns"} part="columns" aria-hidden="true">
|
|
323
|
+
<span>${i??""}</span><span>${a??""}</span>${r.length?v`<span class="last">${r.join(" \xB7 ")}</span>`:P}
|
|
324
|
+
</div>`}render(){let t=this.items??[],e=t.some(a=>!!a.text),i=this.preview;return v`${this.columnRow(e)}<ol role="list" part="list" class=${e?"texts":""} aria-label=${this.label||P} @pointerleave=${()=>this.preview=null}>
|
|
325
|
+
${t.map((a,r)=>{let n=String(this.start+r).padStart(2,"0"),c=a.badge||a.price||a.meta;return v`<li part="row" class=${a.featured?"featured":""} @pointermove=${f=>this.point(f,a)}>
|
|
326
|
+
<span class="number" aria-hidden="true">${n}</span>
|
|
230
327
|
<div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
|
|
231
|
-
${
|
|
328
|
+
${a.href?v`<a href=${a.href} part="link">${a.name}</a>`:a.name}
|
|
232
329
|
</div>
|
|
233
|
-
${
|
|
234
|
-
${
|
|
330
|
+
${e?v`<p class="text" part="text">${a.text??""}</p>`:P}
|
|
331
|
+
${c?v`<span class="side">
|
|
332
|
+
${a.badge?v`<span class="badge" part="badge">${a.badge}</span>`:P}
|
|
333
|
+
${a.price?v`<span class="price" part="price">${a.price}</span>`:P}
|
|
334
|
+
${a.meta?v`<span class="meta" part="meta">${a.meta}</span>`:P}
|
|
335
|
+
</span>`:v`<span></span>`}
|
|
336
|
+
${a.href?v`<span class="arrow">${Pr}</span>`:v`<span></span>`}
|
|
235
337
|
</li>`})}
|
|
236
|
-
</ol
|
|
338
|
+
</ol>${i?v`<div class="preview" part="preview" aria-hidden="true" style=${`--x:${i.x}px;--y:${i.y}px`}>
|
|
339
|
+
${i.label?v`<span>${i.label}</span>`:P}<img src=${i.src} alt="" />
|
|
340
|
+
</div>`:P}`}},ni=class extends me{static{this.properties={items:{type:Array},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,mi,at`
|
|
237
341
|
:host { display: block; container: impakt-stat-row / inline-size; }
|
|
238
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,
|
|
239
|
-
li { border-block-start: ${
|
|
342
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${z(6)}; }
|
|
343
|
+
li { border-block-start: ${o.borderThin} solid ${o.rule}; padding-block-start: ${z(5)}; }
|
|
240
344
|
p { margin: 0; display: flex; flex-direction: column; gap: ${z(2)}; }
|
|
241
|
-
.value { font-family: ${
|
|
242
|
-
.label { font-size: ${
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
345
|
+
.value { font-family: ${o.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${le("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${o.textHeading}; }
|
|
346
|
+
.label { font-size: ${K("sm")}; line-height: ${bt("normal")}; color: ${o.textMuted}; }
|
|
347
|
+
/* The note is meta: monospace capitals at 11px. */
|
|
348
|
+
.note { font-family: ${o.fontMono}; font-size: 0.6875rem; letter-spacing: ${o.trackingWide}; text-transform: uppercase; color: ${o.textMuted}; }
|
|
349
|
+
`]}render(){return v`<ul role="list" part="list" aria-label=${this.label||P}>
|
|
350
|
+
${this.items.map(t=>v`<li part="stat">
|
|
351
|
+
<p><span class="value" part="value">${t.figure}</span> <span class="label" part="label">${t.label}</span>${t.note?v` <span class="note">${t.note}</span>`:P}</p>
|
|
247
352
|
</li>`)}
|
|
248
|
-
</ul>`}},
|
|
353
|
+
</ul>`}},oi=class extends me{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},open:{type:Array},multiple:{type:Boolean},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.items=[],this.headingLevel=2,this.open=[],this.multiple=!0,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,mi,at`
|
|
249
354
|
:host { display: block; container: impakt-faq / inline-size; }
|
|
250
355
|
.head { display: flex; flex-direction: column; gap: ${z(4)}; margin-block-end: ${z(10)}; max-inline-size: 44rem; }
|
|
251
|
-
.eyebrow { margin: 0; font-family: ${
|
|
252
|
-
.heading { font-family: ${
|
|
253
|
-
.lead { margin: 0; font-size: ${
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
356
|
+
.eyebrow { margin: 0; font-family: ${o.fontEyebrow}; font-size: ${K("sm")}; color: var(--impakt-eyebrow, ${o.textMuted}); }
|
|
357
|
+
.heading { font-family: ${o.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${le("semibold")}; line-height: 1.04; letter-spacing: -0.04em; color: ${o.textHeading}; }
|
|
358
|
+
.lead { margin: 0; font-size: ${K("md")}; line-height: ${bt("normal")}; color: ${o.textMuted}; }
|
|
359
|
+
/* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */
|
|
360
|
+
impakt-accordion { border-block-start: ${o.borderThin} solid ${o.text}; }
|
|
361
|
+
impakt-accordion::part(item) { border-block-end: ${o.borderThin} solid ${o.text}; }
|
|
362
|
+
impakt-accordion::part(header) { min-block-size: 5.75rem; padding-block: ${z(5)}; font-family: ${o.fontHeading}; font-size: clamp(1.25rem, 3.2cqi, 1.5rem); font-weight: ${le("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
363
|
+
impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${o.textMuted}; line-height: ${bt("normal")}; }
|
|
364
|
+
@media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }
|
|
365
|
+
`]}render(){let t=this.id_("heading"),e=Math.min(Math.max(this.headingLevel,1),5),i=this.eyebrow||this.heading||this.lead?v`<div class="head" part="head">
|
|
366
|
+
${this.eyebrow?v`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:P}
|
|
367
|
+
${this.heading?v`<div id=${t} class="heading" part="heading" role="heading" aria-level=${e}>${this.heading}</div>`:P}
|
|
368
|
+
${this.lead?v`<p class="lead" part="lead">${this.lead}</p>`:P}
|
|
369
|
+
</div>`:P,a=v`<impakt-accordion part="questions" marker="plus" .items=${this.items} .headingLevel=${e+1} .open=${this.open} .multiple=${this.multiple}>
|
|
370
|
+
${this.items.map(r=>v`<slot name=${`panel-${r.id}`} slot=${`panel-${r.id}`}>${r.body}</slot>`)}
|
|
371
|
+
</impakt-accordion>`;return this.heading?v`<section aria-labelledby=${t}>${i}${a}</section>`:v`<div>${i}${a}</div>`}},li=class extends me{constructor(){super();this.hasFooter=!1;this.open=!1,this.links=[],this.current="",this.brand="",this.mark="",this.home="/",this.label="Menu",this.closeText="Close",this.currentText=""}static{this.properties={open:{type:Boolean,reflect:!0},links:{type:Array},current:{type:String},brand:{type:String},mark:{type:String},home:{type:String},label:{type:String},closeText:{type:String,attribute:"close-text"},currentText:{type:String,attribute:"current-text"}}}static{this.styles=[...me.styles,ba,at`
|
|
262
372
|
/* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
|
|
263
|
-
:host { --impakt-menu: ${
|
|
373
|
+
:host { --impakt-menu: ${o.text}; --impakt-menu-on: ${o.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${o.surfaceCard} 78%, ${o.text}); --impakt-menu-rule: color-mix(in srgb, ${o.surfaceCard} 18%, ${o.text}); }
|
|
264
374
|
dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; overflow: auto; background: var(--impakt-menu); color: var(--impakt-menu-on); }
|
|
265
375
|
dialog[open] { display: flex; }
|
|
266
376
|
dialog::backdrop { background: var(--impakt-menu); }
|
|
267
|
-
.bar { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding: ${z(2)} ${z(4)}; border-block-end: ${
|
|
268
|
-
.brand { color: inherit; text-decoration: none; font-family: ${
|
|
269
|
-
.
|
|
377
|
+
.bar { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding: ${z(2)} ${z(4)}; border-block-end: ${o.borderThin} solid var(--impakt-menu-rule); }
|
|
378
|
+
.brand { color: inherit; text-decoration: none; font-family: ${o.fontHeading}; font-size: ${K("md")}; font-weight: ${le("semibold")}; border-radius: ${o.radiusSm}; }
|
|
379
|
+
.brand.marked { display: inline-flex; align-items: center; gap: ${z(3)}; min-block-size: 44px; font-weight: ${le("medium")}; }
|
|
380
|
+
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: var(--impakt-menu-on); color: var(--impakt-menu); font-size: ${K("sm")}; }
|
|
381
|
+
.close { display: inline-flex; align-items: center; gap: ${z(2)}; min-block-size: 44px; padding: 0 ${z(4)}; font: inherit; font-size: ${K("sm")}; font-weight: ${le("medium")}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${o.radius}; cursor: pointer; }
|
|
270
382
|
nav { flex: 1; padding: ${z(6)} ${z(5)} 0; }
|
|
271
383
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
272
|
-
li { border-block-end: ${
|
|
273
|
-
li a { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding-block: ${z(4)}; color: inherit; text-decoration: none; font-family: ${
|
|
384
|
+
li { border-block-end: ${o.borderThin} solid var(--impakt-menu-rule); }
|
|
385
|
+
li a { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding-block: ${z(4)}; color: inherit; text-decoration: none; font-family: ${o.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${le("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
274
386
|
li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
275
|
-
.number { font-family: ${
|
|
387
|
+
.number { font-family: ${o.fontMono}; font-size: ${K("sm")}; font-weight: ${le("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
|
|
276
388
|
/*
|
|
277
389
|
* The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
|
|
278
390
|
* --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
|
|
279
391
|
*/
|
|
280
392
|
a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
281
|
-
a[aria-current] .
|
|
393
|
+
a[aria-current] .number { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
394
|
+
a[aria-current]:not(.worded) .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }
|
|
282
395
|
.foot { display: flex; flex-direction: column; gap: ${z(4)}; padding: ${z(8)} ${z(5)} calc(${z(8)} + env(safe-area-inset-bottom)); }
|
|
283
396
|
.foot[hidden] { display: none; }
|
|
284
397
|
/* What is slotted at the foot is read on ink too. */
|
|
285
398
|
::slotted(*) { --impakt-color-text-default: var(--impakt-menu-on); --impakt-color-text-heading: var(--impakt-menu-on); --impakt-color-text-muted: var(--impakt-menu-muted); --impakt-color-text-link: var(--impakt-menu-on); --impakt-color-text-link-hover: var(--impakt-menu-on); color: var(--impakt-menu-on); }
|
|
286
399
|
@media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
|
|
287
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let i=this.dialog;i&&(this.open?(typeof i.showModal=="function"?i.showModal():i.setAttribute("open",""),
|
|
400
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let i=this.dialog;i&&(this.open?(typeof i.showModal=="function"?i.showModal():i.setAttribute("open",""),qr(this)):(typeof i.close=="function"&&i.open?i.close():i.removeAttribute("open"),Fa(this)))}disconnectedCallback(){super.disconnectedCallback(),Fa(this)}close(){this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0})))}footerChanged(e){this.hasFooter=e.target.assignedNodes().length>0,this.requestUpdate()}render(){return v`<dialog part="dialog" aria-label=${this.label} @cancel=${()=>this.close()} @close=${()=>this.close()}>
|
|
288
401
|
<div class="bar" part="bar">
|
|
289
|
-
${this.brand?
|
|
402
|
+
${this.brand?v`<a class=${this.mark?"brand marked":"brand"} href=${this.home||"/"} part="brand">${this.mark?v`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>`:P}${this.brand}</a>`:v`<span></span>`}
|
|
290
403
|
<button class="close" type="button" part="close" @click=${()=>this.close()}>
|
|
291
404
|
<span>${this.closeText}</span>
|
|
292
405
|
<svg viewBox="0 0 12 12" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false"><path d="M1 1l10 10M11 1 1 11" /></svg>
|
|
@@ -294,105 +407,117 @@ import"./atomic-ui.js";import{css as Ae,html as C,nothing as G}from"./atomic-ui.
|
|
|
294
407
|
</div>
|
|
295
408
|
<nav aria-label=${this.label} part="nav">
|
|
296
409
|
<ol role="list">
|
|
297
|
-
${(this.links??[]).map((e,i)=>{let a=!!this.current&&e.href===this.current;return
|
|
298
|
-
<a href=${e.href} aria-current=${a?"page":
|
|
299
|
-
<span class="words">${e.label}</span><span class="number" aria-hidden="true">${
|
|
410
|
+
${(this.links??[]).map((e,i)=>{let a=!!this.current&&e.href===this.current,r=String(i+1).padStart(2,"0"),n=a&&!!this.currentText;return v`<li>
|
|
411
|
+
<a href=${e.href} class=${n?"worded":""} aria-current=${a?"page":P} part="link" @click=${()=>this.close()}>
|
|
412
|
+
<span class="words">${e.label}</span><span class="number" aria-hidden="true">${n?`${this.currentText} \xB7 ${r}`:r}</span>
|
|
300
413
|
</a>
|
|
301
414
|
</li>`})}
|
|
302
415
|
</ol>
|
|
303
416
|
</nav>
|
|
304
417
|
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
305
|
-
</dialog>`}},
|
|
418
|
+
</dialog>`}},ci=class extends me{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},points:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.points=[],this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,mi,at`
|
|
306
419
|
:host { display: block; container: impakt-offer / inline-size; }
|
|
307
|
-
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${z(12)}; align-items: start; }
|
|
420
|
+
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'copy points' 'actions points'; grid-template-rows: auto 1fr; column-gap: ${z(12)}; row-gap: ${z(5)}; align-items: start; }
|
|
421
|
+
.copy { grid-area: copy; }
|
|
422
|
+
.actions { grid-area: actions; }
|
|
423
|
+
ol { grid-area: points; }
|
|
308
424
|
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${z(5)}; }
|
|
309
|
-
.eyebrow { margin: 0; font-family: ${
|
|
310
|
-
.heading { font-family: ${
|
|
311
|
-
.lead { margin: 0; max-inline-size: 32rem; font-size: ${
|
|
425
|
+
.eyebrow { margin: 0; font-family: ${o.fontEyebrow}; font-size: ${K("sm")}; color: var(--impakt-eyebrow, ${o.textMuted}); }
|
|
426
|
+
.heading { font-family: ${o.fontHeading}; font-size: clamp(2rem, 7cqi, 4rem); font-weight: ${le("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${o.textHeading}; }
|
|
427
|
+
.lead { margin: 0; max-inline-size: 32rem; font-size: ${K("md")}; line-height: ${bt("normal")}; color: ${o.text}; }
|
|
312
428
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
313
|
-
li { display: flex; gap: ${z(5)}; padding-block: ${z(5)}; border-block-start: ${
|
|
314
|
-
.number { flex: none; font-family: ${
|
|
315
|
-
@container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; gap: ${z(8)}; } }
|
|
316
|
-
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return
|
|
429
|
+
li { display: flex; gap: ${z(5)}; padding-block: ${z(5)}; border-block-start: ${o.borderThin} solid ${o.text}; font-size: ${K("lg")}; font-weight: ${le("medium")}; line-height: 1.2; color: ${o.text}; }
|
|
430
|
+
.number { flex: none; font-family: ${o.fontMono}; font-size: ${K("sm")}; font-weight: ${le("regular")}; line-height: 1.6; }
|
|
431
|
+
@container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${z(8)}; } }
|
|
432
|
+
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return v`<div class="offer" part="offer">
|
|
317
433
|
<div class="copy">
|
|
318
|
-
${this.eyebrow?
|
|
319
|
-
${this.heading?
|
|
320
|
-
${this.lead?
|
|
321
|
-
<slot name="actions"></slot>
|
|
434
|
+
${this.eyebrow?v`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:P}
|
|
435
|
+
${this.heading?v`<div class="heading" part="heading" role="heading" aria-level=${t}>${this.heading}</div>`:P}
|
|
436
|
+
${this.lead?v`<p class="lead" part="lead">${this.lead}</p>`:P}
|
|
322
437
|
</div>
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
438
|
+
<div class="actions" part="actions"><slot name="actions"></slot></div>
|
|
439
|
+
${(this.points??[]).length?v`<ol role="list" part="points">
|
|
440
|
+
${this.points.map((e,i)=>v`<li><span class="number" aria-hidden="true">${String(i+1).padStart(2,"0")}</span><span>${e}</span></li>`)}
|
|
441
|
+
</ol>`:P}
|
|
442
|
+
</div>`}},di=class extends me{static{this.properties={heading:{type:String},text:{type:String},meta:{type:String},href:{type:String},linkText:{type:String,attribute:"link-text"},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.heading="",this.text="",this.meta="",this.href="",this.linkText="",this.headingLevel=3}static{this.styles=[...me.styles,ba,at`
|
|
327
443
|
:host { display: block; block-size: 100%; }
|
|
328
|
-
article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${z(4)}; padding: ${z(6)}; background: ${
|
|
329
|
-
.meta { margin: 0; font-family: ${
|
|
330
|
-
.heading { font-family: ${
|
|
444
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${z(4)}; padding: ${z(6)}; background: ${o.surfaceCard}; border: ${o.borderThin} solid ${o.text}; border-radius: ${o.radius}; transition: background-color 140ms ease-out; }
|
|
445
|
+
.meta { margin: 0; font-family: ${o.fontMono}; font-size: ${K("sm")}; letter-spacing: ${o.trackingWide}; text-transform: uppercase; color: ${o.textMuted}; }
|
|
446
|
+
.heading { font-family: ${o.fontHeading}; font-size: ${K("xl")}; font-weight: ${le("semibold")}; line-height: 1.15; letter-spacing: -0.025em; color: ${o.text}; }
|
|
331
447
|
.heading a { color: inherit; text-decoration: none; }
|
|
332
448
|
.heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
333
449
|
.heading a:focus-visible { outline: none; }
|
|
334
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
450
|
+
.heading a:focus-visible::after { box-shadow: ${o.focusShadow}; }
|
|
335
451
|
article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
|
|
336
|
-
.text { margin: 0; font-size: ${
|
|
337
|
-
.more { margin-block-start: auto; font-family: ${
|
|
452
|
+
.text { margin: 0; font-size: ${K("sm")}; line-height: ${bt("normal")}; color: ${o.textMuted}; }
|
|
453
|
+
.more { margin-block-start: auto; font-family: ${o.fontMono}; font-size: ${K("sm")}; letter-spacing: ${o.trackingWide}; text-transform: uppercase; color: ${o.text}; }
|
|
338
454
|
@media (forced-colors: active) { article { border-color: CanvasText; } }
|
|
339
|
-
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return
|
|
340
|
-
${this.meta?
|
|
341
|
-
<div class="heading" part="heading" role="heading" aria-level=${t}>${this.href?
|
|
342
|
-
${this.text?
|
|
343
|
-
${this.linkText&&this.href?
|
|
344
|
-
</article>`}},
|
|
345
|
-
:host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${
|
|
346
|
-
.handle { position: absolute; inline-size:
|
|
347
|
-
.handle:nth-of-type(1) { inset-block-start: -
|
|
348
|
-
.handle:nth-of-type(2) { inset-block-start: -
|
|
349
|
-
.handle:nth-of-type(3) { inset-block-end: -
|
|
350
|
-
.handle:nth-of-type(4) { inset-block-end: -
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
455
|
+
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return v`<article part="card">
|
|
456
|
+
${this.meta?v`<p class="meta" part="meta">${this.meta}</p>`:P}
|
|
457
|
+
<div class="heading" part="heading" role="heading" aria-level=${t}>${this.href?v`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}</div>
|
|
458
|
+
${this.text?v`<p class="text" part="text">${this.text}</p>`:P}
|
|
459
|
+
${this.linkText&&this.href?v`<span class="more" aria-hidden="true">${this.linkText} →</span>`:P}
|
|
460
|
+
</article>`}},pi=class extends me{static{this.properties={label:{type:String},cursor:{type:String},hideLabelOn:{type:String,reflect:!0,attribute:"hide-label-on"}}}constructor(){super(),this.label="",this.cursor=null,this.hideLabelOn=""}static{this.styles=[...me.styles,at`
|
|
461
|
+
:host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${gt("color.accent.default","#ffd43b")}; color: ${gt("color.accent.on","#1a1a1a")}; outline: 1.5px solid ${gt("color.accent.on","#1a1a1a")}; outline-offset: -1px; }
|
|
462
|
+
.handle { position: absolute; inline-size: 6px; block-size: 6px; box-sizing: border-box; background: ${o.surfaceCard}; border: 1px solid ${gt("color.accent.on","#1a1a1a")}; }
|
|
463
|
+
.handle:nth-of-type(1) { inset-block-start: -3px; inset-inline-start: -3px; }
|
|
464
|
+
.handle:nth-of-type(2) { inset-block-start: -3px; inset-inline-end: -3px; }
|
|
465
|
+
.handle:nth-of-type(3) { inset-block-end: -3px; inset-inline-start: -3px; }
|
|
466
|
+
.handle:nth-of-type(4) { inset-block-end: -3px; inset-inline-end: -3px; }
|
|
467
|
+
/* The label is meta: monospace capitals at 11px, square. */
|
|
468
|
+
.label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${o.fontMono}; font-size: 0.6875rem; font-weight: ${le("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${o.surfaceCard}; background: ${o.text}; border-radius: ${o.radiusSm}; }
|
|
469
|
+
@media (max-width: 40rem) { :host([hide-label-on='phone']) .label { display: none; } }
|
|
470
|
+
/* The pointer's tip sits on the bottom-right handle. */
|
|
471
|
+
.cursor { position: absolute; inset-block-start: calc(100% - 1px); inset-inline-start: calc(100% - 1px); display: flex; align-items: flex-start; gap: 2px; pointer-events: none; line-height: 1; }
|
|
472
|
+
.cursor svg { display: block; flex: none; color: ${o.text}; stroke: ${o.surfaceCard}; }
|
|
473
|
+
.tag { margin-block-start: 14px; padding: 3px 6px; white-space: nowrap; font-family: ${o.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${o.surfaceCard}; background: ${o.text}; }
|
|
474
|
+
@media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label, .tag { background: CanvasText; color: Canvas; } .cursor svg { color: CanvasText; } }
|
|
475
|
+
`]}render(){return v`<slot></slot><span class="handle" aria-hidden="true"></span><span class="handle" aria-hidden="true"></span><span class="handle" aria-hidden="true"></span><span class="handle" aria-hidden="true"></span>${this.label?v`<span class="label" part="label" aria-hidden="true">${this.label}</span>`:P}${this.cursor!=null?v`<span class="cursor" part="cursor" aria-hidden="true"
|
|
476
|
+
><svg viewBox="0 0 16 20" width="16" height="20" focusable="false"><path d="M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z" fill="currentColor" stroke-width="1.2" stroke-linejoin="round" /></svg
|
|
477
|
+
>${this.cursor?v`<span class="tag">${this.cursor}</span>`:P}</span
|
|
478
|
+
>`:P}`}};customElements.define("impakt-work-list",si);customElements.define("impakt-stat-row",ni);customElements.define("impakt-faq",oi);customElements.define("impakt-site-menu",li);customElements.define("impakt-offer",ci);customElements.define("impakt-post-card",di);customElements.define("impakt-highlight",pi);import{css as Le,html as M,nothing as _}from"./atomic-ui.js";import{say as fe,ImpaktElement as ne,focusRing as vi,targetSize as fa,visuallyHidden as Or,fontWeight as Ae,lineHeight as Ua,space as u,spaceAround as Ge,t as p,token as Wr,type as F,iconSvg as rt}from"./atomic-ui.js";var Fr=Wr("color.accent.default","#c8a15a"),Da=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,Ya=Le`
|
|
479
|
+
.round { ${fa} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.rule}; border-radius: 50%; box-shadow: ${p.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }
|
|
355
480
|
.round:hover:not(:disabled) { box-shadow: ${p.shadowMd}; }
|
|
356
481
|
.round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
|
|
357
|
-
`,
|
|
358
|
-
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${
|
|
359
|
-
.h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${
|
|
482
|
+
`,ki=Le`
|
|
483
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${F("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${p.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${Ae("semibold")}); letter-spacing: ${p.trackingWide}; text-transform: uppercase; }
|
|
484
|
+
.h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${Ae("bold")}; letter-spacing: ${p.trackingTight}; text-wrap: balance; }
|
|
360
485
|
.lead { margin: 0; color: ${p.textMuted}; text-wrap: pretty; }
|
|
361
|
-
`,
|
|
362
|
-
:host { display: block; container-type: inline-size; --most: 1; --gap: ${
|
|
486
|
+
`,hi=class extends ne{constructor(){super();this.index=0;this.count=0;this.visible=null;this.heading=null;this.paused=!1;this.held=!1;this.label="Slides",this.perView="1",this.arrows="below",this.autoplay=!1,this.seconds=6,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},perView:{type:String,reflect:!0,attribute:"per-view"},arrows:{type:String,reflect:!0},autoplay:{type:Boolean,reflect:!0},seconds:{type:Number},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ne.styles,vi,Ge,Ya,Le`
|
|
487
|
+
:host { display: block; container-type: inline-size; --most: 1; --gap: ${u(6)}; }
|
|
363
488
|
:host([per-view='2']) { --most: 2; }
|
|
364
489
|
:host([per-view='3']) { --most: 3; }
|
|
365
|
-
.track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${
|
|
490
|
+
.track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${u(1)} ${u(2)}; border-radius: ${p.radiusLg}; }
|
|
366
491
|
.track::-webkit-scrollbar { display: none; }
|
|
367
492
|
::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; }
|
|
368
493
|
/* Whole slides only: a slice of the next one reads as content spilling out of the page. */
|
|
369
494
|
@container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
|
|
370
|
-
@container (max-width: 40rem) { .track { --per: 1; --gap: ${
|
|
371
|
-
.controls { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
372
|
-
.dots { display: flex; flex-wrap: wrap; gap: ${
|
|
373
|
-
.dot { ${
|
|
374
|
-
.dot span { display: block; inline-size: 8px; block-size: 8px; border-radius:
|
|
495
|
+
@container (max-width: 40rem) { .track { --per: 1; --gap: ${u(4)}; } }
|
|
496
|
+
.controls { display: flex; align-items: center; justify-content: space-between; gap: ${u(4)}; margin-block-start: ${u(4)}; }
|
|
497
|
+
.dots { display: flex; flex-wrap: wrap; gap: ${u(1)}; }
|
|
498
|
+
.dot { ${fa} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${p.radiusSm}; }
|
|
499
|
+
.dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${p.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }
|
|
375
500
|
.dot[aria-current='true'] span { inline-size: 24px; background: ${p.brand}; }
|
|
376
|
-
.buttons { display: flex; gap: ${
|
|
501
|
+
.buttons { display: flex; gap: ${u(2)}; }
|
|
377
502
|
section { position: relative; }
|
|
378
|
-
@container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${
|
|
379
|
-
.sr-only { ${
|
|
503
|
+
@container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${u(4)}); inset-inline-end: 0; } }
|
|
504
|
+
.sr-only { ${Or} }
|
|
380
505
|
@media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
|
|
381
|
-
`]}get track(){return this.renderRoot.querySelector(".track")}get slides(){return Array.from(this.children)}get last(){return Math.max(0,this.count-(this.visible??Number(this.perView||1)))}measure(){let e=this.track,i=this.slides[0];if(!e||!i)return;let a=i.getBoundingClientRect().width;if(a<=0)return;let r=Number.parseFloat(getComputedStyle(e).columnGap)||0,
|
|
506
|
+
`]}get track(){return this.renderRoot.querySelector(".track")}get slides(){return Array.from(this.children)}get last(){return Math.max(0,this.count-(this.visible??Number(this.perView||1)))}measure(){let e=this.track,i=this.slides[0];if(!e||!i)return;let a=i.getBoundingClientRect().width;if(a<=0)return;let r=Number.parseFloat(getComputedStyle(e).columnGap)||0,n=Math.max(1,Math.round((e.clientWidth+r)/(a+r)));if(n===this.visible)return;this.visible=n,this.index=Math.min(this.index,this.last);let c=this.slides[this.index];c&&typeof e.scrollTo=="function"&&e.scrollTo({left:c.offsetLeft-e.offsetLeft,behavior:"auto"}),this.requestUpdate()}onSlots(){let e=this.slides;this.count=e.length,e.forEach((i,a)=>{i.setAttribute("role","group"),i.setAttribute("aria-roledescription",fe("slide")),i.setAttribute("aria-label",fe("{slide} of {slides}",{slide:a+1,slides:e.length}))}),this.measure(),this.requestUpdate()}go(e){let i=Math.min(this.last,Math.max(0,e));this.index=i,this.heading=i,clearTimeout(this.settle),this.settle=setTimeout(()=>{let n=this.heading===null;this.heading=null;let c=this.track,f=this.slides[this.index];!n&&c&&f&&typeof c.scrollTo=="function"&&c.scrollTo({left:f.offsetLeft-c.offsetLeft,behavior:"auto"})},900),this.requestUpdate();let a=this.track,r=this.slides[i];a&&r&&typeof a.scrollTo=="function"&&a.scrollTo({left:r.offsetLeft-a.offsetLeft,behavior:Da()?"auto":"smooth"})}onScroll(){let e=this.track,i=this.slides;if(!e||!i.length)return;let a=0,r=1/0;if(i.forEach((n,c)=>{let f=Math.abs(n.offsetLeft-e.offsetLeft-e.scrollLeft);f<r&&(r=f,a=c)}),this.heading!==null){a===this.heading&&r<2&&(this.heading=null,clearTimeout(this.settle));return}a!==this.index&&(this.index=Math.min(a,this.last),this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.go(this.index+1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.go(this.index-1))}get canPlay(){return this.autoplay&&!Da()}restart(){clearInterval(this.timer),this.timer=void 0,!(!this.canPlay||this.paused||this.held)&&(this.timer=setInterval(()=>this.go(this.index>=this.last?0:this.index+1),Math.max(2,this.seconds)*1e3))}hold(e){this.held=e,this.restart()}togglePause(){this.paused=!this.paused,this.restart(),this.requestUpdate()}firstUpdated(){typeof ResizeObserver=="function"&&this.track&&(this.observer=new ResizeObserver(()=>this.measure()),this.observer.observe(this.track))}updated(e){(e.has("autoplay")||e.has("seconds"))&&this.restart(),e.has("perView")&&this.measure()}connectedCallback(){super.connectedCallback(),this.track&&this.observer?.observe(this.track),this.restart()}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),clearInterval(this.timer),clearTimeout(this.settle)}render(){let e=Array.from({length:this.last+1},(i,a)=>a);return M`<section aria-roledescription=${fe("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
|
|
382
507
|
@mouseenter=${()=>this.hold(!0)} @mouseleave=${()=>this.hold(!1)} @focusin=${()=>this.hold(!0)} @focusout=${()=>this.hold(!1)}>
|
|
383
508
|
<div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
|
|
384
509
|
<div class="controls" part="controls">
|
|
385
|
-
<div class="dots">${e.length>1?e.map(i=>
|
|
510
|
+
<div class="dots">${e.length>1?e.map(i=>M`<button class="dot" type="button" aria-label=${fe("Go to slide {slide}",{slide:i+1})} aria-current=${i===this.index?"true":"false"} @click=${()=>this.go(i)}><span></span></button>`):_}</div>
|
|
386
511
|
<div class="buttons">
|
|
387
|
-
${this.canPlay?
|
|
388
|
-
<button class="round" type="button" aria-label=${
|
|
389
|
-
<button class="round" type="button" aria-label=${
|
|
512
|
+
${this.canPlay?M`<button class="round" type="button" aria-label=${fe(this.paused?"Play the slides":"Pause the slides")} @click=${this.togglePause}>${this.paused?rt("arrow-right","18px"):M`<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>`:_}
|
|
513
|
+
<button class="round" type="button" aria-label=${fe("Previous slide")} ?disabled=${this.index===0} @click=${()=>this.go(this.index-1)}>${rt("arrow-left","18px")}</button>
|
|
514
|
+
<button class="round" type="button" aria-label=${fe("Next slide")} ?disabled=${this.index>=this.last} @click=${()=>this.go(this.index+1)}>${rt("arrow-right","18px")}</button>
|
|
390
515
|
</div>
|
|
391
516
|
</div>
|
|
392
|
-
<p class="sr-only" aria-live="polite">${
|
|
393
|
-
</section>`}};function
|
|
517
|
+
<p class="sr-only" aria-live="polite">${fe("Slide {slide} of {slides}",{slide:this.index+1,slides:this.count})}</p>
|
|
518
|
+
</section>`}};function Ga(s,t,e){let i=s===t-1,a={wide:1,narrow:1,rows:1};if(e==="grid")return i&&(a.wide=t%3?4-t%3:1,a.narrow=t%2?2:1),a;if(s===0)return a;if(t===2)return{wide:2,narrow:2,rows:2};if(t===3)return{...a,wide:2};if(i){let r=(t-5)%4;a.wide=t===4?2:t>5&&r?5-r:1,a.narrow=t%2?1:2}return a}var ui=class extends ne{constructor(){super();this.shown=-1;this.opener=null;this.items=[],this.layout="feature",this.label="Gallery",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},layout:{type:String,reflect:!0},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ne.styles,vi,Ge,Ya,Le`
|
|
394
519
|
:host { display: block; container-type: inline-size; }
|
|
395
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
520
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${u(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }
|
|
396
521
|
:host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
|
|
397
522
|
li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
|
|
398
523
|
:host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
|
|
@@ -402,104 +527,118 @@ import"./atomic-ui.js";import{css as Ae,html as C,nothing as G}from"./atomic-ui.
|
|
|
402
527
|
@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); } }
|
|
403
528
|
dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
|
|
404
529
|
dialog::backdrop { background: rgb(10 14 12 / 0.9); }
|
|
405
|
-
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${
|
|
406
|
-
.bar { display: flex; align-items: center; justify-content: space-between; ${
|
|
407
|
-
.middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${
|
|
530
|
+
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${u(4)}; gap: ${u(3)}; color: #fff; }
|
|
531
|
+
.bar { display: flex; align-items: center; justify-content: space-between; ${F("sm")} }
|
|
532
|
+
.middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${u(3)}; min-block-size: 0; }
|
|
408
533
|
.middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${p.radiusLg}; }
|
|
409
534
|
figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
|
|
410
|
-
.caption { margin: 0; text-align: center; ${
|
|
411
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}open(e,i){this.opener=i.currentTarget,this.shown=e,this.requestUpdate(),this.updateComplete.then(()=>{let a=this.dialog;a&&!a.open&&(typeof a.showModal=="function"?a.showModal():a.setAttribute("open",""))})}close(){let e=this.dialog;e?.open&&(typeof e.close=="function"?e.close():e.removeAttribute("open")),this.onClosed()}onClosed(){this.shown!==-1&&(this.shown=-1,this.requestUpdate(),this.opener?.focus())}step(e){let i=(this.items??[]).length;!i||this.shown<0||(this.shown=(this.shown+e+i)%i,this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.step(1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.step(-1))}render(){let e=this.items??[],i=this.shown>=0?e[this.shown]:void 0;return
|
|
412
|
-
<button class="open" type="button" aria-label=${
|
|
535
|
+
.caption { margin: 0; text-align: center; ${F("sm")} }
|
|
536
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}open(e,i){this.opener=i.currentTarget,this.shown=e,this.requestUpdate(),this.updateComplete.then(()=>{let a=this.dialog;a&&!a.open&&(typeof a.showModal=="function"?a.showModal():a.setAttribute("open",""))})}close(){let e=this.dialog;e?.open&&(typeof e.close=="function"?e.close():e.removeAttribute("open")),this.onClosed()}onClosed(){this.shown!==-1&&(this.shown=-1,this.requestUpdate(),this.opener?.focus())}step(e){let i=(this.items??[]).length;!i||this.shown<0||(this.shown=(this.shown+e+i)%i,this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.step(1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.step(-1))}render(){let e=this.items??[],i=this.shown>=0?e[this.shown]:void 0;return M`<ul aria-label=${this.label} part="list">${e.map((a,r)=>{let n=Ga(r,e.length,this.layout);return M`<li style=${`--span-wide:${n.wide};--span-narrow:${n.narrow};--span-rows:${n.rows}`}>
|
|
537
|
+
<button class="open" type="button" aria-label=${fe("View larger: {picture}",{picture:a.alt})} @click=${c=>this.open(r,c)}><img src=${a.src} alt=${a.alt} loading="lazy" /></button>
|
|
413
538
|
</li>`})}</ul>
|
|
414
539
|
<dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
|
|
415
|
-
${i?
|
|
416
|
-
<div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${
|
|
540
|
+
${i?M`<div class="stage">
|
|
541
|
+
<div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${fe("Close")} @click=${this.close}>${rt("close","18px")}</button></div>
|
|
417
542
|
<div class="middle">
|
|
418
|
-
<button class="round" type="button" aria-label=${
|
|
543
|
+
<button class="round" type="button" aria-label=${fe("Previous picture")} @click=${()=>this.step(-1)}>${rt("arrow-left","18px")}</button>
|
|
419
544
|
<figure><img src=${i.src} alt=${i.alt} /></figure>
|
|
420
|
-
<button class="round" type="button" aria-label=${
|
|
545
|
+
<button class="round" type="button" aria-label=${fe("Next picture")} @click=${()=>this.step(1)}>${rt("arrow-right","18px")}</button>
|
|
421
546
|
</div>
|
|
422
547
|
<p class="caption">${i.caption??i.alt}</p>
|
|
423
|
-
</div>`:
|
|
424
|
-
</dialog>`}},
|
|
548
|
+
</div>`:_}
|
|
549
|
+
</dialog>`}},gi=class extends ne{static{this.properties={heading:{type:String},items:{type:Array},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.items=[],this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ne.styles,vi,Ge,Le`
|
|
425
550
|
:host { display: block; }
|
|
426
|
-
p { margin: 0 0 ${
|
|
427
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${
|
|
551
|
+
p { margin: 0 0 ${u(6)}; text-align: center; color: ${p.textMuted}; ${F("sm")} font-weight: ${Ae("medium")}; }
|
|
552
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${u(8)} ${u(12)}; }
|
|
428
553
|
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; }
|
|
429
554
|
li:hover img { filter: none; opacity: 1; }
|
|
430
555
|
a { display: block; border-radius: ${p.radiusSm}; }
|
|
431
|
-
`]}render(){return
|
|
432
|
-
<ul part="list">${(this.items??[]).map(t=>
|
|
556
|
+
`]}render(){return M`${this.heading?M`<p part="heading">${this.heading}</p>`:_}
|
|
557
|
+
<ul part="list">${(this.items??[]).map(t=>M`<li>${t.href?M`<a href=${t.href}><img src=${t.src} alt=${t.alt} /></a>`:M`<img src=${t.src} alt=${t.alt} />`}</li>`)}</ul>`}},bi=class extends ne{static{this.properties={items:{type:Array},orientation:{type:String,reflect:!0},look:{type:String,reflect:!0},tones:{type:Boolean,reflect:!0},current:{type:Number},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.orientation="horizontal",this.look="numbered",this.tones=!1,this.current=-1,this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ne.styles,Ge,ki,Le`
|
|
433
558
|
:host { display: block; container-type: inline-size; }
|
|
434
|
-
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${
|
|
435
|
-
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${
|
|
436
|
-
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${p.brand}; color: ${p.onBrand}; ${
|
|
437
|
-
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${
|
|
438
|
-
.h { ${
|
|
439
|
-
.meta { margin: 0; ${
|
|
440
|
-
.body { margin: 0; color: ${p.textMuted}; line-height: ${
|
|
559
|
+
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${u(6)}; }
|
|
560
|
+
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${u(2)}; }
|
|
561
|
+
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${p.brand}; color: ${p.onBrand}; ${F("sm")} font-weight: ${Ae("bold")}; position: relative; z-index: 1; margin-block-end: ${u(2)}; }
|
|
562
|
+
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${u(6)} + 8px); block-size: 2px; background: ${p.rule}; }
|
|
563
|
+
.h { ${F("lg")} letter-spacing: 0; }
|
|
564
|
+
.meta { margin: 0; ${F("sm")} color: ${p.textMuted}; font-family: ${p.fontMono}; letter-spacing: 0.02em; }
|
|
565
|
+
.body { margin: 0; color: ${p.textMuted}; line-height: ${Ua("normal")}; text-wrap: pretty; }
|
|
441
566
|
:host([orientation='vertical']) ol { grid-auto-flow: row; }
|
|
442
567
|
:host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
443
568
|
:host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
444
|
-
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
569
|
+
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${u(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
445
570
|
@container (max-width: 40rem) {
|
|
446
571
|
ol { grid-auto-flow: row; }
|
|
447
572
|
li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
448
573
|
li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
449
|
-
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
574
|
+
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${u(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
450
575
|
}
|
|
451
|
-
:
|
|
576
|
+
/* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */
|
|
577
|
+
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${u(5)}; border-block-start: 1px solid var(--rule); }
|
|
578
|
+
:host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }
|
|
579
|
+
:host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; letter-spacing: ${p.trackingWide}; text-transform: uppercase; }
|
|
580
|
+
:host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' · '; }
|
|
581
|
+
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${u(5)} - 1px); }
|
|
582
|
+
:host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }
|
|
452
583
|
:host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
|
|
453
|
-
:host([look='ruled']) ol { gap: ${
|
|
454
|
-
/* On a phone the ruled steps
|
|
584
|
+
:host([look='ruled']) ol { gap: ${u(5)}; }
|
|
585
|
+
/* 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. */
|
|
455
586
|
@container (max-width: 40rem) {
|
|
456
587
|
:host([look='ruled']) ol { gap: 0; }
|
|
457
|
-
:host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${
|
|
458
|
-
:host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start:
|
|
459
|
-
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${
|
|
588
|
+
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${u(6)}; min-block-size: 0; border-block-start: 0; }
|
|
589
|
+
: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; }
|
|
590
|
+
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${u(6)} + 2px); inset-inline-start: 0; inline-size: 10px; block-size: 10px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; background: ${p.surfaceCard}; }
|
|
591
|
+
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${u(6)} + 7px); }
|
|
592
|
+
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${u(6)} + 7px); }
|
|
593
|
+
:host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }
|
|
594
|
+
/* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */
|
|
595
|
+
:host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${p.text}; }
|
|
596
|
+
:host([look='ruled'][tones]) li::after { inset-block: ${u(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; }
|
|
460
597
|
}
|
|
461
|
-
@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; } }
|
|
462
|
-
`]}render(){return
|
|
463
|
-
${t.meta?
|
|
598
|
+
@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; } }
|
|
599
|
+
`]}render(){return M`<ol part="list">${(this.items??[]).map((t,e)=>M`<li part="step" aria-current=${e===this.current?"step":_} style=${this.look==="ruled"?`--chart:var(--impakt-color-chart-${e%5+1}, var(--impakt-color-brand-default, #1f4ed8))`:_}>
|
|
600
|
+
${t.meta?M`<p class="meta">${t.meta}</p>`:_}
|
|
464
601
|
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.heading}</div>
|
|
465
|
-
${t.text?
|
|
466
|
-
</li>`)}</ol>`}},
|
|
602
|
+
${t.text?M`<p class="body">${t.text}</p>`:_}
|
|
603
|
+
</li>`)}</ol>`}},fi=class extends ne{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},points:{type:Array},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},imageSide:{type:String,reflect:!0,attribute:"image-side"},insetSrc:{type:String,attribute:"inset-src"},insetAlt:{type:String,attribute:"inset-alt"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.points=[],this.level=2,this.imageSrc="",this.imageAlt="",this.imageSide="end",this.insetSrc="",this.insetAlt="",this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ne.styles,Ge,ki,Le`
|
|
467
604
|
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
468
605
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
469
606
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
470
607
|
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
471
|
-
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
608
|
+
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u(16)}; align-items: center; }
|
|
472
609
|
:host([image-side='start']) .picture { order: -1; }
|
|
473
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
474
|
-
.h { ${
|
|
475
|
-
.lead { ${
|
|
476
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${
|
|
477
|
-
li { display: flex; gap: ${
|
|
610
|
+
.words { display: flex; flex-direction: column; gap: ${u(4)}; }
|
|
611
|
+
.h { ${F("4xl")} }
|
|
612
|
+
.lead { ${F("lg")} }
|
|
613
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${u(3)}; }
|
|
614
|
+
li { display: flex; gap: ${u(3)}; align-items: flex-start; line-height: ${Ua("normal")}; }
|
|
478
615
|
.tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${p.brandSubtle}; color: ${p.brand}; }
|
|
479
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
616
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${u(3)} ${u(4)}; align-items: center; margin-block-start: ${u(2)}; }
|
|
480
617
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${p.radius2xl}; box-shadow: ${p.shadowXl}; }
|
|
481
618
|
.picture { position: relative; }
|
|
482
619
|
.picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
|
|
483
620
|
.inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-sizing: border-box; }
|
|
484
621
|
@container (max-width: 48rem) {
|
|
485
|
-
.split { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
622
|
+
.split { grid-template-columns: minmax(0, 1fr); gap: ${u(8)}; }
|
|
486
623
|
:host([image-side='start']) .picture { order: 0; }
|
|
487
|
-
.h { ${
|
|
624
|
+
.h { ${F("3xl")} }
|
|
488
625
|
}
|
|
489
|
-
`]}render(){return
|
|
626
|
+
`]}render(){return M`<div class="split" part="split">
|
|
490
627
|
<div class="words">
|
|
491
|
-
${this.eyebrow?
|
|
628
|
+
${this.eyebrow?M`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:_}
|
|
492
629
|
<div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
|
|
493
|
-
${this.lead?
|
|
494
|
-
${this.points?.length?
|
|
630
|
+
${this.lead?M`<p class="lead">${this.lead}</p>`:_}
|
|
631
|
+
${this.points?.length?M`<ul>${this.points.map(t=>M`<li><span class="tick">${rt("check","14px")}</span><span>${t}</span></li>`)}</ul>`:_}
|
|
495
632
|
<div class="actions"><slot name="actions"></slot></div>
|
|
496
633
|
</div>
|
|
497
|
-
${this.imageSrc?
|
|
498
|
-
</div>`}}
|
|
634
|
+
${this.imageSrc?M`<div class="picture ${this.insetSrc?"has-inset":""}"><img src=${this.imageSrc} alt=${this.imageAlt} loading="lazy" part="image" />${this.insetSrc?M`<img class="inset" src=${this.insetSrc} alt=${this.insetAlt} loading="lazy" />`:_}</div>`:_}
|
|
635
|
+
</div>`}},$i=class extends ne{static{this.properties={heading:{type:String},lead:{type:String},tone:{type:String,reflect:!0},align:{type:String,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.lead="",this.tone="brand",this.align="split",this.imageSrc="",this.imageAlt="",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ne.styles,Ge,ki,Le`
|
|
499
636
|
:host { display: block; container-type: inline-size; }
|
|
500
|
-
.panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
637
|
+
.panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${u(8)}; padding: ${u(16)}; border-radius: ${p.radius2xl}; background: ${p.surfaceCard}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
|
|
501
638
|
:host([tone='subtle']) .panel { background: ${p.surfaceSubtle}; box-shadow: none; }
|
|
502
|
-
:host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.
|
|
639
|
+
:host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.shadowMd};
|
|
640
|
+
/* A primary button on the brand panel turns over, as it does on an ink band, so it keeps an edge against the panel. */
|
|
641
|
+
--impakt-button-primary: ${p.onBrand}; --impakt-button-on-primary: ${p.brand}; --impakt-button-primary-hover: color-mix(in srgb, ${p.onBrand} 86%, ${p.brand}); --impakt-color-text-inverse: ${p.brand}; }
|
|
503
642
|
/* Only the words take the light colours: a button in the actions keeps its own. */
|
|
504
643
|
:host([tone='brand']) .words { --impakt-color-text-heading: ${p.onBrand}; --impakt-color-text-default: ${p.onBrand}; --impakt-color-text-muted: ${p.onBrand}; --impakt-color-text-link: ${p.onBrand}; }
|
|
505
644
|
/* A soft glow in the corner, so a flat colour has some depth. Decoration only. */
|
|
@@ -509,103 +648,103 @@ import"./atomic-ui.js";import{css as Ae,html as C,nothing as G}from"./atomic-ui.
|
|
|
509
648
|
.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%); }
|
|
510
649
|
.panel.pictured .words, .panel.pictured .actions { z-index: 1; }
|
|
511
650
|
@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%); } }
|
|
512
|
-
.words { position: relative; display: flex; flex-direction: column; gap: ${
|
|
513
|
-
.h { ${
|
|
514
|
-
.lead { ${
|
|
515
|
-
.actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${
|
|
651
|
+
.words { position: relative; display: flex; flex-direction: column; gap: ${u(3)}; max-inline-size: 40rem; }
|
|
652
|
+
.h { ${F("4xl")} }
|
|
653
|
+
.lead { ${F("lg")} }
|
|
654
|
+
.actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${u(3)}; }
|
|
516
655
|
:host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
|
|
517
656
|
:host([align='center']) .panel { flex-direction: column; text-align: center; }
|
|
518
657
|
:host([align='center']) .words { align-items: center; }
|
|
519
|
-
@container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${
|
|
658
|
+
@container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${u(8)} ${u(6)}; } .h { ${F("3xl")} } :host([align='center']) .panel { align-items: center; } }
|
|
520
659
|
@media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
|
|
521
|
-
`]}render(){return
|
|
522
|
-
${this.imageSrc?
|
|
660
|
+
`]}render(){return M`<div class="panel ${this.imageSrc?"pictured":""}" part="panel">
|
|
661
|
+
${this.imageSrc?M`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />`:_}
|
|
523
662
|
<div class="words">
|
|
524
663
|
<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
|
|
525
|
-
${this.lead?
|
|
664
|
+
${this.lead?M`<p class="lead">${this.lead}</p>`:_}
|
|
526
665
|
</div>
|
|
527
666
|
<div class="actions"><slot name="actions"></slot></div>
|
|
528
|
-
</div>`}},
|
|
667
|
+
</div>`}},_a=s=>M`<span class="stars" role="img" aria-label=${fe("Rated {rating} out of 5",{rating:s})}>${[1,2,3,4,5].map(t=>M`<svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill=${t<=s?"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>`,Dr=s=>s.split(/\s+/).filter(t=>/^[A-Za-z]/.test(t)&&t.toLowerCase()!=="and").slice(0,2).map(t=>t[0].toUpperCase()).join(""),xi=class extends ne{static{this.properties={summary:{type:String},rating:{type:Number},items:{type:Array},columns:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.summary="",this.rating=void 0,this.items=[],this.columns="three",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ne.styles,Ge,Le`
|
|
529
668
|
:host { display: block; container-type: inline-size; }
|
|
530
|
-
.top { display: flex; align-items: center; gap: ${
|
|
531
|
-
.stars { display: inline-flex; gap: 2px; color: ${
|
|
532
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
669
|
+
.top { display: flex; align-items: center; gap: ${u(3)}; margin-block-end: ${u(6)}; ${F("sm")} font-weight: ${Ae("medium")}; }
|
|
670
|
+
.stars { display: inline-flex; gap: 2px; color: ${Fr}; }
|
|
671
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${u(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
533
672
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
534
|
-
li { display: flex; flex-direction: column; gap: ${
|
|
535
|
-
blockquote { margin: 0; flex: 1; ${
|
|
536
|
-
.who { display: flex; align-items: center; gap: ${
|
|
537
|
-
.face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${p.brandSubtle}; color: ${p.brand}; ${
|
|
673
|
+
li { display: flex; flex-direction: column; gap: ${u(4)}; padding: ${u(6)}; background: ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
|
|
674
|
+
blockquote { margin: 0; flex: 1; ${F("md")} text-wrap: pretty; }
|
|
675
|
+
.who { display: flex; align-items: center; gap: ${u(3)}; }
|
|
676
|
+
.face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${p.brandSubtle}; color: ${p.brand}; ${F("sm")} font-weight: ${Ae("bold")}; }
|
|
538
677
|
.face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
539
|
-
.name { font-weight: ${
|
|
540
|
-
.about { color: ${p.textMuted}; ${
|
|
678
|
+
.name { font-weight: ${Ae("semibold")}; ${F("sm")} }
|
|
679
|
+
.about { color: ${p.textMuted}; ${F("sm")} }
|
|
541
680
|
@container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
542
|
-
`]}render(){return
|
|
543
|
-
<ul part="list">${(this.items??[]).map(t=>
|
|
544
|
-
${t.rating?
|
|
681
|
+
`]}render(){return M`${this.summary||this.rating?M`<p class="top" part="summary" style="margin-block-start:0">${this.rating?_a(Math.round(this.rating)):_}<span>${this.summary}</span></p>`:_}
|
|
682
|
+
<ul part="list">${(this.items??[]).map(t=>M`<li part="review">
|
|
683
|
+
${t.rating?_a(t.rating):_}
|
|
545
684
|
<blockquote>${t.quote}</blockquote>
|
|
546
|
-
<div class="who"><span class="face" aria-hidden="true">${t.avatarSrc?
|
|
547
|
-
</li>`)}</ul>`}},
|
|
685
|
+
<div class="who"><span class="face" aria-hidden="true">${t.avatarSrc?M`<img src=${t.avatarSrc} alt="" />`:Dr(t.person)}</span><span><span class="name">${t.person}</span>${t.about?M`<br /><span class="about">${t.about}</span>`:_}</span></div>
|
|
686
|
+
</li>`)}</ul>`}},yi=class extends ne{constructor(){super();this.done=!1;this.heading="",this.lead="",this.label="Email address",this.buttonText="Sign up",this.smallPrint="",this.doneText="Thank you. You\u2019re on the list.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={heading:{type:String},lead:{type:String},label:{type:String},buttonText:{type:String,attribute:"button-text"},smallPrint:{type:String,attribute:"small-print"},doneText:{type:String,attribute:"done-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ne.styles,vi,Ge,ki,Le`
|
|
548
687
|
:host { display: block; container-type: inline-size; }
|
|
549
|
-
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
550
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
551
|
-
.h { ${
|
|
552
|
-
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${
|
|
553
|
-
label { grid-column: 1 / -1; ${
|
|
554
|
-
input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${
|
|
555
|
-
button { ${
|
|
688
|
+
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u(8)}; align-items: center; }
|
|
689
|
+
.words { display: flex; flex-direction: column; gap: ${u(2)}; }
|
|
690
|
+
.h { ${F("2xl")} }
|
|
691
|
+
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${u(1)} ${u(3)}; }
|
|
692
|
+
label { grid-column: 1 / -1; ${F("sm")} font-weight: ${Ae("semibold")}; }
|
|
693
|
+
input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${u(2.5)} ${u(3)}; font: inherit; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.border}; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; }
|
|
694
|
+
button { ${fa} min-block-size: 44px; padding: ${u(2)} ${u(5)}; font: inherit; ${F("sm")} font-weight: ${Ae("semibold")}; color: ${p.onBrand}; background: ${p.brand}; border: 0; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; cursor: pointer; }
|
|
556
695
|
button:hover { background: ${p.brandHover}; }
|
|
557
|
-
.note { grid-column: 1 / -1; margin: ${
|
|
558
|
-
.done { margin: 0; ${
|
|
696
|
+
.note { grid-column: 1 / -1; margin: ${u(1)} 0 0; color: ${p.textMuted}; ${F("sm")} }
|
|
697
|
+
.done { margin: 0; ${F("md")} font-weight: ${Ae("semibold")}; }
|
|
559
698
|
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
560
|
-
`]}submit(e){e.preventDefault();let i=e.currentTarget;if(typeof i.reportValidity=="function"&&!i.reportValidity())return;let a=i.querySelector("input").value.trim();this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{email:a},bubbles:!0,composed:!0})),this.done=!0,this.requestUpdate()}render(){let e=this.id_("email");return
|
|
699
|
+
`]}submit(e){e.preventDefault();let i=e.currentTarget;if(typeof i.reportValidity=="function"&&!i.reportValidity())return;let a=i.querySelector("input").value.trim();this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{email:a},bubbles:!0,composed:!0})),this.done=!0,this.requestUpdate()}render(){let e=this.id_("email");return M`<div class="wrap" part="wrap">
|
|
561
700
|
<div class="words">
|
|
562
|
-
${this.heading?
|
|
563
|
-
${this.lead?
|
|
701
|
+
${this.heading?M`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:_}
|
|
702
|
+
${this.lead?M`<p class="lead">${this.lead}</p>`:_}
|
|
564
703
|
</div>
|
|
565
|
-
<div aria-live="polite">${this.done?
|
|
704
|
+
<div aria-live="polite">${this.done?M`<p class="done">${this.doneText}</p>`:M`<form @submit=${this.submit}>
|
|
566
705
|
<label for=${e}>${this.label}</label>
|
|
567
706
|
<input id=${e} type="email" name="email" autocomplete="email" required />
|
|
568
707
|
<button type="submit">${this.buttonText}</button>
|
|
569
|
-
${this.smallPrint?
|
|
708
|
+
${this.smallPrint?M`<p class="note">${this.smallPrint}</p>`:_}
|
|
570
709
|
</form>`}</div>
|
|
571
|
-
</div>`}};customElements.define("impakt-carousel",
|
|
710
|
+
</div>`}};customElements.define("impakt-carousel",hi);customElements.define("impakt-gallery",ui);customElements.define("impakt-logo-cloud",gi);customElements.define("impakt-steps",bi);customElements.define("impakt-media-split",fi);customElements.define("impakt-cta-banner",$i);customElements.define("impakt-reviews",xi);customElements.define("impakt-newsletter",yi);import{css as At,html as D,nothing as he}from"./atomic-ui.js";import{say as Xe,pageLocale as _r,ImpaktElement as Ee,focusRing as Lt,targetSize as Xa,fontWeight as ue,space as $,spaceAround as Ci,t as l,type as Z,iconSvg as st}from"./atomic-ui.js";var wi=class extends Ee{static{this.properties={imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},plots:{type:Array},hint:{type:String},selectedPlot:{type:String,attribute:"selected-plot"},panel:{type:String,reflect:!0},plotWord:{type:String,attribute:"plot-word"},actionText:{type:String,attribute:"action-text"},availableText:{type:String,attribute:"available-text"},reservedText:{type:String,attribute:"reserved-text"},soldText:{type:String,attribute:"sold-text"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.imageSrc="",this.imageAlt="",this.plots=[],this.hint="Choose a plot to see its price and availability.",this.selectedPlot="",this.panel="beside",this.plotWord="Plot",this.actionText="View this home",this.availableText="Available",this.reservedText="Reserved",this.soldText="Sold",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Ee.styles,Lt,Ci,At`
|
|
572
711
|
:host { display: block; container-type: inline-size; }
|
|
573
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${
|
|
574
|
-
.plan { position: relative; overflow: hidden; border-radius: ${
|
|
712
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${$(6)}; align-items: start; }
|
|
713
|
+
.plan { position: relative; overflow: hidden; border-radius: ${l.radius2xl}; background: ${l.surfaceSubtle}; box-shadow: ${l.shadowMd}; line-height: 0; }
|
|
575
714
|
.plan img { inline-size: 100%; block-size: auto; }
|
|
576
|
-
.pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${
|
|
715
|
+
.pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${Z("xs")} line-height: 1; font-weight: ${ue("bold")}; color: ${l.onBrand}; background: ${l.brand}; border: 2px solid ${l.surfaceCard}; border-radius: 50%; box-shadow: ${l.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }
|
|
577
716
|
.pin:hover { transform: scale(1.12); }
|
|
578
|
-
.pin.reserved { color: ${
|
|
579
|
-
.pin.sold { color: ${
|
|
580
|
-
.pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${
|
|
581
|
-
.panel { display: flex; flex-direction: column; gap: ${
|
|
582
|
-
.hint { margin: 0; color: ${
|
|
583
|
-
.name { margin: 0; font-family: ${
|
|
584
|
-
.sub { margin: 0; color: ${
|
|
585
|
-
.price { margin: 0; ${
|
|
586
|
-
.status { align-self: flex-start; padding: ${
|
|
587
|
-
.status.reserved { color: ${
|
|
588
|
-
.status.sold { color: ${
|
|
589
|
-
.go { ${
|
|
590
|
-
.go:hover { background: ${
|
|
591
|
-
.legend { display: flex; flex-wrap: wrap; gap: ${
|
|
592
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
593
|
-
.key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${
|
|
594
|
-
.key.reserved { background: ${
|
|
595
|
-
.key.sold { background: ${
|
|
596
|
-
:host { --plan-card: var(--impakt-solid-card, ${
|
|
717
|
+
.pin.reserved { color: ${l.text}; background: ${l.warningSubtle}; border-color: ${l.warning}; border-style: dashed; }
|
|
718
|
+
.pin.sold { color: ${l.textMuted}; background: ${l.surfaceCard}; border-color: ${l.border}; border-radius: ${l.radius}; }
|
|
719
|
+
.pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${l.shadowLg}, 0 0 0 3px ${l.brand}; }
|
|
720
|
+
.panel { display: flex; flex-direction: column; gap: ${$(3)}; padding: ${$(6)}; background: ${l.surfaceCard}; border-radius: ${l.radius2xl}; box-shadow: ${l.shadowSm}, 0 0 0 1px color-mix(in srgb, ${l.text} 6%, transparent); }
|
|
721
|
+
.hint { margin: 0; color: ${l.textMuted}; }
|
|
722
|
+
.name { margin: 0; font-family: ${l.fontHeading}; ${Z("2xl")} font-weight: ${ue("bold")}; color: ${l.textHeading}; }
|
|
723
|
+
.sub { margin: 0; color: ${l.textMuted}; }
|
|
724
|
+
.price { margin: 0; ${Z("xl")} font-weight: ${ue("semibold")}; }
|
|
725
|
+
.status { align-self: flex-start; padding: ${$(.5)} ${$(2.5)}; ${Z("xs")} font-weight: ${ue("semibold")}; color: ${l.successText}; background: ${l.successSubtle}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); }
|
|
726
|
+
.status.reserved { color: ${l.warningText}; background: ${l.warningSubtle}; }
|
|
727
|
+
.status.sold { color: ${l.text}; background: ${l.surfaceSubtle}; }
|
|
728
|
+
.go { ${Xa} display: inline-flex; align-items: center; justify-content: center; gap: ${$(2)}; padding: ${$(2)} ${$(4)}; ${Z("sm")} font-weight: ${ue("semibold")}; color: ${l.onBrand}; text-decoration: none; background: ${l.brand}; border-radius: ${l.radiusLg}; }
|
|
729
|
+
.go:hover { background: ${l.brandHover}; }
|
|
730
|
+
.legend { display: flex; flex-wrap: wrap; gap: ${$(4)}; margin: ${$(3)} 0 0; padding: 0; list-style: none; ${Z("sm")} color: ${l.textMuted}; }
|
|
731
|
+
.legend li { display: inline-flex; align-items: center; gap: ${$(2)}; }
|
|
732
|
+
.key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${l.brand}; border: 2px solid ${l.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }
|
|
733
|
+
.key.reserved { background: ${l.warningSubtle}; border: 2px dashed ${l.warning}; }
|
|
734
|
+
.key.sold { background: ${l.surfaceCard}; border: 2px solid ${l.border}; border-radius: 3px; }
|
|
735
|
+
:host { --plan-card: var(--impakt-solid-card, ${l.surfaceCard}); --plan-text: var(--impakt-solid-text, ${l.text}); --plan-heading: var(--impakt-solid-heading, ${l.text}); --plan-muted: var(--impakt-solid-muted, ${l.textMuted}); }
|
|
597
736
|
:host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impakt-color-surface-card: var(--plan-card); --impakt-color-text-default: var(--plan-text); --impakt-color-text-heading: var(--plan-heading); --impakt-color-text-muted: var(--plan-muted); }
|
|
598
|
-
@container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${
|
|
737
|
+
@container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${$(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${l.shadowXl}; } }
|
|
599
738
|
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
600
|
-
`]}willUpdate(t){(t.has("selectedPlot")||t.has("plots"))&&this.selectedPlot&&!this.chosen&&(this.chosen=this.plots.find(e=>String(e.number)===this.selectedPlot))}word(t){return t==="sold"?this.soldText:t==="reserved"?this.reservedText:this.availableText}choose(t){this.chosen=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plot:t},bubbles:!0,composed:!0}))}renderPanel(){let t=this.chosen;if(!t)return
|
|
739
|
+
`]}willUpdate(t){(t.has("selectedPlot")||t.has("plots"))&&this.selectedPlot&&!this.chosen&&(this.chosen=this.plots.find(e=>String(e.number)===this.selectedPlot))}word(t){return t==="sold"?this.soldText:t==="reserved"?this.reservedText:this.availableText}choose(t){this.chosen=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plot:t},bubbles:!0,composed:!0}))}renderPanel(){let t=this.chosen;if(!t)return D`<p class="hint">${this.hint}</p>`;let e=t.status??"available";return D`<span class="status ${e}">${this.word(e)}</span>
|
|
601
740
|
<p class="name">${this.plotWord} ${t.number}</p>
|
|
602
|
-
${t.name||t.beds?
|
|
603
|
-
${t.price?
|
|
604
|
-
${t.href&&e!=="sold"?
|
|
741
|
+
${t.name||t.beds?D`<p class="sub">${[t.name,t.beds].filter(Boolean).join(" \xB7 ")}</p>`:he}
|
|
742
|
+
${t.price?D`<p class="price">${t.price}</p>`:he}
|
|
743
|
+
${t.href&&e!=="sold"?D`<a class="go" href=${t.href}>${this.actionText}${st("arrow-right","16px")}</a>`:he}`}render(){return D`<div class="wrap" part="wrap">
|
|
605
744
|
<div>
|
|
606
745
|
<div class="plan" part="plan">
|
|
607
746
|
<img src=${this.imageSrc} alt=${this.imageAlt} />
|
|
608
|
-
${this.plots.map(t=>{let e=t.status??"available",i=[`${this.plotWord} ${t.number}`,t.name,this.word(e),t.price].filter(Boolean).join(", ");return
|
|
747
|
+
${this.plots.map(t=>{let e=t.status??"available",i=[`${this.plotWord} ${t.number}`,t.name,this.word(e),t.price].filter(Boolean).join(", ");return D`<button class="pin ${e}" type="button" style="left:${Number(t.x)}%;top:${Number(t.y)}%" aria-label=${i} aria-pressed=${String(this.chosen===t)} @click=${()=>this.choose(t)}>${t.number}</button>`})}
|
|
609
748
|
</div>
|
|
610
749
|
<ul class="legend">
|
|
611
750
|
<li><span class="key"></span>${this.availableText}</li>
|
|
@@ -614,318 +753,352 @@ import"./atomic-ui.js";import{css as Ae,html as C,nothing as G}from"./atomic-ui.
|
|
|
614
753
|
</ul>
|
|
615
754
|
</div>
|
|
616
755
|
<div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
|
|
617
|
-
</div>`}};function
|
|
756
|
+
</div>`}};function Va(s,t,e){let i=e*12;if(s<=0||i<=0)return 0;let a=t/100/12;return a===0?s/i:s*a/(1-(1+a)**-i)}var Si=class extends Ee{static{this.properties={heading:{type:String},price:{type:Number},depositPercent:{type:Number,attribute:"deposit-percent"},rate:{type:Number},years:{type:Number},currency:{type:String},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="What would it cost each month?",this.price=385e3,this.depositPercent=10,this.rate=4.5,this.years=30,this.currency="GBP",this.smallPrint="This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Ee.styles,Lt,Ci,At`
|
|
618
757
|
:host { display: block; container-type: inline-size; }
|
|
619
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${
|
|
620
|
-
.inputs { display: flex; flex-direction: column; gap: ${
|
|
621
|
-
.h { margin: 0; font-family: ${
|
|
622
|
-
label { display: flex; justify-content: space-between; gap: ${
|
|
623
|
-
.read { font-weight: ${
|
|
624
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
625
|
-
input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${
|
|
626
|
-
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
627
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${
|
|
628
|
-
.caption { margin: 0; ${
|
|
629
|
-
output { display: block; font-family: ${
|
|
630
|
-
dl { display: grid; gap: ${
|
|
631
|
-
dl div { display: flex; justify-content: space-between; gap: ${
|
|
758
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${l.surfaceCard}; border-radius: ${l.radius2xl}; box-shadow: ${l.shadowMd}, 0 0 0 1px color-mix(in srgb, ${l.text} 6%, transparent); }
|
|
759
|
+
.inputs { display: flex; flex-direction: column; gap: ${$(5)}; padding: ${$(8)}; }
|
|
760
|
+
.h { margin: 0; font-family: ${l.fontHeading}; ${Z("2xl")} font-weight: ${ue("bold")}; color: ${l.textHeading}; }
|
|
761
|
+
label { display: flex; justify-content: space-between; gap: ${$(3)}; ${Z("sm")} font-weight: ${ue("semibold")}; margin-block-end: ${$(1.5)}; }
|
|
762
|
+
.read { font-weight: ${ue("regular")}; color: ${l.textMuted}; }
|
|
763
|
+
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${$(2)} ${$(3)}; font: inherit; color: ${l.text}; background: ${l.surfaceCard}; border: ${l.borderThin} solid ${l.border}; border-radius: ${l.radiusLg}; }
|
|
764
|
+
input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${l.brand}; }
|
|
765
|
+
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${$(4)}; }
|
|
766
|
+
.result { display: flex; flex-direction: column; justify-content: center; gap: ${$(2)}; padding: ${$(8)}; color: ${l.onBrand}; background: ${l.brand}; }
|
|
767
|
+
.caption { margin: 0; ${Z("sm")} opacity: 0.85; }
|
|
768
|
+
output { display: block; font-family: ${l.fontHeading}; ${Z("4xl")} font-weight: ${ue("bold")}; }
|
|
769
|
+
dl { display: grid; gap: ${$(2)}; margin: ${$(4)} 0 0; padding-block-start: ${$(4)}; border-block-start: 1px solid color-mix(in srgb, ${l.onBrand} 25%, transparent); ${Z("sm")} }
|
|
770
|
+
dl div { display: flex; justify-content: space-between; gap: ${$(3)}; }
|
|
632
771
|
dt { opacity: 0.85; }
|
|
633
|
-
dd { margin: 0; font-weight: ${
|
|
772
|
+
dd { margin: 0; font-weight: ${ue("semibold")}; }
|
|
634
773
|
/* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
|
|
635
|
-
.small { grid-column: 1 / -1; margin: 0; padding: ${
|
|
636
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${
|
|
637
|
-
`]}money(t){try{return new Intl.NumberFormat(
|
|
774
|
+
.small { grid-column: 1 / -1; margin: 0; padding: ${$(4)} ${$(8)}; ${Z("xs")} color: ${l.text}; background: ${l.surfaceSubtle}; }
|
|
775
|
+
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${$(5)}; } .small { padding: ${$(4)} ${$(5)}; } }
|
|
776
|
+
`]}money(t){try{return new Intl.NumberFormat(_r(this),{style:"currency",currency:this.currency,maximumFractionDigits:0}).format(t)}catch{return String(Math.round(t))}}field(t){return e=>{this[t]=Number(e.target.value)||0}}render(){let t=this.price*this.depositPercent/100,e=Math.max(this.price-t,0),i=Va(e,this.rate,this.years);return D`<div class="wrap" part="wrap">
|
|
638
777
|
<div class="inputs">
|
|
639
|
-
${this.heading?
|
|
640
|
-
<div><label for=${this.id_("price")}>${
|
|
641
|
-
<div><label for=${this.id_("deposit")}>${
|
|
778
|
+
${this.heading?D`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:he}
|
|
779
|
+
<div><label for=${this.id_("price")}>${Xe("Home price")}</label><input id=${this.id_("price")} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this.price)} @input=${this.field("price")} /></div>
|
|
780
|
+
<div><label for=${this.id_("deposit")}>${Xe("Deposit")} <span class="read">${this.depositPercent}% · ${this.money(t)}</span></label><input id=${this.id_("deposit")} type="range" min="5" max="60" step="1" .value=${String(this.depositPercent)} @input=${this.field("depositPercent")} /></div>
|
|
642
781
|
<div class="two">
|
|
643
|
-
<div><label for=${this.id_("years")}>${
|
|
644
|
-
<div><label for=${this.id_("rate")}>${
|
|
782
|
+
<div><label for=${this.id_("years")}>${Xe("Term")} <span class="read">${Xe("{years} years",{years:this.years})}</span></label><input id=${this.id_("years")} type="range" min="5" max="40" step="1" .value=${String(this.years)} @input=${this.field("years")} /></div>
|
|
783
|
+
<div><label for=${this.id_("rate")}>${Xe("Interest rate (%)")}</label><input id=${this.id_("rate")} type="number" min="0" max="20" step="0.05" inputmode="decimal" .value=${String(this.rate)} @input=${this.field("rate")} /></div>
|
|
645
784
|
</div>
|
|
646
785
|
</div>
|
|
647
786
|
<div class="result">
|
|
648
|
-
<p class="caption">${
|
|
787
|
+
<p class="caption">${Xe("Estimated monthly repayment")}</p>
|
|
649
788
|
<output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(i)}</output>
|
|
650
789
|
<dl>
|
|
651
|
-
<div><dt>${
|
|
652
|
-
<div><dt>${
|
|
790
|
+
<div><dt>${Xe("You would borrow")}</dt><dd>${this.money(e)}</dd></div>
|
|
791
|
+
<div><dt>${Xe("Total repayable")}</dt><dd>${this.money(i*this.years*12)}</dd></div>
|
|
653
792
|
</dl>
|
|
654
793
|
</div>
|
|
655
|
-
${this.smallPrint?
|
|
656
|
-
</div>`}},
|
|
657
|
-
.frame { position: relative; overflow: hidden; border-radius: ${
|
|
794
|
+
${this.smallPrint?D`<p class="small">${this.smallPrint}</p>`:he}
|
|
795
|
+
</div>`}},zi=class extends Ee{static{this.properties={beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},beforeLabel:{type:String,attribute:"before-label"},afterLabel:{type:String,attribute:"after-label"},label:{type:String},position:{type:Number},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.beforeLabel="Before",this.afterLabel="After",this.label="Compare the two pictures",this.position=50,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Ee.styles,Lt,Ci,At`
|
|
796
|
+
.frame { position: relative; overflow: hidden; border-radius: ${l.radius2xl}; box-shadow: ${l.shadowLg}; line-height: 0; --at: 50%; }
|
|
658
797
|
img { display: block; inline-size: 100%; block-size: auto; }
|
|
659
798
|
.after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
|
|
660
|
-
.tag { position: absolute; inset-block-start: ${
|
|
661
|
-
.tag.b { inset-inline-start: ${
|
|
662
|
-
.tag.a { inset-inline-end: ${
|
|
663
|
-
.line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${
|
|
664
|
-
.grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${
|
|
799
|
+
.tag { position: absolute; inset-block-start: ${$(3)}; padding: ${$(1)} ${$(3)}; ${Z("xs")} line-height: 1.4; font-weight: ${ue("semibold")}; color: ${l.text}; background: ${l.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); box-shadow: ${l.shadowSm}; }
|
|
800
|
+
.tag.b { inset-inline-start: ${$(3)}; }
|
|
801
|
+
.tag.a { inset-inline-end: ${$(3)}; }
|
|
802
|
+
.line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${l.surfaceCard}; pointer-events: none; }
|
|
803
|
+
.grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${l.text}; background: ${l.surfaceCard}; border-radius: 50%; box-shadow: ${l.shadowMd}; }
|
|
665
804
|
input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
|
|
666
|
-
.frame:has(input:focus-visible) .grip { box-shadow: ${
|
|
667
|
-
`]}render(){return
|
|
805
|
+
.frame:has(input:focus-visible) .grip { box-shadow: ${l.focusShadow}; }
|
|
806
|
+
`]}render(){return D`<div class="frame" part="frame" style="--at:${this.position}%">
|
|
668
807
|
<img src=${this.beforeSrc} alt=${this.beforeAlt} />
|
|
669
808
|
<img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
|
|
670
809
|
<span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
|
|
671
810
|
<span class="tag a" aria-hidden="true">${this.afterLabel}</span>
|
|
672
|
-
<span class="line"><span class="grip">${
|
|
811
|
+
<span class="line"><span class="grip">${st("arrow-left","14px")}${st("arrow-right","14px")}</span></span>
|
|
673
812
|
<input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${t=>{this.position=Number(t.target.value)}} />
|
|
674
|
-
</div>`}},
|
|
813
|
+
</div>`}},Ti=class extends Ee{constructor(){super();this.shown=!1;this.check=()=>{let e=window.scrollY>=this.revealAfter;e!==this.shown&&(this.shown=e,this.requestUpdate(),this.clearance(e))};this.label="Quick actions",this.heading="",this.lead="",this.showOn="phones",this.revealAfter=400}static{this.properties={label:{type:String},heading:{type:String},lead:{type:String},showOn:{type:String,reflect:!0,attribute:"show-on"},revealAfter:{type:Number,attribute:"reveal-after"}}}static{this.styles=[...Ee.styles,Lt,At`
|
|
675
814
|
:host { display: block; }
|
|
676
|
-
.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
815
|
+
.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${$(4)}; padding: ${$(3)} ${$(4)} calc(${$(3)} + env(safe-area-inset-bottom)); background: ${l.surfaceCard}; box-shadow: ${l.shadowXl}, 0 -1px 0 color-mix(in srgb, ${l.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }
|
|
677
816
|
.bar.on { transform: none; visibility: visible; }
|
|
678
817
|
.spacer { block-size: 5rem; }
|
|
679
|
-
.h { font-family: ${
|
|
680
|
-
.t { ${
|
|
818
|
+
.h { font-family: ${l.fontHeading}; ${Z("md")} font-weight: ${ue("bold")}; color: ${l.textHeading}; }
|
|
819
|
+
.t { ${Z("xs")} color: ${l.textMuted}; }
|
|
681
820
|
.words { min-inline-size: 0; }
|
|
682
|
-
.actions { display: flex; flex: none; gap: ${
|
|
821
|
+
.actions { display: flex; flex: none; gap: ${$(2)}; }
|
|
683
822
|
@media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
|
|
684
|
-
`]}clearance(e){let a=e&&getComputedStyle(this).display!=="none"?`${this.renderRoot.querySelector(".bar")?.getBoundingClientRect().height??80}px`:"",r=document.documentElement.style;r.scrollPaddingBlockEnd=a,a?r.setProperty("--impakt-bottom-bar",a):r.removeProperty("--impakt-bottom-bar")}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.check,{passive:!0}),this.check()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.check),this.clearance(!1)}render(){return
|
|
823
|
+
`]}clearance(e){let a=e&&getComputedStyle(this).display!=="none"?`${this.renderRoot.querySelector(".bar")?.getBoundingClientRect().height??80}px`:"",r=document.documentElement.style;r.scrollPaddingBlockEnd=a,a?r.setProperty("--impakt-bottom-bar",a):r.removeProperty("--impakt-bottom-bar")}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.check,{passive:!0}),this.check()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.check),this.clearance(!1)}render(){return D`<div class="spacer"></div>
|
|
685
824
|
<section class="bar ${this.shown?"on":""}" part="bar" aria-label=${this.label}>
|
|
686
825
|
<div class="words">
|
|
687
|
-
${this.heading?
|
|
688
|
-
${this.lead?
|
|
826
|
+
${this.heading?D`<div class="h">${this.heading}</div>`:he}
|
|
827
|
+
${this.lead?D`<div class="t">${this.lead}</div>`:he}
|
|
689
828
|
</div>
|
|
690
829
|
<div class="actions"><slot name="actions"></slot></div>
|
|
691
|
-
</section>`}},
|
|
830
|
+
</section>`}},Mi=class extends Ee{static{this.properties={heading:{type:String},address:{type:String},hours:{type:String},phone:{type:String},mapSrc:{type:String,attribute:"map-src"},mapAlt:{type:String,attribute:"map-alt"},directionsText:{type:String,attribute:"directions-text"},directionsHref:{type:String,attribute:"directions-href"},nearby:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.address="",this.hours="",this.phone="",this.mapSrc="",this.mapAlt="",this.directionsText="Get directions",this.directionsHref="",this.nearby=[],this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Ee.styles,Lt,Ci,At`
|
|
692
831
|
:host { display: block; container-type: inline-size; }
|
|
693
|
-
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${
|
|
832
|
+
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${l.surfaceCard}; border-radius: ${l.radius2xl}; box-shadow: ${l.shadowMd}, 0 0 0 1px color-mix(in srgb, ${l.text} 6%, transparent); }
|
|
694
833
|
.wrap.solo { grid-template-columns: minmax(0, 1fr); }
|
|
695
|
-
.map { min-block-size: 16rem; background: ${
|
|
834
|
+
.map { min-block-size: 16rem; background: ${l.surfaceSubtle}; }
|
|
696
835
|
.map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
697
|
-
.info { display: flex; flex-direction: column; gap: ${
|
|
698
|
-
.h { margin: 0; font-family: ${
|
|
699
|
-
.row { display: flex; gap: ${
|
|
700
|
-
.row svg { flex: none; margin-block-start: ${
|
|
701
|
-
.row a { display: inline-flex; align-items: center; min-block-size: ${
|
|
702
|
-
a { color: ${
|
|
703
|
-
ul { display: grid; gap: ${
|
|
704
|
-
li { display: flex; justify-content: space-between; gap: ${
|
|
705
|
-
li span:last-child { color: ${
|
|
706
|
-
.go { ${
|
|
707
|
-
.go:hover { background: ${
|
|
708
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${
|
|
709
|
-
`]}render(){let t=this.directionsHref||(this.address?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}`:"");return
|
|
710
|
-
${this.mapSrc?
|
|
836
|
+
.info { display: flex; flex-direction: column; gap: ${$(3)}; padding: ${$(8)}; }
|
|
837
|
+
.h { margin: 0; font-family: ${l.fontHeading}; ${Z("2xl")} font-weight: ${ue("bold")}; color: ${l.textHeading}; }
|
|
838
|
+
.row { display: flex; gap: ${$(3)}; margin: 0; white-space: pre-line; }
|
|
839
|
+
.row svg { flex: none; margin-block-start: ${$(.5)}; color: ${l.brand}; }
|
|
840
|
+
.row a { display: inline-flex; align-items: center; min-block-size: ${l.targetMin}; margin-block-start: -2px; }
|
|
841
|
+
a { color: ${l.link}; }
|
|
842
|
+
ul { display: grid; gap: ${$(1.5)}; margin: ${$(1)} 0; padding: ${$(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${l.text} 10%, transparent); ${Z("sm")} }
|
|
843
|
+
li { display: flex; justify-content: space-between; gap: ${$(3)}; }
|
|
844
|
+
li span:last-child { color: ${l.textMuted}; text-align: end; }
|
|
845
|
+
.go { ${Xa} align-self: flex-start; display: inline-flex; align-items: center; gap: ${$(2)}; padding: ${$(2)} ${$(4)}; ${Z("sm")} font-weight: ${ue("semibold")}; color: ${l.onBrand}; text-decoration: none; background: ${l.brand}; border-radius: ${l.radiusLg}; }
|
|
846
|
+
.go:hover { background: ${l.brandHover}; }
|
|
847
|
+
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${$(5)}; } }
|
|
848
|
+
`]}render(){let t=this.directionsHref||(this.address?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}`:"");return D`<div class="wrap ${this.mapSrc?"":"solo"}" part="wrap">
|
|
849
|
+
${this.mapSrc?D`<div class="map"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>`:he}
|
|
711
850
|
<div class="info">
|
|
712
|
-
${this.heading?
|
|
713
|
-
${this.address?
|
|
714
|
-
${this.hours?
|
|
715
|
-
${this.phone?
|
|
716
|
-
${this.nearby.length?
|
|
717
|
-
${t?
|
|
851
|
+
${this.heading?D`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:he}
|
|
852
|
+
${this.address?D`<p class="row">${st("map-pin","20px")}<span>${this.address}</span></p>`:he}
|
|
853
|
+
${this.hours?D`<p class="row">${st("clock","20px")}<span>${this.hours}</span></p>`:he}
|
|
854
|
+
${this.phone?D`<p class="row">${st("phone","20px")}<a href=${`tel:${this.phone.replace(/\s+/g,"")}`}>${this.phone}</a></p>`:he}
|
|
855
|
+
${this.nearby.length?D`<ul>${this.nearby.map(e=>D`<li><span>${e.place}</span><span>${e.distance}</span></li>`)}</ul>`:he}
|
|
856
|
+
${t?D`<a class="go" href=${t}>${this.directionsText}${st("arrow-right","16px")}</a>`:he}
|
|
718
857
|
</div>
|
|
719
|
-
</div>`}};customElements.define("impakt-site-plan",
|
|
720
|
-
.card { background: ${
|
|
721
|
-
.h { margin: 0; font-family: ${
|
|
722
|
-
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${
|
|
723
|
-
.btn:hover { background: ${
|
|
724
|
-
.btn.quiet { color: ${
|
|
725
|
-
.small { margin: 0; ${
|
|
726
|
-
.visually-hidden { ${
|
|
727
|
-
`,
|
|
858
|
+
</div>`}};customElements.define("impakt-site-plan",wi);customElements.define("impakt-mortgage-calculator",Si);customElements.define("impakt-before-after",zi);customElements.define("impakt-sticky-bar",Ti);customElements.define("impakt-location-card",Mi);import{css as $t,html as k,nothing as W}from"./atomic-ui.js";import{say as q,pageLocale as Ka,ImpaktElement as we,focusRing as It,targetSize as Za,visuallyHidden as Ur,fontWeight as oe,space as g,spaceAround as xt,t as d,token as ft,type as ee}from"./atomic-ui.js";var Rt=$t`
|
|
859
|
+
.card { background: ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-shadow: ${d.shadowSm}, 0 0 0 1px ${d.hairline}; }
|
|
860
|
+
.h { margin: 0; font-family: ${d.fontHeading}; ${ee("2xl")} font-weight: ${oe("bold")}; color: ${d.textHeading}; }
|
|
861
|
+
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${g(2.5)} ${g(5)}; font: inherit; font-weight: ${oe("semibold")}; color: ${d.onBrand}; text-decoration: none; background: ${d.brand}; border: 0; border-radius: ${d.radiusLg}; cursor: pointer; }
|
|
862
|
+
.btn:hover { background: ${d.brandHover}; }
|
|
863
|
+
.btn.quiet { color: ${d.link}; background: transparent; box-shadow: inset 0 0 0 ${d.borderThin} ${d.border}; }
|
|
864
|
+
.small { margin: 0; ${ee("xs")} color: ${d.textMuted}; }
|
|
865
|
+
.visually-hidden { ${Ur} }
|
|
866
|
+
`,Ai=(s,t="GBP",e=0)=>{try{return new Intl.NumberFormat(Ka(),{style:"currency",currency:t,maximumFractionDigits:e,minimumFractionDigits:e}).format(s)}catch{return String(Math.round(s))}},Ja=k`<svg viewBox="0 0 20 12" width="20" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false"><path d="M0 6h18M13 1l5 5-5 5" /></svg>`,Li=class extends we{static{this.properties={heading:{type:String},plans:{type:Array},rows:{type:Array},buttonText:{type:String,attribute:"button-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Compare cover",this.plans=[],this.rows=[],this.buttonText="Choose",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...we.styles,It,Za,xt,Rt,$t`
|
|
728
867
|
:host { display: block; container-type: inline-size; }
|
|
729
|
-
.h { margin-block-end: ${
|
|
730
|
-
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${
|
|
731
|
-
.plan { position: relative; display: flex; flex-direction: column; gap: ${
|
|
732
|
-
|
|
733
|
-
.
|
|
734
|
-
.
|
|
735
|
-
.
|
|
736
|
-
.
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
li
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
868
|
+
.h { margin-block-end: ${g(5)}; }
|
|
869
|
+
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${g(4)}; }
|
|
870
|
+
.plan { --plan-accent: ${ft("color.accent.default","#ffd43b")}; --plan-on-accent: ${ft("color.accent.on","#111111")}; position: relative; display: flex; flex-direction: column; gap: ${g(3)}; padding: ${g(6)}; color: ${d.text}; border: ${d.borderThin} solid ${d.text}; border-radius: ${d.radiusSm}; box-shadow: none; }
|
|
871
|
+
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
872
|
+
.plan.top { background: ${d.text}; color: ${d.surfaceCard}; --plan-muted: color-mix(in srgb, ${d.surfaceCard} 72%, ${d.text}); }
|
|
873
|
+
.badge { align-self: flex-start; padding: 2px ${g(2)}; font-family: ${d.fontMono}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
874
|
+
.name { margin: 0; ${ee("lg")} font-weight: ${oe("medium")}; color: inherit; }
|
|
875
|
+
.price { margin: 0; font-family: ${d.fontHeading}; ${ee("4xl")} font-weight: ${oe("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
876
|
+
/* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */
|
|
877
|
+
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
878
|
+
.period { margin-inline-start: ${g(1)}; font-family: ${d.fontMono}; font-size: 0.8125rem; font-weight: ${oe("regular")}; letter-spacing: 0; color: var(--plan-muted, ${d.textMuted}); }
|
|
879
|
+
.note { margin: 0; ${ee("sm")} color: var(--plan-muted, ${d.textMuted}); }
|
|
880
|
+
ul { flex: 1; margin: 0; padding: ${g(3)} 0 0; list-style: none; display: grid; gap: ${g(2)}; align-content: start; }
|
|
881
|
+
li { display: flex; gap: ${g(2)}; ${ee("sm")} }
|
|
882
|
+
li[data-has='false'] { color: var(--plan-muted, ${d.textMuted}); }
|
|
883
|
+
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
884
|
+
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
885
|
+
.plan .btn { justify-content: space-between; gap: ${g(4)}; color: ${d.surfaceCard}; background: ${d.text}; border-radius: ${d.radiusSm}; box-shadow: none; }
|
|
886
|
+
.plan .btn:hover { background: ${d.brandHover}; }
|
|
887
|
+
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
888
|
+
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${d.surfaceCard}); }
|
|
889
|
+
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
890
|
+
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${g(6)}; } }
|
|
891
|
+
`]}has(t,e){return t.includes.split(",").map(i=>i.trim().toLowerCase()).includes(e.label.trim().toLowerCase())}choose(t,e){this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plan:t},bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}render(){return k`
|
|
892
|
+
${this.heading?k`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:W}
|
|
746
893
|
<div class="grid" style=${`--cols: ${Math.max(1,this.plans.length)}`}>
|
|
747
|
-
${this.plans.map(t
|
|
748
|
-
${t.badge
|
|
894
|
+
${this.plans.map(t=>k`<section class="card plan ${t.badge?"top":""}" aria-labelledby=${this.id_(`n-${t.id}`)}>
|
|
895
|
+
${t.badge?k`<span class="badge">${t.badge}</span>`:W}
|
|
749
896
|
<h3 class="name" id=${this.id_(`n-${t.id}`)}>${t.name}</h3>
|
|
750
|
-
<p class="price">${t.price}${t.period
|
|
751
|
-
${t.note
|
|
752
|
-
<ul>${this.rows.map(e=>{let i=this.has(t,e);return
|
|
753
|
-
${t.href
|
|
897
|
+
<p class="price">${t.price}${t.period?k` <span class="period">${t.period}</span>`:W}</p>
|
|
898
|
+
${t.note?k`<p class="note">${t.note}</p>`:W}
|
|
899
|
+
<ul>${this.rows.map(e=>{let i=this.has(t,e);return k`<li data-has=${String(i)}><span class="mark" aria-hidden="true">${i?"\u221A":"\u2013"}</span><span>${e.label}${i?k`<span class="visually-hidden">: ${q("included")}</span>`:k`<span class="not"> · ${q("not included")}</span>`}</span></li>`})}</ul>
|
|
900
|
+
${t.href?k`<a class="btn" href=${t.href} @click=${e=>this.choose(t,e)}><span>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></span>${Ja}</a>`:k`<button class="btn" type="button" @click=${e=>this.choose(t,e)}><span>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></span>${Ja}</button>`}
|
|
754
901
|
</section>`)}
|
|
755
|
-
</div>`}};function
|
|
902
|
+
</div>`}};function er(s,t){let e=/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(s),i=t&&!/^en\b/i.test(t)?`&hl=${encodeURIComponent(t.split("-")[0])}&cc_lang_pref=${encodeURIComponent(t.split("-")[0])}`:"";if(e)return`https://www.youtube-nocookie.com/embed/${e[1]}?autoplay=1&rel=0${i}`;let a=/vimeo\.com\/(?:video\/)?(\d+)/.exec(s);return a?`https://player.vimeo.com/video/${a[1]}?autoplay=1&dnt=1`:null}var Et=class extends we{static{this.properties={videoSrc:{type:String,attribute:"video-src"},label:{type:String},posterSrc:{type:String,attribute:"poster-src"},captionsSrc:{type:String,attribute:"captions-src"},transcriptHref:{type:String,attribute:"transcript-href"},playText:{type:String,attribute:"play-text"},ratio:{type:String,reflect:!0},look:{type:String,reflect:!0},caption:{type:String},duration:{type:String},transcript:{type:String},transcriptText:{type:String,attribute:"transcript-text"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.videoSrc="",this.label="Video",this.posterSrc="",this.captionsSrc="",this.transcriptHref="",this.playText="Play video",this.ratio="16:9",this.look="plain",this.caption="",this.duration="",this.transcript="",this.transcriptText="",this.playing=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...we.styles,It,xt,Rt,$t`
|
|
756
903
|
:host { display: block; }
|
|
757
|
-
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${
|
|
904
|
+
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${d.radiusXl}; background: #111; }
|
|
758
905
|
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
759
906
|
:host([ratio='1:1']) .frame { aspect-ratio: 1; }
|
|
760
907
|
:host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }
|
|
761
908
|
iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }
|
|
762
909
|
.play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }
|
|
763
|
-
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${
|
|
910
|
+
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${d.brand}; box-shadow: ${d.shadowLg}; }
|
|
764
911
|
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
765
|
-
.label { position: absolute; inset-inline: ${
|
|
766
|
-
.foot { margin: ${
|
|
767
|
-
.foot a { color: ${
|
|
912
|
+
.label { position: absolute; inset-inline: ${g(5)}; inset-block-end: ${g(4)}; ${ee("lg")} font-weight: ${oe("semibold")}; text-align: start; }
|
|
913
|
+
.foot { margin: ${g(2)} 0 0; ${ee("sm")} }
|
|
914
|
+
.foot a { color: ${d.link}; }
|
|
768
915
|
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
769
|
-
|
|
916
|
+
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
917
|
+
.window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${d.borderThin} solid var(--stage-rule); }
|
|
918
|
+
.bar { display: flex; align-items: center; gap: ${g(1.5)}; padding: ${g(3)} ${g(4)}; border-block-end: ${d.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
919
|
+
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
920
|
+
.bar .dot:first-child { background: ${ft("color.accent.default","#ffd43b")}; }
|
|
921
|
+
.bar .caption { margin-inline-start: ${g(1.5)}; font-family: ${d.fontMono}; font-size: 0.6875rem; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
922
|
+
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
923
|
+
:host([look='window']) .play { background: none; color: inherit; }
|
|
924
|
+
:host([look='window']) .disc { display: none; }
|
|
925
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${g(3)}; max-inline-size: calc(100% - 2 * ${g(5)}); box-sizing: border-box; padding: ${g(3)} ${g(5)}; ${ee("md")} font-weight: ${oe("medium")}; color: ${ft("color.accent.on","#111111")}; background: ${ft("color.accent.default","#ffd43b")}; }
|
|
926
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${ft("color.accent.default","#ffd43b")} 88%, #ffffff); }
|
|
927
|
+
:host([look='window']) .play:focus-visible { outline: none; }
|
|
928
|
+
:host([look='window']) .play:focus-visible .label { box-shadow: ${d.focusShadow}; }
|
|
929
|
+
.length { font-family: ${d.fontMono}; font-size: 0.6875rem; letter-spacing: ${d.trackingWide}; text-transform: uppercase; }
|
|
930
|
+
.transcript { margin-block-start: ${g(3)}; border-block: ${d.borderThin} solid ${d.text}; }
|
|
931
|
+
.transcript summary { ${Za} display: flex; align-items: center; gap: ${g(2)}; padding-block: ${g(3)}; cursor: pointer; font-weight: ${oe("medium")}; list-style: none; }
|
|
932
|
+
.transcript summary::-webkit-details-marker { display: none; }
|
|
933
|
+
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${d.fontMono}; }
|
|
934
|
+
.transcript[open] summary::before { content: '−'; }
|
|
935
|
+
.transcript .words { padding-block-end: ${g(4)}; color: ${d.textMuted}; display: grid; gap: ${g(3)}; max-inline-size: 65ch; }
|
|
936
|
+
.transcript p { margin: 0; }
|
|
937
|
+
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
938
|
+
`]}render(){let t=er(this.videoSrc,Ka(this)),e;this.videoSrc?t&&this.playing?e=k`<iframe src=${t} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`:t?e=k`${this.posterSrc?k`<img src=${this.posterSrc} alt="" />`:W}
|
|
770
939
|
<button class="play" type="button" @click=${()=>{this.playing=!0}}>
|
|
771
940
|
<span class="disc" aria-hidden="true"><svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></span>
|
|
772
|
-
<span class="label">${this.playText}<span class="visually-hidden">: ${this.label}</span></span>
|
|
773
|
-
</button>`:e
|
|
941
|
+
<span class="label">${this.playText}${this.duration?k` <span class="length">${this.duration}</span>`:W}<span class="visually-hidden">: ${this.label}</span></span>
|
|
942
|
+
</button>`:e=k`<video controls preload="metadata" poster=${this.posterSrc||W} aria-label=${this.label}>
|
|
774
943
|
<source src=${this.videoSrc} />
|
|
775
|
-
${this.captionsSrc
|
|
776
|
-
</video>`:e
|
|
777
|
-
|
|
944
|
+
${this.captionsSrc?k`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />`:W}
|
|
945
|
+
</video>`:e=k`<div class="empty">${q("Add a video address")}</div>`;let i=k`<div class="frame" part="frame">${e}</div>`,a=(this.transcript??"").split(/\n\s*\n/).map(r=>r.trim()).filter(Boolean);return k`${this.look==="window"?k`<div class="window" part="window">
|
|
946
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?k`<span class="caption">${this.caption}</span>`:W}</div>
|
|
947
|
+
${i}
|
|
948
|
+
</div>`:i}
|
|
949
|
+
${a.length?k`<details class="transcript" part="transcript"><summary>${this.transcriptText||q("Read the transcript")}</summary><div class="words">${a.map(r=>k`<p>${r}</p>`)}</div></details>`:W}
|
|
950
|
+
${this.transcriptHref?k`<p class="foot"><a href=${this.transcriptHref}>${q("Read the transcript")}<span class="visually-hidden">${q(" of {video}",{video:this.label})}</span></a></p>`:W}`}},Qa={mortgage:{heading:"Your home may be repossessed",text:"Your home may be repossessed if you do not keep up repayments on your mortgage."},"secured-loan":{heading:"Think carefully before securing other debts against your home",text:"Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it."},investment:{heading:"Capital at risk",text:"The value of investments can go down as well as up, and you may get back less than you put in."},insurance:{heading:"Important information",text:"Read the policy documents to check the cover suits your needs. Limits and exclusions apply."},custom:{heading:"",text:""}},Ei=class extends we{static{this.properties={kind:{type:String,reflect:!0},heading:{type:String},text:{type:String},firm:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.kind="mortgage",this.heading="",this.text="",this.firm="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...we.styles,xt,$t`
|
|
778
951
|
:host { display: block; }
|
|
779
|
-
.box { padding: ${
|
|
780
|
-
:host([kind='insurance']) .box { border-color: ${
|
|
781
|
-
strong { display: block; margin-block-end: ${
|
|
782
|
-
p { margin: 0; color: ${
|
|
952
|
+
.box { padding: ${g(5)}; border-inline-start: 6px solid ${d.warning}; border-radius: ${d.radiusLg}; background: ${d.warningSubtle}; }
|
|
953
|
+
:host([kind='insurance']) .box { border-color: ${d.info}; background: ${d.infoSubtle}; }
|
|
954
|
+
strong { display: block; margin-block-end: ${g(1)}; ${ee("md")} color: ${d.text}; }
|
|
955
|
+
p { margin: 0; color: ${d.text}; }
|
|
783
956
|
/* Muted text is proved against the card colour, not the notice's, so the firm's line is in the text colour (1.4.3). */
|
|
784
|
-
.firm { margin-block-start: ${
|
|
785
|
-
`]}render(){let t=
|
|
786
|
-
${e
|
|
787
|
-
${i
|
|
788
|
-
${this.firm
|
|
789
|
-
</aside>`}},
|
|
957
|
+
.firm { margin-block-start: ${g(3)}; ${ee("sm")} color: ${d.text}; }
|
|
958
|
+
`]}render(){let t=Qa[this.kind]??Qa.custom,e=this.heading||(t.heading?q(t.heading):""),i=this.text||(t.text?q(t.text):"");return k`<aside class="box" part="box" aria-label=${e||q("Important information")}>
|
|
959
|
+
${e?k`<strong>${e}</strong>`:W}
|
|
960
|
+
${i?k`<p>${i}</p>`:W}
|
|
961
|
+
${this.firm?k`<p class="firm">${this.firm}</p>`:W}
|
|
962
|
+
</aside>`}},Ve={standard:[{from:0,rate:0},{from:125e3,rate:2},{from:25e4,rate:5},{from:925e3,rate:10},{from:15e5,rate:12}],firstTime:[{from:0,rate:0},{from:3e5,rate:5}],firstTimeLimit:5e5,additionalSurcharge:5};function $a(s,t,e=0){let i=0;return t.forEach((a,r)=>{let n=t[r+1]?.from??1/0;s>a.from&&(i+=(Math.min(s,n)-a.from)*(a.rate+e)/100)}),Math.round(i)}function tr(s,t){return s<=0?0:t==="first-time"&&s<=Ve.firstTimeLimit?$a(s,Ve.firstTime):t==="additional"?s<4e4?0:$a(s,Ve.standard,Ve.additionalSurcharge):$a(s,Ve.standard)}var ir=$t`
|
|
790
963
|
:host { display: block; container-type: inline-size; }
|
|
791
964
|
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
|
|
792
|
-
.inputs { display: flex; flex-direction: column; gap: ${
|
|
793
|
-
label, legend { display: block; ${
|
|
965
|
+
.inputs { display: flex; flex-direction: column; gap: ${g(5)}; padding: ${g(8)}; }
|
|
966
|
+
label, legend { display: block; ${ee("sm")} font-weight: ${oe("semibold")}; margin-block-end: ${g(1.5)}; padding: 0; }
|
|
794
967
|
fieldset { margin: 0; padding: 0; border: 0; }
|
|
795
|
-
.choices { display: flex; flex-wrap: wrap; gap: ${
|
|
796
|
-
.choices label { display: inline-flex; align-items: center; gap: ${
|
|
797
|
-
.choices input { accent-color: ${
|
|
798
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
799
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${
|
|
800
|
-
.caption { margin: 0; ${
|
|
801
|
-
output { display: block; font-family: ${
|
|
802
|
-
.line { margin: 0; ${
|
|
803
|
-
.foot { grid-column: 1 / -1; padding: ${
|
|
968
|
+
.choices { display: flex; flex-wrap: wrap; gap: ${g(2)}; }
|
|
969
|
+
.choices label { display: inline-flex; align-items: center; gap: ${g(2)}; margin: 0; padding: ${g(2)} ${g(3)}; font-weight: ${oe("regular")}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; cursor: pointer; }
|
|
970
|
+
.choices input { accent-color: ${d.brand}; }
|
|
971
|
+
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${g(2)} ${g(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; }
|
|
972
|
+
.result { display: flex; flex-direction: column; justify-content: center; gap: ${g(2)}; padding: ${g(8)}; color: ${d.onBrand}; background: ${d.brand}; }
|
|
973
|
+
.caption { margin: 0; ${ee("sm")} opacity: 0.85; }
|
|
974
|
+
output { display: block; font-family: ${d.fontHeading}; ${ee("4xl")} font-weight: ${oe("bold")}; }
|
|
975
|
+
.line { margin: 0; ${ee("sm")} }
|
|
976
|
+
.foot { grid-column: 1 / -1; padding: ${g(4)} ${g(8)}; background: ${d.surfaceSubtle}; }
|
|
804
977
|
/* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
|
|
805
|
-
.foot .small { color: ${
|
|
806
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${
|
|
807
|
-
`,
|
|
978
|
+
.foot .small { color: ${d.text}; }
|
|
979
|
+
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${g(5)}; } .foot { padding: ${g(4)} ${g(5)}; } }
|
|
980
|
+
`,Bi=class extends we{static{this.properties={heading:{type:String},price:{type:Number},buyer:{type:String},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="How much stamp duty would you pay?",this.price=385e3,this.buyer="first-time",this.smallPrint="Based on Stamp Duty Land Tax rates in England and Northern Ireland from 1 April 2025. Scotland and Wales have their own taxes. Check what you would pay on GOV.UK.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...we.styles,It,xt,Rt,ir]}render(){let t=tr(this.price,this.buyer),e=this.price>0?t/this.price*100:0,i=[["first-time",q("First home")],["mover",q("Moving home")],["additional",q("Second home")]];return k`<div class="card wrap" part="wrap">
|
|
808
981
|
<div class="inputs">
|
|
809
|
-
${this.heading
|
|
810
|
-
<div><label for=${this.id_("price")}>${
|
|
982
|
+
${this.heading?k`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:W}
|
|
983
|
+
<div><label for=${this.id_("price")}>${q("Price of the home (\xA3)")}</label>
|
|
811
984
|
<input id=${this.id_("price")} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this.price)} @input=${a=>{this.price=Number(a.target.value)||0}} /></div>
|
|
812
|
-
<fieldset><legend>${
|
|
813
|
-
${i.map(([a,r])
|
|
985
|
+
<fieldset><legend>${q("Are you buying")}</legend><div class="choices">
|
|
986
|
+
${i.map(([a,r])=>k`<label><input type="radio" name=${this.id_("buyer")} .checked=${this.buyer===a} @change=${()=>{this.buyer=a}} />${r}</label>`)}
|
|
814
987
|
</div></fieldset>
|
|
815
988
|
</div>
|
|
816
989
|
<div class="result" aria-live="polite">
|
|
817
|
-
<p class="caption">${
|
|
818
|
-
<output for=${this.id_("price")}>${
|
|
819
|
-
<p class="line">${t?
|
|
820
|
-
${this.buyer==="first-time"&&this.price>
|
|
990
|
+
<p class="caption">${q("Stamp duty to pay")}</p>
|
|
991
|
+
<output for=${this.id_("price")}>${Ai(t)}</output>
|
|
992
|
+
<p class="line">${t?q("About {rate}% of the price",{rate:e.toFixed(1)}):q("Nothing to pay at this price")}</p>
|
|
993
|
+
${this.buyer==="first-time"&&this.price>Ve.firstTimeLimit?k`<p class="line">${q("First-time buyer relief stops above {limit}, so the usual rates apply.",{limit:Ai(Ve.firstTimeLimit)})}</p>`:W}
|
|
821
994
|
</div>
|
|
822
|
-
${this.smallPrint
|
|
823
|
-
</div>`}},
|
|
824
|
-
<input id=${this.id_(i)} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this[i])} @input=${this.field(i)} /></div>`;return
|
|
995
|
+
${this.smallPrint?k`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:W}
|
|
996
|
+
</div>`}},Ii=class extends we{static{this.properties={heading:{type:String},income:{type:Number},secondIncome:{type:Number,attribute:"second-income"},deposit:{type:Number},timesIncome:{type:Number,attribute:"times-income"},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="How much could you borrow?",this.income=45e3,this.secondIncome=0,this.deposit=3e4,this.timesIncome=4.5,this.smallPrint="This is a guide, not a mortgage offer. What a lender offers depends on your circumstances. Your home may be repossessed if you do not keep up repayments on your mortgage.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...we.styles,It,xt,Rt,ir]}field(t){return e=>{this[t]=Number(e.target.value)||0}}render(){let t=Math.max(0,(this.income+this.secondIncome)*this.timesIncome),e=(i,a)=>k`<div><label for=${this.id_(i)}>${a}</label>
|
|
997
|
+
<input id=${this.id_(i)} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this[i])} @input=${this.field(i)} /></div>`;return k`<div class="card wrap" part="wrap">
|
|
825
998
|
<div class="inputs">
|
|
826
|
-
${this.heading
|
|
827
|
-
${e("income",
|
|
828
|
-
${e("secondIncome",
|
|
829
|
-
${e("deposit",
|
|
999
|
+
${this.heading?k`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:W}
|
|
1000
|
+
${e("income",q("Your yearly income before tax (\xA3)"))}
|
|
1001
|
+
${e("secondIncome",q("A second person\u2019s income, if buying together (\xA3)"))}
|
|
1002
|
+
${e("deposit",q("Your deposit (\xA3)"))}
|
|
830
1003
|
</div>
|
|
831
1004
|
<div class="result" aria-live="polite">
|
|
832
|
-
<p class="caption">${
|
|
833
|
-
<output>${
|
|
834
|
-
<p class="line">${
|
|
1005
|
+
<p class="caption">${q("You could borrow about")}</p>
|
|
1006
|
+
<output>${Ai(t)}</output>
|
|
1007
|
+
<p class="line">${q("With your deposit, that\u2019s a home of about {amount}.",{amount:Ai(t+this.deposit)})}</p>
|
|
835
1008
|
</div>
|
|
836
|
-
${this.smallPrint
|
|
837
|
-
</div>`}},
|
|
838
|
-
Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",this.buttonText="Ask for a call back",this.doneText="Thanks. We\u2019ll call you at the time you chose.",this.headingLevel=2,this.sent=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...
|
|
1009
|
+
${this.smallPrint?k`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:W}
|
|
1010
|
+
</div>`}},Bt=class extends we{static{this.properties={heading:{type:String},phone:{type:String},hours:{type:String},email:{type:String},callbackHeading:{type:String,attribute:"callback-heading"},buttonText:{type:String,attribute:"button-text"},doneText:{type:String,attribute:"done-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Talk to us",this.phone="0800 000 0000",this.hours=`Monday to Friday, 9am to 6pm
|
|
1011
|
+
Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",this.buttonText="Ask for a call back",this.doneText="Thanks. We\u2019ll call you at the time you chose.",this.headingLevel=2,this.sent=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...we.styles,It,xt,Rt,$t`
|
|
839
1012
|
:host { display: block; container-type: inline-size; }
|
|
840
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
841
|
-
.phone { display: inline-block; margin: ${
|
|
842
|
-
.hours { margin: 0; white-space: pre-line; color: ${
|
|
843
|
-
.email { display: inline-flex; align-items: center; min-block-size: ${
|
|
844
|
-
form { display: grid; gap: ${
|
|
845
|
-
.sub { margin: 0; ${
|
|
846
|
-
label { display: block; ${
|
|
847
|
-
input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
848
|
-
.done { margin: 0; padding: ${
|
|
849
|
-
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${
|
|
850
|
-
`]}submit(t){t.preventDefault();let e=new FormData(t.target),i={name:String(e.get("name")??""),phone:String(e.get("phone")??""),when:String(e.get("when")??"")};this.dispatchEvent(new CustomEvent("impakt-submit",{detail:i,bubbles:!0,composed:!0})),this.sent=!0}render(){return
|
|
1013
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${g(6)}; padding: ${g(8)}; }
|
|
1014
|
+
.phone { display: inline-block; margin: ${g(3)} 0; font-family: ${d.fontHeading}; ${ee("3xl")} font-weight: ${oe("bold")}; color: ${d.link}; text-decoration: none; }
|
|
1015
|
+
.hours { margin: 0; white-space: pre-line; color: ${d.textMuted}; }
|
|
1016
|
+
.email { display: inline-flex; align-items: center; min-block-size: ${d.targetMin}; margin-block-start: ${g(3)}; color: ${d.link}; overflow-wrap: anywhere; }
|
|
1017
|
+
form { display: grid; gap: ${g(3)}; padding: ${g(5)}; border-radius: ${d.radiusLg}; background: ${d.surfaceInset}; }
|
|
1018
|
+
.sub { margin: 0; ${ee("lg")} font-weight: ${oe("bold")}; color: ${d.text}; }
|
|
1019
|
+
label { display: block; ${ee("sm")} font-weight: ${oe("semibold")}; margin-block-end: ${g(1)}; }
|
|
1020
|
+
input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${g(2)} ${g(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; }
|
|
1021
|
+
.done { margin: 0; padding: ${g(5)}; border-radius: ${d.radiusLg}; background: ${d.successSubtle}; color: ${d.successText}; font-weight: ${oe("semibold")}; }
|
|
1022
|
+
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${g(5)}; } }
|
|
1023
|
+
`]}submit(t){t.preventDefault();let e=new FormData(t.target),i={name:String(e.get("name")??""),phone:String(e.get("phone")??""),when:String(e.get("when")??"")};this.dispatchEvent(new CustomEvent("impakt-submit",{detail:i,bubbles:!0,composed:!0})),this.sent=!0}render(){return k`<div class="card wrap" part="wrap">
|
|
851
1024
|
<div>
|
|
852
|
-
${this.heading
|
|
853
|
-
${this.phone
|
|
854
|
-
${this.hours
|
|
855
|
-
${this.email
|
|
1025
|
+
${this.heading?k`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:W}
|
|
1026
|
+
${this.phone?k`<a class="phone" href=${`tel:${this.phone.replace(/[^\d+]/g,"")}`}>${this.phone}</a>`:W}
|
|
1027
|
+
${this.hours?k`<p class="hours">${this.hours}</p>`:W}
|
|
1028
|
+
${this.email?k`<a class="email" href=${`mailto:${this.email}`}>${this.email}</a>`:W}
|
|
856
1029
|
</div>
|
|
857
|
-
${this.callbackHeading?this.sent
|
|
1030
|
+
${this.callbackHeading?this.sent?k`<p class="done" role="status">${this.doneText}</p>`:k`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
|
|
858
1031
|
<p class="sub" id=${this.id_("cb")}>${this.callbackHeading}</p>
|
|
859
|
-
<div><label for=${this.id_("name")}>${
|
|
860
|
-
<div><label for=${this.id_("tel")}>${
|
|
861
|
-
<div><label for=${this.id_("when")}>${
|
|
1032
|
+
<div><label for=${this.id_("name")}>${q("Your name")}</label><input id=${this.id_("name")} name="name" autocomplete="name" required /></div>
|
|
1033
|
+
<div><label for=${this.id_("tel")}>${q("Phone number")}</label><input id=${this.id_("tel")} name="phone" type="tel" autocomplete="tel" required /></div>
|
|
1034
|
+
<div><label for=${this.id_("when")}>${q("Best time to call")}</label><select id=${this.id_("when")} name="when"><option value="Morning">${q("Morning")}</option><option value="Afternoon">${q("Afternoon")}</option><option value="Evening">${q("Evening")}</option></select></div>
|
|
862
1035
|
<button class="btn" type="submit">${this.buttonText}</button>
|
|
863
|
-
</form>`:
|
|
864
|
-
</div>`}};
|
|
1036
|
+
</form>`:W}
|
|
1037
|
+
</div>`}};Et.createProperty("playing",{state:!0});Bt.createProperty("sent",{state:!0});customElements.define("impakt-plan-comparison",Li);customElements.define("impakt-video",Et);customElements.define("impakt-regulatory-notice",Ei);customElements.define("impakt-stamp-duty-calculator",Bi);customElements.define("impakt-affordability-calculator",Ii);customElements.define("impakt-contact-block",Bt);import{css as Yr,html as O,nothing as ce,unsafeCSS as ar}from"./atomic-ui.js";import{ImpaktElement as rr,pageLocale as sr,say as J,focusRing as Gr,targetSize as xa,visuallyHidden as nr,fontSize as ya,fontWeight as Je,space as x,spaceAround as Xr,t as b,token as or,type as Te,toneOf as Ri}from"./atomic-ui.js";var Hi=s=>s.reduce((t,e)=>t+e,0),lr=(s,t)=>s.find(e=>typeof e.below=="number"&&t<e.below)??s.at(-1);function Ht(s,t,e){let i=s.flatMap(c=>(t[c.id]??[]).flatMap(f=>c.choices.filter(m=>m.id===f))),a=Hi(i.map(c=>c.cost??0)),r=Hi(i.map(c=>c.weeks??0));for(let c of i)a*=c.costFactor??1,r*=c.weeksFactor??1;let n=(lr(e.teams,a)?.engineers??1)+Hi(i.map(c=>c.engineers??0));return{cost:a,low:Math.round(a*e.low),high:Math.round(a*e.high),weeks:Math.max(e.minWeeks,Math.round(r)),engineers:n,way:lr(e.ways,a)?.text??""}}function va(s,t){let e=s.map(a=>typeof a.share=="number"?Math.max(1,Math.round(t*a.share)):0),i=Math.max(1,t-Hi(e));return s.map((a,r)=>typeof a.share=="number"?e[r]:i)}var Ni=class extends rr{constructor(){super();this.at=0;this.answers={};this.tip="";this.copied="";this.started=!1;this.questions=[],this.teams=[],this.ways=[],this.phases=[],this.low=.85,this.high=1.25,this.minWeeks=1,this.currency="GBP",this.unit=1,this.intro="",this.budgetLabel="Indicative budget",this.resultHeading="Your estimate",this.teamText="{n} engineers",this.teamTextOne="1 engineer",this.note="",this.contactHref="",this.sendLabel="Send this to us",this.layout="wizard",this.wayLabel="",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={questions:{type:Array},teams:{type:Array},ways:{type:Array},phases:{type:Array},low:{type:Number},high:{type:Number},minWeeks:{type:Number,attribute:"min-weeks"},currency:{type:String},unit:{type:Number},intro:{type:String},budgetLabel:{type:String,attribute:"budget-label"},resultHeading:{type:String,attribute:"result-heading"},teamText:{type:String,attribute:"team-text"},teamTextOne:{type:String,attribute:"team-text-one"},note:{type:String},contactHref:{type:String,attribute:"contact-href"},sendLabel:{type:String,attribute:"send-label"},layout:{type:String,reflect:!0},wayLabel:{type:String,attribute:"way-label"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...rr.styles,Xr,Gr,Yr`
|
|
865
1038
|
:host { display: block; container-type: inline-size; }
|
|
866
1039
|
[hidden] { display: none !important; }
|
|
867
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${
|
|
868
|
-
.mono { font-family: ${
|
|
869
|
-
.sr-only { ${
|
|
1040
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${x(10)}; align-items: start; }
|
|
1041
|
+
.mono { font-family: ${b.fontMono}; font-size: ${ya("xs")}; letter-spacing: 0.04em; text-transform: uppercase; color: ${b.textMuted}; margin: 0; }
|
|
1042
|
+
.sr-only { ${nr} }
|
|
870
1043
|
|
|
871
|
-
.progress { display: grid; gap: ${
|
|
1044
|
+
.progress { display: grid; gap: ${x(2)}; margin-block-end: ${x(6)}; }
|
|
872
1045
|
.bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }
|
|
873
|
-
.bar i { display: block; block-size: 100%; background: ${
|
|
1046
|
+
.bar i { display: block; block-size: 100%; background: ${b.brand}; transition: inline-size 300ms ease; }
|
|
874
1047
|
|
|
875
1048
|
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
|
|
876
|
-
legend { padding: 0; margin-block-end: ${
|
|
877
|
-
.q { margin: 0; font-family: ${
|
|
878
|
-
.hint { margin: 0 0 ${
|
|
1049
|
+
legend { padding: 0; margin-block-end: ${x(2)}; }
|
|
1050
|
+
.q { margin: 0; font-family: ${b.fontHeading}; font-weight: ${Je("bold")}; ${Te("3xl")} letter-spacing: ${b.trackingTight}; color: ${b.textHeading}; outline: none; }
|
|
1051
|
+
.hint { margin: 0 0 ${x(6)}; color: ${b.textMuted}; }
|
|
879
1052
|
|
|
880
|
-
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1053
|
+
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${x(3)}; }
|
|
881
1054
|
.choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
882
|
-
.choice { position: relative; display: grid; gap: ${
|
|
883
|
-
.choice:hover { border-color: ${
|
|
884
|
-
.choice input { ${
|
|
885
|
-
.choice:has(input:checked) { border-color: ${
|
|
886
|
-
.choice:has(input:focus-visible) { box-shadow: ${
|
|
887
|
-
.many .choice { padding: ${
|
|
888
|
-
.label { font-weight: ${
|
|
889
|
-
.small { ${
|
|
1055
|
+
.choice { position: relative; display: grid; gap: ${x(1)}; align-content: start; padding: ${x(4)}; border: ${b.borderThin} solid ${b.border}; border-radius: ${b.radiusLg}; background: ${b.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
|
|
1056
|
+
.choice:hover { border-color: ${b.borderStrong}; }
|
|
1057
|
+
.choice input { ${nr} }
|
|
1058
|
+
.choice:has(input:checked) { border-color: ${b.brand}; box-shadow: inset 0 0 0 1px ${b.brand}; background: ${b.brandSubtle}; }
|
|
1059
|
+
.choice:has(input:focus-visible) { box-shadow: ${b.focusShadow}; }
|
|
1060
|
+
.many .choice { padding: ${x(3)}; }
|
|
1061
|
+
.label { font-weight: ${Je("semibold")}; }
|
|
1062
|
+
.small { ${Te("sm")} color: ${b.textMuted}; }
|
|
890
1063
|
/* A tick for a picked feature, drawn in the corner. */
|
|
891
|
-
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${
|
|
1064
|
+
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${x(2)}; inset-inline-end: ${x(3)}; color: ${b.brand}; font-weight: ${Je("bold")}; }
|
|
892
1065
|
|
|
893
|
-
.scale { display: grid; gap: ${
|
|
894
|
-
.scale input { inline-size: 100%; accent-color: ${
|
|
895
|
-
.ticks { display: flex; justify-content: space-between; ${
|
|
896
|
-
.ticks span[aria-current] { color: ${
|
|
1066
|
+
.scale { display: grid; gap: ${x(3)}; }
|
|
1067
|
+
.scale input { inline-size: 100%; accent-color: ${b.brand}; ${xa} }
|
|
1068
|
+
.ticks { display: flex; justify-content: space-between; ${Te("sm")} color: ${b.textMuted}; }
|
|
1069
|
+
.ticks span[aria-current] { color: ${b.text}; font-weight: ${Je("semibold")}; }
|
|
897
1070
|
.now { margin: 0; }
|
|
898
1071
|
|
|
899
|
-
.nav { display: flex; gap: ${
|
|
900
|
-
button, .send { ${
|
|
901
|
-
.primary, .send { background: ${
|
|
902
|
-
.primary:hover, .send:hover { background: ${
|
|
903
|
-
.secondary { background: transparent; color: ${
|
|
904
|
-
.secondary:hover { background: ${
|
|
1072
|
+
.nav { display: flex; gap: ${x(3)}; margin-block-start: ${x(8)}; }
|
|
1073
|
+
button, .send { ${xa} display: inline-flex; align-items: center; justify-content: center; gap: ${x(2)}; padding: ${x(2.5)} ${x(5)}; border-radius: ${b.radiusLg}; font: inherit; font-weight: ${Je("semibold")}; cursor: pointer; text-decoration: none; border: ${b.borderThin} solid transparent; }
|
|
1074
|
+
.primary, .send { background: ${b.brand}; color: ${b.onBrand}; }
|
|
1075
|
+
.primary:hover, .send:hover { background: ${b.brandHover}; }
|
|
1076
|
+
.secondary { background: transparent; color: ${b.text}; border-color: ${b.borderStrong}; }
|
|
1077
|
+
.secondary:hover { background: ${b.surfaceSubtle}; }
|
|
905
1078
|
|
|
906
|
-
.panel { position: sticky; inset-block-start: ${
|
|
1079
|
+
.panel { position: sticky; inset-block-start: ${x(6)}; overflow: hidden; isolation: isolate; padding: ${x(8)}; border-radius: ${b.radiusXl}; background: ${b.surfaceCard}; box-shadow: ${b.shadowMd}; display: grid; gap: ${x(2)}; }
|
|
907
1080
|
/* The glow behind the budget grows as the product does. */
|
|
908
|
-
.glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${
|
|
909
|
-
.range { margin: 0; font-family: ${
|
|
910
|
-
.weeks { margin: 0; ${
|
|
911
|
-
.tip { margin: ${
|
|
1081
|
+
.glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${ar(Ri(1,0))} 45%, transparent), color-mix(in srgb, ${ar(Ri(2,1))} 25%, transparent) 45%, transparent 70%); transform: scale(var(--s, 0.7)); transform-origin: 70% 30%; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
|
|
1082
|
+
.range { margin: 0; font-family: ${b.fontHeading}; font-weight: ${Je("bold")}; font-size: ${ya("5xl")}; line-height: 1; letter-spacing: ${b.trackingTight}; color: ${b.textHeading}; }
|
|
1083
|
+
.weeks { margin: 0; ${Te("lg")} }
|
|
1084
|
+
.tip { margin: ${x(4)} 0 0; padding-block-start: ${x(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${b.textMuted}; }
|
|
912
1085
|
|
|
913
|
-
.result { display: grid; gap: ${
|
|
914
|
-
.summary { margin: 0; ${
|
|
1086
|
+
.result { display: grid; gap: ${x(6)}; }
|
|
1087
|
+
.summary { margin: 0; ${Te("xl")} text-wrap: pretty; }
|
|
915
1088
|
.phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }
|
|
916
1089
|
.phases i { display: block; }
|
|
917
|
-
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${
|
|
918
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
1090
|
+
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${x(2)} ${x(5)}; }
|
|
1091
|
+
.legend li { display: inline-flex; align-items: center; gap: ${x(2)}; }
|
|
919
1092
|
.legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }
|
|
920
|
-
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
921
|
-
dt { margin: 0 0 ${
|
|
922
|
-
dd { margin: 0; font-weight: ${
|
|
923
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
924
|
-
.note { margin: 0; ${
|
|
925
|
-
.status { margin: 0; ${
|
|
1093
|
+
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${x(4)}; }
|
|
1094
|
+
dt { margin: 0 0 ${x(1)}; }
|
|
1095
|
+
dd { margin: 0; font-weight: ${Je("semibold")}; }
|
|
1096
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${x(3)}; }
|
|
1097
|
+
.note { margin: 0; ${Te("sm")} color: ${b.textMuted}; }
|
|
1098
|
+
.status { margin: 0; ${Te("sm")} }
|
|
926
1099
|
|
|
927
1100
|
@container (max-width: 48rem) {
|
|
928
|
-
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
1101
|
+
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${x(8)}; }
|
|
929
1102
|
/* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it
|
|
930
1103
|
and it never widens the page (1.4.10). */
|
|
931
1104
|
.panel { position: relative; inset-block-start: auto; }
|
|
@@ -933,152 +1106,223 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
933
1106
|
}
|
|
934
1107
|
@container (max-width: 30rem) {
|
|
935
1108
|
.choices { grid-template-columns: minmax(0, 1fr); }
|
|
936
|
-
.range { font-size: ${
|
|
1109
|
+
.range { font-size: ${ya("4xl")}; }
|
|
1110
|
+
}
|
|
1111
|
+
/* layout="all": every question at once, and the result as an ink panel beside them. */
|
|
1112
|
+
.all { --accent: ${or("color.accent.default","#ffd43b")}; --on-accent: ${or("color.accent.on","#111111")}; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'questions panel' 'note panel'; grid-template-rows: auto 1fr; column-gap: ${x(2.5)}; align-items: stretch; }
|
|
1113
|
+
.all .questions { grid-area: questions; display: grid; gap: ${x(6)}; padding: ${x(8)} ${x(8)} ${x(4)}; background: ${b.surfaceCard}; border: ${b.borderThin} solid ${b.text}; border-block-end: 0; }
|
|
1114
|
+
.all .foot { grid-area: note; padding: 0 ${x(8)} ${x(8)}; background: ${b.surfaceCard}; border: ${b.borderThin} solid ${b.text}; border-block-start: 0; }
|
|
1115
|
+
.all .foot .note { ${Te("md")} }
|
|
1116
|
+
.all .ink { grid-area: panel; display: flex; flex-direction: column; gap: ${x(3)}; padding: ${x(8)}; background: ${b.text}; color: ${b.surfaceCard}; --muted: color-mix(in srgb, ${b.surfaceCard} 72%, ${b.text}); --line: color-mix(in srgb, ${b.surfaceCard} 18%, ${b.text}); }
|
|
1117
|
+
.all .ink .mono { color: var(--muted); font-size: 0.6875rem; letter-spacing: ${b.trackingWide}; }
|
|
1118
|
+
/* The accent on ink only where the theme says the pair reads; in dark the panel turns to paper and the range keeps its words. */
|
|
1119
|
+
.all .ink .range { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); font-size: clamp(2.5rem, 7cqi, 3.5rem); letter-spacing: -0.04em; }
|
|
1120
|
+
.all .ink .weeks { font-size: 1.25rem; line-height: 1.3; padding-block-end: ${x(3)}; }
|
|
1121
|
+
.all .rows { list-style: none; margin: 0; padding: 0; }
|
|
1122
|
+
.all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${x(4)}; padding-block: ${x(3.5)}; border-block-start: ${b.borderThin} solid var(--line); }
|
|
1123
|
+
.all .rows .length { font-family: ${b.fontMono}; ${Te("sm")} color: var(--muted); white-space: nowrap; }
|
|
1124
|
+
.all .cta { ${xa} display: flex; align-items: center; justify-content: space-between; gap: ${x(4)}; min-block-size: 44px; padding: ${x(3)} ${x(5)}; ${Te("md")} font-weight: ${Je("medium")}; color: var(--on-accent); background: var(--accent); text-decoration: none; }
|
|
1125
|
+
.all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }
|
|
1126
|
+
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${b.text}, 0 0 0 4px ${b.surfaceCard}; }
|
|
1127
|
+
.all .way { margin: 0; ${Te("sm")} color: var(--muted); }
|
|
1128
|
+
@container (max-width: 48rem) {
|
|
1129
|
+
.all { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel' 'note'; grid-template-rows: auto; column-gap: 0; }
|
|
1130
|
+
.all .questions { padding: ${x(6)} ${x(5)}; border-block-end: ${b.borderThin} solid ${b.text}; }
|
|
1131
|
+
.all .foot { padding: ${x(4)} 0 0; background: none; border: 0; }
|
|
1132
|
+
.all .ink { padding: ${x(6)} ${x(5)}; }
|
|
937
1133
|
}
|
|
938
1134
|
@media (forced-colors: active) {
|
|
1135
|
+
.all .ink { border: 1px solid CanvasText; }
|
|
1136
|
+
.all .cta { border: 1px solid ButtonText; }
|
|
939
1137
|
.choice:has(input:checked) { outline: 3px solid Highlight; }
|
|
940
1138
|
.bar i, .phases i, .legend li::before { background: CanvasText !important; }
|
|
941
1139
|
.glow { display: none; }
|
|
942
1140
|
}
|
|
943
|
-
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let i=(e.start??[]).filter(a=>e.choices.some(r=>r.id===a));return e.kind==="many"?[e.id,i]:[e.id,[i[0]??e.choices[0]?.id].filter(a=>!!a)]})),this.at=0,this.tip="",this.copied=""}willUpdate(e){(e.has("questions")||!this.started)&&(this.reset(),this.started=!0)}get rules(){return{low:this.low,high:this.high,minWeeks:this.minWeeks,teams:this.teams??[],ways:this.ways??[]}}money(e){try{return new Intl.NumberFormat(
|
|
1141
|
+
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let i=(e.start??[]).filter(a=>e.choices.some(r=>r.id===a));return e.kind==="many"?[e.id,i]:[e.id,[i[0]??e.choices[0]?.id].filter(a=>!!a)]})),this.at=0,this.tip="",this.copied=""}willUpdate(e){(e.has("questions")||!this.started)&&(this.reset(),this.started=!0)}get rules(){return{low:this.low,high:this.high,minWeeks:this.minWeeks,teams:this.teams??[],ways:this.ways??[]}}money(e){try{return new Intl.NumberFormat(sr(this),{style:"currency",currency:this.currency||"GBP",notation:"compact",maximumFractionDigits:0}).format(e*(this.unit||1))}catch{return String(e*(this.unit||1))}}listOf(e){try{return new Intl.ListFormat(sr(this),{type:"conjunction"}).format(e)}catch{return e.join(", ")}}weeksWord(e){return e===1?J("{n} week",{n:e}):J("{n} weeks",{n:e})}get most(){let e=this.questions??[],i=Object.fromEntries(e.map(a=>{if(a.kind==="many")return[a.id,a.choices.map(n=>n.id)];let r=[...a.choices].sort((n,c)=>(c.cost??0)*(c.costFactor??1)-(n.cost??0)*(n.costFactor??1))[0];return[a.id,r?[r.id]:[]]}));return Ht(e,i,this.rules).high||1}summaryOf(e){let i=this.questions??[],a=i.find(h=>h.kind==="one"),r=a?a.choices.find(h=>h.id===this.answers[a.id]?.[0]):void 0,n=i.filter(h=>h.kind==="many"&&h.inSummary!==!1).flatMap(h=>(this.answers[h.id]??[]).map(I=>{let de=h.choices.find(mt=>mt.id===I);return de?de.phrase||de.label:I})),c=r?r.phrase||r.label:"",f=c?n.length?J("You are building {thing} with {list}.",{thing:c,list:this.listOf(n)}):J("You are building {thing}.",{thing:c}):"",m=J("Expect {range} and about {weeks} to a first release.",{range:this.rangeOf(e),weeks:this.weeksWord(e.weeks)});return f?`${f} ${m}`:m}rangeOf(e){return J("{low} to {high}",{low:this.money(e.low),high:this.money(e.high)})}teamOf(e){return e===1?this.teamTextOne:this.teamText.replace("{n}",String(e))}pick(e,i,a){let r=this.answers[e.id]??[];this.answers={...this.answers,[e.id]:e.kind==="many"?a?[...r.filter(n=>n!==i.id),i.id]:r.filter(n=>n!==i.id):[i.id]},a&&i.tip&&(this.tip=i.tip),this.requestUpdate()}go(e){let i=(this.questions??[]).length;this.at=Math.max(0,Math.min(i,e)),this.copied="",this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot.querySelector(".current .q")?.focus({preventScroll:!0}))}result(){let e=Ht(this.questions??[],this.answers,this.rules);return{low:e.low*(this.unit||1),high:e.high*(this.unit||1),weeks:e.weeks,engineers:e.engineers,way:e.way,summary:this.textOf(e),answers:this.answers}}textOf(e){let i=[this.summaryOf(e),`${this.teamOf(e.engineers)}.`];e.way&&i.push(`${e.way}.`);let a=(this.questions??[]).filter(n=>n.short&&n.kind!=="many").map(n=>{let c=n.choices.find(f=>f.id===this.answers[n.id]?.[0]);return c?`${n.short}: ${c.label}.`:""}).filter(Boolean),r=(this.questions??[]).filter(n=>n.short&&n.kind==="many"&&n.inSummary===!1).map(n=>{let c=(this.answers[n.id]??[]).map(f=>n.choices.find(m=>m.id===f)?.label??f);return c.length?`${n.short}: ${this.listOf(c)}.`:""}).filter(Boolean);return[...i,...r,...a].join(" ")}send(e){let i=this.result();try{sessionStorage.setItem("impakt.estimate",i.summary)}catch{}this.dispatchEvent(new CustomEvent("impakt-estimate",{detail:i,bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}async copy(){let e=this.result().summary;try{await navigator.clipboard.writeText(e),this.copied=J("Summary copied.")}catch{this.copied=J("Copying is blocked here. Select the summary above instead.")}this.requestUpdate()}heading(e){let i=Math.min(Math.max(this.headingLevel||2,2),6);return O`<div class="q" role="heading" aria-level=${i} tabindex="-1">${e}</div>`}renderQuestion(e,i){let a=this.answers[e.id]??[],r=i===this.at;if(e.kind==="scale"){let c=Math.max(0,e.choices.findIndex(m=>m.id===a[0])),f=e.choices[c];return O`<fieldset class=${r?"current":""} ?hidden=${!r}>
|
|
944
1142
|
<legend>${this.heading(e.heading)}</legend>
|
|
945
|
-
${e.hint?
|
|
1143
|
+
${e.hint?O`<p class="hint">${e.hint}</p>`:ce}
|
|
946
1144
|
<div class="scale">
|
|
947
|
-
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(
|
|
948
|
-
@input=${
|
|
949
|
-
<div class="ticks" aria-hidden="true">${e.choices.map((
|
|
950
|
-
${
|
|
1145
|
+
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(c)} aria-label=${e.heading} aria-valuetext=${f?.label??""}
|
|
1146
|
+
@input=${m=>{let h=e.choices[Number(m.target.value)];h&&this.pick(e,h,!0)}}>
|
|
1147
|
+
<div class="ticks" aria-hidden="true">${e.choices.map((m,h)=>O`<span aria-current=${h===c?"true":ce}>${m.label}</span>`)}</div>
|
|
1148
|
+
${f?.hint?O`<p class="now">${f.hint}</p>`:ce}
|
|
951
1149
|
</div>
|
|
952
|
-
</fieldset>`}let
|
|
1150
|
+
</fieldset>`}let n=e.kind==="many";return O`<fieldset class=${r?"current":""} ?hidden=${!r}>
|
|
953
1151
|
<legend>${this.heading(e.heading)}</legend>
|
|
954
|
-
${e.hint?
|
|
955
|
-
<div class="choices ${
|
|
956
|
-
${e.choices.map(
|
|
957
|
-
<input type=${
|
|
958
|
-
@change=${
|
|
959
|
-
<span class="label">${
|
|
960
|
-
${
|
|
1152
|
+
${e.hint?O`<p class="hint">${e.hint}</p>`:ce}
|
|
1153
|
+
<div class="choices ${n?"many":""}">
|
|
1154
|
+
${e.choices.map(c=>O`<label class="choice">
|
|
1155
|
+
<input type=${n?"checkbox":"radio"} name=${`${this.uid}-${e.id}`} value=${c.id} .checked=${a.includes(c.id)}
|
|
1156
|
+
@change=${f=>this.pick(e,c,f.target.checked)}>
|
|
1157
|
+
<span class="label">${c.label}</span>
|
|
1158
|
+
${c.hint?O`<span class="small">${c.hint}</span>`:ce}
|
|
961
1159
|
</label>`)}
|
|
962
1160
|
</div>
|
|
963
|
-
</fieldset>`}renderResult(e){let i=
|
|
1161
|
+
</fieldset>`}renderResult(e){let i=va(this.phases??[],e.weeks),a=this.at===(this.questions??[]).length;return O`<div class="result ${a?"current":""}" ?hidden=${!a}>
|
|
964
1162
|
${this.heading(this.resultHeading)}
|
|
965
1163
|
<p class="summary">${this.summaryOf(e)}</p>
|
|
966
|
-
${(this.phases??[]).length?
|
|
967
|
-
<div class="phases" aria-hidden="true">${(this.phases??[]).map((r,
|
|
968
|
-
<ul class="legend">${(this.phases??[]).map((r,
|
|
1164
|
+
${(this.phases??[]).length?O`
|
|
1165
|
+
<div class="phases" aria-hidden="true">${(this.phases??[]).map((r,n)=>O`<i style=${`flex-grow:${i[n]};background:${Ri(void 0,n)}`}></i>`)}</div>
|
|
1166
|
+
<ul class="legend">${(this.phases??[]).map((r,n)=>O`<li style=${`--c:${Ri(void 0,n)}`}>${r.label} <b>${this.weeksWord(i[n])}</b></li>`)}</ul>`:ce}
|
|
969
1167
|
<dl>
|
|
970
|
-
<div><dt class="mono">${
|
|
971
|
-
${e.way?
|
|
1168
|
+
<div><dt class="mono">${J("Your team")}</dt><dd>${this.teamOf(e.engineers)}</dd></div>
|
|
1169
|
+
${e.way?O`<div><dt class="mono">${J("Way of working")}</dt><dd>${e.way}</dd></div>`:ce}
|
|
972
1170
|
</dl>
|
|
973
1171
|
<div class="actions">
|
|
974
|
-
${this.contactHref?
|
|
975
|
-
<button type="button" class="secondary" @click=${()=>this.copy()}>${
|
|
976
|
-
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${
|
|
1172
|
+
${this.contactHref?O`<a class="send" href=${this.contactHref} @click=${r=>this.send(r)}>${this.sendLabel} <span aria-hidden="true">→</span></a>`:ce}
|
|
1173
|
+
<button type="button" class="secondary" @click=${()=>this.copy()}>${J("Copy summary")}</button>
|
|
1174
|
+
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${J("Start again")}</button>
|
|
977
1175
|
</div>
|
|
978
1176
|
<p class="status" role="status">${this.copied}</p>
|
|
979
|
-
${this.note?
|
|
980
|
-
</div>`}
|
|
1177
|
+
${this.note?O`<p class="note">${this.note}</p>`:ce}
|
|
1178
|
+
</div>`}renderAll(e){let i=this.questions??[],a=va(this.phases??[],e.weeks),r=O`<svg viewBox="0 0 20 12" width="20" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false"><path d="M0 6h18M13 1l5 5-5 5" /></svg>`;return O`<div class="all">
|
|
1179
|
+
<div class="questions" part="questions">
|
|
1180
|
+
${i.map((n,c)=>{let f=this.answers[n.id]??[],m=n.kind==="many",h=n.choices.map(I=>({value:I.id,label:I.label}));return O`<impakt-chip-group look="site" part="question" .label=${`${String(c+1).padStart(2,"0")} \xB7 ${n.heading}`} .description=${n.hint??""}
|
|
1181
|
+
.options=${h} ?multiple=${m} .values=${m?f:[]} .value=${m?"":f[0]??""}
|
|
1182
|
+
@impakt-change=${I=>this.chipsChanged(n,I)}></impakt-chip-group>`})}
|
|
1183
|
+
</div>
|
|
1184
|
+
<aside class="ink" part="panel">
|
|
1185
|
+
<p class="mono">${this.budgetLabel}</p>
|
|
1186
|
+
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(e)}</p>
|
|
1187
|
+
<p class="weeks">${J("About {weeks} to a first release",{weeks:this.weeksWord(e.weeks)})}</p>
|
|
1188
|
+
${(this.phases??[]).length?O`<ul class="rows" role="list">${(this.phases??[]).map((n,c)=>O`<li><span>${n.label}</span><span class="length">${this.weeksWord(a[c])}</span></li>`)}</ul>`:ce}
|
|
1189
|
+
${this.contactHref?O`<a class="cta" href=${this.contactHref} part="send" @click=${n=>this.send(n)}><span>${this.sendLabel}</span>${r}</a>`:ce}
|
|
1190
|
+
${e.way?O`<p class="way">${this.wayLabel||J("Way of working")}: ${e.way}</p>`:ce}
|
|
1191
|
+
</aside>
|
|
1192
|
+
${this.note?O`<div class="foot"><p class="note">${this.note}</p></div>`:ce}
|
|
1193
|
+
</div>`}chipsChanged(e,i){let a=i.target,r=e.kind==="many"?[...a.values??[]]:[i.detail?.value].filter(f=>!!f);this.answers={...this.answers,[e.id]:r};let n=r.at(-1),c=e.choices.find(f=>f.id===n)?.tip;c&&(this.tip=c),this.requestUpdate()}render(){let e=this.questions??[];if(this.layout==="all")return this.renderAll(Ht(e,this.answers,this.rules));let i=e.length,a=Ht(e,this.answers,this.rules),r=this.at>=i,n=(.6+Math.min(1,a.high/this.most)*1.1).toFixed(2);return O`<div class="wrap">
|
|
981
1194
|
<div>
|
|
982
1195
|
<div class="progress">
|
|
983
|
-
<p class="mono">${r?this.resultHeading:
|
|
1196
|
+
<p class="mono">${r?this.resultHeading:J("Step {step} of {steps}",{step:this.at+1,steps:i})}</p>
|
|
984
1197
|
<div class="bar" aria-hidden="true"><i style=${`inline-size:${i?r?100:(this.at+1)/(i+1)*100:0}%`}></i></div>
|
|
985
1198
|
</div>
|
|
986
|
-
${e.map((
|
|
1199
|
+
${e.map((c,f)=>this.renderQuestion(c,f))}
|
|
987
1200
|
${this.renderResult(a)}
|
|
988
|
-
${r?
|
|
989
|
-
${this.at>0?
|
|
990
|
-
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===i-1?
|
|
1201
|
+
${r?ce:O`<div class="nav">
|
|
1202
|
+
${this.at>0?O`<button type="button" class="secondary" @click=${()=>this.go(this.at-1)}>${J("Back")}</button>`:ce}
|
|
1203
|
+
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===i-1?J("See my estimate"):J("Next")} <span aria-hidden="true">→</span></button>
|
|
991
1204
|
</div>`}
|
|
992
1205
|
</div>
|
|
993
|
-
<aside class="panel" part="panel" style=${`--s:${
|
|
1206
|
+
<aside class="panel" part="panel" style=${`--s:${n}`}>
|
|
994
1207
|
<div class="glow" aria-hidden="true"></div>
|
|
995
1208
|
<p class="mono">${this.budgetLabel}</p>
|
|
996
1209
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(a)}</p>
|
|
997
|
-
<p class="weeks">${
|
|
1210
|
+
<p class="weeks">${J("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
|
|
998
1211
|
<p class="tip" aria-live="polite">${this.tip||this.intro}</p>
|
|
999
1212
|
</aside>
|
|
1000
|
-
</div>`}};customElements.define("impakt-estimator",
|
|
1213
|
+
</div>`}};customElements.define("impakt-estimator",Ni);import{css as wa,html as A,nothing as G}from"./atomic-ui.js";import{ImpaktElement as yt,focusRing as Sa,hideOn as Vr,fontSize as Be,fontWeight as nt,space as R,t as Y,token as cr,type as Nt,toneOf as ka}from"./atomic-ui.js";var Jr=[0,1,2,3,4],Qe=Y.fontMono,ji=class extends yt{static{this.properties={brand:{type:String},logoSrc:{type:String,attribute:"logo-src"},logoAlt:{type:String,attribute:"logo-alt"},home:{type:String},badge:{type:String},meta:{type:String},links:{type:Array},label:{type:String},menuText:{type:String,attribute:"menu-text"},status:{type:String},statusMeta:{type:String,attribute:"status-meta"},statusTone:{type:String,attribute:"status-tone"},actionText:{type:String,attribute:"action-text"},actionHref:{type:String,attribute:"action-href"},fold:{type:String,reflect:!0},mark:{type:String},context:{type:String},statusAt:{type:String,reflect:!0,attribute:"status-at"},navLook:{type:String,attribute:"nav-look"},current:{type:String},presence:{type:Array}}}constructor(){super(),this.brand="",this.logoSrc="",this.logoAlt="",this.home="/",this.badge="",this.meta="",this.links=[],this.label="Main",this.menuText="Menu",this.status="",this.statusMeta="",this.statusTone="success",this.actionText="",this.actionHref="",this.fold="measure",this.mark="",this.context="",this.statusAt="end",this.navLook="",this.current="",this.presence=[]}static{this.styles=[...yt.styles,Sa,wa`
|
|
1001
1214
|
:host { display: block; container-type: inline-size; }
|
|
1215
|
+
/* With a mark, the name is set small beside it, as in the canvas header. */
|
|
1216
|
+
.brand.marked { gap: ${R(3)}; font-size: ${Be("md")}; letter-spacing: -0.01em; }
|
|
1217
|
+
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${Y.text}; color: ${Y.surfaceCard}; font-size: ${Be("sm")}; font-weight: ${nt("medium")}; }
|
|
1218
|
+
.context { font-size: ${Be("sm")}; white-space: nowrap; }
|
|
1219
|
+
.context .slash { margin-inline-end: ${R(2)}; opacity: 0.72; }
|
|
1220
|
+
.presence { display: flex; }
|
|
1221
|
+
.presence .avatar { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; box-sizing: border-box; margin-inline-start: -6px; border-radius: 50%; border: ${Y.borderThin} solid ${Y.text}; background: ${Y.surfaceCard}; color: ${Y.text}; font-family: ${Qe}; font-size: 0.625rem; line-height: 1; }
|
|
1222
|
+
.presence .avatar:first-child { margin-inline-start: 0; }
|
|
1223
|
+
.presence .avatar.accent { background: ${cr("color.accent.default","#ffd43b")}; color: ${cr("color.accent.on","#111111")}; }
|
|
1002
1224
|
.bar { display: flex; align-items: center; gap: ${R(6)}; }
|
|
1003
1225
|
.start { display: flex; align-items: center; gap: ${R(3)}; flex: none; }
|
|
1004
1226
|
.middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
|
|
1005
1227
|
.middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }
|
|
1006
1228
|
slot { display: contents; }
|
|
1007
|
-
.brand { display: inline-flex; align-items: center; min-block-size: ${
|
|
1229
|
+
.brand { display: inline-flex; align-items: center; min-block-size: ${Y.targetMin}; color: inherit; text-decoration: none; font-family: ${Y.fontHeading}; font-weight: ${nt("semibold")}; ${Nt("2xl")} letter-spacing: -0.02em; line-height: 1; border-radius: ${Y.radiusSm}; }
|
|
1008
1230
|
.brand img { display: block; block-size: 32px; inline-size: auto; }
|
|
1009
|
-
.chip { display: inline-flex; align-items: center; gap: ${R(1)}; padding: 2px ${R(2)}; border-radius: ${
|
|
1231
|
+
.chip { display: inline-flex; align-items: center; gap: ${R(1)}; padding: 2px ${R(2)}; border-radius: ${Y.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${Qe}; font-size: ${Be("xs")}; }
|
|
1010
1232
|
.chip svg { inline-size: 12px; block-size: 12px; }
|
|
1011
|
-
.meta { font-family: ${
|
|
1233
|
+
.meta { font-family: ${Qe}; font-size: ${Be("xs")}; opacity: 0.72; }
|
|
1012
1234
|
.middle impakt-nav { flex: 1 1 8rem; }
|
|
1235
|
+
/* File tabs sit in one box as wide as the tabs, centred between the name and the action. */
|
|
1236
|
+
:host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }
|
|
1013
1237
|
.end { display: flex; align-items: center; gap: ${R(3)}; flex: none; }
|
|
1014
1238
|
.end:empty, .start:empty { display: none; }
|
|
1015
|
-
.status { display: inline-flex; align-items: center; gap: ${R(2)}; padding: ${R(1)} ${R(3)}; border: ${
|
|
1239
|
+
.status { display: inline-flex; align-items: center; gap: ${R(2)}; padding: ${R(1)} ${R(3)}; border: ${Y.borderThin} solid ${Y.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${Y.surfaceCard}; font-family: ${Qe}; font-size: ${Be("xs")}; white-space: nowrap; }
|
|
1240
|
+
/* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */
|
|
1241
|
+
.start .status { padding: 2px ${R(2)}; border-color: ${Y.text}; border-radius: ${Y.radius}; font-size: 0.6875rem; letter-spacing: ${Y.trackingWide}; text-transform: uppercase; }
|
|
1242
|
+
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
1016
1243
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
1017
1244
|
.status .hash { opacity: 0.72; }
|
|
1018
|
-
@container (max-width:
|
|
1245
|
+
@container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${R(2)}; } :host(:not([fold='narrow'])) .end { flex: 1 1 100%; } }
|
|
1246
|
+
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${R(3)}; } }
|
|
1019
1247
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
1020
1248
|
line of their own under the name and the action, and wrap there. */
|
|
1021
1249
|
@container (max-width: 40rem) {
|
|
1022
|
-
:host(:not(:defined)) .bar { flex-wrap: wrap; row-gap: ${R(1)}; }
|
|
1023
|
-
:host(:not(:defined)) .start { flex: 1 1 auto; }
|
|
1024
|
-
:host(:not(:defined)) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }
|
|
1250
|
+
:host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${R(1)}; }
|
|
1251
|
+
:host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }
|
|
1252
|
+
:host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }
|
|
1253
|
+
/* fold="narrow": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */
|
|
1254
|
+
:host([fold='narrow']) .middle { justify-content: flex-end; }
|
|
1255
|
+
/* On the narrowest bars the action takes its own row, so the Menu button never spills over the brand. */
|
|
1256
|
+
:host(:not([fold='narrow'])) .middle { justify-content: flex-end; min-inline-size: max-content; }
|
|
1257
|
+
:host([fold='narrow']) .end > slot > impakt-button { display: none; }
|
|
1025
1258
|
}
|
|
1026
|
-
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}render(){let t=this.logoSrc?
|
|
1259
|
+
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}render(){let t=this.logoSrc?A`<img src=${this.logoSrc} alt=${this.logoAlt||this.brand} />`:A`${this.brand}`,e=this.status?A`<span class="status" part="status" style=${`--tone:${ka(this.statusTone,0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta?A` <span class="hash">${this.statusMeta}</span>`:G}</span>`:G,i=this.presence??[];return A`<div class="bar" part="bar">
|
|
1027
1260
|
<div class="start"><slot name="start">
|
|
1028
|
-
${this.brand||this.logoSrc?
|
|
1029
|
-
${this.
|
|
1030
|
-
${this.
|
|
1261
|
+
${this.brand||this.logoSrc?A`<a class=${this.mark?"brand marked":"brand"} href=${this.home||"/"} part="brand">${this.mark?A`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>`:G}${t}</a>`:G}
|
|
1262
|
+
${this.context?A`<span class="context" part="context"><span class="slash" aria-hidden="true">/</span>${this.context}</span>`:G}
|
|
1263
|
+
${this.statusAt==="start"?e:G}
|
|
1264
|
+
${this.badge?A`<span class="chip" part="badge"><svg viewBox="0 0 14 14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="3.5" cy="3" r="1.5"/><circle cx="3.5" cy="11" r="1.5"/><circle cx="10.5" cy="4.5" r="1.5"/><path d="M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4"/></svg>${this.badge}</span>`:G}
|
|
1265
|
+
${this.meta?A`<span class="meta" part="meta">${this.meta}</span>`:G}
|
|
1031
1266
|
</slot></div>
|
|
1032
|
-
<div class="middle"><slot name="middle">${(this.links??[]).length?
|
|
1033
|
-
<div class="end"><slot name="end">
|
|
1034
|
-
${this.
|
|
1035
|
-
${this.actionText?
|
|
1267
|
+
<div class="middle"><slot name="middle">${(this.links??[]).length?A`<impakt-nav align="center" size="sm" fold=${this.fold} look=${this.navLook||G} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold==="narrow"?this.actionText:""} .actionHref=${this.actionHref}></impakt-nav>`:G}</slot></div>
|
|
1268
|
+
<div class="end"><slot name="presence">${i.length?A`<span class="presence" part="presence">${i.map(a=>A`<span class=${a.accent?"avatar accent":"avatar"} role="img" aria-label=${a.name}>${a.initials??a.name.slice(0,1).toUpperCase()}</span>`)}</span>`:G}</slot><slot name="end">
|
|
1269
|
+
${this.statusAt==="start"?G:e}
|
|
1270
|
+
${this.actionText?A`<impakt-button variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref||G} @click=${this.act}>${this.actionText}</impakt-button>`:G}
|
|
1036
1271
|
</slot></div>
|
|
1037
|
-
</div>`}},
|
|
1272
|
+
</div>`}},qi=class extends yt{static{this.properties={text:{type:String},src:{type:String},alt:{type:String},href:{type:String},size:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.text="",this.src="",this.alt="",this.href="/",this.size="md",this.hideOn="never"}static{this.styles=[...yt.styles,Sa,Vr,wa`
|
|
1038
1273
|
:host { display: inline-flex; align-items: center; flex: none; }
|
|
1039
|
-
a { color: inherit; text-decoration: none; font-family: ${
|
|
1040
|
-
:host([size='sm']) a { ${
|
|
1274
|
+
a { color: inherit; text-decoration: none; font-family: ${Y.fontHeading}; font-weight: ${nt("semibold")}; letter-spacing: -0.02em; line-height: 1; border-radius: ${Y.radiusSm}; }
|
|
1275
|
+
:host([size='sm']) a { ${Nt("xl")} } :host([size='md']) a { ${Nt("2xl")} } :host([size='lg']) a { ${Nt("3xl")} }
|
|
1041
1276
|
img { display: block; block-size: 32px; inline-size: auto; }
|
|
1042
|
-
@media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${
|
|
1043
|
-
`]}render(){return
|
|
1277
|
+
@media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${Nt("xl")} } }
|
|
1278
|
+
`]}render(){return A`<a href=${this.href||"/"} part="link">${this.src?A`<img src=${this.src} alt=${this.alt||this.text||this.textContent?.trim()||""} />`:A`<slot>${this.text}</slot>`}</a>`}},Pi=class extends yt{static{this.properties={brand:{type:String},brandSize:{type:String,reflect:!0,attribute:"brand-size"},log:{type:Array},columns:{type:Array},columnsOnPhone:{type:String,attribute:"columns-on-phone",reflect:!0},legal:{type:String},stripe:{type:Boolean,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},actionText:{type:String,attribute:"action-text"},actionHref:{type:String,attribute:"action-href"},tagline:{type:String}}}constructor(){super(),this.brand="",this.brandSize="lg",this.log=[],this.columns=[],this.columnsOnPhone="shown",this.legal="",this.stripe=!1,this.headingLevel=2,this.actionText="",this.actionHref="",this.tagline=""}static{this.styles=[...yt.styles,Sa,wa`
|
|
1044
1279
|
/* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */
|
|
1045
1280
|
:host { display: block; container-type: inline-size; position: relative; padding-block: ${R(8)} ${R(4)}; margin-block-end: calc(-1 * ${R(8)}); }
|
|
1046
1281
|
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${R(10)}; }
|
|
1047
|
-
.brand { margin: 0; font-family: ${
|
|
1282
|
+
.brand { margin: 0; font-family: ${Y.fontHeading}; font-weight: ${nt("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
|
|
1048
1283
|
/* The name as a wordmark across the whole footer, under the columns. */
|
|
1049
1284
|
:host([brand-size='display']) .top { grid-template-columns: 1fr; }
|
|
1050
1285
|
:host([brand-size='display']) .top > div:first-child { order: 2; }
|
|
1051
|
-
:host([brand-size='display']) .brand { font-weight: ${
|
|
1286
|
+
:host([brand-size='display']) .brand { font-weight: ${nt("semibold")}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }
|
|
1052
1287
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
1053
|
-
.log { margin-block-start: ${R(8)}; display: grid; gap: ${R(3)}; font-family: ${
|
|
1288
|
+
.log { margin-block-start: ${R(8)}; display: grid; gap: ${R(3)}; font-family: ${Qe}; font-size: ${Be("sm")}; }
|
|
1054
1289
|
.log li { display: flex; align-items: center; gap: ${R(3)}; opacity: 0.72; }
|
|
1055
1290
|
.log li:first-child { opacity: 1; }
|
|
1056
1291
|
.log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }
|
|
1057
1292
|
.log .code { margin-inline-end: ${R(3)}; }
|
|
1058
1293
|
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${R(8)}; }
|
|
1059
|
-
.h { margin: 0 0 ${R(4)}; font-family: ${
|
|
1294
|
+
.h { margin: 0 0 ${R(4)}; font-family: ${Qe}; font-size: ${Be("xs")}; font-weight: ${nt("medium")}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
|
|
1060
1295
|
.columns ul { display: grid; gap: ${R(3)}; }
|
|
1061
|
-
a { color: inherit; text-decoration: none; font-weight: ${
|
|
1296
|
+
a { color: inherit; text-decoration: none; font-weight: ${nt("medium")}; border-radius: ${Y.radiusSm}; }
|
|
1062
1297
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
1063
|
-
.legal { margin: ${R(16)} 0 0; font-family: ${
|
|
1298
|
+
.legal { margin: ${R(16)} 0 0; font-family: ${Qe}; font-size: ${Be("xs")}; opacity: 0.72; }
|
|
1299
|
+
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${R(2)} ${R(6)}; margin-block-start: ${R(16)}; }
|
|
1300
|
+
.foot .legal { margin: 0; }
|
|
1301
|
+
.tagline { margin: 0; font-family: ${Qe}; font-size: ${Be("xs")}; opacity: 0.72; text-align: end; }
|
|
1302
|
+
.row { display: flex; align-items: flex-start; gap: ${R(8)}; }
|
|
1303
|
+
.row .columns { flex: 1; }
|
|
1304
|
+
.row impakt-button { flex: none; }
|
|
1064
1305
|
.stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
|
|
1065
1306
|
.stripe span { flex: 1; }
|
|
1066
|
-
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
1307
|
+
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }
|
|
1067
1308
|
@container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
|
|
1068
1309
|
@media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
|
|
1069
|
-
`]}heading(t){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?
|
|
1310
|
+
`]}heading(t){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?A`<h3 class="h">${t}</h3>`:e===4?A`<h4 class="h">${t}</h4>`:A`<h2 class="h">${t}</h2>`}render(){let t=this.log??[];return A`<div part="footer">
|
|
1070
1311
|
<div class="top">
|
|
1071
1312
|
<div>
|
|
1072
|
-
${this.brand?
|
|
1073
|
-
${t.length?
|
|
1313
|
+
${this.brand?A`<p class="brand" part="brand">${this.brand}</p>`:G}
|
|
1314
|
+
${t.length?A`<ul class="log" part="log">${t.map((e,i)=>A`<li style=${`--tone:${ka(e.tone??(i===0?"success":"accent"),i)}`}><span class="dot" aria-hidden="true"></span><span>${e.meta?A`<span class="code">${e.meta}</span>`:G}${e.text}</span></li>`)}</ul>`:G}
|
|
1074
1315
|
</div>
|
|
1075
|
-
<div class="
|
|
1076
|
-
|
|
1316
|
+
<div class="row">
|
|
1317
|
+
<div class="columns" part="columns" style=${`--count:${Math.max(1,(this.columns??[]).length)}`}>
|
|
1318
|
+
${(this.columns??[]).map(e=>A`<div>${this.heading(e.heading)}<ul>${(e.links??[]).map(i=>A`<li><a href=${i.href}>${i.label}</a></li>`)}</ul></div>`)}
|
|
1319
|
+
</div>
|
|
1320
|
+
${this.actionText?A`<impakt-button variant="outline" icon-after="arrow-right" href=${this.actionHref||G} part="action">${this.actionText}</impakt-button>`:G}
|
|
1077
1321
|
</div>
|
|
1078
1322
|
</div>
|
|
1079
|
-
${this.legal?
|
|
1080
|
-
${this.stripe?
|
|
1081
|
-
</div>`}};customElements.define("impakt-site-header",
|
|
1323
|
+
${this.tagline?A`<div class="foot">${this.legal?A`<p class="legal" part="legal">${this.legal}</p>`:A`<span></span>`}<p class="tagline" part="tagline">${this.tagline}</p></div>`:this.legal?A`<p class="legal" part="legal">${this.legal}</p>`:G}
|
|
1324
|
+
${this.stripe?A`<div class="stripe" aria-hidden="true">${Jr.map(e=>A`<span style=${`background:${ka(void 0,e)}`}></span>`)}</div>`:G}
|
|
1325
|
+
</div>`}};customElements.define("impakt-site-header",ji);customElements.define("impakt-wordmark",qi);customElements.define("impakt-site-footer",Pi);import{html as vt,css as Qr,nothing as za}from"./atomic-ui.js";import{say as dr,ImpaktElement as pr,fontSize as Kr,fontWeight as Zr,space as Ke,t as Ta,token as Ma}from"./atomic-ui.js";var Oi=s=>Math.min(1,Math.max(0,s)),Wi=class extends pr{constructor(){super();this.paused=!1;this.frame=0;this.started=0;this.reduced=!1;this.seekFrom=0;this.seekTo=0;this.seekStart=0;this.seekMs=0;this.onScroll=()=>{(this.drive==="view"||this.drive==="page")&&this.schedule()};this.tick=e=>{if(this.frame=0,this.seekMs){this.seekStart||(this.seekStart=e);let i=Math.min(1,(e-this.seekStart)/this.seekMs),a=i<.5?4*i*i*i:1-Math.pow(-2*i+2,3)/2;this.progress=this.seekFrom+(this.seekTo-this.seekFrom)*a,i<1?this.schedule():this.seekMs=0;return}if(this.drive==="view"){let i=this.getBoundingClientRect(),a=window.innerHeight||1;this.progress=Oi(-i.top/Math.max(1,i.height-a))}else if(this.drive==="page"){let i=document.documentElement;this.progress=Oi(window.scrollY/Math.max(1,i.scrollHeight-(window.innerHeight||0)))}else this.drive==="loop"&&!this.paused&&!this.reduced&&(this.started||(this.started=e-this.progress*this.duration*1e3),this.progress=(e-this.started)/(this.duration*1e3)%1,this.schedule())};this.togglePause=()=>this.setPaused(!this.paused);this.drive="view",this.layout="stage",this.length=3,this.duration=8,this.label="Animation",this.progress=0,this.controls="below",this.bleed=!1,this.hideOn="never"}static{this.properties={drive:{type:String,reflect:!0},layout:{type:String,reflect:!0},length:{type:Number},duration:{type:Number},label:{type:String},progress:{type:Number},controls:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}static{this.styles=[...pr.styles,Qr`
|
|
1082
1326
|
:host {
|
|
1083
1327
|
display: block;
|
|
1084
1328
|
position: relative;
|
|
@@ -1092,7 +1336,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1092
1336
|
}
|
|
1093
1337
|
:host([layout='split']) .frame {
|
|
1094
1338
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
1095
|
-
gap: ${
|
|
1339
|
+
gap: ${Ke(8)};
|
|
1096
1340
|
}
|
|
1097
1341
|
.stage {
|
|
1098
1342
|
position: sticky;
|
|
@@ -1117,34 +1361,34 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1117
1361
|
}
|
|
1118
1362
|
.controls {
|
|
1119
1363
|
display: flex;
|
|
1120
|
-
gap: ${
|
|
1364
|
+
gap: ${Ke(3)};
|
|
1121
1365
|
align-items: center;
|
|
1122
1366
|
justify-content: center;
|
|
1123
|
-
padding-block: ${
|
|
1367
|
+
padding-block: ${Ke(3)};
|
|
1124
1368
|
}
|
|
1125
1369
|
:host([bleed]) { margin-inline: calc(50% - 50vw); }
|
|
1126
1370
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1127
1371
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1128
1372
|
/* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
|
|
1129
|
-
.stage > .controls { position: absolute; inset-inline: ${
|
|
1373
|
+
.stage > .controls { position: absolute; inset-inline: ${Ke(6)}; inset-block-end: ${Ke(6)}; z-index: 2; padding: 0; }
|
|
1130
1374
|
.stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }
|
|
1131
1375
|
/* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
|
|
1132
1376
|
.controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
|
|
1133
1377
|
.pause {
|
|
1134
|
-
min-width: ${
|
|
1135
|
-
min-height: ${
|
|
1136
|
-
padding: ${
|
|
1137
|
-
border-radius:
|
|
1138
|
-
border: 1px solid ${
|
|
1139
|
-
background: ${
|
|
1140
|
-
color: ${
|
|
1141
|
-
font-size: ${
|
|
1142
|
-
font-weight: ${
|
|
1378
|
+
min-width: ${Ma("target.min","24px")};
|
|
1379
|
+
min-height: ${Ma("target.min","24px")};
|
|
1380
|
+
padding: ${Ke(2)} ${Ke(4)};
|
|
1381
|
+
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1382
|
+
border: 1px solid ${Ta.border};
|
|
1383
|
+
background: ${Ta.surfaceCard};
|
|
1384
|
+
color: ${Ta.text};
|
|
1385
|
+
font-size: ${Kr("sm")};
|
|
1386
|
+
font-weight: ${Zr("medium")};
|
|
1143
1387
|
cursor: pointer;
|
|
1144
1388
|
}
|
|
1145
1389
|
.pause:focus-visible {
|
|
1146
1390
|
outline: none;
|
|
1147
|
-
box-shadow: ${
|
|
1391
|
+
box-shadow: ${Ma("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1148
1392
|
}
|
|
1149
1393
|
@media (max-width: 48rem) {
|
|
1150
1394
|
:host([layout='split']) .frame {
|
|
@@ -1162,7 +1406,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1162
1406
|
.stage {
|
|
1163
1407
|
position: relative;
|
|
1164
1408
|
height: auto;
|
|
1165
|
-
gap: ${
|
|
1409
|
+
gap: ${Ke(6)};
|
|
1166
1410
|
}
|
|
1167
1411
|
/* With less motion the layers are shown one after another, so every
|
|
1168
1412
|
state the scene would have moved through can still be seen. */
|
|
@@ -1170,17 +1414,17 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1170
1414
|
grid-area: auto;
|
|
1171
1415
|
}
|
|
1172
1416
|
}
|
|
1173
|
-
`]}connectedCallback(){super.connectedCallback();try{this.reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{this.reduced=!1}window.addEventListener("scroll",this.onScroll,{passive:!0,capture:!0}),window.addEventListener("resize",this.onScroll),this.schedule()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.onScroll,{capture:!0}),window.removeEventListener("resize",this.onScroll),this.frame&&cancelAnimationFrame(this.frame),this.frame=0}updated(e){e.has("length")&&this.style.setProperty("--impakt-scene-length",String(this.length)),e.has("progress")&&this.publish(),e.has("drive")&&(this.started=0,this.schedule())}seek(e,i=0){if(i<=0||this.reduced){this.progress=
|
|
1417
|
+
`]}connectedCallback(){super.connectedCallback();try{this.reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{this.reduced=!1}window.addEventListener("scroll",this.onScroll,{passive:!0,capture:!0}),window.addEventListener("resize",this.onScroll),this.schedule()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.onScroll,{capture:!0}),window.removeEventListener("resize",this.onScroll),this.frame&&cancelAnimationFrame(this.frame),this.frame=0}updated(e){e.has("length")&&this.style.setProperty("--impakt-scene-length",String(this.length)),e.has("progress")&&this.publish(),e.has("drive")&&(this.started=0,this.schedule())}seek(e,i=0){if(i<=0||this.reduced){this.progress=Oi(e);return}this.seekFrom=this.progress,this.seekTo=Oi(e),this.seekStart=0,this.seekMs=i,this.schedule()}schedule(){!this.frame&&typeof requestAnimationFrame=="function"&&(this.frame=requestAnimationFrame(this.tick))}publish(){this.style.setProperty("--impakt-scene-progress",this.progress.toFixed(4)),this.dispatchEvent(new CustomEvent("impakt-scene-progress",{detail:{progress:this.progress},bubbles:!0,composed:!0}))}setPaused(e){this.paused!==e&&(this.paused=e,this.started=0,this.schedule(),this.requestUpdate())}pause(){this.setPaused(!0)}render(){let e=this.drive==="loop",i=this.controls==="over"&&!this.reduced,a=vt`<div class="controls" part="controls">
|
|
1174
1418
|
<slot name="controls"></slot>
|
|
1175
|
-
${e&&!this.reduced?
|
|
1176
|
-
${this.paused?
|
|
1177
|
-
</button>`:
|
|
1178
|
-
</div>`,r=
|
|
1419
|
+
${e&&!this.reduced?vt`<button class="pause" type="button" aria-pressed=${this.paused?"true":"false"} @click=${this.togglePause}>
|
|
1420
|
+
${this.paused?dr("Play {name}",{name:this.label}):dr("Pause {name}",{name:this.label})}
|
|
1421
|
+
</button>`:za}
|
|
1422
|
+
</div>`,r=vt`<div class="stage" part="stage"><slot name="stage"></slot>${i?a:za}</div>`;return vt`
|
|
1179
1423
|
<div class="frame" part="frame" role="region" aria-label=${this.label}>
|
|
1180
|
-
${this.layout==="split"?
|
|
1424
|
+
${this.layout==="split"?vt`<div class="content" part="content"><slot></slot></div>${r}`:vt`${r}<div class="content" part="content"><slot></slot></div>`}
|
|
1181
1425
|
</div>
|
|
1182
|
-
${i?
|
|
1183
|
-
`}};customElements.define("impakt-scene",
|
|
1426
|
+
${i?za:a}
|
|
1427
|
+
`}};customElements.define("impakt-scene",Wi);import{html as Ie,css as es}from"./atomic-ui.js";import{say as mr,ImpaktElement as hr,visuallyHidden as ts,fontSize as Ca,fontWeight as ur,space as $e,t as X,token as ot}from"./atomic-ui.js";var Aa={brand:"var(--impakt-color-brand-default, #1f4ed8)",accent:"var(--impakt-color-accent-default, #c8a15a)",info:"var(--impakt-color-status-info-default, #1f4ed8)",success:"var(--impakt-color-status-success-default, #047857)",warning:"var(--impakt-color-status-warning-default, #b45309)",danger:"var(--impakt-color-status-danger-default, #c8102e)"},Fi=class extends hr{constructor(){super();this.scene=null;this.onProgress=e=>{this.value=e.detail.progress};this.onInput=e=>{let i=Number(e.target.value)/1e3;this.value=i,this.scene?.seek(i)};this.label="Scene progress",this.stops=[],this.look="buttons",this.hint="",this.value=0}static{this.properties={label:{type:String},stops:{type:Array},look:{type:String,reflect:!0},hint:{type:String},value:{type:Number,state:!0}}}static{this.styles=[...hr.styles,es`
|
|
1184
1428
|
:host {
|
|
1185
1429
|
display: block;
|
|
1186
1430
|
width: 100%;
|
|
@@ -1189,71 +1433,71 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1189
1433
|
}
|
|
1190
1434
|
.wrap {
|
|
1191
1435
|
display: grid;
|
|
1192
|
-
gap: ${
|
|
1193
|
-
padding: ${
|
|
1194
|
-
border-radius: ${
|
|
1195
|
-
background: ${
|
|
1196
|
-
box-shadow: ${
|
|
1197
|
-
border: 1px solid ${
|
|
1436
|
+
gap: ${$e(2)};
|
|
1437
|
+
padding: ${$e(3)} ${$e(4)};
|
|
1438
|
+
border-radius: ${ot("radius.xl","16px")};
|
|
1439
|
+
background: ${X.surfaceCard};
|
|
1440
|
+
box-shadow: ${ot("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")};
|
|
1441
|
+
border: 1px solid ${X.border};
|
|
1198
1442
|
}
|
|
1199
1443
|
input {
|
|
1200
1444
|
width: 100%;
|
|
1201
|
-
min-height: ${
|
|
1202
|
-
accent-color: ${
|
|
1445
|
+
min-height: ${ot("target.min","24px")};
|
|
1446
|
+
accent-color: ${X.brand};
|
|
1203
1447
|
margin: 0;
|
|
1204
1448
|
}
|
|
1205
1449
|
.stops {
|
|
1206
1450
|
position: relative;
|
|
1207
1451
|
display: flex;
|
|
1208
1452
|
flex-wrap: wrap;
|
|
1209
|
-
gap: ${
|
|
1453
|
+
gap: ${$e(2)};
|
|
1210
1454
|
list-style: none;
|
|
1211
1455
|
margin: 0;
|
|
1212
1456
|
padding: 0;
|
|
1213
1457
|
}
|
|
1214
1458
|
button {
|
|
1215
|
-
min-height: ${
|
|
1216
|
-
padding: ${
|
|
1217
|
-
border-radius:
|
|
1218
|
-
border: 1px solid ${
|
|
1459
|
+
min-height: ${ot("target.min","24px")};
|
|
1460
|
+
padding: ${$e(1)} ${$e(3)};
|
|
1461
|
+
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1462
|
+
border: 1px solid ${X.border};
|
|
1219
1463
|
background: transparent;
|
|
1220
|
-
color: ${
|
|
1221
|
-
font-size: ${
|
|
1222
|
-
font-weight: ${
|
|
1464
|
+
color: ${X.textMuted};
|
|
1465
|
+
font-size: ${Ca("xs")};
|
|
1466
|
+
font-weight: ${ur("medium")};
|
|
1223
1467
|
cursor: pointer;
|
|
1224
1468
|
}
|
|
1225
1469
|
button[aria-current='true'] {
|
|
1226
|
-
color: ${
|
|
1227
|
-
border-color: ${
|
|
1470
|
+
color: ${X.text};
|
|
1471
|
+
border-color: ${X.text};
|
|
1228
1472
|
}
|
|
1229
1473
|
.sr-only {
|
|
1230
|
-
${
|
|
1474
|
+
${ts}
|
|
1231
1475
|
}
|
|
1232
1476
|
/* The graph look: the code of where you are, the line of stops, where you are. */
|
|
1233
1477
|
:host([look='graph']) { max-width: none; }
|
|
1234
|
-
.graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${
|
|
1235
|
-
.mono { font-family: ${
|
|
1478
|
+
.graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${$e(6)}; align-items: center; padding: ${$e(4)} ${$e(6)}; border-radius: ${ot("radius.xl","16px")}; background: ${X.surfaceCard}; box-shadow: ${ot("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")}; border: 1px solid ${X.border}; }
|
|
1479
|
+
.mono { font-family: ${X.fontMono}; font-size: ${Ca("xs")}; letter-spacing: 0.04em; }
|
|
1236
1480
|
.head { display: grid; gap: 2px; }
|
|
1237
|
-
.head .k { color: ${
|
|
1238
|
-
.head .code { font-size: ${
|
|
1239
|
-
.head .note { color: ${
|
|
1481
|
+
.head .k { color: ${X.textMuted}; text-transform: uppercase; }
|
|
1482
|
+
.head .code { font-size: ${Ca("md")}; color: ${X.text}; }
|
|
1483
|
+
.head .note { color: ${X.textMuted}; }
|
|
1240
1484
|
.line { position: relative; block-size: 48px; }
|
|
1241
|
-
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${
|
|
1485
|
+
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${X.border}; opacity: 0.5; }
|
|
1242
1486
|
.fill { opacity: 1; background: none; display: flex; overflow: hidden; }
|
|
1243
1487
|
.fill span { block-size: 100%; }
|
|
1244
|
-
.dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${
|
|
1488
|
+
.dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${X.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }
|
|
1245
1489
|
.dot[data-passed] { background: var(--c); }
|
|
1246
1490
|
.dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
|
|
1247
|
-
.dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${
|
|
1248
|
-
.dot-label[data-current] { color: ${
|
|
1491
|
+
.dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${X.textMuted}; text-transform: uppercase; pointer-events: none; }
|
|
1492
|
+
.dot-label[data-current] { color: ${X.text}; font-weight: ${ur("bold")}; }
|
|
1249
1493
|
.line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
|
|
1250
1494
|
.line input:focus-visible { opacity: 1; }
|
|
1251
|
-
.where { display: grid; gap: ${
|
|
1252
|
-
.chip { display: inline-flex; align-items: center; gap: ${
|
|
1495
|
+
.where { display: grid; gap: ${$e(2)}; justify-items: end; }
|
|
1496
|
+
.chip { display: inline-flex; align-items: center; gap: ${$e(2)}; padding: ${$e(1)} ${$e(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${X.border}; color: ${X.text}; text-transform: uppercase; }
|
|
1253
1497
|
.chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
|
|
1254
|
-
.hint { color: ${
|
|
1498
|
+
.hint { color: ${X.textMuted}; text-transform: uppercase; }
|
|
1255
1499
|
/* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
|
|
1256
|
-
.chip .meta { color: ${
|
|
1500
|
+
.chip .meta { color: ${X.textMuted}; }
|
|
1257
1501
|
@media (max-width: 48rem) {
|
|
1258
1502
|
.graph { grid-template-columns: minmax(0, 1fr); }
|
|
1259
1503
|
.where { justify-items: start; }
|
|
@@ -1262,29 +1506,29 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1262
1506
|
button:focus-visible,
|
|
1263
1507
|
input:focus-visible {
|
|
1264
1508
|
outline: none;
|
|
1265
|
-
box-shadow: ${
|
|
1509
|
+
box-shadow: ${ot("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1266
1510
|
}
|
|
1267
|
-
`]}connectedCallback(){super.connectedCallback(),this.scene=this.closest("impakt-scene"),this.scene?.addEventListener("impakt-scene-progress",this.onProgress),this.scene&&(this.value=this.scene.progress)}disconnectedCallback(){super.disconnectedCallback(),this.scene?.removeEventListener("impakt-scene-progress",this.onProgress),this.scene=null}goTo(e){this.scene?.seek(e.at,600)}nearest(){let e=-1,i=1/0;return this.stops.forEach((a,r)=>{let
|
|
1511
|
+
`]}connectedCallback(){super.connectedCallback(),this.scene=this.closest("impakt-scene"),this.scene?.addEventListener("impakt-scene-progress",this.onProgress),this.scene&&(this.value=this.scene.progress)}disconnectedCallback(){super.disconnectedCallback(),this.scene?.removeEventListener("impakt-scene-progress",this.onProgress),this.scene=null}goTo(e){this.scene?.seek(e.at,600)}nearest(){let e=-1,i=1/0;return this.stops.forEach((a,r)=>{let n=Math.abs(a.at-this.value);n<i&&(i=n,e=r)}),e}renderGraph(e,i){let a=e,r=[...this.stops??[]].sort((m,h)=>m.at-h.at);a=r.indexOf(this.stops[a]);let n=m=>{let h=m?.tone??"brand";return typeof h=="number"?`var(--impakt-color-chart-${h}, ${Aa.brand})`:Aa[h]??Aa.brand},c=r[a]??r[0],f=r.map((m,h)=>{let I=h===0?0:r[h-1].at,de=Math.min(m.at,this.value);return{width:Math.round(Math.max(0,de-I)*1e4)/100,c:n(m)}});return Ie`<div class="graph" part="wrap">
|
|
1268
1512
|
<div class="head mono" aria-hidden="true">
|
|
1269
1513
|
<span class="k">HEAD</span>
|
|
1270
|
-
<span class="code">${
|
|
1271
|
-
${
|
|
1514
|
+
<span class="code">${c?.meta??c?.label??""}</span>
|
|
1515
|
+
${c?.note?Ie`<span class="note">${c.note}</span>`:null}
|
|
1272
1516
|
</div>
|
|
1273
1517
|
<div class="line">
|
|
1274
1518
|
<div class="track"></div>
|
|
1275
|
-
<div class="fill" aria-hidden="true">${
|
|
1276
|
-
${r.map((
|
|
1277
|
-
<button type="button" class="dot" style=${`left:${
|
|
1278
|
-
<span class="sr-only">${
|
|
1519
|
+
<div class="fill" aria-hidden="true">${f.map(m=>Ie`<span style=${`width:${m.width}%;background:${m.c}`}></span>`)}</div>
|
|
1520
|
+
${r.map((m,h)=>Ie`
|
|
1521
|
+
<button type="button" class="dot" style=${`left:${m.at*100}%;--c:${n(m)}`} ?data-passed=${m.at<=this.value+1e-4} aria-current=${h===a?"true":"false"} @click=${()=>this.goTo(m)}>
|
|
1522
|
+
<span class="sr-only">${mr("Go to {name}",{name:m.label})}</span>
|
|
1279
1523
|
</button>
|
|
1280
|
-
<span class="dot-label mono" style=${`left:${
|
|
1524
|
+
<span class="dot-label mono" style=${`left:${m.at*100}%`} ?data-current=${h===a} aria-hidden="true">${m.label}</span>`)}
|
|
1281
1525
|
<input type="range" min="0" max="1000" step="1" .value=${String(Math.round(this.value*1e3))} aria-label=${this.label} aria-valuetext=${i} @input=${this.onInput} />
|
|
1282
1526
|
</div>
|
|
1283
1527
|
<div class="where" aria-hidden="true">
|
|
1284
|
-
${
|
|
1285
|
-
${this.hint?
|
|
1528
|
+
${c?Ie`<span class="chip mono" style=${`--c:${n(c)}`}>${c.label}${c.meta?Ie` <span class="meta">${c.meta}</span>`:null}</span>`:null}
|
|
1529
|
+
${this.hint?Ie`<span class="hint mono">${this.hint}</span>`:null}
|
|
1286
1530
|
</div>
|
|
1287
|
-
</div>`}render(){let e=this.nearest(),i=e>=0?this.stops[e].label:`${Math.round(this.value*100)}%`;return this.look==="graph"?this.renderGraph(e,i):
|
|
1531
|
+
</div>`}render(){let e=this.nearest(),i=e>=0?this.stops[e].label:`${Math.round(this.value*100)}%`;return this.look==="graph"?this.renderGraph(e,i):Ie`
|
|
1288
1532
|
<div class="wrap" part="wrap">
|
|
1289
1533
|
<input
|
|
1290
1534
|
type="range"
|
|
@@ -1296,52 +1540,52 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1296
1540
|
aria-valuetext=${i}
|
|
1297
1541
|
@input=${this.onInput}
|
|
1298
1542
|
/>
|
|
1299
|
-
${this.stops.length?
|
|
1300
|
-
${this.stops.map((a,r)=>
|
|
1543
|
+
${this.stops.length?Ie`<ul class="stops" part="stops">
|
|
1544
|
+
${this.stops.map((a,r)=>Ie`<li>
|
|
1301
1545
|
<button type="button" aria-current=${r===e?"true":"false"} @click=${()=>this.goTo(a)}>
|
|
1302
|
-
<span aria-hidden="true">${a.label}</span><span class="sr-only">${
|
|
1546
|
+
<span aria-hidden="true">${a.label}</span><span class="sr-only">${mr("Go to {name}",{name:a.label})}</span>
|
|
1303
1547
|
</button>
|
|
1304
1548
|
</li>`)}
|
|
1305
1549
|
</ul>`:null}
|
|
1306
1550
|
</div>
|
|
1307
|
-
`}};customElements.define("impakt-scrubber",
|
|
1308
|
-
.h { margin: 0; color: var(--impakt-heading, ${
|
|
1551
|
+
`}};customElements.define("impakt-scrubber",Fi);import{css as lt,html as C,nothing as ge,svg as kt}from"./atomic-ui.js";import{say as Se,ImpaktElement as Re,focusRing as is,visuallyHidden as as,fontSize as wt,fontWeight as Xi,space as E,spaceAround as jt,t as B,token as rs,type as ss,iconSvg as ns,toneOf as Ea,TONE as gr}from"./atomic-ui.js";function Ba(s,t){let e=()=>{s.setAttribute("shown",""),t?.()};if(typeof IntersectionObserver!="function")return e(),()=>{};let i=new IntersectionObserver(a=>{a.some(r=>r.isIntersecting)&&(e(),i.disconnect())},{threshold:.25});return i.observe(s),()=>i.disconnect()}var br=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,Vi=lt`.mono { font-family: ${B.fontMono}; font-size: ${wt("xs")}; letter-spacing: 0.04em; }`,os=(s,t,e)=>{switch(Math.min(Math.max(s||3,2),6)){case 2:return C`<h2 class=${e}>${t}</h2>`;case 4:return C`<h4 class=${e}>${t}</h4>`;case 5:return C`<h5 class=${e}>${t}</h5>`;case 6:return C`<h6 class=${e}>${t}</h6>`;default:return C`<h3 class=${e}>${t}</h3>`}},Ji=lt`
|
|
1552
|
+
.h { margin: 0; color: var(--impakt-heading, ${B.textHeading}); font-family: ${B.fontHeading}; font-weight: ${Xi("bold")}; letter-spacing: ${B.trackingTight}; text-wrap: balance; }
|
|
1309
1553
|
.body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
|
|
1310
1554
|
.meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
|
|
1311
|
-
.sr-only { ${
|
|
1312
|
-
`,
|
|
1555
|
+
.sr-only { ${as} }
|
|
1556
|
+
`,Di=class extends Re{constructor(){super();this.raf=0;this.label="",this.heading="",this.text="",this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.items=[],this.href="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},heading:{type:String},text:{type:String},beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},items:{type:Array},href:{type:String},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Re.styles,jt,Vi,Ji,lt`
|
|
1313
1557
|
:host { display: block; }
|
|
1314
1558
|
article { display: flex; flex-direction: column; gap: ${E(3)}; }
|
|
1315
|
-
.media { border-radius: ${
|
|
1559
|
+
.media { border-radius: ${B.radiusXl}; overflow: clip; background: ${B.surfaceInset}; }
|
|
1316
1560
|
.media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
|
|
1317
1561
|
impakt-before-after { display: block; }
|
|
1318
|
-
.h { font-size: ${
|
|
1562
|
+
.h { font-size: ${wt("3xl")}; }
|
|
1319
1563
|
.h a { color: inherit; text-decoration: none; }
|
|
1320
1564
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1321
|
-
.h a:focus-visible { outline: none; box-shadow: ${
|
|
1565
|
+
.h a:focus-visible { outline: none; box-shadow: ${B.focusShadow}; border-radius: ${B.radiusSm}; }
|
|
1322
1566
|
ul { list-style: none; margin: ${E(1)} 0 0; padding: 0; display: grid; gap: ${E(1)}; }
|
|
1323
|
-
li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${E(2)}; padding: ${E(1)} ${E(3)}; border-radius: ${
|
|
1324
|
-
li[data-change='added'] { background: ${
|
|
1325
|
-
li[data-change='removed'] { background: ${
|
|
1326
|
-
li[data-change='same'] { color: ${
|
|
1327
|
-
.sign { font-weight: ${
|
|
1328
|
-
`]}wipe(e){let i=this.renderRoot.querySelector("impakt-before-after");if(!i)return;if(cancelAnimationFrame(this.raf),
|
|
1329
|
-
${e?
|
|
1330
|
-
${this.label?
|
|
1331
|
-
${this.heading?
|
|
1332
|
-
${this.text?
|
|
1333
|
-
${(this.items??[]).length?
|
|
1334
|
-
</article>`}},
|
|
1567
|
+
li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${E(2)}; padding: ${E(1)} ${E(3)}; border-radius: ${B.radius}; }
|
|
1568
|
+
li[data-change='added'] { background: ${B.successSubtle}; color: ${B.successText}; }
|
|
1569
|
+
li[data-change='removed'] { background: ${B.dangerSubtle}; color: ${B.dangerText}; }
|
|
1570
|
+
li[data-change='same'] { color: ${B.textMuted}; }
|
|
1571
|
+
.sign { font-weight: ${Xi("bold")}; }
|
|
1572
|
+
`]}wipe(e){let i=this.renderRoot.querySelector("impakt-before-after");if(!i)return;if(cancelAnimationFrame(this.raf),br()){i.position=e;return}let a=i.position??La,r=performance.now(),n=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,c=f=>{let m=Math.min(1,(f-r)/450);i.position=a+(e-a)*n(m),m<1&&(this.raf=requestAnimationFrame(c))};this.raf=requestAnimationFrame(c)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf)}render(){let e=this.beforeSrc&&this.afterSrc,i=this.href?C`<a href=${this.href}>${this.heading}</a>`:this.heading,a={added:"+",removed:"\u2212",same:" "},r={added:Se("Added"),removed:Se("Removed"),same:Se("Kept")};return C`<article part="card">
|
|
1573
|
+
${e?C`<div class="media" @pointerenter=${n=>n.pointerType==="mouse"&&this.wipe(0)} @pointerleave=${n=>n.pointerType==="mouse"&&this.wipe(La)}><impakt-before-after .position=${La} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${Se("Before")} .afterLabel=${Se("Shipped")} .label=${Se("Compare {name} before and after",{name:this.heading})}></impakt-before-after></div>`:this.afterSrc||this.beforeSrc?C`<div class="media"><img src=${this.afterSrc||this.beforeSrc} alt=${this.afterSrc?this.afterAlt:this.beforeAlt} loading="lazy" /></div>`:ge}
|
|
1574
|
+
${this.label?C`<p class="meta mono">${this.label}</p>`:ge}
|
|
1575
|
+
${this.heading?ls(this.headingLevel,i):ge}
|
|
1576
|
+
${this.text?C`<p class="body">${this.text}</p>`:ge}
|
|
1577
|
+
${(this.items??[]).length?C`<ul class="mono" part="diff">${this.items.map(n=>C`<li data-change=${n.change}><span class="sign" aria-hidden="true">${a[n.change]??" "}</span><span><span class="sr-only">${r[n.change]??""}: </span>${n.text}</span></li>`)}</ul>`:ge}
|
|
1578
|
+
</article>`}},_i=class extends Re{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="two",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Re.styles,jt,lt`
|
|
1335
1579
|
:host { display: block; container-type: inline-size; }
|
|
1336
1580
|
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${E(12)} ${E(10)}; }
|
|
1337
1581
|
:host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }
|
|
1338
1582
|
:host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1339
1583
|
@container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
1340
|
-
`]}render(){let t=typeof location>"u"?"":location.pathname.replace(/\/$/,""),e=(this.items??[]).filter(i=>!i.href||i.href.replace(/\/$/,"")!==t);return
|
|
1584
|
+
`]}render(){let t=typeof location>"u"?"":location.pathname.replace(/\/$/,""),e=(this.items??[]).filter(i=>!i.href||i.href.replace(/\/$/,"")!==t);return C`<ul part="list">${e.map(i=>{let a=i.heading??i.title??"";return C`<li><impakt-release-card
|
|
1341
1585
|
.label=${i.label??""} .heading=${a} .text=${i.text??""} .href=${i.href??""}
|
|
1342
|
-
.beforeSrc=${i.beforeSrc??""} .beforeAlt=${i.beforeAlt||
|
|
1343
|
-
.afterSrc=${i.afterSrc??""} .afterAlt=${i.afterAlt||
|
|
1344
|
-
.items=${i.items??[]} .headingLevel=${this.headingLevel}></impakt-release-card></li>`})}</ul>`}},
|
|
1586
|
+
.beforeSrc=${i.beforeSrc??""} .beforeAlt=${i.beforeAlt||Se("{name} as a wireframe",{name:a})}
|
|
1587
|
+
.afterSrc=${i.afterSrc??""} .afterAlt=${i.afterAlt||Se("{name} as it shipped",{name:a})}
|
|
1588
|
+
.items=${i.items??[]} .headingLevel=${this.headingLevel}></impakt-release-card></li>`})}</ul>`}},La=42;function ls(s,t){let e=Math.min(Math.max(s||3,2),6);return e===2?C`<h2 class="h">${t}</h2>`:e===4?C`<h4 class="h">${t}</h4>`:e===5?C`<h5 class="h">${t}</h5>`:e===6?C`<h6 class="h">${t}</h6>`:C`<h3 class="h">${t}</h3>`}var Ui=class extends Re{constructor(){super();this.unwatch=()=>{};this.items=[],this.trunk="",this.look="tones",this.current=-1,this.currentText="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},trunk:{type:String},look:{type:String,reflect:!0},current:{type:Number},currentText:{type:String,attribute:"current-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Re.styles,jt,Vi,Ji,lt`
|
|
1345
1589
|
:host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
|
|
1346
1590
|
ul { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
1347
1591
|
ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
|
|
@@ -1350,10 +1594,10 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1350
1594
|
.graph svg { position: absolute; inset-block-start: -${E(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${E(12)}); overflow: visible; }
|
|
1351
1595
|
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${E(4)} ${E(10)}; align-items: start; }
|
|
1352
1596
|
.path { margin: 0 0 ${E(2)}; opacity: 0.72; }
|
|
1353
|
-
.h { font-size: ${
|
|
1597
|
+
.h { font-size: ${wt("3xl")}; line-height: 1.05; }
|
|
1354
1598
|
.h a { color: inherit; text-decoration: none; }
|
|
1355
1599
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1356
|
-
.h a:focus-visible { outline: none; box-shadow: ${
|
|
1600
|
+
.h a:focus-visible { outline: none; box-shadow: ${B.focusShadow}; border-radius: ${B.radiusSm}; }
|
|
1357
1601
|
.detail { display: flex; flex-direction: column; gap: ${E(3)}; padding-block-start: ${E(1)}; }
|
|
1358
1602
|
.tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
|
|
1359
1603
|
.end { position: relative; display: flex; align-items: center; gap: ${E(3)}; padding-block-start: ${E(4)}; }
|
|
@@ -1362,35 +1606,58 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1362
1606
|
li { grid-template-columns: 56px minmax(0, 1fr); }
|
|
1363
1607
|
.graph svg { inline-size: 56px; }
|
|
1364
1608
|
.row { grid-template-columns: minmax(0, 1fr); }
|
|
1365
|
-
.h { font-size: ${
|
|
1609
|
+
.h { font-size: ${wt("2xl")}; }
|
|
1610
|
+
}
|
|
1611
|
+
/* The mono look: thin ink lines, hollow rings, a hairline under each row and monospace capitals. */
|
|
1612
|
+
:host([look='mono']) { --trunk: currentColor; --gx: 60px; }
|
|
1613
|
+
:host([look='mono']) ul::before { inline-size: 1px; border-radius: 0; }
|
|
1614
|
+
:host([look='mono']) .graph svg path { stroke-width: 1.5; }
|
|
1615
|
+
:host([look='mono']) .ring { position: absolute; inset-inline-start: calc(var(--gx) - 5px); inset-block-start: calc(-1 * ${E(6)} + 0.43 * (100% + 2 * ${E(6)}) - 5px); inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; background: ${B.surfaceCard}; }
|
|
1616
|
+
:host([look='mono']) .ring.current { background: ${rs("color.accent.default","#ffd43b")}; }
|
|
1617
|
+
:host([look='mono']) .text { padding-block-end: ${E(6)}; border-block-end: ${B.borderThin} solid ${B.rule}; }
|
|
1618
|
+
:host([look='mono']) li { padding-block-end: 0; }
|
|
1619
|
+
:host([look='mono']) .path { font-size: 0.6875rem; letter-spacing: ${B.trackingWide}; text-transform: uppercase; opacity: 1; color: ${B.textMuted}; }
|
|
1620
|
+
:host([look='mono']) .h { font-size: clamp(1.5rem, 4cqi, 2rem); font-weight: ${Xi("semibold")}; letter-spacing: -0.03em; }
|
|
1621
|
+
:host([look='mono']) .tags { font-size: 0.6875rem; letter-spacing: ${B.trackingWide}; opacity: 1; color: ${B.textMuted}; }
|
|
1622
|
+
:host([look='mono']) .body { color: ${B.textMuted}; opacity: 1; }
|
|
1623
|
+
:host([look='mono']) .end { font-size: 0.6875rem; letter-spacing: ${B.trackingWide}; text-transform: uppercase; }
|
|
1624
|
+
/* The trunk runs on into its end dot, which sits on the trunk; the words line up with the rows' words. */
|
|
1625
|
+
:host([look='mono']) .end::before { flex: none; inline-size: 8px; block-size: 8px; margin-inline: 7.5px calc(96px - 15.5px - ${E(3)}); }
|
|
1626
|
+
:host([look='mono']) .end::after { content: ''; position: absolute; inset-block-start: 0; inset-inline-start: 11px; inline-size: 1px; block-size: calc(${E(4)} + (100% - ${E(4)}) / 2); background: var(--trunk); }
|
|
1627
|
+
@container (max-width: 44rem) {
|
|
1628
|
+
/* Set on the list, since a container query cannot restyle the container itself. */
|
|
1629
|
+
:host([look='mono']) ul { --gx: 35px; }
|
|
1630
|
+
:host([look='mono']) .tags { display: none; }
|
|
1631
|
+
:host([look='mono']) .end::before { margin-inline-end: calc(56px - 15.5px - ${E(3)}); }
|
|
1366
1632
|
}
|
|
1633
|
+
@media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }
|
|
1367
1634
|
/* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */
|
|
1368
1635
|
@media (prefers-reduced-motion: no-preference) {
|
|
1369
1636
|
.graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }
|
|
1370
|
-
.graph circle { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }
|
|
1637
|
+
.graph circle, .ring { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }
|
|
1371
1638
|
:host([shown]) .graph svg { clip-path: inset(0); }
|
|
1372
|
-
:host([shown]) .graph circle { transform: scale(1); }
|
|
1639
|
+
:host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }
|
|
1373
1640
|
}
|
|
1374
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1375
|
-
<path d="M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200" fill="none" stroke=${
|
|
1376
|
-
|
|
1377
|
-
</svg>`;return
|
|
1378
|
-
<div class="graph">${e(
|
|
1379
|
-
<div>
|
|
1380
|
-
${
|
|
1641
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ba(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let e=this.look==="mono",i=a=>kt`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
1642
|
+
<path d="M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200" fill="none" stroke=${a} stroke-width="3" vector-effect="non-scaling-stroke" />
|
|
1643
|
+
${e?ge:kt`<circle cx="60" cy="86" r="8" fill=${a} />`}
|
|
1644
|
+
</svg>`;return C`<ul part="list">${(this.items??[]).map((a,r)=>{let n=r===this.current,c=C`${a.heading}${n&&this.currentText?C`<span class="sr-only"> (${this.currentText})</span>`:ge}`;return C`<li part="item" style=${`--i:${r}`}>
|
|
1645
|
+
<div class="graph">${i(e?"currentColor":Ea(a.tone,r))}${e?C`<span class=${n?"ring current":"ring"} aria-hidden="true"></span>`:ge}</div>
|
|
1646
|
+
<div class="text">
|
|
1647
|
+
${a.path?C`<p class="path mono">${a.path}</p>`:ge}
|
|
1381
1648
|
<div class="row">
|
|
1382
|
-
${
|
|
1649
|
+
${os(this.headingLevel,a.href?C`<a href=${a.href}>${c}</a>`:c,"h")}
|
|
1383
1650
|
<div class="detail">
|
|
1384
|
-
${
|
|
1385
|
-
${
|
|
1651
|
+
${a.text?C`<p class="body">${a.text}</p>`:ge}
|
|
1652
|
+
${a.tags?.length?C`<p class="tags mono">${a.tags.join(" \xB7 ")}</p>`:ge}
|
|
1386
1653
|
</div>
|
|
1387
1654
|
</div>
|
|
1388
1655
|
</div>
|
|
1389
|
-
</li>`)}</ul>
|
|
1390
|
-
${this.trunk?
|
|
1656
|
+
</li>`})}</ul>
|
|
1657
|
+
${this.trunk?C`<p class="end mono" part="trunk">${this.trunk}</p>`:ge}`}},Yi=class extends Re{constructor(){super();this.unwatch=()=>{};this.counted=null;this.items=[],this.summary="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},summary:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Re.styles,jt,Vi,Ji,lt`
|
|
1391
1658
|
:host { display: block; container-type: inline-size; }
|
|
1392
|
-
.summary { display: inline-flex; align-items: center; gap: ${E(2)}; margin: 0 0 ${E(6)}; padding: ${E(1)} ${E(3)}; border-radius: ${
|
|
1393
|
-
.summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${
|
|
1659
|
+
.summary { display: inline-flex; align-items: center; gap: ${E(2)}; margin: 0 0 ${E(6)}; padding: ${E(1)} ${E(3)}; border-radius: ${B.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
|
|
1660
|
+
.summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${B.success}; }
|
|
1394
1661
|
/* The rows share one grid, so the figure column fits the widest figure and every row lines up. */
|
|
1395
1662
|
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${E(6)}; }
|
|
1396
1663
|
li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${E(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
|
|
@@ -1401,28 +1668,28 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1401
1668
|
}
|
|
1402
1669
|
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1403
1670
|
/* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */
|
|
1404
|
-
.tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${
|
|
1405
|
-
.figure { margin: 0; font-family: ${
|
|
1406
|
-
.label { margin: 0; ${
|
|
1671
|
+
.tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${B.success}; color: var(--impakt-color-status-success-on, #fff); }
|
|
1672
|
+
.figure { margin: 0; font-family: ${B.fontHeading}; font-weight: ${Xi("bold")}; font-size: ${wt("5xl")}; line-height: 1; letter-spacing: ${B.trackingTight}; white-space: nowrap; }
|
|
1673
|
+
.label { margin: 0; ${ss("xl")} }
|
|
1407
1674
|
.status { margin: 0; opacity: 0.72; }
|
|
1408
1675
|
@container (max-width: 40rem) {
|
|
1409
1676
|
ul { grid-template-columns: 28px minmax(0, 1fr); }
|
|
1410
1677
|
li { row-gap: ${E(1)}; }
|
|
1411
1678
|
.label, .status { grid-column: 2; }
|
|
1412
|
-
.figure { font-size: ${
|
|
1679
|
+
.figure { font-size: ${wt("4xl")}; }
|
|
1413
1680
|
}
|
|
1414
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1415
|
-
<ul part="list">${(this.items??[]).map((i,a)=>
|
|
1416
|
-
<span class="tick" aria-hidden="true">${
|
|
1681
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ba(this,()=>this.run())}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}run(){if(br())return;let e=this.items??[],i=performance.now(),a=r=>{this.counted=e.map((n,c)=>Math.min(1,Math.max(0,(r-i-c*150)/1200))),this.requestUpdate(),this.counted.some(n=>n<1)?requestAnimationFrame(a):this.counted=null};requestAnimationFrame(a)}render(){let e=(i,a)=>{let r=this.counted?.[a],n=/^(\d+)(.*)$/.exec(i);if(r===void 0||r>=1||!n)return C`${i}`;let c=1-Math.pow(1-r,3);return C`<span aria-hidden="true">${Math.round(Number(n[1])*c)}${n[2]}</span><span class="sr-only">${i}</span>`};return C`${this.summary?C`<p class="summary mono" part="summary">${this.summary}</p>`:ge}
|
|
1682
|
+
<ul part="list">${(this.items??[]).map((i,a)=>C`<li part="item" style=${`--i:${a}`}>
|
|
1683
|
+
<span class="tick" aria-hidden="true">${ns("check","16px")}</span>
|
|
1417
1684
|
<p class="figure">${e(i.figure,a)}</p>
|
|
1418
1685
|
<p class="label">${i.label}</p>
|
|
1419
|
-
${i.status?
|
|
1420
|
-
</li>`)}</ul>`}},
|
|
1686
|
+
${i.status?C`<p class="status mono">${i.status}</p>`:C`<span></span>`}
|
|
1687
|
+
</li>`)}</ul>`}},Gi=class extends Re{constructor(){super();this.unwatch=()=>{};this.lanes=[],this.marks=[],this.span=20,this.unit="",this.every=2,this.release="",this.releaseAt=0,this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={lanes:{type:Array},marks:{type:Array},span:{type:Number},unit:{type:String},every:{type:Number},release:{type:String},releaseAt:{type:Number,attribute:"release-at"},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Re.styles,is,jt,Vi,Ji,lt`
|
|
1421
1688
|
:host { display: block; }
|
|
1422
1689
|
/* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */
|
|
1423
|
-
figure { margin: 0; overflow-x: auto; border-radius: ${
|
|
1690
|
+
figure { margin: 0; overflow-x: auto; border-radius: ${B.radiusSm}; }
|
|
1424
1691
|
svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }
|
|
1425
|
-
text { font-family: ${
|
|
1692
|
+
text { font-family: ${B.fontMono}; font-size: 12px; fill: currentColor; }
|
|
1426
1693
|
.faint { opacity: 0.5; }
|
|
1427
1694
|
/* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */
|
|
1428
1695
|
.halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }
|
|
@@ -1431,22 +1698,341 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1431
1698
|
svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }
|
|
1432
1699
|
:host([shown]) svg { clip-path: inset(0 -40px 0 0); }
|
|
1433
1700
|
}
|
|
1434
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1435
|
-
<svg viewBox="0 0 ${1200} ${
|
|
1436
|
-
<line x1=${24} y1=${
|
|
1437
|
-
<path d="M${1168} ${
|
|
1438
|
-
${
|
|
1439
|
-
<path d="M${
|
|
1440
|
-
<circle cx=${
|
|
1441
|
-
<text x=${
|
|
1701
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ba(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let r=this.span>0?this.span:20,n=H=>24+Math.min(Math.max(H,0),r)/r*1116,c=this.lanes??[],f=52,m=40+(c.length+1)*f+40,h=40,I=H=>h+(H+1)*f,de=[];for(let H=0;H<=r;H+=Math.max(1,this.every||2))de.push(H);let mt=H=>c.findIndex(pe=>H>=pe.from&&H<=pe.to),Sr=H=>(this.marks??[]).some(pe=>mt(pe.at)===H),ma=this.unit||Se("wk"),zr=this.label||Se("Project timeline"),Tr=c.map(H=>`${H.label}: ${Se("{unit} {from} to {to}",{unit:ma,from:H.from,to:H.to})}`).join("; ");return C`<figure part="figure" tabindex="0">
|
|
1702
|
+
<svg viewBox="0 0 ${1200} ${m}" role="img" aria-label=${`${zr}. ${Tr}${this.release?`. ${Se("{name} at {unit} {at}",{name:this.release,unit:ma,at:this.releaseAt})}`:""}`}>
|
|
1703
|
+
<line x1=${24} y1=${h} x2=${1180} y2=${h} stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
1704
|
+
<path d="M${1168} ${h-7} L${1180} ${h} L${1168} ${h+7}" fill="none" stroke="currentColor" stroke-width="3" />
|
|
1705
|
+
${c.map((H,pe)=>{let ht=Ea(H.tone,pe),Me=I(pe),Ze=n(H.from),St=n(H.to),zt=Math.min(36,(St-Ze)/3);return kt`<g>
|
|
1706
|
+
<path d="M${Ze} ${h} C${Ze} ${(h+Me)/2} ${Ze+zt} ${Me} ${Ze+zt*1.6} ${Me} L${St-zt*1.6} ${Me} C${St-zt} ${Me} ${St} ${(h+Me)/2} ${St} ${h}" fill="none" stroke=${ht} stroke-width="3" />
|
|
1707
|
+
<circle cx=${Ze} cy=${h} r="7" fill=${ht} />
|
|
1708
|
+
<text x=${Ze+zt*1.6} y=${Sr(pe)?Me-10:Me+20} class="halo" style=${`fill:${ht}`}>${H.label}</text>
|
|
1442
1709
|
</g>`})}
|
|
1443
|
-
${(this.marks??[]).map(
|
|
1444
|
-
${this.release?
|
|
1445
|
-
<circle cx=${
|
|
1446
|
-
<rect x=${
|
|
1447
|
-
<text x=${
|
|
1448
|
-
</g>`:
|
|
1449
|
-
${
|
|
1710
|
+
${(this.marks??[]).map(H=>{let pe=mt(H.at),ht=pe>=0?I(pe):h,Me=pe>=0?Ea(c[pe].tone,pe):"currentColor";return kt`<g><circle cx=${n(H.at)} cy=${ht} r="6" fill="var(--impakt-color-surface-card, #fff)" stroke=${Me} stroke-width="3" /><text x=${n(H.at)} y=${ht+22} text-anchor="middle" class="faint">${H.label}</text></g>`})}
|
|
1711
|
+
${this.release?kt`<g>
|
|
1712
|
+
<circle cx=${n(this.releaseAt)} cy=${h} r="10" fill=${gr.success} />
|
|
1713
|
+
<rect x=${n(this.releaseAt)-8} y=${h-36} rx="4" width=${this.release.length*7.6+16} height="22" fill=${gr.success} />
|
|
1714
|
+
<text x=${n(this.releaseAt)} y=${h-21} style="fill:var(--impakt-color-surface-card, #fff)">${this.release}</text>
|
|
1715
|
+
</g>`:ge}
|
|
1716
|
+
${de.map(H=>kt`<text x=${n(H)} y=${m-10} text-anchor="middle" class="faint">${ma} ${H}</text>`)}
|
|
1450
1717
|
</svg>
|
|
1451
|
-
</figure>`}};customElements.define("impakt-release-card",
|
|
1718
|
+
</figure>`}};customElements.define("impakt-release-card",Di);customElements.define("impakt-release-list",_i);customElements.define("impakt-branch-list",Ui);customElements.define("impakt-check-list",Yi);customElements.define("impakt-branch-timeline",Gi);import{css as De,html as S,nothing as Q}from"./atomic-ui.js";import{ImpaktElement as te,focusRing as ds,fontWeight as Fe,say as xr,space as L,spaceAround as ps,t as T}from"./atomic-ui.js";import{css as cs,unsafeCSS as qt}from"./atomic-ui.js";import{token as ct}from"./atomic-ui.js";var xe=ct("color.ink","#111111"),qe=ct("color.paper","#EFEFED"),fr=ct("color.ink-raised","#1C1C1C"),dt=ct("color.ink-line","#2E2E2E"),Pt=ct("color.ink-muted","#A8A8A6"),ae=ct("color.accent.default","#FFD43B"),ye=ct("color.accent.on","#111111"),Ot=qt("var(--impakt-band, var(--impakt-color-ink, #111111))"),ze=qt("var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))"),Pe=qt("var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))"),Wt=qt("var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),Oe=qt("var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),V=cs`
|
|
1719
|
+
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1720
|
+
font-size: 0.6875rem;
|
|
1721
|
+
font-weight: 400;
|
|
1722
|
+
line-height: 1.4;
|
|
1723
|
+
letter-spacing: 0.06em;
|
|
1724
|
+
text-transform: uppercase;
|
|
1725
|
+
`,We=(s,t=3)=>Math.min(Math.max(Number(s)||t,1),6),$r=s=>String(s).padStart(2,"0");var Ia={note:["01","Discover","Note"],wireframe:["02","Design low-fi","Wireframe"],component:["03","Design hi-fi","Component"],code:["04","Build","Code"],live:["05","Launch","Live"]},Qi=class extends te{static{this.properties={stage:{type:String,reflect:!0},index:{type:String},phase:{type:String},label:{type:String},onInk:{type:Boolean,reflect:!0,attribute:"on-ink"},announce:{type:Boolean}}}constructor(){super(),this.stage="",this.index="",this.phase="",this.label="",this.onInk=!1,this.announce=!1}static{this.styles=[...te.styles,De`
|
|
1726
|
+
:host { display: inline-block; vertical-align: middle; }
|
|
1727
|
+
.tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${xe}; border: 1px solid ${xe}; ${V}; font-size: 0.75rem; font-weight: ${Fe("medium")}; white-space: nowrap; }
|
|
1728
|
+
:host([on-ink]) .tag { background: ${fr}; border-color: ${dt}; }
|
|
1729
|
+
.index { color: ${ae}; }
|
|
1730
|
+
.phase { color: ${qe}; }
|
|
1731
|
+
.label { color: ${Pt}; }
|
|
1732
|
+
@media (prefers-color-scheme: dark) { .tag { border-color: ${dt}; } }
|
|
1733
|
+
@media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }
|
|
1734
|
+
`]}render(){let t=this.stage&&this.stage in Ia?Ia[this.stage]:void 0,e=this.index||t?.[0]||"",i=this.phase||(t?xr(t[1]):""),a=this.label||(t?xr(t[2]):"");return!e&&!i&&!a?S``:S`<span class="tag" part="tag" aria-hidden=${this.announce?Q:"true"}
|
|
1735
|
+
>${e?S`<span class="index" part="index">${e}</span>`:Q}${i?S`<span class="phase" part="phase">${i}</span>`:Q}${a?S`<span class="label" part="label">${a}</span>`:Q}</span
|
|
1736
|
+
>`}},Ki=class extends te{static{this.properties={label:{type:String},heading:{type:String},lead:{type:String},size:{type:String,reflect:!0},level:{type:Number,reflect:!0},leadPosition:{type:String,reflect:!0,attribute:"lead-position"},stage:{type:String},stageOnInk:{type:Boolean,attribute:"stage-on-ink"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.label="",this.heading="",this.lead="",this.size="m",this.level=2,this.leadPosition="below",this.stage="",this.stageOnInk=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...te.styles,ps,De`
|
|
1737
|
+
:host { display: block; container-type: inline-size; color: ${T.text}; }
|
|
1738
|
+
.top { display: flex; align-items: center; justify-content: space-between; gap: ${L(4)}; min-block-size: 29px; }
|
|
1739
|
+
.label { margin: 0; font-family: ${T.fontMono}; font-size: 0.875rem; line-height: 1.4; color: ${T.textMuted}; }
|
|
1740
|
+
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${L(10)}; row-gap: ${L(6)}; align-items: end; margin-block-start: ${L(6)}; }
|
|
1741
|
+
.heading { margin: 0; font-family: ${T.fontHeading}; font-weight: ${Fe("semibold")}; color: var(--impakt-color-text-heading, ${T.text}); text-wrap: balance; overflow-wrap: anywhere; }
|
|
1742
|
+
:host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
1743
|
+
:host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
1744
|
+
:host([size='xl']) .heading { font-size: clamp(3rem, 0.8rem + 10cqi, 7.5rem); line-height: 0.95; letter-spacing: -0.05em; }
|
|
1745
|
+
.lead { margin: ${L(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${T.textMuted}; }
|
|
1746
|
+
.side { display: grid; gap: ${L(6)}; justify-items: end; }
|
|
1747
|
+
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
1748
|
+
.body.aside { align-items: center; }
|
|
1749
|
+
.side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }
|
|
1750
|
+
.side:not(:has(.lead)) { align-self: center; }
|
|
1751
|
+
::slotted([slot='aside']) { display: block; max-inline-size: 100%; }
|
|
1752
|
+
@container (max-width: 47.99rem) {
|
|
1753
|
+
.body { grid-template-columns: minmax(0, 1fr); }
|
|
1754
|
+
.side { justify-items: stretch; }
|
|
1755
|
+
.side .lead { inline-size: auto; }
|
|
1756
|
+
}
|
|
1757
|
+
`]}render(){let t=S`<p class="lead" part="lead"><slot name="lead">${this.lead}</slot></p>`,e=!!this.lead||this.hasSlot("lead"),i=S`<slot name="heading">${this.heading}</slot>`,a=Number(this.level)===1?S`<h1 class="heading" part="heading">${i}</h1>`:S`<h2 class="heading" part="heading">${i}</h2>`,r=this.leadPosition==="side";return S`<header part="head">
|
|
1758
|
+
<div class="top">
|
|
1759
|
+
${this.label?S`<p class="label" part="label"><span aria-hidden="true"># </span>${this.label}</p>`:S`<span></span>`}
|
|
1760
|
+
<slot name="tag">${this.stage?S`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>`:Q}</slot>
|
|
1761
|
+
</div>
|
|
1762
|
+
<div class=${this.hasSlot("aside")?"body aside":"body"}>
|
|
1763
|
+
<div class="main">${a}${e&&!r?t:Q}</div>
|
|
1764
|
+
<div class="side">${e&&r?t:Q}<slot name="aside"></slot></div>
|
|
1765
|
+
</div>
|
|
1766
|
+
</header>`}hasSlot(t){let e=this.children;return e?Array.from(e).some(i=>i.getAttribute("slot")===t):!1}},Zi=class extends te{static{this.properties={number:{type:String},heading:{type:String},text:{type:String},tags:{type:String},href:{type:String},linkText:{type:String,attribute:"link-text"},headingLevel:{type:Number,attribute:"heading-level"},featured:{type:Boolean,reflect:!0}}}constructor(){super(),this.featured=!1,this.number="",this.heading="",this.text="",this.tags="",this.href="",this.linkText="Learn more",this.headingLevel=3}static{this.styles=[...te.styles,De`
|
|
1767
|
+
:host { display: block; block-size: 100%; }
|
|
1768
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${L(6)}; padding: ${L(6)}; background: ${T.surfaceCard}; color: ${T.text}; border: 1px solid ${T.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
1769
|
+
.top { display: flex; align-items: center; justify-content: space-between; }
|
|
1770
|
+
.number { font-family: ${T.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }
|
|
1771
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }
|
|
1772
|
+
.foot { display: grid; gap: ${L(3)}; }
|
|
1773
|
+
.heading { margin: 0; font-family: ${T.fontHeading}; font-size: 1.5rem; font-weight: ${Fe("semibold")}; line-height: 1.15; letter-spacing: -0.02em; }
|
|
1774
|
+
.heading a { color: inherit; text-decoration: none; }
|
|
1775
|
+
.heading a::after { content: ''; position: absolute; inset: 0; }
|
|
1776
|
+
.heading a:focus-visible { outline: none; }
|
|
1777
|
+
.heading a:focus-visible::after { box-shadow: ${T.focusShadow}; }
|
|
1778
|
+
.text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: ${T.textMuted}; }
|
|
1779
|
+
.tags { margin: ${L(1)} 0 0; ${V}; color: ${T.textMuted}; }
|
|
1780
|
+
.more { margin-block-start: ${L(2)}; ${V}; font-weight: ${Fe("medium")}; }
|
|
1781
|
+
article:has(a):hover, article:focus-within, :host([featured]) article { background: ${xe}; color: ${qe}; border-color: ${xe}; }
|
|
1782
|
+
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${Pt}; }
|
|
1783
|
+
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${ae}; }
|
|
1784
|
+
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
1785
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
1786
|
+
`]}render(){let t=We(this.headingLevel);return S`<article part="card">
|
|
1787
|
+
<div class="top" aria-hidden="true">
|
|
1788
|
+
<span class="number" part="number">${this.number}</span>
|
|
1789
|
+
<span class="dot" part="dot"></span>
|
|
1790
|
+
</div>
|
|
1791
|
+
<div class="foot">
|
|
1792
|
+
<div class="heading" part="heading" role="heading" aria-level=${t}>
|
|
1793
|
+
${this.href?S`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}
|
|
1794
|
+
</div>
|
|
1795
|
+
${this.text?S`<p class="text" part="text">${this.text}</p>`:Q}
|
|
1796
|
+
${this.tags?S`<p class="tags" part="tags">${this.tags}</p>`:Q}
|
|
1797
|
+
${this.href&&this.linkText?S`<span class="more" part="more" aria-hidden="true">${this.linkText} →</span>`:Q}
|
|
1798
|
+
</div>
|
|
1799
|
+
</article>`}},ea=class extends te{static{this.properties={name:{type:String},variant:{type:String,reflect:!0},drift:{type:Boolean,reflect:!0}}}constructor(){super(),this.name="",this.variant="ink",this.drift=!1}static{this.styles=[...te.styles,De`
|
|
1800
|
+
:host { display: inline-block; position: relative; pointer-events: none; }
|
|
1801
|
+
.cursor { display: inline-flex; align-items: flex-start; }
|
|
1802
|
+
svg { display: block; flex: none; }
|
|
1803
|
+
.arrow { fill: ${xe}; stroke: ${qe}; }
|
|
1804
|
+
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${V}; font-weight: ${Fe("medium")}; white-space: nowrap; background: ${xe}; color: ${qe}; border: 1px solid ${xe}; }
|
|
1805
|
+
:host([variant='outline']) .name { background: ${T.surfaceCard}; color: ${T.text}; border-color: ${T.text}; }
|
|
1806
|
+
:host([variant='accent']) .name { background: ${ae}; color: ${ye}; border-color: ${ye}; }
|
|
1807
|
+
:host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }
|
|
1808
|
+
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }
|
|
1809
|
+
@media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }
|
|
1810
|
+
@media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }
|
|
1811
|
+
`]}render(){return S`<span class="cursor" part="cursor" aria-hidden="true">
|
|
1812
|
+
<svg viewBox="0 0 16 22" width="16" height="22" focusable="false"><path class="arrow" d="M1.5 1.5v16.2l4.3-4.1 3 6.6 2.6-1.2-3-6.5h6z" stroke-width="1.25" stroke-linejoin="round" /></svg>
|
|
1813
|
+
${this.name?S`<span class="name" part="name">${this.name}</span>`:Q}
|
|
1814
|
+
</span>`}},ta=class extends te{static{this.properties={text:{type:String},arrow:{type:String,reflect:!0},decorative:{type:Boolean,reflect:!0}}}constructor(){super(),this.text="",this.arrow="none",this.decorative=!1}static{this.styles=[...te.styles,De`
|
|
1815
|
+
:host { display: inline-block; max-inline-size: 18rem; }
|
|
1816
|
+
.note { display: inline-flex; align-items: center; gap: ${L(2)}; }
|
|
1817
|
+
:host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }
|
|
1818
|
+
:host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }
|
|
1819
|
+
p { margin: 0; font-family: var(--impakt-font-family-hand, ${T.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${T.textMuted}; }
|
|
1820
|
+
svg { flex: none; color: ${T.textMuted}; }
|
|
1821
|
+
:host([arrow='left']) svg { transform: scaleX(-1); }
|
|
1822
|
+
:host([arrow='down']) svg { transform: rotate(90deg); }
|
|
1823
|
+
:host([arrow='up']) svg { transform: rotate(-90deg); }
|
|
1824
|
+
@media (forced-colors: active) { p, svg { color: CanvasText; } }
|
|
1825
|
+
`]}render(){let t=this.arrow&&this.arrow!=="none"?S`<svg viewBox="0 0 40 24" width="40" height="24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M2 16c8-10 20-12 34-6M30 4l6 6-7 4" /></svg>`:Q;return S`<div class="note" part="note" aria-hidden=${this.decorative?"true":Q}><p part="text"><slot>${this.text}</slot></p>${t}</div>`}},ia=class extends te{static{this.properties={items:{type:Array},layout:{type:String,reflect:!0},size:{type:String,reflect:!0},label:{type:String}}}constructor(){super(),this.items=[],this.layout="columns",this.size="md",this.label=""}static{this.styles=[...te.styles,ds,De`
|
|
1826
|
+
:host { display: block; color: ${T.text}; }
|
|
1827
|
+
dl { margin: 0; display: grid; gap: ${L(5)}; }
|
|
1828
|
+
:host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${L(5)}; row-gap: ${L(6)}; }
|
|
1829
|
+
:host([layout='columns']) .fact { border-block-start: 1px solid ${T.text}; padding-block-start: ${L(4)}; }
|
|
1830
|
+
dt { ${V}; color: ${T.textMuted}; }
|
|
1831
|
+
dd { margin: ${L(2)} 0 0; font-family: ${T.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }
|
|
1832
|
+
:host([layout='columns']) dd { margin-block-start: ${L(3)}; }
|
|
1833
|
+
.sm { font-size: 1rem; }
|
|
1834
|
+
.md { font-size: 1.125rem; }
|
|
1835
|
+
.lg { font-size: 1.5rem; letter-spacing: -0.01em; }
|
|
1836
|
+
.xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }
|
|
1837
|
+
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
|
|
1838
|
+
a:hover { text-decoration-thickness: 2px; }
|
|
1839
|
+
@media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }
|
|
1840
|
+
`]}render(){return this.items.length?S`<dl part="list" aria-label=${this.label||Q}>
|
|
1841
|
+
${this.items.map(t=>S`<div class="fact" part="fact">
|
|
1842
|
+
<dt part="label">${t.label}</dt>
|
|
1843
|
+
<dd part="value" class=${t.size??this.size}>${t.href?S`<a href=${t.href}>${t.value}</a>`:t.value}</dd>
|
|
1844
|
+
</div>`)}
|
|
1845
|
+
</dl>`:S``}},aa=class extends te{static{this.properties={items:{type:Array},start:{type:Number},headingLevel:{type:Number,attribute:"heading-level"},label:{type:String}}}constructor(){super(),this.items=[],this.start=1,this.headingLevel=3,this.label=""}static{this.styles=[...te.styles,De`
|
|
1846
|
+
:host { display: block; container-type: inline-size; color: ${T.text}; }
|
|
1847
|
+
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${T.text}; }
|
|
1848
|
+
li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${L(10)}; align-items: center; padding-block: ${L(6)}; border-block-end: 1px solid ${T.rule}; }
|
|
1849
|
+
.n { font-family: ${T.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${T.textMuted}; }
|
|
1850
|
+
.heading { margin: 0; font-family: ${T.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${Fe("semibold")}; line-height: 1.15; letter-spacing: -0.025em; }
|
|
1851
|
+
.text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${T.textMuted}; }
|
|
1852
|
+
@container (max-width: 47.99rem) {
|
|
1853
|
+
li { grid-template-columns: minmax(0, 1fr); row-gap: ${L(2)}; }
|
|
1854
|
+
}
|
|
1855
|
+
@media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }
|
|
1856
|
+
`]}render(){if(!this.items.length)return S``;let t=We(this.headingLevel),e=Number.isFinite(Number(this.start))?Number(this.start):1;return S`<ol part="list" role="list" start=${e} aria-label=${this.label||Q}>
|
|
1857
|
+
${this.items.map((i,a)=>S`<li part="item">
|
|
1858
|
+
<span class="n" aria-hidden="true">${$r(e+a)}</span>
|
|
1859
|
+
<div class="heading" role="heading" aria-level=${t} part="heading">${i.heading}</div>
|
|
1860
|
+
${i.text?S`<p class="text" part="text">${i.text}</p>`:S`<span></span>`}
|
|
1861
|
+
</li>`)}
|
|
1862
|
+
</ol>`}},ra=class extends te{static{this.properties={columns:{type:Array},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.columns=[],this.headingLevel=3}static{this.styles=[...te.styles,De`
|
|
1863
|
+
:host { display: block; color: ${T.text}; }
|
|
1864
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${L(8)} ${L(5)}; }
|
|
1865
|
+
section { border-block-start: 1px solid ${T.text}; padding-block-start: ${L(4)}; }
|
|
1866
|
+
.heading { margin: 0; ${V}; color: ${T.textMuted}; }
|
|
1867
|
+
ul { margin: ${L(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${L(2)}; }
|
|
1868
|
+
li { font-family: ${T.fontHeading}; font-size: 1.5rem; font-weight: ${Fe("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
1869
|
+
@media (forced-colors: active) { section { border-color: CanvasText; } }
|
|
1870
|
+
`]}render(){if(!this.columns.length)return S``;let t=We(this.headingLevel);return S`<div class="grid" part="grid">
|
|
1871
|
+
${this.columns.map(e=>S`<section part="column">
|
|
1872
|
+
<div class="heading" role="heading" aria-level=${t} part="heading">${e.heading}</div>
|
|
1873
|
+
<ul role="list" part="list">${(e.items??[]).map(i=>S`<li part="item">${i}</li>`)}</ul>
|
|
1874
|
+
</section>`)}
|
|
1875
|
+
</div>`}},sa=class extends te{static{this.properties={hours:{type:String},name:{type:String},region:{type:String},text:{type:String},tag:{type:String},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.hours="",this.name="",this.region="",this.text="",this.tag="",this.headingLevel=3}static{this.styles=[...te.styles,De`
|
|
1876
|
+
:host { display: block; block-size: 100%; container-type: inline-size; }
|
|
1877
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${L(2)}; padding: ${L(8)}; background: ${T.surfaceCard}; color: ${T.text}; border: 1px solid ${T.text}; }
|
|
1878
|
+
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${L(2)}; }
|
|
1879
|
+
.hours { margin: 0; ${V}; color: ${T.textMuted}; }
|
|
1880
|
+
.tag { margin: 0; padding: 3px 6px; ${V}; font-weight: ${Fe("medium")}; background: ${ae}; color: ${ye}; }
|
|
1881
|
+
.name { margin: ${L(2)} 0 0; font-family: ${T.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${Fe("semibold")}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
|
|
1882
|
+
.region { margin: ${L(2)} 0 0; font-size: 1rem; line-height: 1.4; }
|
|
1883
|
+
.text { margin: ${L(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${T.textMuted}; }
|
|
1884
|
+
@container (max-width: 22rem) { article { padding: ${L(5)}; } }
|
|
1885
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }
|
|
1886
|
+
`]}render(){let t=We(this.headingLevel);return S`<article part="card">
|
|
1887
|
+
${this.hours||this.tag?S`<div class="top">${this.hours?S`<p class="hours" part="hours">${this.hours}</p>`:S`<span></span>`}${this.tag?S`<p class="tag" part="tag">${this.tag}</p>`:Q}</div>`:Q}
|
|
1888
|
+
<div class="name" role="heading" aria-level=${t} part="name">${this.name}</div>
|
|
1889
|
+
${this.region?S`<p class="region" part="region">${this.region}</p>`:Q}
|
|
1890
|
+
${this.text?S`<p class="text" part="text">${this.text}</p>`:Q}
|
|
1891
|
+
</article>`}};customElements.define("impakt-stage-tag",Qi);customElements.define("impakt-section-head",Ki);customElements.define("impakt-service-card",Zi);customElements.define("impakt-cursor",ea);customElements.define("impakt-hand-note",ta);customElements.define("impakt-facts",ia);customElements.define("impakt-numbered-list",aa);customElements.define("impakt-column-list",ra);customElements.define("impakt-office-card",sa);import{css as Dt,html as U,nothing as be,svg as ms}from"./atomic-ui.js";import{ImpaktElement as Ne,fontWeight as Ft,say as yr,space as re,t as He,visuallyHidden as hs}from"./atomic-ui.js";var vr=40,Ra=72,na=class extends Ne{static{this.properties={nodes:{type:Array},lineLabel:{type:String,attribute:"line-label"},label:{type:String}}}constructor(){super(),this.nodes=[],this.lineLabel="",this.label=""}static{this.styles=[...Ne.styles,Dt`
|
|
1892
|
+
:host { display: block; container-type: inline-size; background: ${Ot}; color: ${ze}; }
|
|
1893
|
+
.visual { display: none; position: relative; }
|
|
1894
|
+
.visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
|
|
1895
|
+
.visual path { fill: none; stroke: ${ze}; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
|
|
1896
|
+
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${ze}; background: ${Ot}; transform: translate(-50%, -50%); }
|
|
1897
|
+
.ring.current { inline-size: 12px; block-size: 12px; background: ${ae}; }
|
|
1898
|
+
.vlabel { position: absolute; transform: translateX(-50%); ${V}; color: ${Pe}; white-space: nowrap; }
|
|
1899
|
+
.lineLabel { position: absolute; inset-inline-start: 0; ${V}; color: ${Pe}; }
|
|
1900
|
+
.flag { display: inline-block; padding: 4px 8px; ${V}; font-weight: ${Ft("medium")}; background: ${ae}; color: ${ye}; white-space: nowrap; }
|
|
1901
|
+
.visual .flag { position: absolute; transform: translate(-50%, -100%); }
|
|
1902
|
+
|
|
1903
|
+
ol { margin: 0; padding: ${re(6)} ${re(4)}; list-style: none; }
|
|
1904
|
+
li { position: relative; padding: 0 0 ${re(5)} 28px; }
|
|
1905
|
+
li::before { content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 4px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${ze}; background: ${Ot}; }
|
|
1906
|
+
li[aria-current]::before { background: ${ae}; }
|
|
1907
|
+
li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 4.25px; inset-block-start: 14px; inset-block-end: -4px; inline-size: 1.5px; background: ${ze}; }
|
|
1908
|
+
.rlabel { ${V}; font-size: 0.75rem; color: ${ze}; }
|
|
1909
|
+
li .flag { margin-inline-start: ${re(2)}; }
|
|
1910
|
+
|
|
1911
|
+
@container (min-width: 60rem) {
|
|
1912
|
+
.visual { display: block; }
|
|
1913
|
+
ol { ${hs} }
|
|
1914
|
+
}
|
|
1915
|
+
@media (forced-colors: active) {
|
|
1916
|
+
.visual path { stroke: CanvasText; }
|
|
1917
|
+
.ring, li::before { border-color: CanvasText; background: Canvas; }
|
|
1918
|
+
.ring.current, li[aria-current]::before { background: Highlight; }
|
|
1919
|
+
li::after { background: CanvasText; }
|
|
1920
|
+
.flag { border: 1px solid CanvasText; }
|
|
1921
|
+
}
|
|
1922
|
+
`]}render(){let t=this.nodes??[];if(!t.length)return U``;let e=t.length,i=m=>Math.max(0,Math.min(4,Number(m.depth)||0)),a=Math.max(...t.map(i)),r=Ra+a*vr+44,n=t.map((m,h)=>({x:(h+.5)/e*1e3,y:Ra+i(m)*vr})),c=`M0 ${n[0].y} L${n[0].x} ${n[0].y}`;for(let m=1;m<e;m++){let h=n[m-1],I=n[m];if(h.y===I.y)c+=` L${I.x} ${I.y}`;else{let de=(h.x+I.x)/2;c+=` C${de} ${h.y} ${de} ${I.y} ${I.x} ${I.y}`}}c+=` L1000 ${n[e-1].y}`;let f=m=>`${(m+.5)/e*100}%`;return U`<div class="visual" part="drawing" aria-hidden="true" style="block-size:${r}px">
|
|
1923
|
+
<svg viewBox="0 0 1000 ${r}" preserveAspectRatio="none" focusable="false">${ms`<path d=${c} />`}</svg>
|
|
1924
|
+
${this.lineLabel?U`<span class="lineLabel" style="inset-block-start:${Ra-64}px">${this.lineLabel}</span>`:be}
|
|
1925
|
+
${t.map((m,h)=>{let I=n[h].y,mt=i(m)===0?m.flag?be:U`<span class="vlabel" style="inset-inline-start:${f(h)};inset-block-start:${I-30}px">${m.label}</span>`:U`<span class="vlabel" style="inset-inline-start:${f(h)};inset-block-start:${I+14}px">${m.label}</span>`;return U`<span class="ring ${m.current?"current":""}" style="inset-inline-start:${f(h)};inset-block-start:${I}px"></span>
|
|
1926
|
+
${mt}
|
|
1927
|
+
${m.flag?U`<span class="flag" style="inset-inline-start:${f(h)};inset-block-start:${I-12}px">${m.flag}</span>`:be}`})}
|
|
1928
|
+
</div>
|
|
1929
|
+
<ol part="list" role="list" aria-label=${this.label||be}>
|
|
1930
|
+
${t.map(m=>U`<li part="item" aria-current=${m.current?"step":be}>
|
|
1931
|
+
<span class="rlabel">${m.label}</span>${m.flag?U`<span class="flag">${m.flag}</span>`:be}
|
|
1932
|
+
</li>`)}
|
|
1933
|
+
</ol>`}},oa=class extends Ne{static{this.properties={days:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},label:{type:String}}}constructor(){super(),this.days=[],this.headingLevel=3,this.label=""}static{this.styles=[...Ne.styles,Dt`
|
|
1934
|
+
:host { display: block; }
|
|
1935
|
+
ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; }
|
|
1936
|
+
li { box-sizing: border-box; min-block-size: 150px; padding: ${re(5)}; background: ${Wt}; border: 1px solid ${Oe}; color: ${ze}; }
|
|
1937
|
+
li.highlight { background: ${ae}; border-color: ${ae}; color: ${ye}; }
|
|
1938
|
+
.day { margin: 0; ${V}; color: ${Pe}; }
|
|
1939
|
+
.heading { margin: ${re(2)} 0 0; font-family: ${He.fontHeading}; font-size: 2rem; font-weight: ${Ft("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
1940
|
+
.text { margin: ${re(3)} 0 0; font-size: 0.875rem; line-height: 1.45; color: ${Pe}; }
|
|
1941
|
+
li.highlight :is(.day, .text) { color: ${ye}; }
|
|
1942
|
+
@media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }
|
|
1943
|
+
`]}render(){if(!this.days?.length)return U``;let t=We(this.headingLevel);return U`<ol part="list" role="list" aria-label=${this.label||be}>
|
|
1944
|
+
${this.days.map(e=>U`<li part="day" class=${e.highlight?"highlight":""}>
|
|
1945
|
+
<p class="day">${e.day}</p>
|
|
1946
|
+
<div class="heading" role="heading" aria-level=${t}>${e.heading}</div>
|
|
1947
|
+
${e.text?U`<p class="text">${e.text}</p>`:be}
|
|
1948
|
+
</li>`)}
|
|
1949
|
+
</ol>`}},la=class extends Ne{static{this.properties={label:{type:String},text:{type:String}}}constructor(){super(),this.label="",this.text=""}static{this.styles=[...Ne.styles,Dt`
|
|
1950
|
+
:host { display: block; }
|
|
1951
|
+
.panel { padding: ${re(8)} ${re(8)} ${re(10)}; background: ${xe}; color: ${qe}; border: 1px solid ${xe}; }
|
|
1952
|
+
.label { margin: 0 0 ${re(4)}; ${V}; font-weight: ${Ft("medium")}; color: ${ae}; }
|
|
1953
|
+
.text { margin: 0; max-inline-size: 26em; font-family: ${He.fontHeading}; font-size: clamp(1.5rem, 1rem + 2vw, 2rem); font-weight: ${Ft("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
1954
|
+
@media (prefers-color-scheme: dark) { .panel { border-color: ${dt}; } }
|
|
1955
|
+
@media (max-width: 30rem) { .panel { padding: ${re(6)}; } }
|
|
1956
|
+
@media (forced-colors: active) { .panel { border-color: CanvasText; } }
|
|
1957
|
+
`]}render(){return U`<div class="panel" part="panel">
|
|
1958
|
+
${this.label?U`<p class="label" part="label">${this.label}</p>`:be}
|
|
1959
|
+
<p class="text" part="text"><slot>${this.text}</slot></p>
|
|
1960
|
+
</div>`}},ca=class extends Ne{static{this.properties={number:{type:String},statement:{type:String},metric:{type:String},impact:{type:String,reflect:!0},impactLabel:{type:String,attribute:"impact-label"}}}constructor(){super(),this.number="",this.statement="",this.metric="",this.impact="",this.impactLabel=""}static{this.styles=[...Ne.styles,Dt`
|
|
1961
|
+
:host { display: block; block-size: 100%; }
|
|
1962
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${re(4)}; padding: ${re(6)}; background: ${He.surfaceCard}; color: ${He.text}; border: 1px solid ${He.text}; }
|
|
1963
|
+
.top { display: flex; justify-content: space-between; align-items: center; gap: ${re(2)}; flex-wrap: wrap; min-block-size: 22px; }
|
|
1964
|
+
.number { font-family: ${He.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }
|
|
1965
|
+
.impact { margin: 0; padding: 3px 7px; ${V}; font-weight: ${Ft("medium")}; border: 1px solid ${He.text}; color: ${He.text}; }
|
|
1966
|
+
:host([impact='high']) .impact { background: ${ae}; color: ${ye}; border-color: ${ye}; }
|
|
1967
|
+
.statement { margin: 0; font-family: ${He.fontHeading}; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }
|
|
1968
|
+
.metric { margin: 0; ${V}; color: ${He.textMuted}; }
|
|
1969
|
+
@media (forced-colors: active) { article, .impact { border-color: CanvasText; } }
|
|
1970
|
+
`]}render(){let t={high:"High impact",medium:"Medium impact",low:"Low impact"},e=this.impactLabel||(this.impact&&t[this.impact]?yr(t[this.impact]):"");return U`<article part="card">
|
|
1971
|
+
${this.number||e?U`<div class="top">
|
|
1972
|
+
<span class="number" part="number">${this.number}</span>
|
|
1973
|
+
${e?U`<p class="impact" part="impact">${e}</p>`:be}
|
|
1974
|
+
</div>`:be}
|
|
1975
|
+
${this.statement?U`<p class="statement" part="statement">${this.statement}</p>`:be}
|
|
1976
|
+
${this.metric?U`<p class="metric" part="metric">${yr("Metric")} · ${this.metric}</p>`:be}
|
|
1977
|
+
</article>`}},da=class extends Ne{static{this.properties={caption:{type:String},ratio:{type:String},filled:{state:!0}}}constructor(){super(),this.caption="",this.ratio="16 / 9",this.filled=!1}static{this.styles=[...Ne.styles,Dt`
|
|
1978
|
+
:host { display: block; }
|
|
1979
|
+
.frame { border: 1px solid ${Oe}; background: ${Ot}; color: ${ze}; }
|
|
1980
|
+
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${re(3)}; background: ${Wt}; border-block-end: 1px solid ${Oe}; overflow: hidden; }
|
|
1981
|
+
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${Oe}; }
|
|
1982
|
+
.dot:first-child { background: ${ae}; }
|
|
1983
|
+
.caption { margin-inline-start: ${re(1.5)}; ${V}; color: ${Pe}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1984
|
+
.canvas { position: relative; }
|
|
1985
|
+
.canvas.empty { background-image: linear-gradient(to right, ${Oe} 1px, transparent 1px), linear-gradient(to bottom, ${Oe} 1px, transparent 1px); background-size: 28px 28px; }
|
|
1986
|
+
::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }
|
|
1987
|
+
@media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
1988
|
+
`]}render(){return U`<div class="frame" part="frame">
|
|
1989
|
+
<div class="bar" part="bar" aria-hidden="true">
|
|
1990
|
+
<span class="dot"></span><span class="dot"></span><span class="dot"></span>
|
|
1991
|
+
${this.caption?U`<span class="caption" part="caption">${this.caption}</span>`:be}
|
|
1992
|
+
</div>
|
|
1993
|
+
<div class="canvas ${this.filled?"":"empty"}" part="canvas" style=${this.filled?"":`aspect-ratio: ${this.ratio||"16 / 9"}`}>
|
|
1994
|
+
<slot @slotchange=${this.onSlot}></slot>
|
|
1995
|
+
</div>
|
|
1996
|
+
</div>`}onSlot(t){this.filled=t.target.assignedElements().length>0}};customElements.define("impakt-process-line",na);customElements.define("impakt-week-strip",oa);customElements.define("impakt-callout",la);customElements.define("impakt-hypothesis-card",ca);customElements.define("impakt-browser-frame",da);import{css as us,html as pt,nothing as _t}from"./atomic-ui.js";import{ImpaktElement as kr,fontWeight as wr,space as Ut,t as _e}from"./atomic-ui.js";var pa=class extends kr{static{this.properties={steps:{type:Array},size:{type:String,reflect:!0},onInk:{type:Boolean,reflect:!0,attribute:"on-ink"},headingLevel:{type:Number,attribute:"heading-level"},label:{type:String}}}constructor(){super(),this.steps=[],this.size="md",this.onInk=!1,this.headingLevel=3,this.label=""}static{this.styles=[...kr.styles,us`
|
|
1997
|
+
:host { display: block; container-type: inline-size; }
|
|
1998
|
+
ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }
|
|
1999
|
+
li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }
|
|
2000
|
+
li:not(:first-child) { flex-basis: 56px; }
|
|
2001
|
+
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${_e.text}; }
|
|
2002
|
+
:host([on-ink]) .arrow { color: ${ze}; }
|
|
2003
|
+
.arrow svg { display: block; }
|
|
2004
|
+
.via { font-size: 0.75rem; line-height: 1.2; color: ${_e.textMuted}; }
|
|
2005
|
+
:host([on-ink]) .via { color: ${Pe}; }
|
|
2006
|
+
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${Ut(4)} ${Ut(5)}; border: 1px solid ${_e.text}; background: ${_e.surfaceCard}; color: ${_e.text}; }
|
|
2007
|
+
:host([size='lg']) .box { padding: ${Ut(6)}; }
|
|
2008
|
+
.box.soft { background: ${_e.surfaceSubtle}; }
|
|
2009
|
+
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${Wt}; border-color: ${Oe}; color: ${ze}; }
|
|
2010
|
+
.box.ink { background: ${xe}; border-color: ${dt}; color: ${qe}; }
|
|
2011
|
+
.box.accent { background: ${ae}; border-color: ${ae}; color: ${ye}; }
|
|
2012
|
+
.label { margin: 0 0 ${Ut(2)}; ${V}; color: ${_e.textMuted}; }
|
|
2013
|
+
.text { margin: ${Ut(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${_e.textMuted}; }
|
|
2014
|
+
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${Pe}; }
|
|
2015
|
+
.ink :is(.label, .text) { color: ${Pt}; }
|
|
2016
|
+
.accent :is(.label, .text) { color: ${ye}; }
|
|
2017
|
+
.heading { margin: 0; font-family: ${_e.fontHeading}; font-size: 1.125rem; font-weight: ${wr("medium")}; line-height: 1.25; letter-spacing: -0.01em; }
|
|
2018
|
+
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${wr("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2019
|
+
@container (max-width: 47.99rem) {
|
|
2020
|
+
ol, li { flex-direction: column; }
|
|
2021
|
+
.arrow { inline-size: auto; block-size: 48px; flex-direction: row; }
|
|
2022
|
+
.arrow svg { transform: rotate(90deg); }
|
|
2023
|
+
}
|
|
2024
|
+
@media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }
|
|
2025
|
+
`]}render(){if(!this.steps?.length)return pt``;let t=We(this.headingLevel);return pt`<ol part="list" role="list" aria-label=${this.label||_t}>
|
|
2026
|
+
${this.steps.map((e,i)=>pt`<li part="step">
|
|
2027
|
+
${i>0?pt`<span class="arrow" part="arrow">
|
|
2028
|
+
<svg viewBox="0 0 36 12" width="36" height="12" fill="none" stroke="currentColor" stroke-width="1.25" aria-hidden="true" focusable="false"><path d="M0 6h34M29 1l5 5-5 5" /></svg>
|
|
2029
|
+
${e.connector?pt`<span class="via">${e.connector}</span>`:_t}
|
|
2030
|
+
</span>`:_t}
|
|
2031
|
+
<div class="box ${e.tone??"card"}" part="box">
|
|
2032
|
+
${e.label?pt`<p class="label">${e.label}</p>`:_t}
|
|
2033
|
+
<div class="heading" role="heading" aria-level=${t}>${e.heading}</div>
|
|
2034
|
+
${e.text?pt`<p class="text">${e.text}</p>`:_t}
|
|
2035
|
+
</div>
|
|
2036
|
+
</li>`)}
|
|
2037
|
+
</ol>`}};customElements.define("impakt-flow",pa);export{Ii as ImpaktAffordabilityCalculator,Kt as ImpaktAnnouncement,zi as ImpaktBeforeAfter,Ui as ImpaktBranchList,Gi as ImpaktBranchTimeline,da as ImpaktBrowserFrame,la as ImpaktCallout,ii as ImpaktCardGrid,hi as ImpaktCarousel,Yi as ImpaktCheckList,ra as ImpaktColumnList,Bt as ImpaktContactBlock,$i as ImpaktCtaBanner,ea as ImpaktCursor,Ni as ImpaktEstimator,ia as ImpaktFacts,oi as ImpaktFaq,Vt as ImpaktFeatureList,pa as ImpaktFlow,ui as ImpaktGallery,ta as ImpaktHandNote,Xt as ImpaktHero,pi as ImpaktHighlight,ca as ImpaktHypothesisCard,ri as ImpaktJourneyButton,Mi as ImpaktLocationCard,gi as ImpaktLogoCloud,fi as ImpaktMediaSplit,Si as ImpaktMortgageCalculator,yi as ImpaktNewsletter,aa as ImpaktNumberedList,ci as ImpaktOffer,sa as ImpaktOfficeCard,Li as ImpaktPlanComparison,di as ImpaktPostCard,na as ImpaktProcessLine,Jt as ImpaktQuote,Ei as ImpaktRegulatoryNotice,Di as ImpaktReleaseCard,_i as ImpaktReleaseList,xi as ImpaktReviews,Wi as ImpaktScene,Fi as ImpaktScrubber,Zt as ImpaktSearchBar,Ki as ImpaktSectionHead,Zi as ImpaktServiceCard,Pi as ImpaktSiteFooter,ji as ImpaktSiteHeader,li as ImpaktSiteMenu,wi as ImpaktSitePlan,Qi as ImpaktStageTag,Bi as ImpaktStampDutyCalculator,Qt as ImpaktStat,ni as ImpaktStatRow,bi as ImpaktSteps,Ti as ImpaktStickyBar,Et as ImpaktVideo,oa as ImpaktWeekStrip,qi as ImpaktWordmark,si as ImpaktWorkList,Ct as JOURNEY_STAGES,Ve as SDLT,Ia as STAGE_WORDS,er as embedOf,Ht as estimate,Ga as gallerySpan,Va as monthlyPayment,va as phaseWeeks,tr as stampDuty};
|
|
1452
2038
|
//# sourceMappingURL=atomic-ui-blocks.js.map
|