@atomic-ui/blocks 0.13.0 → 0.13.2
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 +261 -18
- package/dist/{chunk-JIITZUGI.js → chunk-53V2GY6L.js} +30 -19
- package/dist/chunk-53V2GY6L.js.map +1 -0
- package/dist/{chunk-MX7FU5JE.js → chunk-B6I3GVJ5.js} +32 -19
- package/dist/chunk-B6I3GVJ5.js.map +1 -0
- package/dist/{chunk-KOYQRJKY.js → chunk-FNGN2F6Y.js} +145 -14
- package/dist/chunk-FNGN2F6Y.js.map +1 -0
- package/dist/{chunk-W3MK3EEO.js → chunk-H262HKSL.js} +37 -19
- package/dist/chunk-H262HKSL.js.map +1 -0
- package/dist/{chunk-VXQS5TAN.js → chunk-IT2NA25D.js} +44 -23
- package/dist/chunk-IT2NA25D.js.map +1 -0
- package/dist/{chunk-EYP5LWUR.js → chunk-MMADM6OW.js} +13 -3
- package/dist/chunk-MMADM6OW.js.map +1 -0
- package/dist/{chunk-CCFBROX3.js → chunk-WIVKJL64.js} +67 -34
- package/dist/chunk-WIVKJL64.js.map +1 -0
- package/dist/{chunk-X3U2SOVV.js → chunk-WTVF3JRL.js} +43 -27
- package/dist/chunk-WTVF3JRL.js.map +1 -0
- package/dist/components/changelog.js +1 -1
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +21 -6
- package/dist/components/g2-case.js +1 -1
- package/dist/components/g2-site.d.ts +17 -4
- package/dist/components/g2-site.js +1 -1
- package/dist/components/journey.d.ts +13 -2
- package/dist/components/journey.js +1 -1
- package/dist/components/organisms.js +1 -1
- package/dist/components/site.d.ts +72 -1
- package/dist/components/site.js +2 -1
- package/dist/components/studio.d.ts +4 -0
- package/dist/components/studio.js +1 -1
- package/dist/index.js +8 -8
- package/dist/standalone/atomic-ui-blocks.js +1207 -1046
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-CCFBROX3.js.map +0 -1
- package/dist/chunk-EYP5LWUR.js.map +0 -1
- package/dist/chunk-JIITZUGI.js.map +0 -1
- package/dist/chunk-KOYQRJKY.js.map +0 -1
- package/dist/chunk-MX7FU5JE.js.map +0 -1
- package/dist/chunk-VXQS5TAN.js.map +0 -1
- package/dist/chunk-W3MK3EEO.js.map +0 -1
- package/dist/chunk-X3U2SOVV.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/* @atomic-ui/blocks version 0.13.
|
|
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.13.2, standalone. Load atomic-ui.js from @atomic-ui/ui first, from the same folder. */
|
|
2
|
+
import"./atomic-ui.js";import{css as ht,html as j,nothing as ce}from"./atomic-ui.js";import{ImpaktElement as Ce,fontSize as nt,fontWeight as qe,lineHeight as ei,space as y,spaceAround as li,t as S,token as Or,type as rt,iconSvg as ti}from"./atomic-ui.js";var wa=(o,t,e)=>j`<div class=${e} role="heading" aria-level=${o}>${t}</div>`,Ya=ht`
|
|
3
|
+
.h { margin: 0; color: ${S.textHeading}; font-family: ${S.fontHeading}; font-weight: ${qe("bold")}; line-height: ${ei("tight")}; }
|
|
4
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${S.brand})); ${rt("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${S.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${qe("semibold")}); letter-spacing: ${S.trackingWide}; text-transform: uppercase; }
|
|
5
|
+
.body { margin: 0; line-height: ${ei("normal")}; max-inline-size: 65ch; }
|
|
6
|
+
`,ii=class extends Ce{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=[...Ce.styles,li,Ya,ht`
|
|
7
7
|
:host { display: block; container-type: inline-size; }
|
|
8
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
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 { ${
|
|
12
|
+
.h { ${rt("5xl")} letter-spacing: ${S.trackingTight}; text-wrap: balance; }
|
|
13
|
+
.body { ${rt("lg")} color: ${S.textMuted}; text-wrap: pretty; }
|
|
14
|
+
@container (max-width: 40rem) { .h { ${rt("4xl")} } }
|
|
15
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: ${S.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${S.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
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; }
|
|
@@ -23,7 +23,7 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
23
23
|
.cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
|
|
24
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: ${y(14)}; inset-inline-end: ${y(9)}; display: inline-flex; align-items: center; gap: ${y(2.5)}; padding: ${y(3)} ${y(4.5)}; ${
|
|
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)}; ${rt("sm")} font-weight: ${qe("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${S.radiusXl}; }
|
|
27
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; }
|
|
@@ -31,24 +31,24 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
31
31
|
@container (max-width: 30rem) { .finder { display: none; } }
|
|
32
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
33
|
`]}render(){if(this.treatment==="cover"&&this.imageSrc)return j`<div class="cover" part="hero">
|
|
34
|
-
${this.ratingText?j`<div class="chip-line"><div class="chip">${
|
|
34
|
+
${this.ratingText?j`<div class="chip-line"><div class="chip">${ti("star","20px")}${this.ratingText}</div></div>`:ce}
|
|
35
35
|
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
36
36
|
<div class="words">
|
|
37
|
-
${this.eyebrow?j`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon!=="none"?
|
|
38
|
-
${
|
|
39
|
-
${this.lead?j`<p class="body">${this.lead}</p>`:
|
|
37
|
+
${this.eyebrow?j`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon!=="none"?ti(this.eyebrowIcon,"16px"):ce}${this.eyebrow}</p>`:ce}
|
|
38
|
+
${wa(this.level,j`<slot name="heading">${this.heading}</slot>`,"h")}
|
|
39
|
+
${this.lead?j`<p class="body">${this.lead}</p>`:ce}
|
|
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
|
|
43
|
+
</div>`;let t=!!this.imageSrc&&this.align!=="center";return j`<div class="hero ${t?"pictured":""}" part="hero">
|
|
44
44
|
<div class="words">
|
|
45
|
-
${this.eyebrow?j`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:
|
|
46
|
-
${
|
|
47
|
-
${this.lead?j`<p class="body">${this.lead}</p>`:
|
|
45
|
+
${this.eyebrow?j`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:ce}
|
|
46
|
+
${wa(this.level,j`<slot name="heading">${this.heading}</slot>`,"h")}
|
|
47
|
+
${this.lead?j`<p class="body">${this.lead}</p>`:ce}
|
|
48
48
|
<div class="actions"><slot name="actions"></slot></div>
|
|
49
49
|
</div>
|
|
50
|
-
${
|
|
51
|
-
</div>`}},
|
|
50
|
+
${t?j`<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />`:ce}
|
|
51
|
+
</div>`}},ai=class extends Ce{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=[...Ce.styles,li,Ya,ht`
|
|
52
52
|
:host { display: block; container-type: inline-size; }
|
|
53
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)); }
|
|
@@ -56,142 +56,145 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
56
56
|
li { display: flex; flex-direction: column; gap: ${y(2)}; }
|
|
57
57
|
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${y(4)}; align-items: start; }
|
|
58
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: ${
|
|
59
|
+
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${S.radiusLg}; background: ${S.brandSubtle}; color: ${S.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: ${nt("lg")}; }
|
|
62
|
+
.body { color: ${S.text}; }
|
|
63
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: ${
|
|
64
|
+
:host([look='ruled']) li { gap: ${y(3)}; padding-block-start: ${y(5)}; border-block-start: ${S.borderThin} solid ${S.text}; }
|
|
65
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: ${
|
|
67
|
-
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${
|
|
66
|
+
:host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${qe("semibold")}; letter-spacing: -0.02em; line-height: 1.2; }
|
|
67
|
+
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${S.textMuted}; }
|
|
68
68
|
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${y(3)}; }
|
|
69
69
|
/* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */
|
|
70
70
|
:host([look='numbered']) ul { gap: ${y(3)}; }
|
|
71
|
-
:host([look='numbered']) li { gap: ${y(4)}; padding: ${y(6)}; background: ${
|
|
72
|
-
.top { display: flex; align-items: center; justify-content: space-between; font-family: ${
|
|
73
|
-
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${
|
|
74
|
-
.dot.attention { background: ${
|
|
71
|
+
:host([look='numbered']) li { gap: ${y(4)}; padding: ${y(6)}; background: ${S.surfaceCard}; border: ${S.borderThin} solid ${S.text}; border-radius: ${S.radiusSm}; }
|
|
72
|
+
.top { display: flex; align-items: center; justify-content: space-between; font-family: ${S.fontMono}; font-size: ${nt("sm")}; color: ${S.text}; }
|
|
73
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${S.text}; }
|
|
74
|
+
.dot.attention { background: ${Or("color.accent.default","#ffd43b")}; box-shadow: inset 0 0 0 1px ${S.text}; }
|
|
75
75
|
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
76
76
|
@media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }
|
|
77
77
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
78
78
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
79
|
-
`]}render(){let
|
|
80
|
-
${
|
|
81
|
-
${e.icon&&this.look!=="ruled"&&!
|
|
82
|
-
<div class="words">${
|
|
83
|
-
</li>`)}</ul>`}},
|
|
79
|
+
`]}render(){let t=this.look==="numbered";return j`<ul part="list">${(this.items??[]).map((e,i)=>j`<li part="item">
|
|
80
|
+
${t?j`<div class="top" aria-hidden="true"><span>${String(i+1).padStart(2,"0")}</span><span class=${e.attention?"dot attention":"dot"}></span></div>`:ce}
|
|
81
|
+
${e.icon&&this.look!=="ruled"&&!t?j`<span class="icon">${ti(e.icon,"24px")}</span>`:ce}
|
|
82
|
+
<div class="words">${wa(this.headingLevel,j`${e.heading}${t&&e.attention?j`<span class="sr"> (${e.attention})</span>`:ce}`,"h")}${e.text?j`<p class="body">${e.text}</p>`:ce}</div>
|
|
83
|
+
</li>`)}</ul>`}},ri=class extends Ce{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=[...Ce.styles,li,ht`
|
|
84
84
|
:host { display: block; }
|
|
85
85
|
figure { margin: 0; display: flex; flex-direction: column; gap: ${y(4)}; max-inline-size: 48rem; }
|
|
86
86
|
:host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }
|
|
87
|
-
blockquote { margin: 0; font-family: ${
|
|
88
|
-
:host([size='lg']) blockquote { font-size: ${
|
|
87
|
+
blockquote { margin: 0; font-family: ${S.fontHeading}; font-size: ${nt("lg")}; line-height: ${ei("normal")}; color: inherit; }
|
|
88
|
+
:host([size='lg']) blockquote { font-size: ${nt("2xl")}; line-height: ${ei("tight")}; }
|
|
89
89
|
blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
|
|
90
90
|
figcaption { display: flex; align-items: center; gap: ${y(3)}; }
|
|
91
91
|
img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
|
|
92
|
-
.name { font-weight: ${
|
|
93
|
-
.detail { color: ${
|
|
92
|
+
.name { font-weight: ${qe("semibold")}; }
|
|
93
|
+
.detail { color: ${S.textMuted}; font-size: ${nt("sm")}; }
|
|
94
94
|
`]}render(){return j`<figure part="figure">
|
|
95
95
|
<blockquote part="quote">${this.quote}</blockquote>
|
|
96
|
-
${this.person?j`<figcaption>${this.imageSrc?j`<img src=${this.imageSrc} alt="" />`:
|
|
97
|
-
</figure>`}},
|
|
96
|
+
${this.person?j`<figcaption>${this.imageSrc?j`<img src=${this.imageSrc} alt="" />`:ce}<span><span class="name">${this.person}</span>${this.about?j`<br /><span class="detail">${this.about}</span>`:ce}</span></figcaption>`:ce}
|
|
97
|
+
</figure>`}},ni=class extends Ce{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=[...Ce.styles,ht`
|
|
98
98
|
:host { display: block; }
|
|
99
99
|
.stat { display: flex; flex-direction: column; gap: ${y(1)}; }
|
|
100
100
|
:host([align='center']) .stat { align-items: center; text-align: center; }
|
|
101
|
-
.value { font-family: ${
|
|
102
|
-
:host([size='lg']) .value { font-size: ${
|
|
101
|
+
.value { font-family: ${S.fontHeading}; font-size: ${nt("3xl")}; font-weight: ${qe("bold")}; line-height: 1; color: ${S.textHeading}; }
|
|
102
|
+
:host([size='lg']) .value { font-size: ${nt("5xl")}; }
|
|
103
103
|
:host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
|
|
104
|
-
.label { font-weight: ${
|
|
105
|
-
.detail { color: ${
|
|
106
|
-
`]}render(){return j`<p class="stat" part="stat" style="margin:0"><span class="value">${this.figure}</span> <span class="label">${this.label}</span>${this.note?j` <span class="detail">${this.note}</span>`:
|
|
104
|
+
.label { font-weight: ${qe("semibold")}; }
|
|
105
|
+
.detail { color: ${S.textMuted}; font-size: ${nt("sm")}; }
|
|
106
|
+
`]}render(){return j`<p class="stat" part="stat" style="margin:0"><span class="value">${this.figure}</span> <span class="label">${this.label}</span>${this.note?j` <span class="detail">${this.note}</span>`:ce}</p>`}},si=class extends Ce{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=[...Ce.styles,ht`
|
|
107
107
|
:host { display: block; }
|
|
108
|
-
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${y(2)} ${y(3)}; padding: ${y(2.5)} ${y(5)}; ${
|
|
108
|
+
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${y(2)} ${y(3)}; padding: ${y(2.5)} ${y(5)}; ${rt("sm")} text-align: center; color: ${S.onBrand}; background: ${S.brand}; }
|
|
109
109
|
:host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }
|
|
110
|
-
a { display: inline-flex; align-items: center; gap: ${y(1)}; min-block-size: ${
|
|
111
|
-
`]}render(){return j`<div class="bar" part="bar"><span>${this.message}</span>${this.linkText&&this.href?j`<a href=${this.href}>${this.linkText}${
|
|
110
|
+
a { display: inline-flex; align-items: center; gap: ${y(1)}; min-block-size: ${S.targetMin}; color: inherit; font-weight: ${qe("semibold")}; }
|
|
111
|
+
`]}render(){return j`<div class="bar" part="bar"><span>${this.message}</span>${this.linkText&&this.href?j`<a href=${this.href}>${this.linkText}${ti("arrow-right","14px")}</a>`:ce}</div>`}},oi=class extends Ce{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=[...Ce.styles,li,ht`
|
|
112
112
|
:host { display: block; container-type: inline-size; }
|
|
113
|
-
form { display: flex; align-items: center; padding: ${y(3)}; background: ${
|
|
113
|
+
form { display: flex; align-items: center; padding: ${y(3)}; background: ${S.surfaceCard}; color: ${S.text}; border-radius: ${S.radius2xl}; box-shadow: ${S.shadowXl}; }
|
|
114
114
|
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${y(1)}; padding: ${y(1.5)} ${y(5)}; }
|
|
115
|
-
label { ${
|
|
116
|
-
select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${
|
|
117
|
-
select:focus-visible, button:focus-visible { outline: 2px solid ${
|
|
118
|
-
button { flex: none; min-block-size: 48px; padding: ${y(3)} ${y(6)}; font: inherit; font-weight: ${
|
|
119
|
-
button:hover { background: ${
|
|
115
|
+
label { ${rt("sm")} color: ${S.textMuted}; }
|
|
116
|
+
select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${rt("sm")} font-weight: ${qe("semibold")}; color: ${S.text}; background: transparent; border: 0; border-radius: ${S.radiusSm}; cursor: pointer; }
|
|
117
|
+
select:focus-visible, button:focus-visible { outline: 2px solid ${S.brand}; outline-offset: 2px; }
|
|
118
|
+
button { flex: none; min-block-size: 48px; padding: ${y(3)} ${y(6)}; font: inherit; font-weight: ${qe("semibold")}; color: ${S.onBrand}; background: ${S.brand}; border: 0; border-radius: ${S.radiusLg}; cursor: pointer; }
|
|
119
|
+
button:hover { background: ${S.brandHover}; }
|
|
120
120
|
@container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }
|
|
121
121
|
@container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${y(2)}; } .field { flex: none; } }
|
|
122
|
-
`]}submit(
|
|
123
|
-
${(this.items??[]).map((
|
|
124
|
-
<option value="">${
|
|
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 j`<form role="search" aria-label=${this.label} method="get" action=${this.action||ce} @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 j`<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=>j`<option value=${r}>${r}</option>`)}
|
|
125
125
|
</select></div>`})}
|
|
126
126
|
<button type="submit">${this.buttonText}</button>
|
|
127
|
-
</form>`}};customElements.define("impakt-search-bar",
|
|
127
|
+
</form>`}};customElements.define("impakt-search-bar",oi);customElements.define("impakt-announcement",si);customElements.define("impakt-hero",ii);customElements.define("impakt-feature-list",ai);customElements.define("impakt-quote",ri);customElements.define("impakt-stat",ni);import{css as Fr,html as ut,nothing as ci}from"./atomic-ui.js";import{ImpaktElement as Xa,focusRing as Wr,fontSize as Dr,fontWeight as Sa,lineHeight as Ja,space as Ht,spaceAround as _r,t as me,iconSvg as Gr}from"./atomic-ui.js";var di=class extends Xa{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=[...Xa.styles,Wr,_r,Fr`
|
|
128
128
|
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
129
129
|
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
130
130
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
131
131
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
132
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
132
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${Ht(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
133
133
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
134
134
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
135
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: ${
|
|
137
|
-
img { border-block-end: ${
|
|
136
|
+
li { position: relative; display: flex; flex-direction: column; background: ${me.surfaceCard}; border: ${me.borderThin} solid ${me.text}; border-radius: ${me.radiusXl}; box-shadow: none; overflow: hidden; }
|
|
137
|
+
img { border-block-end: ${me.borderThin} solid ${me.text}; }
|
|
138
138
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
139
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
140
|
-
.h { margin: 0; color: ${
|
|
141
|
-
.h a { color: inherit; text-decoration: none; border-radius: ${
|
|
139
|
+
.words { display: flex; flex-direction: column; gap: ${Ht(2)}; padding: ${Ht(5)}; flex: 1; }
|
|
140
|
+
.h { margin: 0; color: ${me.textHeading}; font-family: ${me.fontHeading}; font-size: ${Dr("lg")}; font-weight: ${Sa("bold")}; line-height: ${Ja("tight")}; }
|
|
141
|
+
.h a { color: inherit; text-decoration: none; border-radius: ${me.radiusSm}; }
|
|
142
142
|
.h a::after { content: ''; position: absolute; inset: 0; }
|
|
143
143
|
li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
144
|
-
.body { margin: 0; line-height: ${
|
|
144
|
+
.body { margin: 0; line-height: ${Ja("normal")}; }
|
|
145
145
|
/* A marketing badge: monospace capitals at 11px in a 1px outline. */
|
|
146
|
-
.badge { align-self: flex-start; padding: 2px ${
|
|
146
|
+
.badge { align-self: flex-start; padding: 2px ${Ht(2)}; border-radius: ${me.radiusSm}; font-family: ${me.fontMono}; font-size: 0.6875rem; font-weight: ${Sa("medium")}; line-height: 1.4; letter-spacing: ${me.trackingWide}; text-transform: uppercase; color: ${me.text}; background: transparent; border: ${me.borderThin} solid ${me.text}; }
|
|
147
147
|
@media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }
|
|
148
|
-
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${
|
|
148
|
+
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${Ht(1)}; color: ${me.link}; font-weight: ${Sa("semibold")}; }
|
|
149
149
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
150
150
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
151
|
-
`]}render(){return
|
|
152
|
-
${
|
|
151
|
+
`]}render(){return ut`<ul part="list">${(this.items??[]).map(t=>ut`<li class=${t.href?"linked":""} part="card">
|
|
152
|
+
${t.imageSrc?ut`<img src=${t.imageSrc} alt=${t.imageAlt??""} loading="lazy" />`:ci}
|
|
153
153
|
<div class="words">
|
|
154
|
-
${
|
|
155
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${
|
|
156
|
-
${
|
|
157
|
-
${
|
|
154
|
+
${t.badge?ut`<span class="badge">${t.badge}</span>`:ci}
|
|
155
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.href?ut`<a href=${t.href}>${t.heading}</a>`:t.heading}</div>
|
|
156
|
+
${t.text?ut`<p class="body">${t.text}</p>`:ci}
|
|
157
|
+
${t.href?ut`<span class="more" aria-hidden="true">${Gr("arrow-right","1em")}</span>`:ci}
|
|
158
158
|
</div>
|
|
159
|
-
</li>`)}</ul>`}};customElements.define("impakt-card-grid",
|
|
159
|
+
</li>`)}</ul>`}};customElements.define("impakt-card-grid",di);import{css as Ur,html as Se,nothing as Qa,unsafeCSS as N}from"./atomic-ui.js";import{ImpaktElement as Ka,focusRing as Vr,fontWeight as Xe,say as Je,space as Za,t as q,token as er}from"./atomic-ui.js";var Nt=["note","wireframe","component","code","live"],pi=o=>Nt.includes(o),za=o=>Nt.indexOf(o),Yr=Se`<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">
|
|
160
160
|
<path d="M0 6h18M13 1l5 5-5 5" />
|
|
161
|
-
</svg>`,
|
|
161
|
+
</svg>`,Xr=Se`<svg class="pointer" viewBox="0 0 16 20" width="16" height="20" aria-hidden="true" focusable="false">
|
|
162
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>`,
|
|
163
|
+
</svg>`,mi=(o,t,e)=>N(`--jt: var(--impakt-motion-journey-${o}-duration, ${t}ms); --je: var(--impakt-motion-journey-${o}-easing, ${e});`),Ma=[{name:"flatten",ms:640,easing:[.65,0,.35,1]},{name:"ink-in",ms:560,easing:[.22,1,.36,1]},{name:"compile",ms:720,easing:[.83,0,.17,1]},{name:"ship",ms:600,easing:[.34,1.56,.64,1]}],ae="--impakt-journey-p",Ca=8,ui=o=>`--impakt-journey-g${o}`,hi;function tr(){if(hi!==void 0)return hi;let o=typeof CSS<"u"?CSS:void 0;if(!o?.registerProperty)return hi=!1;for(let t of[ae,...Array.from({length:Ca},(e,i)=>ui(i))])try{o.registerProperty({name:t,syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}return hi=!0}function Jr([o,t,e,i]){let a=(r,n,s)=>3*r*(1-s)**2*s+3*n*(1-s)*s**2+s**3;return r=>{if(r<=0)return 0;if(r>=1)return 1;let n=0,s=1,m=r;for(let $=0;$<30;$+=1){let f=a(o,e,m);if(Math.abs(f-r)<1e-5)break;f<r?n=m:s=m,m=(n+s)/2}return a(t,i,m)}}var ir=(o,t)=>Ma[Math.max(0,Math.min(3,Math.max(o,t)-1))],de=o=>`clamp(0, min(calc(1 + var(${ae}) - ${o}), calc(1 - var(${ae}) + ${o})), 1)`,Ta=`clamp(0, calc(1 - var(${ae})), 1)`,ar=`max(0, calc(var(${ae}) - 3))`,rr=`max(0, calc(var(${ae}) - 4))`,gi=class extends Ka{constructor(){super();this.sections=[];this.frameRequest=0;this.easings=[];this.onScroll=()=>{this.frameRequest||(this.frameRequest=requestAnimationFrame(()=>{this.frameRequest=0,this.scrub()}))};this.onResize=()=>{this.getAttribute("scrub")==="timeline"?this.timeline():this.onScroll()};this.stage="live",this.label="",this.href="",this.decorative=!1,this.track="",this.travel=!1,this.code={},this.annotations=!1,this.captions=[],this.marginNote="",this.specs=[],this.markWidth="320",this.markHeight="72"}static{this.properties={stage:{type:String,reflect:!0},label:{type:String},href:{type:String},decorative:{type:Boolean,reflect:!0},track:{type:String},travel:{type:Boolean,reflect:!0},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"},progress:{type:Number}}}static{this.styles=[...Ka.styles,Vr,Ur`
|
|
164
164
|
:host {
|
|
165
165
|
display: block; inline-size: min(100%, 35rem); container-type: inline-size;
|
|
166
|
-
--impakt-journey-accent: ${
|
|
167
|
-
--hand: var(--impakt-font-family-hand, ${
|
|
166
|
+
--impakt-journey-accent: ${er("color.accent.default","#ffd43b")}; --impakt-journey-on-accent: ${er("color.accent.on","#1a1a1a")};
|
|
167
|
+
--hand: var(--impakt-font-family-hand, ${q.fontBody});
|
|
168
168
|
/* The stage as a number. Set by hand, it moves on the timing of the move into the new stage, and back out of a
|
|
169
169
|
stage the same move runs in reverse. A tracked button sets it on the frame instead, from the scroll. */
|
|
170
|
-
${
|
|
171
|
-
transition: ${
|
|
172
|
-
${
|
|
170
|
+
${N(ae)}: 4;
|
|
171
|
+
transition: ${N(ae)} var(--jt) var(--je);
|
|
172
|
+
${mi("flatten",640,"cubic-bezier(0.65, 0, 0.35, 1)")}
|
|
173
173
|
}
|
|
174
|
-
:host([stage='note']) { ${
|
|
175
|
-
:host([stage='wireframe']) { ${
|
|
176
|
-
:host([stage='component']) { ${
|
|
177
|
-
:host([stage='code']) { ${
|
|
178
|
-
:host([stage='live']) { ${
|
|
174
|
+
:host([stage='note']) { ${N(ae)}: 0; }
|
|
175
|
+
:host([stage='wireframe']) { ${N(ae)}: 1; }
|
|
176
|
+
:host([stage='component']) { ${N(ae)}: 2; ${mi("ink-in",560,"cubic-bezier(0.22, 1, 0.36, 1)")} }
|
|
177
|
+
:host([stage='code']) { ${N(ae)}: 3; ${mi("compile",720,"cubic-bezier(0.83, 0, 0.17, 1)")} }
|
|
178
|
+
:host([stage='live']) { ${N(ae)}: 4; ${mi("ship",600,"cubic-bezier(0.34, 1.56, 0.64, 1)")} }
|
|
179
179
|
/* Travelling: it stays in view while its sections scroll past, in a column as tall as they are. */
|
|
180
180
|
:host([travel]) { position: sticky; inset-block-start: var(--impakt-journey-travel-top, 20vh); }
|
|
181
181
|
|
|
182
|
-
/* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi)
|
|
182
|
+
/* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi), as the Journey object
|
|
183
|
+
component (8:477) places it on its 560 by 360 frame: the shell 320 by 72 at 120, 144. */
|
|
183
184
|
.frame { position: relative; aspect-ratio: 14 / 9; }
|
|
184
185
|
/* Each plate is one stage's shape with that stage's words in it. Every one is drawn from the stage number, so
|
|
185
186
|
its opacity and its shape follow the stage wherever it is between two. Nothing here changes the layout. */
|
|
186
187
|
.plate { position: absolute; box-sizing: border-box; pointer-events: none; }
|
|
187
|
-
.bar { inset-inline-start:
|
|
188
|
-
|
|
189
|
-
.
|
|
190
|
-
.wire
|
|
188
|
+
.bar { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; }
|
|
189
|
+
/* The sticky note: 290 square, turned 4° (8:362). */
|
|
190
|
+
.note { inset-inline-start: 20.98cqi; inset-block-start: 7.11cqi; inline-size: 51.79cqi; block-size: 51.79cqi; background: var(--impakt-journey-accent); box-shadow: 0 3.2cqi 6.4cqi rgb(0 0 0 / 0.18); }
|
|
191
|
+
.wire { background: ${q.surfaceCard}; border: ${q.borderThin} dashed ${q.textMuted}; }
|
|
192
|
+
.wire > svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${q.rule}; }
|
|
191
193
|
.solid { background: var(--impakt-journey-accent); }
|
|
192
194
|
.shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }
|
|
193
195
|
/* 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. */
|
|
194
|
-
|
|
196
|
+
/* The code window: 520 by 300 at 20, 40, with 6px corners (8:431). */
|
|
197
|
+
.window { inset-inline: 3.57cqi; inset-block: 7.14cqi 3.57cqi; padding: 4.5cqi 5cqi; background: var(--impakt-color-surface-ink-raised, ${q.text}); border: ${q.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: 6px; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); line-height: 1.5; color: var(--impakt-color-text-inverse-muted, color-mix(in srgb, ${q.surfaceCard} 78%, ${q.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) 44px minmax(0, 1fr); }
|
|
195
198
|
/* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */
|
|
196
199
|
.window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }
|
|
197
200
|
.window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }
|
|
@@ -205,21 +208,21 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
205
208
|
* from a strip; and the live button's shadow and fill grow to full size, past it for a moment where ship's
|
|
206
209
|
* easing overshoots.
|
|
207
210
|
*/
|
|
208
|
-
.note { opacity: ${
|
|
209
|
-
.wire { opacity: ${
|
|
210
|
-
.solid { opacity: max(${
|
|
211
|
-
.window { opacity: ${
|
|
212
|
-
.shadow { opacity: ${
|
|
211
|
+
.note { opacity: ${N(de(0))}; transform: rotate(calc(4deg * ${N(de(0))})) scale(1, calc(0.45 + 0.55 * ${N(de(0))})); }
|
|
212
|
+
.wire { opacity: ${N(de(1))}; transform: rotate(calc(4deg * ${N(Ta)})) scale(calc(1 - 0.1 * ${N(Ta)}), calc(1 + 3 * ${N(Ta)})); }
|
|
213
|
+
.solid { opacity: max(${N(de(2))}, ${N(de(4))}); transform: scale(calc(0.92 + 0.08 * max(${N(de(2))}, min(1, ${N(ar)})) + 0.4 * ${N(rr)})); }
|
|
214
|
+
.window { opacity: ${N(de(3))}; transform: scale(calc(0.94 + 0.06 * ${N(de(3))}), calc(0.5 + 0.5 * ${N(de(3))})); }
|
|
215
|
+
.shadow { opacity: ${N(de(4))}; transform: scale(calc(0.9 + 0.1 * min(1, ${N(ar)}) + 0.4 * ${N(rr)})); }
|
|
213
216
|
|
|
214
217
|
/* The words as each stage draws them, inside that stage's plate, so they morph and fade with it. All decoration: the link below carries the name. */
|
|
215
|
-
.said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
218
|
+
.said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${Za(4)}; padding-inline: 5cqi; font-family: ${q.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${Xe("medium")}; line-height: 1.2; color: var(--impakt-journey-on-accent); }
|
|
216
219
|
.arrow { flex: none; }
|
|
217
220
|
/* At the note stage the words are handwritten, bold, with a line drawn under them. */
|
|
218
|
-
.note .said { flex-direction: column; align-items: flex-start; padding:
|
|
221
|
+
.note .said { flex-direction: column; align-items: flex-start; padding: 7.7cqi; font-family: var(--hand); font-size: clamp(1.125rem, 6.07cqi, 2.125rem); font-weight: ${Xe("bold")}; line-height: 1.1; letter-spacing: -0.01em; }
|
|
219
222
|
.note .said .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; }
|
|
220
223
|
.note .said .arrow { align-self: flex-end; }
|
|
221
|
-
.wire .said { justify-content: center; font-family: ${
|
|
222
|
-
.window .said { position: static; padding-inline: 3ch 0; justify-content: flex-start; font-family: ${
|
|
224
|
+
.wire .said { justify-content: center; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${Xe("regular")}; color: ${q.textMuted}; }
|
|
225
|
+
.window .said { position: static; padding-inline: 3ch 0; justify-content: flex-start; font-family: ${q.fontMono}; font-size: inherit; font-weight: ${Xe("regular")}; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${q.surfaceCard})); }
|
|
223
226
|
.window .said .arrow { display: none; }
|
|
224
227
|
|
|
225
228
|
/*
|
|
@@ -227,39 +230,42 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
227
230
|
* screen reader meet an ordinary link with the button's words. Its own words are not painted: the plates paint
|
|
228
231
|
* them, so they can morph. In forced colours the plates step aside and the link draws its words itself.
|
|
229
232
|
*/
|
|
230
|
-
.words { position: absolute; inset-inline-start:
|
|
231
|
-
:host([stage='note']) .words { inset-inline-start:
|
|
232
|
-
:host([stage='wireframe']) .words { justify-content: center; font-family: ${
|
|
233
|
-
:host([stage='code']) .words { min-block-size: 44px; inset-block-start: calc(
|
|
234
|
-
a.words:focus-visible { outline: none; box-shadow: ${
|
|
233
|
+
.words { position: absolute; inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: calc(25.71cqi + 6.43cqi - max(22px, 6.43cqi)); box-sizing: border-box; min-block-size: max(44px, 12.86cqi); display: flex; align-items: center; justify-content: space-between; gap: ${Za(4)}; padding-inline: 5cqi; font-family: ${q.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${Xe("medium")}; line-height: 1.2; color: transparent; text-decoration: none; }
|
|
234
|
+
:host([stage='note']) .words { inset-inline-start: 20.98cqi; inset-block-start: 7.11cqi; inline-size: 51.79cqi; min-block-size: 51.79cqi; align-items: flex-start; padding: 7.7cqi; font-family: var(--hand); font-size: clamp(1.125rem, 6.07cqi, 2.125rem); font-weight: ${Xe("bold")}; line-height: 1.1; transform: rotate(4deg); }
|
|
235
|
+
:host([stage='wireframe']) .words { justify-content: center; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${Xe("regular")}; }
|
|
236
|
+
:host([stage='code']) .words { min-block-size: 44px; inset-block-start: calc(26.79cqi - 22px); justify-content: flex-start; padding-inline: calc(8.57cqi + 3ch) 8.57cqi; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${Xe("regular")}; }
|
|
237
|
+
a.words:focus-visible { outline: none; box-shadow: ${q.focusShadow}; }
|
|
235
238
|
|
|
236
239
|
/* Live, it answers a pointer: the button lifts when pointed at and sits when pressed, and its fill deepens a little. */
|
|
237
240
|
.solid { transition: background-color 180ms, translate var(--impakt-motion-journey-lift-duration, 180ms) var(--impakt-motion-journey-lift-easing, cubic-bezier(0.2, 0, 0, 1)); }
|
|
238
|
-
:host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${
|
|
241
|
+
:host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${q.text}); translate: 0 -2px; }
|
|
239
242
|
:host([stage='live']) .frame:has(a.words:active) .solid { translate: 0 1px; transition: background-color 140ms, translate var(--impakt-motion-journey-press-duration, 140ms) var(--impakt-motion-journey-press-easing, cubic-bezier(0.4, 0, 0.2, 1)); }
|
|
240
243
|
|
|
241
244
|
/* The design notes. Each shows at its own stages, follows the stage number with the shapes, and none is read. */
|
|
242
|
-
.ann { position: absolute; pointer-events: none; color: ${
|
|
243
|
-
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${
|
|
245
|
+
.ann { position: absolute; pointer-events: none; color: ${q.text}; }
|
|
246
|
+
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); letter-spacing: ${q.trackingWide}; text-transform: uppercase; color: ${q.textMuted}; white-space: nowrap; }
|
|
244
247
|
.caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; }
|
|
245
|
-
${
|
|
248
|
+
${N(Nt.map((e,i)=>`.caption span:nth-child(${i+1}) { opacity: ${de(i)}; }`).join(`
|
|
246
249
|
`))}
|
|
247
|
-
.margin { inset-inline-start:
|
|
248
|
-
|
|
250
|
+
.margin { inset-inline-start: 76.96cqi; inset-block-start: 7.14cqi; inline-size: 21.43cqi; font-family: var(--hand); font-size: clamp(0.625rem, 3.57cqi, 1.25rem); line-height: 1.2; transform: rotate(4deg); opacity: ${N(de(0))}; }
|
|
251
|
+
/* The measures, as the redlines (8:401) draw them: the width 26px over the shell, the height 10px beside it. */
|
|
252
|
+
.width { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 21.07cqi; block-size: 2.14cqi; border-inline: 1px solid currentColor; }
|
|
249
253
|
.width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }
|
|
250
|
-
.width b, .height b { position: absolute; font-family: ${
|
|
254
|
+
.width b, .height b { position: absolute; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); font-weight: ${Xe("regular")}; line-height: 1; background: var(--impakt-journey-mark-ground, ${q.surfaceCard}); padding-inline: 0.4em; }
|
|
251
255
|
.width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }
|
|
252
|
-
.height { inset-inline-start:
|
|
256
|
+
.height { inset-inline-start: 80.36cqi; inline-size: 2.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; border-block: 1px solid currentColor; }
|
|
253
257
|
.height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }
|
|
254
258
|
.height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }
|
|
255
|
-
.width, .height { opacity: max(${
|
|
256
|
-
|
|
257
|
-
.specs
|
|
258
|
-
.
|
|
259
|
-
|
|
259
|
+
.width, .height { opacity: max(${N(de(1))}, ${N(de(2))}); }
|
|
260
|
+
/* The spec tags (8:417) 30px under the shell. */
|
|
261
|
+
.specs { inset-inline-start: 21.43cqi; inset-block-start: 43.93cqi; display: flex; flex-wrap: wrap; gap: 1.43cqi; inline-size: 75cqi; opacity: ${N(de(2))}; }
|
|
262
|
+
.specs span { padding: 0.36em 0.73em; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); line-height: 1.4; letter-spacing: ${q.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${q.surfaceCard}; }
|
|
263
|
+
/* The pointer (8:474) at 404, 196, its tip just inside the shell's corner. */
|
|
264
|
+
.cursor { inset-inline-start: 72.14cqi; inset-block-start: 35cqi; opacity: ${N(de(4))}; }
|
|
265
|
+
.pointer { display: block; fill: ${q.text}; stroke: ${q.surfaceCard}; }
|
|
260
266
|
|
|
261
267
|
/* The gaps a scroll timeline drives, one keyframe set each. */
|
|
262
|
-
${
|
|
268
|
+
${N(Array.from({length:Ca},(e,i)=>`@keyframes impakt-journey-g${i} { from { ${ui(i)}: 0; } to { ${ui(i)}: 1; } }`).join(`
|
|
263
269
|
`))}
|
|
264
270
|
|
|
265
271
|
/* Reduced motion: each stage cuts to its final state, and the live button changes colour only. */
|
|
@@ -278,44 +284,48 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
278
284
|
:host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; forced-color-adjust: none; }
|
|
279
285
|
.ann { color: CanvasText; }
|
|
280
286
|
}
|
|
281
|
-
`]}connectedCallback(){super.connectedCallback(),
|
|
282
|
-
<span class="ann margin" part="margin-note">${this.marginNote||
|
|
287
|
+
`]}connectedCallback(){super.connectedCallback(),tr(),this.hasUpdated&&this.watch()}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}willUpdate(e){e.has("stage")&&!pi(this.stage)&&(this.stage="live")}updated(e){e.has("track")&&this.watch(),e.has("progress")&&(typeof this.progress=="number"&&Number.isFinite(this.progress)?(this.style.setProperty(ae,String(this.progress)),this.style.setProperty("transition","none")):(this.style.removeProperty(ae),this.style.removeProperty("transition")))}get frameEl(){return this.renderRoot.querySelector(".frame")}reduced(){return!!this.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches}unwatch(){this.observer?.disconnect(),this.observer=void 0,this.resizeObserver?.disconnect(),this.resizeObserver=void 0;let e=this.ownerDocument?.defaultView;e?.removeEventListener("scroll",this.onScroll),e?.removeEventListener("resize",this.onResize),this.frameRequest&&cancelAnimationFrame(this.frameRequest),this.frameRequest=0,this.removeAttribute("scrub");let i=this.frameEl;if(i)for(let a of[ae,"animation-name","animation-duration","animation-timing-function","animation-fill-mode","animation-timeline","animation-range"])i.style.removeProperty(a)}watch(){if(this.unwatch(),this.sections=[],!this.track||!this.isConnected||typeof IntersectionObserver!="function")return;let e;try{e=Array.from(this.ownerDocument.querySelectorAll(this.track)).filter(i=>pi(i.getAttribute("data-journey-stage")))}catch{return}if(e.length){this.sections=e,this.reduced()?this.observer=new IntersectionObserver(()=>this.entered(),{threshold:0}):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.reduced()||this.startScrub()}}crossed(e){let a=e.find(r=>r.isIntersecting)?.target.getAttribute("data-journey-stage");pi(a)&&this.become(a)}entered(){let e=this.ownerDocument.defaultView;if(!e)return;let i=null;for(let a of this.sections)a.getBoundingClientRect().top<e.innerHeight&&(i=a.getAttribute("data-journey-stage"));pi(i)&&this.become(i)}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;if(!e)return;let a=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: scroll()")&&CSS.supports("animation-range: 0px 1px")&&tr()&&this.sections.length-1<=Ca&&this.rootScrolls();if(e.addEventListener("resize",this.onResize,{passive:!0}),typeof ResizeObserver=="function"){this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.ownerDocument.documentElement);for(let r of this.sections)this.resizeObserver.observe(r)}this.easings=Ma.map(r=>Jr(this.easingOf(r.name,r.easing))),a?(this.setAttribute("scrub","timeline"),this.timeline()):typeof e.requestAnimationFrame=="function"&&(this.setAttribute("scrub","frame"),e.addEventListener("scroll",this.onScroll,{passive:!0}),this.scrub())}rootScrolls(){let e=this.ownerDocument.defaultView;for(let i=this.sections[0]?.parentElement;i&&i!==this.ownerDocument.body&&i!==this.ownerDocument.documentElement;i=i.parentElement){let{overflowY:a}=e.getComputedStyle(i);if((a==="auto"||a==="scroll")&&i.scrollHeight>i.clientHeight)return!1}return!0}easingOf(e,i){let a=this.ownerDocument.defaultView?.getComputedStyle(this).getPropertyValue(`--impakt-motion-journey-${e}-easing`)??"",r=/cubic-bezier\(([^)]+)\)/.exec(a)?.[1]?.split(",").map(Number);return r?.length===4&&r.every(Number.isFinite)?r:i}gaps(){let e=this.ownerDocument.defaultView,i=e.innerHeight/2,a=this.sections.map(n=>n.getBoundingClientRect().top+e.scrollY),r=this.sections.map(n=>za(n.getAttribute("data-journey-stage")));return a.slice(1).map((n,s)=>({from:r[s],to:r[s+1],start:a[s]-i,end:n-i}))}timeline(){let e=this.frameEl;if(!e||!this.sections.length)return;let i=this.gaps().filter(s=>s.end>s.start),a=za(this.sections[0].getAttribute("data-journey-stage")),r=i.map((s,m)=>s.to===s.from?"":` + ${s.to-s.from} * var(${ui(m)})`).join("");e.style.setProperty(ae,`calc(${a}${r})`);let n=s=>i.map(s).join(", ")||"none";e.style.setProperty("animation-name",i.length?n((s,m)=>`impakt-journey-g${m}`):"none"),e.style.setProperty("animation-duration",n(()=>"1ms")),e.style.setProperty("animation-timing-function",n(s=>{let m=ir(s.from,s.to);return`var(--impakt-motion-journey-${m.name}-easing, cubic-bezier(${m.easing.join(", ")}))`})),e.style.setProperty("animation-fill-mode",n(()=>"both")),e.style.setProperty("animation-timeline",n(()=>"scroll(root block)")),e.style.setProperty("animation-range",n(s=>`${Math.round(s.start)}px ${Math.round(s.end)}px`))}scrub(){let e=this.ownerDocument.defaultView,i=this.frameEl;if(!e||!i||!this.sections.length)return;let a=e.innerHeight/2,r=this.sections.map(_=>_.getBoundingClientRect().top),n=0;r.forEach((_,Ye)=>{_<=a&&(n=Ye)});let s=_=>za(this.sections[_].getAttribute("data-journey-stage")),m=n+1<this.sections.length?n+1:n,$=r[m]-r[n],f=m===n||$<=0?0:Math.min(1,Math.max(0,(a-r[n])/$)),[Z,ye]=[s(n),s(m)],x=Z===ye?0:this.easings[Ma.indexOf(ir(Z,ye))](f),J=Z+x*(ye-Z);i.style.setProperty(ae,J.toFixed(4))}lines(e,i){return e?.length?e.map(a=>Se`<span class=${a.trim().startsWith("//")?"comment":""}>${a}</span>`):Array.from({length:i},(a,r)=>Se`<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 17")];return Se`<span class="ann caption" part="caption">${Nt.map((a,r)=>Se`<span>${String(r+1).padStart(2,"0")} · ${e[r]??""}</span>`)}</span>
|
|
288
|
+
<span class="ann margin" part="margin-note">${this.marginNote||Je("make it the biggest thing on the page")}</span>
|
|
283
289
|
<span class="ann width"><b>${this.markWidth}</b></span>
|
|
284
290
|
<span class="ann height"><b>${this.markHeight}</b></span>
|
|
285
|
-
<span class="ann specs" part="specs">${
|
|
286
|
-
<span class="ann cursor">${
|
|
291
|
+
<span class="ann specs" part="specs">${i.map(a=>Se`<span>${a}</span>`)}</span>
|
|
292
|
+
<span class="ann cursor">${Xr}</span>`}render(){let e=Se`<span class="said"><span class="text">${this.label}</span>${Yr}</span>`,i=Se`<span class="text">${this.label}</span>`;return Se`<div class="frame" part="frame" aria-hidden=${this.decorative?"true":Qa}>
|
|
287
293
|
<span class="plate note" aria-hidden="true">${e}</span>
|
|
288
294
|
<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>${e}</span>
|
|
289
295
|
<span class="plate bar shadow" aria-hidden="true"></span>
|
|
290
296
|
<span class="plate bar solid" aria-hidden="true">${e}</span>
|
|
291
297
|
<span class="plate window" aria-hidden="true"><span class="before">${this.lines(this.code?.before,3)}</span>${e}<span class="after">${this.lines(this.code?.after,2)}</span></span>
|
|
292
|
-
${this.annotations?
|
|
293
|
-
${this.decorative||!this.href?
|
|
294
|
-
</div>`}};customElements.define("impakt-journey-button",
|
|
298
|
+
${this.annotations?Se`<span class="notes" aria-hidden="true">${this.notes()}</span>`:Qa}
|
|
299
|
+
${this.decorative||!this.href?Se`<span class="words" part="button">${i}</span>`:Se`<a class="words" part="button" href=${this.href}>${i}</a>`}
|
|
300
|
+
</div>`}};customElements.define("impakt-journey-button",gi);import{css as gt,html as v,nothing as W}from"./atomic-ui.js";import{ImpaktElement as ve,focusRing as La,fontSize as je,fontWeight as re,lineHeight as Aa,lockScroll as Qr,space as z,spaceAround as wi,t as l,token as St,unlockScroll as nr}from"./atomic-ui.js";var Kr=v`<svg viewBox="0 0 22 22" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false">
|
|
295
301
|
<path d="M5 17 17 5M8 5h9v9" />
|
|
296
|
-
</svg>`,
|
|
297
|
-
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${
|
|
302
|
+
</svg>`,bi=class extends ve{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=[...ve.styles,La,wi,gt`
|
|
303
|
+
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${St("color.accent.default","#ffd43b")}; --impakt-work-on-accent: ${St("color.accent.on","#111111")}; }
|
|
298
304
|
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${l.borderThin} solid ${l.text}; }
|
|
299
305
|
.columns + ol { border-block-start: 0; }
|
|
300
|
-
|
|
301
|
-
|
|
306
|
+
/* The Project row component (8:339): 22px above and below a 72px name, the number in a 54px column, 24px apart. */
|
|
307
|
+
li, .columns { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto 22px; align-items: center; column-gap: ${z(6)}; padding: 22px ${z(8)}; }
|
|
308
|
+
.texts li, .texts.columns { grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr) auto 22px; }
|
|
302
309
|
li { position: relative; border-block-end: ${l.borderThin} solid ${l.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
303
310
|
.columns { padding-block: ${z(3)}; border-block-end: ${l.borderThin} solid ${l.text}; font-family: ${l.fontMono}; font-size: 0.6875rem; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
304
311
|
.columns .last { grid-column: -3; text-align: end; }
|
|
305
|
-
.number { font-family: ${l.fontMono}; font-size:
|
|
306
|
-
|
|
312
|
+
.number { font-family: ${l.fontMono}; font-size: 0.8125rem; line-height: 1.5; font-variant-numeric: tabular-nums; color: ${l.textMuted}; }
|
|
313
|
+
/* Display Row: 72px on a 1080px list and 40px on a 350px phone list (8:329, 14:947). */
|
|
314
|
+
.name { font-family: ${l.fontHeading}; font-size: clamp(2rem, 1.541rem + 4.384cqi, 4.5rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.05em; color: ${l.text}; overflow-wrap: anywhere; }
|
|
307
315
|
.texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }
|
|
308
316
|
.name a { color: inherit; text-decoration: none; }
|
|
309
317
|
/* The link is stretched over the row, so the row is one target. */
|
|
310
318
|
.name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
|
|
311
319
|
.name a:focus-visible { outline: none; }
|
|
312
320
|
.name a:focus-visible::after { box-shadow: ${l.focusShadow}; }
|
|
313
|
-
.text { margin: 0; font-size: ${
|
|
321
|
+
.text { margin: 0; font-size: ${je("md")}; line-height: ${Aa("normal")}; color: ${l.textMuted}; }
|
|
314
322
|
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${z(2)}; text-align: end; }
|
|
315
|
-
.meta, .price { font-family: ${l.fontMono}; font-size: ${
|
|
323
|
+
.meta, .price { font-family: ${l.fontMono}; font-size: ${je("sm")}; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
324
|
+
/* The meta in G2 Mono S: 11px medium capitals at 0.06em (8:331). */
|
|
325
|
+
.meta { font-size: 0.6875rem; font-weight: ${re("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
316
326
|
.price { font-size: 0.6875rem; }
|
|
317
327
|
/* Marketing badges are monospace capitals at 11px. A row that goes somewhere has a solid one; one that does not yet has an outline. */
|
|
318
|
-
.badge { display: inline-block; padding: ${z(1)} ${z(2.5)}; font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${
|
|
328
|
+
.badge { display: inline-block; padding: ${z(1)} ${z(2.5)}; font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${re("medium")}; line-height: 1.4; letter-spacing: ${l.trackingWide}; text-transform: uppercase; white-space: nowrap; color: ${l.surfaceCard}; background: ${l.text}; border: ${l.borderThin} solid ${l.text}; border-radius: ${l.radiusSm}; }
|
|
319
329
|
li:not(:has(a)) .badge { color: ${l.text}; background: transparent; }
|
|
320
330
|
.arrow { display: flex; color: ${l.text}; }
|
|
321
331
|
/* 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. */
|
|
@@ -329,12 +339,15 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
329
339
|
.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: ${l.surfaceCard}; border: ${l.borderThin} solid ${l.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); }
|
|
330
340
|
.preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
|
|
331
341
|
.preview span { display: block; padding-block-end: ${z(2)}; font-family: ${l.fontMono}; font-size: 0.6875rem; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
342
|
+
/* On a phone (14:944): 18px above and below, 14px at the sides, the number, the name with its meta 8px under it, and an 18px arrow, 12px apart. */
|
|
332
343
|
@container impakt-work-list (max-width: 40rem) {
|
|
333
|
-
li, .texts li { grid-template-columns:
|
|
344
|
+
li, .texts li { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: ${z(3)}; padding: 18px 14px; }
|
|
334
345
|
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${z(2)}; }
|
|
335
346
|
.side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${z(2)}; }
|
|
336
347
|
li:not(:has(.text)) .side { grid-row: 2; }
|
|
337
348
|
.arrow { grid-column: 3; grid-row: 1; }
|
|
349
|
+
li:not(:has(.text)) :is(.number, .arrow) { grid-row: 1 / span 2; }
|
|
350
|
+
.arrow svg { inline-size: 18px; block-size: 18px; }
|
|
338
351
|
.columns { display: none; }
|
|
339
352
|
}
|
|
340
353
|
@media (prefers-reduced-motion: reduce) { li { transition: none; } .preview { display: none; } }
|
|
@@ -343,72 +356,79 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
343
356
|
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; }
|
|
344
357
|
.badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }
|
|
345
358
|
}
|
|
346
|
-
`]}point(
|
|
347
|
-
<span>${
|
|
348
|
-
</div>`}render(){let
|
|
349
|
-
${
|
|
350
|
-
<span class="number" aria-hidden="true">${
|
|
359
|
+
`]}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 W;let[i,a,...r]=e;return v`<div class=${t?"columns texts":"columns"} part="columns" aria-hidden="true">
|
|
360
|
+
<span>${i??""}</span><span>${a??""}</span>${r.length?v`<span class="last">${r.join(" \xB7 ")}</span>`:W}
|
|
361
|
+
</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||W} @pointerleave=${()=>this.preview=null}>
|
|
362
|
+
${t.map((a,r)=>{let n=String(this.start+r).padStart(2,"0"),s=a.badge||a.price||a.meta;return v`<li part="row" class=${a.featured?"featured":""} @pointermove=${m=>this.point(m,a)}>
|
|
363
|
+
<span class="number" aria-hidden="true">${n}</span>
|
|
351
364
|
<div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
|
|
352
365
|
${a.href?v`<a href=${a.href} part="link">${a.name}</a>`:a.name}
|
|
353
366
|
</div>
|
|
354
|
-
${e?v`<p class="text" part="text">${a.text??""}</p>`:
|
|
355
|
-
${
|
|
356
|
-
${a.badge?v`<span class="badge" part="badge">${a.badge}</span>`:
|
|
357
|
-
${a.price?v`<span class="price" part="price">${a.price}</span>`:
|
|
358
|
-
${a.meta?v`<span class="meta" part="meta">${a.meta}</span>`:
|
|
367
|
+
${e?v`<p class="text" part="text">${a.text??""}</p>`:W}
|
|
368
|
+
${s?v`<span class="side">
|
|
369
|
+
${a.badge?v`<span class="badge" part="badge">${a.badge}</span>`:W}
|
|
370
|
+
${a.price?v`<span class="price" part="price">${a.price}</span>`:W}
|
|
371
|
+
${a.meta?v`<span class="meta" part="meta">${a.meta}</span>`:W}
|
|
359
372
|
</span>`:v`<span></span>`}
|
|
360
|
-
${a.href?v`<span class="arrow">${
|
|
373
|
+
${a.href?v`<span class="arrow">${Kr}</span>`:v`<span></span>`}
|
|
361
374
|
</li>`})}
|
|
362
|
-
</ol>${
|
|
363
|
-
${
|
|
364
|
-
</div>`:
|
|
375
|
+
</ol>${i?v`<div class="preview" part="preview" aria-hidden="true" style=${`--x:${i.x}px;--y:${i.y}px`}>
|
|
376
|
+
${i.label?v`<span>${i.label}</span>`:W}<img src=${i.src} alt="" />
|
|
377
|
+
</div>`:W}`}},fi=class extends ve{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=[...ve.styles,wi,gt`
|
|
365
378
|
:host { display: block; container: impakt-stat-row / inline-size; }
|
|
379
|
+
/* The Stat component (8:324): a rule, 20px, the 52px figure, 8px, and the label in G2 Body S, 14px at 1.4; four 252px stats 24px apart. */
|
|
366
380
|
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${z(6)}; }
|
|
367
381
|
li { border-block-start: ${l.borderThin} solid ${l.rule}; padding-block-start: ${z(5)}; }
|
|
368
382
|
p { margin: 0; display: flex; flex-direction: column; gap: ${z(2)}; }
|
|
369
|
-
.value { font-family: ${l.fontHeading}; font-size: clamp(2.
|
|
370
|
-
.label { font-size: ${
|
|
383
|
+
.value { font-family: ${l.fontHeading}; font-size: clamp(2.5rem, 6cqi, 3.25rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${l.textHeading}; }
|
|
384
|
+
.label { font-size: ${je("sm")}; line-height: 1.4; color: ${l.textMuted}; }
|
|
385
|
+
/* On a phone (14:783): two across, 20px apart with 16px between the rows; 14px over the 40px figure, 6px under it and 8px under the label. */
|
|
386
|
+
@container impakt-stat-row (max-width: 40rem) {
|
|
387
|
+
ul { gap: ${z(4)} ${z(5)}; }
|
|
388
|
+
li { padding-block: 14px ${z(2)}; }
|
|
389
|
+
p { gap: 6px; }
|
|
390
|
+
}
|
|
371
391
|
/* The note is meta: monospace capitals at 11px. */
|
|
372
392
|
.note { font-family: ${l.fontMono}; font-size: 0.6875rem; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
373
|
-
`]}render(){return v`<ul role="list" part="list" aria-label=${this.label||
|
|
374
|
-
${this.items.map(
|
|
375
|
-
<p><span class="value" part="value">${
|
|
393
|
+
`]}render(){return v`<ul role="list" part="list" aria-label=${this.label||W}>
|
|
394
|
+
${this.items.map(t=>v`<li part="stat">
|
|
395
|
+
<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>`:W}</p>
|
|
376
396
|
</li>`)}
|
|
377
|
-
</ul>`}}
|
|
397
|
+
</ul>`}},$i=class extends ve{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=[...ve.styles,wi,gt`
|
|
378
398
|
:host { display: block; container: impakt-faq / inline-size; }
|
|
379
399
|
.head { display: flex; flex-direction: column; gap: ${z(4)}; margin-block-end: ${z(10)}; max-inline-size: 44rem; }
|
|
380
|
-
.eyebrow { margin: 0; font-family: ${l.fontEyebrow}; font-size: ${
|
|
381
|
-
.heading { font-family: ${l.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${
|
|
382
|
-
.lead { margin: 0; font-size: ${
|
|
400
|
+
.eyebrow { margin: 0; font-family: ${l.fontEyebrow}; font-size: ${je("sm")}; color: var(--impakt-eyebrow, ${l.textMuted}); }
|
|
401
|
+
.heading { font-family: ${l.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${re("semibold")}; line-height: 1.04; letter-spacing: -0.04em; color: ${l.textHeading}; }
|
|
402
|
+
.lead { margin: 0; font-size: ${je("md")}; line-height: ${Aa("normal")}; color: ${l.textMuted}; }
|
|
383
403
|
/* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */
|
|
384
404
|
impakt-accordion { border-block-start: ${l.borderThin} solid ${l.text}; }
|
|
385
405
|
impakt-accordion::part(item) { border-block-end: ${l.borderThin} solid ${l.text}; }
|
|
386
|
-
impakt-accordion::part(header) { min-block-size: 5.75rem; padding-block: ${z(5)}; font-family: ${l.fontHeading}; font-size: clamp(1.25rem, 3.2cqi, 1.5rem); font-weight: ${
|
|
387
|
-
impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${l.textMuted}; line-height: ${
|
|
406
|
+
impakt-accordion::part(header) { min-block-size: 5.75rem; padding-block: ${z(5)}; font-family: ${l.fontHeading}; font-size: clamp(1.25rem, 3.2cqi, 1.5rem); font-weight: ${re("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
407
|
+
impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${l.textMuted}; line-height: ${Aa("normal")}; }
|
|
388
408
|
@media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }
|
|
389
|
-
`]}render(){let
|
|
390
|
-
${this.eyebrow?v`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:
|
|
391
|
-
${this.heading?v`<div id=${
|
|
392
|
-
${this.lead?v`<p class="lead" part="lead">${this.lead}</p>`:
|
|
393
|
-
</div>`:
|
|
409
|
+
`]}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">
|
|
410
|
+
${this.eyebrow?v`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:W}
|
|
411
|
+
${this.heading?v`<div id=${t} class="heading" part="heading" role="heading" aria-level=${e}>${this.heading}</div>`:W}
|
|
412
|
+
${this.lead?v`<p class="lead" part="lead">${this.lead}</p>`:W}
|
|
413
|
+
</div>`:W,a=v`<impakt-accordion part="questions" marker="plus" .items=${this.items} .headingLevel=${e+1} .open=${this.open} .multiple=${this.multiple}>
|
|
394
414
|
${this.items.map(r=>v`<slot name=${`panel-${r.id}`} slot=${`panel-${r.id}`}>${r.body}</slot>`)}
|
|
395
|
-
</impakt-accordion>`;return this.heading?v`<section aria-labelledby=${
|
|
415
|
+
</impakt-accordion>`;return this.heading?v`<section aria-labelledby=${t}>${i}${a}</section>`:v`<div>${i}${a}</div>`}},xi=class extends ve{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=[...ve.styles,La,gt`
|
|
396
416
|
/* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
|
|
397
417
|
:host { --impakt-menu: ${l.text}; --impakt-menu-on: ${l.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${l.surfaceCard} 78%, ${l.text}); --impakt-menu-rule: color-mix(in srgb, ${l.surfaceCard} 18%, ${l.text}); }
|
|
398
418
|
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); }
|
|
399
419
|
dialog[open] { display: flex; }
|
|
400
420
|
dialog::backdrop { background: var(--impakt-menu); }
|
|
401
421
|
.bar { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding: ${z(2)} ${z(4)}; border-block-end: ${l.borderThin} solid var(--impakt-menu-rule); }
|
|
402
|
-
.brand { color: inherit; text-decoration: none; font-family: ${l.fontHeading}; font-size: ${
|
|
403
|
-
.brand.marked { display: inline-flex; align-items: center; gap: ${z(3)}; min-block-size: 44px; font-weight: ${
|
|
404
|
-
.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: ${
|
|
405
|
-
.close { display: inline-flex; align-items: center; gap: ${z(2)}; min-block-size: 44px; padding: 0 ${z(4)}; font: inherit; font-size: ${
|
|
422
|
+
.brand { color: inherit; text-decoration: none; font-family: ${l.fontHeading}; font-size: ${je("md")}; font-weight: ${re("semibold")}; border-radius: ${l.radiusSm}; }
|
|
423
|
+
.brand.marked { display: inline-flex; align-items: center; gap: ${z(3)}; min-block-size: 44px; font-weight: ${re("medium")}; }
|
|
424
|
+
.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: ${je("sm")}; }
|
|
425
|
+
.close { display: inline-flex; align-items: center; gap: ${z(2)}; min-block-size: 44px; padding: 0 ${z(4)}; font: inherit; font-size: ${je("sm")}; font-weight: ${re("medium")}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${l.radius}; cursor: pointer; }
|
|
406
426
|
nav { flex: 1; padding: ${z(6)} ${z(5)} 0; }
|
|
407
427
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
408
428
|
li { border-block-end: ${l.borderThin} solid var(--impakt-menu-rule); }
|
|
409
|
-
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: ${l.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${
|
|
429
|
+
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: ${l.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
410
430
|
li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
411
|
-
.number { font-family: ${l.fontMono}; font-size: ${
|
|
431
|
+
.number { font-family: ${l.fontMono}; font-size: ${je("sm")}; font-weight: ${re("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
|
|
412
432
|
/*
|
|
413
433
|
* The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
|
|
414
434
|
* --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
|
|
@@ -421,9 +441,9 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
421
441
|
/* What is slotted at the foot is read on ink too. */
|
|
422
442
|
::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); }
|
|
423
443
|
@media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
|
|
424
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let
|
|
444
|
+
`]}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"),nr(this)))}disconnectedCallback(){super.disconnectedCallback(),nr(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()}>
|
|
425
445
|
<div class="bar" part="bar">
|
|
426
|
-
${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>`:
|
|
446
|
+
${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>`:W}${this.brand}</a>`:v`<span></span>`}
|
|
427
447
|
<button class="close" type="button" part="close" @click=${()=>this.close()}>
|
|
428
448
|
<span>${this.closeText}</span>
|
|
429
449
|
<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>
|
|
@@ -431,117 +451,136 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
431
451
|
</div>
|
|
432
452
|
<nav aria-label=${this.label} part="nav">
|
|
433
453
|
<ol role="list">
|
|
434
|
-
${(this.links??[]).map((e,
|
|
435
|
-
<a href=${e.href} class=${
|
|
436
|
-
<span class="words">${e.label}</span><span class="number" aria-hidden="true">${
|
|
454
|
+
${(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>
|
|
455
|
+
<a href=${e.href} class=${n?"worded":""} aria-current=${a?"page":W} part="link" @click=${()=>this.close()}>
|
|
456
|
+
<span class="words">${e.label}</span><span class="number" aria-hidden="true">${n?`${this.currentText} \xB7 ${r}`:r}</span>
|
|
437
457
|
</a>
|
|
438
458
|
</li>`})}
|
|
439
459
|
</ol>
|
|
440
460
|
</nav>
|
|
441
461
|
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
442
|
-
</dialog>`}},
|
|
462
|
+
</dialog>`}},yi=class extends ve{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=[...ve.styles,wi,gt`
|
|
443
463
|
:host { display: block; container: impakt-offer / inline-size; }
|
|
444
|
-
|
|
464
|
+
/* The Offer component (10:619): the copy 520px wide and the points 460px, 100px apart; the label, heading, lead and action 24px apart. */
|
|
465
|
+
.offer { display: grid; grid-template-columns: minmax(0, 520fr) minmax(0, 460fr); grid-template-areas: 'copy points' 'actions points'; grid-template-rows: auto 1fr; column-gap: 100px; row-gap: ${z(6)}; align-items: start; }
|
|
445
466
|
.copy { grid-area: copy; }
|
|
446
467
|
.actions { grid-area: actions; }
|
|
447
468
|
ol { grid-area: points; }
|
|
448
|
-
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${z(
|
|
449
|
-
|
|
450
|
-
.
|
|
451
|
-
.
|
|
469
|
+
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${z(6)}; }
|
|
470
|
+
/* The label in G2 Mono M, 13px at 1.5; the heading Display L, 64px on a 1080px offer and 36px on a phone; the lead G2 Body M, 16px at 1.45, 480px wide. */
|
|
471
|
+
.eyebrow { margin: 0; font-family: ${l.fontEyebrow}; font-size: 0.8125rem; line-height: 1.5; color: var(--impakt-eyebrow, ${l.textMuted}); }
|
|
472
|
+
.heading { max-inline-size: 8.125em; font-family: ${l.fontHeading}; font-size: clamp(2.25rem, 1.411rem + 3.836cqi, 4rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${l.textHeading}; }
|
|
473
|
+
.lead { margin: 0; max-inline-size: 30rem; font-size: ${je("md")}; line-height: 1.45; color: ${l.text}; }
|
|
452
474
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
475
|
+
/* Each point: a rule, 20px, the number in G2 Mono M and the words in G2 Label L, 20px at 1.2, 20px apart, then 20px. */
|
|
476
|
+
li { display: flex; gap: ${z(5)}; padding-block: ${z(5)}; border-block-start: ${l.borderThin} solid ${l.text}; font-size: 1.25rem; font-weight: ${re("medium")}; line-height: 1.2; letter-spacing: -0.01em; color: ${l.text}; }
|
|
477
|
+
.number { flex: none; font-family: ${l.fontMono}; font-size: 0.8125rem; font-weight: ${re("regular")}; line-height: 1.5; letter-spacing: 0; }
|
|
478
|
+
/* On a phone (15:993): everything 20px apart; the points 14px above and below, the words 16px, 14px after the number. */
|
|
479
|
+
@container impakt-offer (max-width: 44rem) {
|
|
480
|
+
.offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${z(5)}; }
|
|
481
|
+
.copy { gap: ${z(5)}; }
|
|
482
|
+
.heading { line-height: 1.03; }
|
|
483
|
+
li { gap: 14px; padding-block: 14px; font-size: 1rem; }
|
|
484
|
+
}
|
|
485
|
+
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return v`<div class="offer" part="offer">
|
|
457
486
|
<div class="copy">
|
|
458
|
-
${this.eyebrow?v`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:
|
|
459
|
-
${this.heading?v`<div class="heading" part="heading" role="heading" aria-level=${
|
|
460
|
-
${this.lead?v`<p class="lead" part="lead">${this.lead}</p>`:
|
|
487
|
+
${this.eyebrow?v`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:W}
|
|
488
|
+
${this.heading?v`<div class="heading" part="heading" role="heading" aria-level=${t}>${this.heading}</div>`:W}
|
|
489
|
+
${this.lead?v`<p class="lead" part="lead">${this.lead}</p>`:W}
|
|
461
490
|
</div>
|
|
462
491
|
<div class="actions" part="actions"><slot name="actions"></slot></div>
|
|
463
492
|
${(this.points??[]).length?v`<ol role="list" part="points">
|
|
464
|
-
${this.points.map((e,
|
|
465
|
-
</ol>`:
|
|
466
|
-
</div>`}},
|
|
493
|
+
${this.points.map((e,i)=>v`<li><span class="number" aria-hidden="true">${String(i+1).padStart(2,"0")}</span><span>${e}</span></li>`)}
|
|
494
|
+
</ol>`:W}
|
|
495
|
+
</div>`}},vi=class extends ve{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=[...ve.styles,La,gt`
|
|
467
496
|
:host { display: block; block-size: 100%; }
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
497
|
+
/* The Article component (10:648): 24px inside, the meta, title, line and link 14px apart. */
|
|
498
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: 14px; padding: ${z(6)}; background: ${l.surfaceCard}; border: ${l.borderThin} solid ${l.text}; border-radius: ${l.radius}; transition: background-color 140ms ease-out; }
|
|
499
|
+
/* The meta and the link in G2 Mono S: 11px medium capitals at 0.06em. */
|
|
500
|
+
.meta { margin: 0; font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${re("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.textMuted}; }
|
|
501
|
+
.heading { font-family: ${l.fontHeading}; font-size: 1.5rem; font-weight: ${re("semibold")}; line-height: 1.15; letter-spacing: -0.025em; color: ${l.text}; }
|
|
471
502
|
.heading a { color: inherit; text-decoration: none; }
|
|
472
503
|
.heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
473
504
|
.heading a:focus-visible { outline: none; }
|
|
474
505
|
.heading a:focus-visible::after { box-shadow: ${l.focusShadow}; }
|
|
475
506
|
article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
|
|
476
|
-
.text { margin: 0; font-size:
|
|
477
|
-
.more {
|
|
507
|
+
.text { margin: 0; font-size: 0.875rem; line-height: 1.4; color: ${l.textMuted}; }
|
|
508
|
+
.more { font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${re("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.text}; }
|
|
509
|
+
/* On a phone (15:1020): 20px inside and 12px apart. */
|
|
510
|
+
@media (max-width: 47.99rem) { article { gap: ${z(3)}; padding: ${z(5)}; } }
|
|
478
511
|
@media (forced-colors: active) { article { border-color: CanvasText; } }
|
|
479
|
-
`]}render(){let
|
|
480
|
-
${this.meta?v`<p class="meta" part="meta">${this.meta}</p>`:
|
|
481
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
482
|
-
${this.text?v`<p class="text" part="text">${this.text}</p>`:
|
|
483
|
-
${this.linkText&&this.href?v`<span class="more" aria-hidden="true">${this.linkText} →</span>`:
|
|
484
|
-
</article>`}},
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
.
|
|
512
|
+
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return v`<article part="card">
|
|
513
|
+
${this.meta?v`<p class="meta" part="meta">${this.meta}</p>`:W}
|
|
514
|
+
<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>
|
|
515
|
+
${this.text?v`<p class="text" part="text">${this.text}</p>`:W}
|
|
516
|
+
${this.linkText&&this.href?v`<span class="more" aria-hidden="true">${this.linkText} →</span>`:W}
|
|
517
|
+
</article>`}},ki=class extends ve{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=[...ve.styles,gt`
|
|
518
|
+
/*
|
|
519
|
+
* The Selection (9:306): the accent behind the words with a 1.5px ink line, drawn 0.1em outside them at the sides
|
|
520
|
+
* (12px at 120px) and from 2px under the top of the line to 4px over its foot, so the words keep their place in the
|
|
521
|
+
* heading. Its four 8px handles sit on its corners with the same line.
|
|
522
|
+
*/
|
|
523
|
+
:host { --x: 0.1em; --top: 0.0167em; --foot: 0.033em; display: inline-block; position: relative; isolation: isolate; color: ${St("color.accent.on","#1a1a1a")}; }
|
|
524
|
+
.box { position: absolute; z-index: -1; inset: var(--top) calc(-1 * var(--x)) var(--foot); box-sizing: border-box; background: ${St("color.accent.default","#ffd43b")}; border: 1.5px solid ${St("color.accent.on","#1a1a1a")}; }
|
|
525
|
+
.handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${l.surfaceCard}; border: 1.5px solid ${St("color.accent.on","#1a1a1a")}; }
|
|
526
|
+
.handle:nth-of-type(1) { inset-block-start: calc(var(--top) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
527
|
+
.handle:nth-of-type(2) { inset-block-start: calc(var(--top) - 4px); inset-inline-end: calc(-1 * var(--x) - 4px); }
|
|
528
|
+
.handle:nth-of-type(3) { inset-block-end: calc(var(--foot) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
529
|
+
.handle:nth-of-type(4) { inset-block-end: calc(var(--foot) - 4px); inset-inline-end: calc(-1 * var(--x) - 4px); }
|
|
530
|
+
/* The label is meta: monospace capitals at 11px, square, 8px under the box and level with its edge (9:311). */
|
|
531
|
+
.label { position: absolute; inset-block-start: calc(100% - var(--foot) + 8px); inset-inline-start: calc(-1 * var(--x)); padding: 3px 7px; white-space: nowrap; font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${re("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.surfaceCard}; background: ${l.text}; border-radius: ${l.radiusSm}; }
|
|
493
532
|
@media (max-width: 40rem) { :host([hide-label-on='phone']) .label { display: none; } }
|
|
494
|
-
/* The pointer
|
|
495
|
-
.cursor { position: absolute; inset-block-start: calc(100% -
|
|
533
|
+
/* The pointer sits by the bottom-right handle, 16px up from the box's foot, with its name tag 16px along and 18px down (9:313, 9:315). */
|
|
534
|
+
.cursor { position: absolute; inset-block-start: calc(100% - var(--foot) - 16px); inset-inline-start: calc(100% + var(--x) - 4px); display: flex; align-items: flex-start; pointer-events: none; line-height: 1; }
|
|
496
535
|
.cursor svg { display: block; flex: none; color: ${l.text}; stroke: ${l.surfaceCard}; }
|
|
497
|
-
.tag { margin-block-start:
|
|
498
|
-
@media (forced-colors: active) { :host { forced-color-adjust: none;
|
|
499
|
-
`]}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>`:
|
|
536
|
+
.tag { margin-block-start: 18px; padding: 3px 6px; white-space: nowrap; font-family: ${l.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.surfaceCard}; background: ${l.text}; }
|
|
537
|
+
@media (forced-colors: active) { :host { forced-color-adjust: none; color: HighlightText; } .box { background: Highlight; border-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label, .tag { background: CanvasText; color: Canvas; } .cursor svg { color: CanvasText; } }
|
|
538
|
+
`]}render(){return v`<span class="box" part="box" aria-hidden="true"></span><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>`:W}${this.cursor!=null?v`<span class="cursor" part="cursor" aria-hidden="true"
|
|
500
539
|
><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
|
|
501
|
-
>${this.cursor?v`<span class="tag">${this.cursor}</span>`:
|
|
502
|
-
>`:
|
|
503
|
-
.round { ${
|
|
540
|
+
>${this.cursor?v`<span class="tag">${this.cursor}</span>`:W}</span
|
|
541
|
+
>`:W}`}};customElements.define("impakt-work-list",bi);customElements.define("impakt-stat-row",fi);customElements.define("impakt-faq",$i);customElements.define("impakt-site-menu",xi);customElements.define("impakt-offer",yi);customElements.define("impakt-post-card",vi);customElements.define("impakt-highlight",ki);import{css as Pe,html as C,nothing as Y}from"./atomic-ui.js";import{say as ze,ImpaktElement as he,focusRing as Bi,targetSize as Ea,visuallyHidden as Zr,fontWeight as Ae,lineHeight as lr,space as h,spaceAround as st,t as p,token as en,type as U,iconSvg as bt}from"./atomic-ui.js";var tn=en("color.accent.default","#c8a15a"),sr=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,cr=Pe`
|
|
542
|
+
.round { ${Ea} 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; }
|
|
504
543
|
.round:hover:not(:disabled) { box-shadow: ${p.shadowMd}; }
|
|
505
544
|
.round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
|
|
506
|
-
`,
|
|
507
|
-
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${
|
|
508
|
-
.h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${
|
|
545
|
+
`,Ii=Pe`
|
|
546
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${U("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; }
|
|
547
|
+
.h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${Ae("bold")}; letter-spacing: ${p.trackingTight}; text-wrap: balance; }
|
|
509
548
|
.lead { margin: 0; color: ${p.textMuted}; text-wrap: pretty; }
|
|
510
|
-
`,
|
|
511
|
-
:host { display: block; container-type: inline-size; --most: 1; --gap: ${
|
|
549
|
+
`,Si=class extends he{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=[...he.styles,Bi,st,cr,Pe`
|
|
550
|
+
:host { display: block; container-type: inline-size; --most: 1; --gap: ${h(6)}; }
|
|
512
551
|
:host([per-view='2']) { --most: 2; }
|
|
513
552
|
:host([per-view='3']) { --most: 3; }
|
|
514
|
-
.track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${
|
|
553
|
+
.track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${h(1)} ${h(2)}; border-radius: ${p.radiusLg}; }
|
|
515
554
|
.track::-webkit-scrollbar { display: none; }
|
|
516
555
|
::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; }
|
|
517
556
|
/* Whole slides only: a slice of the next one reads as content spilling out of the page. */
|
|
518
557
|
@container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
|
|
519
|
-
@container (max-width: 40rem) { .track { --per: 1; --gap: ${
|
|
520
|
-
.controls { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
521
|
-
.dots { display: flex; flex-wrap: wrap; gap: ${
|
|
522
|
-
.dot { ${
|
|
558
|
+
@container (max-width: 40rem) { .track { --per: 1; --gap: ${h(4)}; } }
|
|
559
|
+
.controls { display: flex; align-items: center; justify-content: space-between; gap: ${h(4)}; margin-block-start: ${h(4)}; }
|
|
560
|
+
.dots { display: flex; flex-wrap: wrap; gap: ${h(1)}; }
|
|
561
|
+
.dot { ${Ea} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${p.radiusSm}; }
|
|
523
562
|
.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; }
|
|
524
563
|
.dot[aria-current='true'] span { inline-size: 24px; background: ${p.brand}; }
|
|
525
|
-
.buttons { display: flex; gap: ${
|
|
564
|
+
.buttons { display: flex; gap: ${h(2)}; }
|
|
526
565
|
section { position: relative; }
|
|
527
|
-
@container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${
|
|
528
|
-
.sr-only { ${
|
|
566
|
+
@container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${h(4)}); inset-inline-end: 0; } }
|
|
567
|
+
.sr-only { ${Zr} }
|
|
529
568
|
@media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
|
|
530
|
-
`]}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,
|
|
569
|
+
`]}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 s=this.slides[this.index];s&&typeof e.scrollTo=="function"&&e.scrollTo({left:s.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",ze("slide")),i.setAttribute("aria-label",ze("{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 s=this.track,m=this.slides[this.index];!n&&s&&m&&typeof s.scrollTo=="function"&&s.scrollTo({left:m.offsetLeft-s.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:sr()?"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,s)=>{let m=Math.abs(n.offsetLeft-e.offsetLeft-e.scrollLeft);m<r&&(r=m,a=s)}),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&&!sr()}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 C`<section aria-roledescription=${ze("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
|
|
531
570
|
@mouseenter=${()=>this.hold(!0)} @mouseleave=${()=>this.hold(!1)} @focusin=${()=>this.hold(!0)} @focusout=${()=>this.hold(!1)}>
|
|
532
571
|
<div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
|
|
533
572
|
<div class="controls" part="controls">
|
|
534
|
-
<div class="dots">${e.length>1?e.map(
|
|
573
|
+
<div class="dots">${e.length>1?e.map(i=>C`<button class="dot" type="button" aria-label=${ze("Go to slide {slide}",{slide:i+1})} aria-current=${i===this.index?"true":"false"} @click=${()=>this.go(i)}><span></span></button>`):Y}</div>
|
|
535
574
|
<div class="buttons">
|
|
536
|
-
${this.canPlay?
|
|
537
|
-
<button class="round" type="button" aria-label=${
|
|
538
|
-
<button class="round" type="button" aria-label=${
|
|
575
|
+
${this.canPlay?C`<button class="round" type="button" aria-label=${ze(this.paused?"Play the slides":"Pause the slides")} @click=${this.togglePause}>${this.paused?bt("arrow-right","18px"):C`<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>`:Y}
|
|
576
|
+
<button class="round" type="button" aria-label=${ze("Previous slide")} ?disabled=${this.index===0} @click=${()=>this.go(this.index-1)}>${bt("arrow-left","18px")}</button>
|
|
577
|
+
<button class="round" type="button" aria-label=${ze("Next slide")} ?disabled=${this.index>=this.last} @click=${()=>this.go(this.index+1)}>${bt("arrow-right","18px")}</button>
|
|
539
578
|
</div>
|
|
540
579
|
</div>
|
|
541
|
-
<p class="sr-only" aria-live="polite">${
|
|
542
|
-
</section>`}};function
|
|
580
|
+
<p class="sr-only" aria-live="polite">${ze("Slide {slide} of {slides}",{slide:this.index+1,slides:this.count})}</p>
|
|
581
|
+
</section>`}};function dr(o,t,e){let i=o===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(o===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 zi=class extends he{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=[...he.styles,Bi,st,cr,Pe`
|
|
543
582
|
:host { display: block; container-type: inline-size; }
|
|
544
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
583
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${h(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }
|
|
545
584
|
:host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
|
|
546
585
|
li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
|
|
547
586
|
:host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
|
|
@@ -551,114 +590,124 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
551
590
|
@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); } }
|
|
552
591
|
dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
|
|
553
592
|
dialog::backdrop { background: rgb(10 14 12 / 0.9); }
|
|
554
|
-
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${
|
|
555
|
-
.bar { display: flex; align-items: center; justify-content: space-between; ${
|
|
556
|
-
.middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${
|
|
593
|
+
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${h(4)}; gap: ${h(3)}; color: #fff; }
|
|
594
|
+
.bar { display: flex; align-items: center; justify-content: space-between; ${U("sm")} }
|
|
595
|
+
.middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${h(3)}; min-block-size: 0; }
|
|
557
596
|
.middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${p.radiusLg}; }
|
|
558
597
|
figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
|
|
559
|
-
.caption { margin: 0; text-align: center; ${
|
|
560
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}open(e,
|
|
561
|
-
<button class="open" type="button" aria-label=${
|
|
598
|
+
.caption { margin: 0; text-align: center; ${U("sm")} }
|
|
599
|
+
`]}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 C`<ul aria-label=${this.label} part="list">${e.map((a,r)=>{let n=dr(r,e.length,this.layout);return C`<li style=${`--span-wide:${n.wide};--span-narrow:${n.narrow};--span-rows:${n.rows}`}>
|
|
600
|
+
<button class="open" type="button" aria-label=${ze("View larger: {picture}",{picture:a.alt})} @click=${s=>this.open(r,s)}><img src=${a.src} alt=${a.alt} loading="lazy" /></button>
|
|
562
601
|
</li>`})}</ul>
|
|
563
602
|
<dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
|
|
564
|
-
${
|
|
565
|
-
<div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${
|
|
603
|
+
${i?C`<div class="stage">
|
|
604
|
+
<div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${ze("Close")} @click=${this.close}>${bt("close","18px")}</button></div>
|
|
566
605
|
<div class="middle">
|
|
567
|
-
<button class="round" type="button" aria-label=${
|
|
568
|
-
<figure><img src=${
|
|
569
|
-
<button class="round" type="button" aria-label=${
|
|
606
|
+
<button class="round" type="button" aria-label=${ze("Previous picture")} @click=${()=>this.step(-1)}>${bt("arrow-left","18px")}</button>
|
|
607
|
+
<figure><img src=${i.src} alt=${i.alt} /></figure>
|
|
608
|
+
<button class="round" type="button" aria-label=${ze("Next picture")} @click=${()=>this.step(1)}>${bt("arrow-right","18px")}</button>
|
|
570
609
|
</div>
|
|
571
|
-
<p class="caption">${
|
|
572
|
-
</div>`:
|
|
573
|
-
</dialog>`}},
|
|
610
|
+
<p class="caption">${i.caption??i.alt}</p>
|
|
611
|
+
</div>`:Y}
|
|
612
|
+
</dialog>`}},Ti=class extends he{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=[...he.styles,Bi,st,Pe`
|
|
574
613
|
:host { display: block; }
|
|
575
|
-
p { margin: 0 0 ${
|
|
576
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${
|
|
614
|
+
p { margin: 0 0 ${h(6)}; text-align: center; color: ${p.textMuted}; ${U("sm")} font-weight: ${Ae("medium")}; }
|
|
615
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${h(8)} ${h(12)}; }
|
|
577
616
|
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; }
|
|
578
617
|
li:hover img { filter: none; opacity: 1; }
|
|
579
618
|
a { display: block; border-radius: ${p.radiusSm}; }
|
|
580
|
-
`]}render(){return
|
|
581
|
-
<ul part="list">${(this.items??[]).map(
|
|
619
|
+
`]}render(){return C`${this.heading?C`<p part="heading">${this.heading}</p>`:Y}
|
|
620
|
+
<ul part="list">${(this.items??[]).map(t=>C`<li>${t.href?C`<a href=${t.href}><img src=${t.src} alt=${t.alt} /></a>`:C`<img src=${t.src} alt=${t.alt} />`}</li>`)}</ul>`}},Mi=class extends he{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=[...he.styles,st,Ii,Pe`
|
|
582
621
|
:host { display: block; container-type: inline-size; }
|
|
583
|
-
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${
|
|
584
|
-
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${
|
|
585
|
-
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}; ${
|
|
586
|
-
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${
|
|
587
|
-
.h { ${
|
|
588
|
-
.meta { margin: 0; ${
|
|
589
|
-
.body { margin: 0; color: ${p.textMuted}; line-height: ${
|
|
622
|
+
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${h(6)}; }
|
|
623
|
+
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${h(2)}; }
|
|
624
|
+
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}; ${U("sm")} font-weight: ${Ae("bold")}; position: relative; z-index: 1; margin-block-end: ${h(2)}; }
|
|
625
|
+
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${h(6)} + 8px); block-size: 2px; background: ${p.rule}; }
|
|
626
|
+
.h { ${U("lg")} letter-spacing: 0; }
|
|
627
|
+
.meta { margin: 0; ${U("sm")} color: ${p.textMuted}; font-family: ${p.fontMono}; letter-spacing: 0.02em; }
|
|
628
|
+
.body { margin: 0; color: ${p.textMuted}; line-height: ${lr("normal")}; text-wrap: pretty; }
|
|
590
629
|
:host([orientation='vertical']) ol { grid-auto-flow: row; }
|
|
591
630
|
:host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
592
631
|
:host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
593
|
-
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
632
|
+
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${h(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
594
633
|
@container (max-width: 40rem) {
|
|
595
634
|
ol { grid-auto-flow: row; }
|
|
596
635
|
li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
597
636
|
li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
598
|
-
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
637
|
+
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${h(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
599
638
|
}
|
|
600
639
|
/* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */
|
|
601
|
-
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${
|
|
640
|
+
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${h(5)}; border-block-start: 1px solid var(--rule); }
|
|
602
641
|
:host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }
|
|
603
|
-
|
|
642
|
+
/* The Step component (10:512): 16px under the rule, 8px apart, the meta in G2 Mono S, the title in G2 Label L (Archivo medium 20px at 1.2) and the text in G2 Body S (14px at 1.4). */
|
|
643
|
+
:host([look='ruled']:not([tones])) li { padding-block-start: ${h(4)}; }
|
|
644
|
+
:host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; font-weight: ${Ae("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
645
|
+
:host([look='ruled']:not([tones])) .h { font-size: 1.25rem; font-weight: ${Ae("medium")}; line-height: 1.2; letter-spacing: -0.01em; }
|
|
646
|
+
:host([look='ruled']:not([tones])) .body { font-size: 0.875rem; line-height: 1.4; }
|
|
604
647
|
:host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' · '; }
|
|
605
|
-
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${
|
|
648
|
+
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${h(4)} - 1px); }
|
|
606
649
|
:host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }
|
|
607
650
|
:host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
|
|
608
|
-
:host([look='ruled']) ol { gap: ${
|
|
651
|
+
:host([look='ruled']) ol { gap: ${h(5)}; }
|
|
609
652
|
/* 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. */
|
|
610
653
|
@container (max-width: 40rem) {
|
|
611
654
|
:host([look='ruled']) ol { gap: 0; }
|
|
612
|
-
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${
|
|
655
|
+
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${h(6)}; min-block-size: 0; border-block-start: 0; }
|
|
613
656
|
: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; }
|
|
614
|
-
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${
|
|
615
|
-
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${
|
|
616
|
-
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${
|
|
657
|
+
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${h(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}; }
|
|
658
|
+
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${h(6)} + 7px); }
|
|
659
|
+
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${h(6)} + 7px); }
|
|
617
660
|
:host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }
|
|
661
|
+
/* The phone rail (15:891): each step 26px in from the rail, 28px under its text, its parts 6px apart; a 10px ring 4px down and the 1.5px line from under it to the next. */
|
|
662
|
+
:host([look='ruled']:not([tones])) li, :host([look='ruled']:not([tones])) li[aria-current] { gap: 6px; padding: 0 0 28px 26px; }
|
|
663
|
+
:host([look='ruled']:not([tones])) li::before { inset-block: 14px 0; inset-inline-start: 4.25px; }
|
|
664
|
+
:host([look='ruled']:not([tones])) li::after { inset-block-start: 4px; border-width: 1.5px; }
|
|
665
|
+
:host([look='ruled']:not([tones])) li:first-child::before { inset-block-start: 14px; }
|
|
666
|
+
:host([look='ruled']:not([tones])) li:last-child::before { display: none; }
|
|
618
667
|
/* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */
|
|
619
668
|
:host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${p.text}; }
|
|
620
|
-
:host([look='ruled'][tones]) li::after { inset-block: ${
|
|
669
|
+
:host([look='ruled'][tones]) li::after { inset-block: ${h(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; }
|
|
621
670
|
}
|
|
622
671
|
@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; } }
|
|
623
|
-
`]}render(){return
|
|
624
|
-
${
|
|
625
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${
|
|
626
|
-
${
|
|
627
|
-
</li>`)}</ol>`}},
|
|
672
|
+
`]}render(){return C`<ol part="list">${(this.items??[]).map((t,e)=>C`<li part="step" aria-current=${e===this.current?"step":Y} style=${this.look==="ruled"?`--chart:var(--impakt-color-chart-${e%5+1}, var(--impakt-color-brand-default, #1f4ed8))`:Y}>
|
|
673
|
+
${t.meta?C`<p class="meta">${t.meta}</p>`:Y}
|
|
674
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.heading}</div>
|
|
675
|
+
${t.text?C`<p class="body">${t.text}</p>`:Y}
|
|
676
|
+
</li>`)}</ol>`}},Ci=class extends he{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=[...he.styles,st,Ii,Pe`
|
|
628
677
|
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
629
678
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
630
679
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
631
680
|
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
632
|
-
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
681
|
+
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(16)}; align-items: center; }
|
|
633
682
|
:host([image-side='start']) .picture { order: -1; }
|
|
634
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
635
|
-
.h { ${
|
|
636
|
-
.lead { ${
|
|
637
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${
|
|
638
|
-
li { display: flex; gap: ${
|
|
683
|
+
.words { display: flex; flex-direction: column; gap: ${h(4)}; }
|
|
684
|
+
.h { ${U("4xl")} }
|
|
685
|
+
.lead { ${U("lg")} }
|
|
686
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${h(3)}; }
|
|
687
|
+
li { display: flex; gap: ${h(3)}; align-items: flex-start; line-height: ${lr("normal")}; }
|
|
639
688
|
.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}; }
|
|
640
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
689
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${h(3)} ${h(4)}; align-items: center; margin-block-start: ${h(2)}; }
|
|
641
690
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${p.radius2xl}; box-shadow: ${p.shadowXl}; }
|
|
642
691
|
.picture { position: relative; }
|
|
643
692
|
.picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
|
|
644
693
|
.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; }
|
|
645
694
|
@container (max-width: 48rem) {
|
|
646
|
-
.split { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
695
|
+
.split { grid-template-columns: minmax(0, 1fr); gap: ${h(8)}; }
|
|
647
696
|
:host([image-side='start']) .picture { order: 0; }
|
|
648
|
-
.h { ${
|
|
697
|
+
.h { ${U("3xl")} }
|
|
649
698
|
}
|
|
650
|
-
`]}render(){return
|
|
699
|
+
`]}render(){return C`<div class="split" part="split">
|
|
651
700
|
<div class="words">
|
|
652
|
-
${this.eyebrow?
|
|
701
|
+
${this.eyebrow?C`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:Y}
|
|
653
702
|
<div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
|
|
654
|
-
${this.lead?
|
|
655
|
-
${this.points?.length?
|
|
703
|
+
${this.lead?C`<p class="lead">${this.lead}</p>`:Y}
|
|
704
|
+
${this.points?.length?C`<ul>${this.points.map(t=>C`<li><span class="tick">${bt("check","14px")}</span><span>${t}</span></li>`)}</ul>`:Y}
|
|
656
705
|
<div class="actions"><slot name="actions"></slot></div>
|
|
657
706
|
</div>
|
|
658
|
-
${this.imageSrc?
|
|
659
|
-
</div>`}},
|
|
707
|
+
${this.imageSrc?C`<div class="picture ${this.insetSrc?"has-inset":""}"><img src=${this.imageSrc} alt=${this.imageAlt} loading="lazy" part="image" />${this.insetSrc?C`<img class="inset" src=${this.insetSrc} alt=${this.insetAlt} loading="lazy" />`:Y}</div>`:Y}
|
|
708
|
+
</div>`}},Ai=class extends he{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=[...he.styles,st,Ii,Pe`
|
|
660
709
|
:host { display: block; container-type: inline-size; }
|
|
661
|
-
.panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
710
|
+
.panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${h(8)}; padding: ${h(16)}; border-radius: ${p.radius2xl}; background: ${p.surfaceCard}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
|
|
662
711
|
:host([tone='subtle']) .panel { background: ${p.surfaceSubtle}; box-shadow: none; }
|
|
663
712
|
:host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.shadowMd};
|
|
664
713
|
/* A primary button on the brand panel turns over, as it does on an ink band, so it keeps an edge against the panel. */
|
|
@@ -672,103 +721,103 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
672
721
|
.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%); }
|
|
673
722
|
.panel.pictured .words, .panel.pictured .actions { z-index: 1; }
|
|
674
723
|
@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%); } }
|
|
675
|
-
.words { position: relative; display: flex; flex-direction: column; gap: ${
|
|
676
|
-
.h { ${
|
|
677
|
-
.lead { ${
|
|
678
|
-
.actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${
|
|
724
|
+
.words { position: relative; display: flex; flex-direction: column; gap: ${h(3)}; max-inline-size: 40rem; }
|
|
725
|
+
.h { ${U("4xl")} }
|
|
726
|
+
.lead { ${U("lg")} }
|
|
727
|
+
.actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${h(3)}; }
|
|
679
728
|
:host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
|
|
680
729
|
:host([align='center']) .panel { flex-direction: column; text-align: center; }
|
|
681
730
|
:host([align='center']) .words { align-items: center; }
|
|
682
|
-
@container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${
|
|
731
|
+
@container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${h(8)} ${h(6)}; } .h { ${U("3xl")} } :host([align='center']) .panel { align-items: center; } }
|
|
683
732
|
@media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
|
|
684
|
-
`]}render(){return
|
|
685
|
-
${this.imageSrc?
|
|
733
|
+
`]}render(){return C`<div class="panel ${this.imageSrc?"pictured":""}" part="panel">
|
|
734
|
+
${this.imageSrc?C`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />`:Y}
|
|
686
735
|
<div class="words">
|
|
687
736
|
<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
|
|
688
|
-
${this.lead?
|
|
737
|
+
${this.lead?C`<p class="lead">${this.lead}</p>`:Y}
|
|
689
738
|
</div>
|
|
690
739
|
<div class="actions"><slot name="actions"></slot></div>
|
|
691
|
-
</div>`}},
|
|
740
|
+
</div>`}},or=o=>C`<span class="stars" role="img" aria-label=${ze("Rated {rating} out of 5",{rating:o})}>${[1,2,3,4,5].map(t=>C`<svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill=${t<=o?"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>`,an=o=>o.split(/\s+/).filter(t=>/^[A-Za-z]/.test(t)&&t.toLowerCase()!=="and").slice(0,2).map(t=>t[0].toUpperCase()).join(""),Li=class extends he{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=[...he.styles,st,Pe`
|
|
692
741
|
:host { display: block; container-type: inline-size; }
|
|
693
|
-
.top { display: flex; align-items: center; gap: ${
|
|
694
|
-
.stars { display: inline-flex; gap: 2px; color: ${
|
|
695
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
742
|
+
.top { display: flex; align-items: center; gap: ${h(3)}; margin-block-end: ${h(6)}; ${U("sm")} font-weight: ${Ae("medium")}; }
|
|
743
|
+
.stars { display: inline-flex; gap: 2px; color: ${tn}; }
|
|
744
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${h(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
696
745
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
697
|
-
li { display: flex; flex-direction: column; gap: ${
|
|
698
|
-
blockquote { margin: 0; flex: 1; ${
|
|
699
|
-
.who { display: flex; align-items: center; gap: ${
|
|
700
|
-
.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}; ${
|
|
746
|
+
li { display: flex; flex-direction: column; gap: ${h(4)}; padding: ${h(6)}; background: ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
|
|
747
|
+
blockquote { margin: 0; flex: 1; ${U("md")} text-wrap: pretty; }
|
|
748
|
+
.who { display: flex; align-items: center; gap: ${h(3)}; }
|
|
749
|
+
.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}; ${U("sm")} font-weight: ${Ae("bold")}; }
|
|
701
750
|
.face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
702
|
-
.name { font-weight: ${
|
|
703
|
-
.about { color: ${p.textMuted}; ${
|
|
751
|
+
.name { font-weight: ${Ae("semibold")}; ${U("sm")} }
|
|
752
|
+
.about { color: ${p.textMuted}; ${U("sm")} }
|
|
704
753
|
@container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
705
|
-
`]}render(){return
|
|
706
|
-
<ul part="list">${(this.items??[]).map(
|
|
707
|
-
${
|
|
708
|
-
<blockquote>${
|
|
709
|
-
<div class="who"><span class="face" aria-hidden="true">${
|
|
710
|
-
</li>`)}</ul>`}},
|
|
754
|
+
`]}render(){return C`${this.summary||this.rating?C`<p class="top" part="summary" style="margin-block-start:0">${this.rating?or(Math.round(this.rating)):Y}<span>${this.summary}</span></p>`:Y}
|
|
755
|
+
<ul part="list">${(this.items??[]).map(t=>C`<li part="review">
|
|
756
|
+
${t.rating?or(t.rating):Y}
|
|
757
|
+
<blockquote>${t.quote}</blockquote>
|
|
758
|
+
<div class="who"><span class="face" aria-hidden="true">${t.avatarSrc?C`<img src=${t.avatarSrc} alt="" />`:an(t.person)}</span><span><span class="name">${t.person}</span>${t.about?C`<br /><span class="about">${t.about}</span>`:Y}</span></div>
|
|
759
|
+
</li>`)}</ul>`}},Ei=class extends he{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=[...he.styles,Bi,st,Ii,Pe`
|
|
711
760
|
:host { display: block; container-type: inline-size; }
|
|
712
|
-
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
713
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
714
|
-
.h { ${
|
|
715
|
-
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${
|
|
716
|
-
label { grid-column: 1 / -1; ${
|
|
717
|
-
input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${
|
|
718
|
-
button { ${
|
|
761
|
+
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(8)}; align-items: center; }
|
|
762
|
+
.words { display: flex; flex-direction: column; gap: ${h(2)}; }
|
|
763
|
+
.h { ${U("2xl")} }
|
|
764
|
+
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${h(1)} ${h(3)}; }
|
|
765
|
+
label { grid-column: 1 / -1; ${U("sm")} font-weight: ${Ae("semibold")}; }
|
|
766
|
+
input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${h(2.5)} ${h(3)}; font: inherit; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.border}; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; }
|
|
767
|
+
button { ${Ea} min-block-size: 44px; padding: ${h(2)} ${h(5)}; font: inherit; ${U("sm")} font-weight: ${Ae("semibold")}; color: ${p.onBrand}; background: ${p.brand}; border: 0; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; cursor: pointer; }
|
|
719
768
|
button:hover { background: ${p.brandHover}; }
|
|
720
|
-
.note { grid-column: 1 / -1; margin: ${
|
|
721
|
-
.done { margin: 0; ${
|
|
769
|
+
.note { grid-column: 1 / -1; margin: ${h(1)} 0 0; color: ${p.textMuted}; ${U("sm")} }
|
|
770
|
+
.done { margin: 0; ${U("md")} font-weight: ${Ae("semibold")}; }
|
|
722
771
|
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
723
|
-
`]}submit(e){e.preventDefault();let
|
|
772
|
+
`]}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 C`<div class="wrap" part="wrap">
|
|
724
773
|
<div class="words">
|
|
725
|
-
${this.heading?
|
|
726
|
-
${this.lead?
|
|
774
|
+
${this.heading?C`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:Y}
|
|
775
|
+
${this.lead?C`<p class="lead">${this.lead}</p>`:Y}
|
|
727
776
|
</div>
|
|
728
|
-
<div aria-live="polite">${this.done?
|
|
777
|
+
<div aria-live="polite">${this.done?C`<p class="done">${this.doneText}</p>`:C`<form @submit=${this.submit}>
|
|
729
778
|
<label for=${e}>${this.label}</label>
|
|
730
779
|
<input id=${e} type="email" name="email" autocomplete="email" required />
|
|
731
780
|
<button type="submit">${this.buttonText}</button>
|
|
732
|
-
${this.smallPrint?
|
|
781
|
+
${this.smallPrint?C`<p class="note">${this.smallPrint}</p>`:Y}
|
|
733
782
|
</form>`}</div>
|
|
734
|
-
</div>`}};customElements.define("impakt-carousel",
|
|
783
|
+
</div>`}};customElements.define("impakt-carousel",Si);customElements.define("impakt-gallery",zi);customElements.define("impakt-logo-cloud",Ti);customElements.define("impakt-steps",Mi);customElements.define("impakt-media-split",Ci);customElements.define("impakt-cta-banner",Ai);customElements.define("impakt-reviews",Li);customElements.define("impakt-newsletter",Ei);import{css as qt,html as V,nothing as ke}from"./atomic-ui.js";import{say as ot,pageLocale as rn,ImpaktElement as Oe,focusRing as jt,targetSize as pr,fontWeight as we,space as b,spaceAround as Pi,t as c,type as ne,iconSvg as ft}from"./atomic-ui.js";var Ri=class extends Oe{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=[...Oe.styles,jt,Pi,qt`
|
|
735
784
|
:host { display: block; container-type: inline-size; }
|
|
736
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${
|
|
785
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${b(6)}; align-items: start; }
|
|
737
786
|
.plan { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; background: ${c.surfaceSubtle}; box-shadow: ${c.shadowMd}; line-height: 0; }
|
|
738
787
|
.plan img { inline-size: 100%; block-size: auto; }
|
|
739
|
-
.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; ${
|
|
788
|
+
.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; ${ne("xs")} line-height: 1; font-weight: ${we("bold")}; color: ${c.onBrand}; background: ${c.brand}; border: 2px solid ${c.surfaceCard}; border-radius: 50%; box-shadow: ${c.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }
|
|
740
789
|
.pin:hover { transform: scale(1.12); }
|
|
741
790
|
.pin.reserved { color: ${c.text}; background: ${c.warningSubtle}; border-color: ${c.warning}; border-style: dashed; }
|
|
742
791
|
.pin.sold { color: ${c.textMuted}; background: ${c.surfaceCard}; border-color: ${c.border}; border-radius: ${c.radius}; }
|
|
743
792
|
.pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${c.shadowLg}, 0 0 0 3px ${c.brand}; }
|
|
744
|
-
.panel { display: flex; flex-direction: column; gap: ${
|
|
793
|
+
.panel { display: flex; flex-direction: column; gap: ${b(3)}; padding: ${b(6)}; background: ${c.surfaceCard}; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowSm}, 0 0 0 1px color-mix(in srgb, ${c.text} 6%, transparent); }
|
|
745
794
|
.hint { margin: 0; color: ${c.textMuted}; }
|
|
746
|
-
.name { margin: 0; font-family: ${c.fontHeading}; ${
|
|
795
|
+
.name { margin: 0; font-family: ${c.fontHeading}; ${ne("2xl")} font-weight: ${we("bold")}; color: ${c.textHeading}; }
|
|
747
796
|
.sub { margin: 0; color: ${c.textMuted}; }
|
|
748
|
-
.price { margin: 0; ${
|
|
749
|
-
.status { align-self: flex-start; padding: ${
|
|
797
|
+
.price { margin: 0; ${ne("xl")} font-weight: ${we("semibold")}; }
|
|
798
|
+
.status { align-self: flex-start; padding: ${b(.5)} ${b(2.5)}; ${ne("xs")} font-weight: ${we("semibold")}; color: ${c.successText}; background: ${c.successSubtle}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); }
|
|
750
799
|
.status.reserved { color: ${c.warningText}; background: ${c.warningSubtle}; }
|
|
751
800
|
.status.sold { color: ${c.text}; background: ${c.surfaceSubtle}; }
|
|
752
|
-
.go { ${
|
|
801
|
+
.go { ${pr} display: inline-flex; align-items: center; justify-content: center; gap: ${b(2)}; padding: ${b(2)} ${b(4)}; ${ne("sm")} font-weight: ${we("semibold")}; color: ${c.onBrand}; text-decoration: none; background: ${c.brand}; border-radius: ${c.radiusLg}; }
|
|
753
802
|
.go:hover { background: ${c.brandHover}; }
|
|
754
|
-
.legend { display: flex; flex-wrap: wrap; gap: ${
|
|
755
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
803
|
+
.legend { display: flex; flex-wrap: wrap; gap: ${b(4)}; margin: ${b(3)} 0 0; padding: 0; list-style: none; ${ne("sm")} color: ${c.textMuted}; }
|
|
804
|
+
.legend li { display: inline-flex; align-items: center; gap: ${b(2)}; }
|
|
756
805
|
.key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${c.brand}; border: 2px solid ${c.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }
|
|
757
806
|
.key.reserved { background: ${c.warningSubtle}; border: 2px dashed ${c.warning}; }
|
|
758
807
|
.key.sold { background: ${c.surfaceCard}; border: 2px solid ${c.border}; border-radius: 3px; }
|
|
759
808
|
:host { --plan-card: var(--impakt-solid-card, ${c.surfaceCard}); --plan-text: var(--impakt-solid-text, ${c.text}); --plan-heading: var(--impakt-solid-heading, ${c.text}); --plan-muted: var(--impakt-solid-muted, ${c.textMuted}); }
|
|
760
809
|
: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); }
|
|
761
|
-
@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: ${
|
|
810
|
+
@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: ${b(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${c.shadowXl}; } }
|
|
762
811
|
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
763
|
-
`]}willUpdate(
|
|
764
|
-
<p class="name">${this.plotWord} ${
|
|
765
|
-
${
|
|
766
|
-
${
|
|
767
|
-
${
|
|
812
|
+
`]}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 V`<p class="hint">${this.hint}</p>`;let e=t.status??"available";return V`<span class="status ${e}">${this.word(e)}</span>
|
|
813
|
+
<p class="name">${this.plotWord} ${t.number}</p>
|
|
814
|
+
${t.name||t.beds?V`<p class="sub">${[t.name,t.beds].filter(Boolean).join(" \xB7 ")}</p>`:ke}
|
|
815
|
+
${t.price?V`<p class="price">${t.price}</p>`:ke}
|
|
816
|
+
${t.href&&e!=="sold"?V`<a class="go" href=${t.href}>${this.actionText}${ft("arrow-right","16px")}</a>`:ke}`}render(){return V`<div class="wrap" part="wrap">
|
|
768
817
|
<div>
|
|
769
818
|
<div class="plan" part="plan">
|
|
770
819
|
<img src=${this.imageSrc} alt=${this.imageAlt} />
|
|
771
|
-
${this.plots.map(
|
|
820
|
+
${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 V`<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>`})}
|
|
772
821
|
</div>
|
|
773
822
|
<ul class="legend">
|
|
774
823
|
<li><span class="key"></span>${this.availableText}</li>
|
|
@@ -777,153 +826,153 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
777
826
|
</ul>
|
|
778
827
|
</div>
|
|
779
828
|
<div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
|
|
780
|
-
</div>`}};function
|
|
829
|
+
</div>`}};function mr(o,t,e){let i=e*12;if(o<=0||i<=0)return 0;let a=t/100/12;return a===0?o/i:o*a/(1-(1+a)**-i)}var Hi=class extends Oe{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=[...Oe.styles,jt,Pi,qt`
|
|
781
830
|
:host { display: block; container-type: inline-size; }
|
|
782
831
|
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${c.surfaceCard}; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowMd}, 0 0 0 1px color-mix(in srgb, ${c.text} 6%, transparent); }
|
|
783
|
-
.inputs { display: flex; flex-direction: column; gap: ${
|
|
784
|
-
.h { margin: 0; font-family: ${c.fontHeading}; ${
|
|
785
|
-
label { display: flex; justify-content: space-between; gap: ${
|
|
786
|
-
.read { font-weight: ${
|
|
787
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
832
|
+
.inputs { display: flex; flex-direction: column; gap: ${b(5)}; padding: ${b(8)}; }
|
|
833
|
+
.h { margin: 0; font-family: ${c.fontHeading}; ${ne("2xl")} font-weight: ${we("bold")}; color: ${c.textHeading}; }
|
|
834
|
+
label { display: flex; justify-content: space-between; gap: ${b(3)}; ${ne("sm")} font-weight: ${we("semibold")}; margin-block-end: ${b(1.5)}; }
|
|
835
|
+
.read { font-weight: ${we("regular")}; color: ${c.textMuted}; }
|
|
836
|
+
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${b(2)} ${b(3)}; font: inherit; color: ${c.text}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; }
|
|
788
837
|
input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${c.brand}; }
|
|
789
|
-
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
790
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${
|
|
791
|
-
.caption { margin: 0; ${
|
|
792
|
-
output { display: block; font-family: ${c.fontHeading}; ${
|
|
793
|
-
dl { display: grid; gap: ${
|
|
794
|
-
dl div { display: flex; justify-content: space-between; gap: ${
|
|
838
|
+
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${b(4)}; }
|
|
839
|
+
.result { display: flex; flex-direction: column; justify-content: center; gap: ${b(2)}; padding: ${b(8)}; color: ${c.onBrand}; background: ${c.brand}; }
|
|
840
|
+
.caption { margin: 0; ${ne("sm")} opacity: 0.85; }
|
|
841
|
+
output { display: block; font-family: ${c.fontHeading}; ${ne("4xl")} font-weight: ${we("bold")}; }
|
|
842
|
+
dl { display: grid; gap: ${b(2)}; margin: ${b(4)} 0 0; padding-block-start: ${b(4)}; border-block-start: 1px solid color-mix(in srgb, ${c.onBrand} 25%, transparent); ${ne("sm")} }
|
|
843
|
+
dl div { display: flex; justify-content: space-between; gap: ${b(3)}; }
|
|
795
844
|
dt { opacity: 0.85; }
|
|
796
|
-
dd { margin: 0; font-weight: ${
|
|
845
|
+
dd { margin: 0; font-weight: ${we("semibold")}; }
|
|
797
846
|
/* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
|
|
798
|
-
.small { grid-column: 1 / -1; margin: 0; padding: ${
|
|
799
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${
|
|
800
|
-
`]}money(
|
|
847
|
+
.small { grid-column: 1 / -1; margin: 0; padding: ${b(4)} ${b(8)}; ${ne("xs")} color: ${c.text}; background: ${c.surfaceSubtle}; }
|
|
848
|
+
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${b(5)}; } .small { padding: ${b(4)} ${b(5)}; } }
|
|
849
|
+
`]}money(t){try{return new Intl.NumberFormat(rn(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=mr(e,this.rate,this.years);return V`<div class="wrap" part="wrap">
|
|
801
850
|
<div class="inputs">
|
|
802
|
-
${this.heading?
|
|
803
|
-
<div><label for=${this.id_("price")}>${
|
|
804
|
-
<div><label for=${this.id_("deposit")}>${
|
|
851
|
+
${this.heading?V`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:ke}
|
|
852
|
+
<div><label for=${this.id_("price")}>${ot("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>
|
|
853
|
+
<div><label for=${this.id_("deposit")}>${ot("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>
|
|
805
854
|
<div class="two">
|
|
806
|
-
<div><label for=${this.id_("years")}>${
|
|
807
|
-
<div><label for=${this.id_("rate")}>${
|
|
855
|
+
<div><label for=${this.id_("years")}>${ot("Term")} <span class="read">${ot("{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>
|
|
856
|
+
<div><label for=${this.id_("rate")}>${ot("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>
|
|
808
857
|
</div>
|
|
809
858
|
</div>
|
|
810
859
|
<div class="result">
|
|
811
|
-
<p class="caption">${
|
|
812
|
-
<output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(
|
|
860
|
+
<p class="caption">${ot("Estimated monthly repayment")}</p>
|
|
861
|
+
<output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(i)}</output>
|
|
813
862
|
<dl>
|
|
814
|
-
<div><dt>${
|
|
815
|
-
<div><dt>${
|
|
863
|
+
<div><dt>${ot("You would borrow")}</dt><dd>${this.money(e)}</dd></div>
|
|
864
|
+
<div><dt>${ot("Total repayable")}</dt><dd>${this.money(i*this.years*12)}</dd></div>
|
|
816
865
|
</dl>
|
|
817
866
|
</div>
|
|
818
|
-
${this.smallPrint?
|
|
819
|
-
</div>`}},
|
|
867
|
+
${this.smallPrint?V`<p class="small">${this.smallPrint}</p>`:ke}
|
|
868
|
+
</div>`}},Ni=class extends Oe{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=[...Oe.styles,jt,Pi,qt`
|
|
820
869
|
.frame { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowLg}; line-height: 0; --at: 50%; }
|
|
821
870
|
img { display: block; inline-size: 100%; block-size: auto; }
|
|
822
871
|
.after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
|
|
823
|
-
.tag { position: absolute; inset-block-start: ${
|
|
824
|
-
.tag.b { inset-inline-start: ${
|
|
825
|
-
.tag.a { inset-inline-end: ${
|
|
872
|
+
.tag { position: absolute; inset-block-start: ${b(3)}; padding: ${b(1)} ${b(3)}; ${ne("xs")} line-height: 1.4; font-weight: ${we("semibold")}; color: ${c.text}; background: ${c.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); box-shadow: ${c.shadowSm}; }
|
|
873
|
+
.tag.b { inset-inline-start: ${b(3)}; }
|
|
874
|
+
.tag.a { inset-inline-end: ${b(3)}; }
|
|
826
875
|
.line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${c.surfaceCard}; pointer-events: none; }
|
|
827
876
|
.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: ${c.text}; background: ${c.surfaceCard}; border-radius: 50%; box-shadow: ${c.shadowMd}; }
|
|
828
877
|
input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
|
|
829
878
|
.frame:has(input:focus-visible) .grip { box-shadow: ${c.focusShadow}; }
|
|
830
|
-
`]}render(){return
|
|
879
|
+
`]}render(){return V`<div class="frame" part="frame" style="--at:${this.position}%">
|
|
831
880
|
<img src=${this.beforeSrc} alt=${this.beforeAlt} />
|
|
832
881
|
<img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
|
|
833
882
|
<span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
|
|
834
883
|
<span class="tag a" aria-hidden="true">${this.afterLabel}</span>
|
|
835
|
-
<span class="line"><span class="grip">${
|
|
836
|
-
<input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${
|
|
837
|
-
</div>`}},
|
|
884
|
+
<span class="line"><span class="grip">${ft("arrow-left","14px")}${ft("arrow-right","14px")}</span></span>
|
|
885
|
+
<input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${t=>{this.position=Number(t.target.value)}} />
|
|
886
|
+
</div>`}},qi=class extends Oe{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=[...Oe.styles,jt,qt`
|
|
838
887
|
:host { display: block; }
|
|
839
|
-
.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
888
|
+
.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${b(4)}; padding: ${b(3)} ${b(4)} calc(${b(3)} + env(safe-area-inset-bottom)); background: ${c.surfaceCard}; box-shadow: ${c.shadowXl}, 0 -1px 0 color-mix(in srgb, ${c.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }
|
|
840
889
|
.bar.on { transform: none; visibility: visible; }
|
|
841
890
|
.spacer { block-size: 5rem; }
|
|
842
|
-
.h { font-family: ${c.fontHeading}; ${
|
|
843
|
-
.t { ${
|
|
891
|
+
.h { font-family: ${c.fontHeading}; ${ne("md")} font-weight: ${we("bold")}; color: ${c.textHeading}; }
|
|
892
|
+
.t { ${ne("xs")} color: ${c.textMuted}; }
|
|
844
893
|
.words { min-inline-size: 0; }
|
|
845
|
-
.actions { display: flex; flex: none; gap: ${
|
|
894
|
+
.actions { display: flex; flex: none; gap: ${b(2)}; }
|
|
846
895
|
@media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
|
|
847
|
-
`]}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
|
|
896
|
+
`]}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 V`<div class="spacer"></div>
|
|
848
897
|
<section class="bar ${this.shown?"on":""}" part="bar" aria-label=${this.label}>
|
|
849
898
|
<div class="words">
|
|
850
|
-
${this.heading?
|
|
851
|
-
${this.lead?
|
|
899
|
+
${this.heading?V`<div class="h">${this.heading}</div>`:ke}
|
|
900
|
+
${this.lead?V`<div class="t">${this.lead}</div>`:ke}
|
|
852
901
|
</div>
|
|
853
902
|
<div class="actions"><slot name="actions"></slot></div>
|
|
854
|
-
</section>`}},
|
|
903
|
+
</section>`}},ji=class extends Oe{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=[...Oe.styles,jt,Pi,qt`
|
|
855
904
|
:host { display: block; container-type: inline-size; }
|
|
856
905
|
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${c.surfaceCard}; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowMd}, 0 0 0 1px color-mix(in srgb, ${c.text} 6%, transparent); }
|
|
857
906
|
.wrap.solo { grid-template-columns: minmax(0, 1fr); }
|
|
858
907
|
.map { min-block-size: 16rem; background: ${c.surfaceSubtle}; }
|
|
859
908
|
.map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
860
|
-
.info { display: flex; flex-direction: column; gap: ${
|
|
861
|
-
.h { margin: 0; font-family: ${c.fontHeading}; ${
|
|
862
|
-
.row { display: flex; gap: ${
|
|
863
|
-
.row svg { flex: none; margin-block-start: ${
|
|
909
|
+
.info { display: flex; flex-direction: column; gap: ${b(3)}; padding: ${b(8)}; }
|
|
910
|
+
.h { margin: 0; font-family: ${c.fontHeading}; ${ne("2xl")} font-weight: ${we("bold")}; color: ${c.textHeading}; }
|
|
911
|
+
.row { display: flex; gap: ${b(3)}; margin: 0; white-space: pre-line; }
|
|
912
|
+
.row svg { flex: none; margin-block-start: ${b(.5)}; color: ${c.brand}; }
|
|
864
913
|
.row a { display: inline-flex; align-items: center; min-block-size: ${c.targetMin}; margin-block-start: -2px; }
|
|
865
914
|
a { color: ${c.link}; }
|
|
866
|
-
ul { display: grid; gap: ${
|
|
867
|
-
li { display: flex; justify-content: space-between; gap: ${
|
|
915
|
+
ul { display: grid; gap: ${b(1.5)}; margin: ${b(1)} 0; padding: ${b(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${c.text} 10%, transparent); ${ne("sm")} }
|
|
916
|
+
li { display: flex; justify-content: space-between; gap: ${b(3)}; }
|
|
868
917
|
li span:last-child { color: ${c.textMuted}; text-align: end; }
|
|
869
|
-
.go { ${
|
|
918
|
+
.go { ${pr} align-self: flex-start; display: inline-flex; align-items: center; gap: ${b(2)}; padding: ${b(2)} ${b(4)}; ${ne("sm")} font-weight: ${we("semibold")}; color: ${c.onBrand}; text-decoration: none; background: ${c.brand}; border-radius: ${c.radiusLg}; }
|
|
870
919
|
.go:hover { background: ${c.brandHover}; }
|
|
871
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${
|
|
872
|
-
`]}render(){let
|
|
873
|
-
${this.mapSrc?
|
|
920
|
+
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${b(5)}; } }
|
|
921
|
+
`]}render(){let t=this.directionsHref||(this.address?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}`:"");return V`<div class="wrap ${this.mapSrc?"":"solo"}" part="wrap">
|
|
922
|
+
${this.mapSrc?V`<div class="map"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>`:ke}
|
|
874
923
|
<div class="info">
|
|
875
|
-
${this.heading?
|
|
876
|
-
${this.address?
|
|
877
|
-
${this.hours?
|
|
878
|
-
${this.phone?
|
|
879
|
-
${this.nearby.length?
|
|
880
|
-
${
|
|
924
|
+
${this.heading?V`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:ke}
|
|
925
|
+
${this.address?V`<p class="row">${ft("map-pin","20px")}<span>${this.address}</span></p>`:ke}
|
|
926
|
+
${this.hours?V`<p class="row">${ft("clock","20px")}<span>${this.hours}</span></p>`:ke}
|
|
927
|
+
${this.phone?V`<p class="row">${ft("phone","20px")}<a href=${`tel:${this.phone.replace(/\s+/g,"")}`}>${this.phone}</a></p>`:ke}
|
|
928
|
+
${this.nearby.length?V`<ul>${this.nearby.map(e=>V`<li><span>${e.place}</span><span>${e.distance}</span></li>`)}</ul>`:ke}
|
|
929
|
+
${t?V`<a class="go" href=${t}>${this.directionsText}${ft("arrow-right","16px")}</a>`:ke}
|
|
881
930
|
</div>
|
|
882
|
-
</div>`}};customElements.define("impakt-site-plan",
|
|
931
|
+
</div>`}};customElements.define("impakt-site-plan",Ri);customElements.define("impakt-mortgage-calculator",Hi);customElements.define("impakt-before-after",Ni);customElements.define("impakt-sticky-bar",qi);customElements.define("impakt-location-card",ji);import{css as Tt,html as w,nothing as G}from"./atomic-ui.js";import{say as P,pageLocale as gr,ImpaktElement as Le,focusRing as Ft,targetSize as br,visuallyHidden as nn,fontWeight as ue,space as u,spaceAround as Mt,t as d,token as zt,type as se}from"./atomic-ui.js";var Wt=Tt`
|
|
883
932
|
.card { background: ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-shadow: ${d.shadowSm}, 0 0 0 1px ${d.hairline}; }
|
|
884
|
-
.h { margin: 0; font-family: ${d.fontHeading}; ${
|
|
885
|
-
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${
|
|
933
|
+
.h { margin: 0; font-family: ${d.fontHeading}; ${se("2xl")} font-weight: ${ue("bold")}; color: ${d.textHeading}; }
|
|
934
|
+
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${u(2.5)} ${u(5)}; font: inherit; font-weight: ${ue("semibold")}; color: ${d.onBrand}; text-decoration: none; background: ${d.brand}; border: 0; border-radius: ${d.radiusLg}; cursor: pointer; }
|
|
886
935
|
.btn:hover { background: ${d.brandHover}; }
|
|
887
936
|
.btn.quiet { color: ${d.link}; background: transparent; box-shadow: inset 0 0 0 ${d.borderThin} ${d.border}; }
|
|
888
|
-
.small { margin: 0; ${
|
|
889
|
-
.visually-hidden { ${
|
|
890
|
-
`,
|
|
937
|
+
.small { margin: 0; ${se("xs")} color: ${d.textMuted}; }
|
|
938
|
+
.visually-hidden { ${nn} }
|
|
939
|
+
`,Oi=(o,t="GBP",e=0)=>{try{return new Intl.NumberFormat(gr(),{style:"currency",currency:t,maximumFractionDigits:e,minimumFractionDigits:e}).format(o)}catch{return String(Math.round(o))}},hr=w`<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>`,Fi=class extends Le{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=[...Le.styles,Ft,br,Mt,Wt,Tt`
|
|
891
940
|
:host { display: block; container-type: inline-size; }
|
|
892
|
-
.h { margin-block-end: ${
|
|
893
|
-
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${
|
|
894
|
-
.plan { --plan-accent: ${
|
|
941
|
+
.h { margin-block-end: ${u(5)}; }
|
|
942
|
+
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${u(4)}; }
|
|
943
|
+
.plan { --plan-accent: ${zt("color.accent.default","#ffd43b")}; --plan-on-accent: ${zt("color.accent.on","#111111")}; position: relative; display: flex; flex-direction: column; gap: ${u(3)}; padding: ${u(6)}; color: ${d.text}; border: ${d.borderThin} solid ${d.text}; border-radius: ${d.radiusSm}; box-shadow: none; }
|
|
895
944
|
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
896
945
|
.plan.top { background: ${d.text}; color: ${d.surfaceCard}; --plan-muted: color-mix(in srgb, ${d.surfaceCard} 72%, ${d.text}); }
|
|
897
|
-
.badge { align-self: flex-start; padding: 2px ${
|
|
898
|
-
.name { margin: 0; ${
|
|
899
|
-
.price { margin: 0; font-family: ${d.fontHeading}; ${
|
|
946
|
+
.badge { align-self: flex-start; padding: 2px ${u(2)}; font-family: ${d.fontMono}; font-size: 0.6875rem; font-weight: ${ue("medium")}; line-height: 1.4; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
947
|
+
.name { margin: 0; ${se("lg")} font-weight: ${ue("medium")}; color: inherit; }
|
|
948
|
+
.price { margin: 0; font-family: ${d.fontHeading}; ${se("4xl")} font-weight: ${ue("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
900
949
|
/* 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. */
|
|
901
950
|
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
902
|
-
.period { margin-inline-start: ${
|
|
903
|
-
.note { margin: 0; ${
|
|
904
|
-
ul { flex: 1; margin: 0; padding: ${
|
|
905
|
-
li { display: flex; gap: ${
|
|
951
|
+
.period { margin-inline-start: ${u(1)}; font-family: ${d.fontMono}; font-size: 0.8125rem; font-weight: ${ue("regular")}; letter-spacing: 0; color: var(--plan-muted, ${d.textMuted}); }
|
|
952
|
+
.note { margin: 0; ${se("sm")} color: var(--plan-muted, ${d.textMuted}); }
|
|
953
|
+
ul { flex: 1; margin: 0; padding: ${u(3)} 0 0; list-style: none; display: grid; gap: ${u(2)}; align-content: start; }
|
|
954
|
+
li { display: flex; gap: ${u(2)}; ${se("sm")} }
|
|
906
955
|
li[data-has='false'] { color: var(--plan-muted, ${d.textMuted}); }
|
|
907
956
|
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
908
957
|
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
909
|
-
.plan .btn { justify-content: space-between; gap: ${
|
|
958
|
+
.plan .btn { justify-content: space-between; gap: ${u(4)}; color: ${d.surfaceCard}; background: ${d.text}; border-radius: ${d.radiusSm}; box-shadow: none; }
|
|
910
959
|
.plan .btn:hover { background: ${d.brandHover}; }
|
|
911
960
|
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
912
961
|
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${d.surfaceCard}); }
|
|
913
962
|
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
914
|
-
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
915
|
-
`]}has(
|
|
916
|
-
${this.heading?
|
|
963
|
+
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${u(6)}; } }
|
|
964
|
+
`]}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 w`
|
|
965
|
+
${this.heading?w`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:G}
|
|
917
966
|
<div class="grid" style=${`--cols: ${Math.max(1,this.plans.length)}`}>
|
|
918
|
-
${this.plans.map(
|
|
919
|
-
${
|
|
920
|
-
<h3 class="name" id=${this.id_(`n-${
|
|
921
|
-
<p class="price">${
|
|
922
|
-
${
|
|
923
|
-
<ul>${this.rows.map(e=>{let
|
|
924
|
-
${
|
|
967
|
+
${this.plans.map(t=>w`<section class="card plan ${t.badge?"top":""}" aria-labelledby=${this.id_(`n-${t.id}`)}>
|
|
968
|
+
${t.badge?w`<span class="badge">${t.badge}</span>`:G}
|
|
969
|
+
<h3 class="name" id=${this.id_(`n-${t.id}`)}>${t.name}</h3>
|
|
970
|
+
<p class="price">${t.price}${t.period?w` <span class="period">${t.period}</span>`:G}</p>
|
|
971
|
+
${t.note?w`<p class="note">${t.note}</p>`:G}
|
|
972
|
+
<ul>${this.rows.map(e=>{let i=this.has(t,e);return w`<li data-has=${String(i)}><span class="mark" aria-hidden="true">${i?"\u221A":"\u2013"}</span><span>${e.label}${i?w`<span class="visually-hidden">: ${P("included")}</span>`:w`<span class="not"> · ${P("not included")}</span>`}</span></li>`})}</ul>
|
|
973
|
+
${t.href?w`<a class="btn" href=${t.href} @click=${e=>this.choose(t,e)}><span>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></span>${hr}</a>`:w`<button class="btn" type="button" @click=${e=>this.choose(t,e)}><span>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></span>${hr}</button>`}
|
|
925
974
|
</section>`)}
|
|
926
|
-
</div>`}};function
|
|
975
|
+
</div>`}};function fr(o,t){let e=/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(o),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(o);return a?`https://player.vimeo.com/video/${a[1]}?autoplay=1&dnt=1`:null}var Pt=class extends Le{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=[...Le.styles,Ft,Mt,Wt,Tt`
|
|
927
976
|
:host { display: block; }
|
|
928
977
|
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${d.radiusXl}; background: #111; }
|
|
929
978
|
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
@@ -933,196 +982,196 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
933
982
|
.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; }
|
|
934
983
|
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${d.brand}; box-shadow: ${d.shadowLg}; }
|
|
935
984
|
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
936
|
-
.label { position: absolute; inset-inline: ${
|
|
937
|
-
.foot { margin: ${
|
|
985
|
+
.label { position: absolute; inset-inline: ${u(5)}; inset-block-end: ${u(4)}; ${se("lg")} font-weight: ${ue("semibold")}; text-align: start; }
|
|
986
|
+
.foot { margin: ${u(2)} 0 0; ${se("sm")} }
|
|
938
987
|
.foot a { color: ${d.link}; }
|
|
939
988
|
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
940
989
|
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
941
990
|
.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); }
|
|
942
|
-
.bar { display: flex; align-items: center; gap: ${
|
|
991
|
+
.bar { display: flex; align-items: center; gap: ${u(1.5)}; padding: ${u(3)} ${u(4)}; border-block-end: ${d.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
943
992
|
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
944
|
-
.bar .dot:first-child { background: ${
|
|
945
|
-
.bar .caption { margin-inline-start: ${
|
|
993
|
+
.bar .dot:first-child { background: ${zt("color.accent.default","#ffd43b")}; }
|
|
994
|
+
.bar .caption { margin-inline-start: ${u(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; }
|
|
946
995
|
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
947
996
|
:host([look='window']) .play { background: none; color: inherit; }
|
|
948
997
|
:host([look='window']) .disc { display: none; }
|
|
949
|
-
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${
|
|
950
|
-
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${
|
|
998
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${u(3)}; max-inline-size: calc(100% - 2 * ${u(5)}); box-sizing: border-box; padding: ${u(3)} ${u(5)}; ${se("md")} font-weight: ${ue("medium")}; color: ${zt("color.accent.on","#111111")}; background: ${zt("color.accent.default","#ffd43b")}; }
|
|
999
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${zt("color.accent.default","#ffd43b")} 88%, #ffffff); }
|
|
951
1000
|
:host([look='window']) .play:focus-visible { outline: none; }
|
|
952
1001
|
:host([look='window']) .play:focus-visible .label { box-shadow: ${d.focusShadow}; }
|
|
953
1002
|
.length { font-family: ${d.fontMono}; font-size: 0.6875rem; letter-spacing: ${d.trackingWide}; text-transform: uppercase; }
|
|
954
|
-
.transcript { margin-block-start: ${
|
|
955
|
-
.transcript summary { ${
|
|
1003
|
+
.transcript { margin-block-start: ${u(3)}; border-block: ${d.borderThin} solid ${d.text}; }
|
|
1004
|
+
.transcript summary { ${br} display: flex; align-items: center; gap: ${u(2)}; padding-block: ${u(3)}; cursor: pointer; font-weight: ${ue("medium")}; list-style: none; }
|
|
956
1005
|
.transcript summary::-webkit-details-marker { display: none; }
|
|
957
1006
|
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${d.fontMono}; }
|
|
958
1007
|
.transcript[open] summary::before { content: '−'; }
|
|
959
|
-
.transcript .words { padding-block-end: ${
|
|
1008
|
+
.transcript .words { padding-block-end: ${u(4)}; color: ${d.textMuted}; display: grid; gap: ${u(3)}; max-inline-size: 65ch; }
|
|
960
1009
|
.transcript p { margin: 0; }
|
|
961
1010
|
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
962
|
-
`]}render(){let
|
|
1011
|
+
`]}render(){let t=fr(this.videoSrc,gr(this)),e;this.videoSrc?t&&this.playing?e=w`<iframe src=${t} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`:t?e=w`${this.posterSrc?w`<img src=${this.posterSrc} alt="" />`:G}
|
|
963
1012
|
<button class="play" type="button" @click=${()=>{this.playing=!0}}>
|
|
964
1013
|
<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>
|
|
965
|
-
<span class="label">${this.playText}${this.duration?
|
|
966
|
-
</button>`:e=
|
|
1014
|
+
<span class="label">${this.playText}${this.duration?w` <span class="length">${this.duration}</span>`:G}<span class="visually-hidden">: ${this.label}</span></span>
|
|
1015
|
+
</button>`:e=w`<video controls preload="metadata" poster=${this.posterSrc||G} aria-label=${this.label}>
|
|
967
1016
|
<source src=${this.videoSrc} />
|
|
968
|
-
${this.captionsSrc?
|
|
969
|
-
</video>`:e=
|
|
970
|
-
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?
|
|
971
|
-
${
|
|
972
|
-
</div>`:
|
|
973
|
-
${a.length?
|
|
974
|
-
${this.transcriptHref?
|
|
1017
|
+
${this.captionsSrc?w`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />`:G}
|
|
1018
|
+
</video>`:e=w`<div class="empty">${P("Add a video address")}</div>`;let i=w`<div class="frame" part="frame">${e}</div>`,a=(this.transcript??"").split(/\n\s*\n/).map(r=>r.trim()).filter(Boolean);return w`${this.look==="window"?w`<div class="window" part="window">
|
|
1019
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?w`<span class="caption">${this.caption}</span>`:G}</div>
|
|
1020
|
+
${i}
|
|
1021
|
+
</div>`:i}
|
|
1022
|
+
${a.length?w`<details class="transcript" part="transcript"><summary>${this.transcriptText||P("Read the transcript")}</summary><div class="words">${a.map(r=>w`<p>${r}</p>`)}</div></details>`:G}
|
|
1023
|
+
${this.transcriptHref?w`<p class="foot"><a href=${this.transcriptHref}>${P("Read the transcript")}<span class="visually-hidden">${P(" of {video}",{video:this.label})}</span></a></p>`:G}`}},ur={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:""}},Wi=class extends Le{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=[...Le.styles,Mt,Tt`
|
|
975
1024
|
:host { display: block; }
|
|
976
|
-
.box { padding: ${
|
|
1025
|
+
.box { padding: ${u(5)}; border-inline-start: 6px solid ${d.warning}; border-radius: ${d.radiusLg}; background: ${d.warningSubtle}; }
|
|
977
1026
|
:host([kind='insurance']) .box { border-color: ${d.info}; background: ${d.infoSubtle}; }
|
|
978
|
-
strong { display: block; margin-block-end: ${
|
|
1027
|
+
strong { display: block; margin-block-end: ${u(1)}; ${se("md")} color: ${d.text}; }
|
|
979
1028
|
p { margin: 0; color: ${d.text}; }
|
|
980
1029
|
/* 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). */
|
|
981
|
-
.firm { margin-block-start: ${
|
|
982
|
-
`]}render(){let
|
|
983
|
-
${e?
|
|
984
|
-
${
|
|
985
|
-
${this.firm?
|
|
986
|
-
</aside>`}},
|
|
1030
|
+
.firm { margin-block-start: ${u(3)}; ${se("sm")} color: ${d.text}; }
|
|
1031
|
+
`]}render(){let t=ur[this.kind]??ur.custom,e=this.heading||(t.heading?P(t.heading):""),i=this.text||(t.text?P(t.text):"");return w`<aside class="box" part="box" aria-label=${e||P("Important information")}>
|
|
1032
|
+
${e?w`<strong>${e}</strong>`:G}
|
|
1033
|
+
${i?w`<p>${i}</p>`:G}
|
|
1034
|
+
${this.firm?w`<p class="firm">${this.firm}</p>`:G}
|
|
1035
|
+
</aside>`}},lt={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 Ba(o,t,e=0){let i=0;return t.forEach((a,r)=>{let n=t[r+1]?.from??1/0;o>a.from&&(i+=(Math.min(o,n)-a.from)*(a.rate+e)/100)}),Math.round(i)}function $r(o,t){return o<=0?0:t==="first-time"&&o<=lt.firstTimeLimit?Ba(o,lt.firstTime):t==="additional"?o<4e4?0:Ba(o,lt.standard,lt.additionalSurcharge):Ba(o,lt.standard)}var xr=Tt`
|
|
987
1036
|
:host { display: block; container-type: inline-size; }
|
|
988
1037
|
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
|
|
989
|
-
.inputs { display: flex; flex-direction: column; gap: ${
|
|
990
|
-
label, legend { display: block; ${
|
|
1038
|
+
.inputs { display: flex; flex-direction: column; gap: ${u(5)}; padding: ${u(8)}; }
|
|
1039
|
+
label, legend { display: block; ${se("sm")} font-weight: ${ue("semibold")}; margin-block-end: ${u(1.5)}; padding: 0; }
|
|
991
1040
|
fieldset { margin: 0; padding: 0; border: 0; }
|
|
992
|
-
.choices { display: flex; flex-wrap: wrap; gap: ${
|
|
993
|
-
.choices label { display: inline-flex; align-items: center; gap: ${
|
|
1041
|
+
.choices { display: flex; flex-wrap: wrap; gap: ${u(2)}; }
|
|
1042
|
+
.choices label { display: inline-flex; align-items: center; gap: ${u(2)}; margin: 0; padding: ${u(2)} ${u(3)}; font-weight: ${ue("regular")}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; cursor: pointer; }
|
|
994
1043
|
.choices input { accent-color: ${d.brand}; }
|
|
995
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
996
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${
|
|
997
|
-
.caption { margin: 0; ${
|
|
998
|
-
output { display: block; font-family: ${d.fontHeading}; ${
|
|
999
|
-
.line { margin: 0; ${
|
|
1000
|
-
.foot { grid-column: 1 / -1; padding: ${
|
|
1044
|
+
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${u(2)} ${u(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; }
|
|
1045
|
+
.result { display: flex; flex-direction: column; justify-content: center; gap: ${u(2)}; padding: ${u(8)}; color: ${d.onBrand}; background: ${d.brand}; }
|
|
1046
|
+
.caption { margin: 0; ${se("sm")} opacity: 0.85; }
|
|
1047
|
+
output { display: block; font-family: ${d.fontHeading}; ${se("4xl")} font-weight: ${ue("bold")}; }
|
|
1048
|
+
.line { margin: 0; ${se("sm")} }
|
|
1049
|
+
.foot { grid-column: 1 / -1; padding: ${u(4)} ${u(8)}; background: ${d.surfaceSubtle}; }
|
|
1001
1050
|
/* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
|
|
1002
1051
|
.foot .small { color: ${d.text}; }
|
|
1003
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${
|
|
1004
|
-
`,
|
|
1052
|
+
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${u(5)}; } .foot { padding: ${u(4)} ${u(5)}; } }
|
|
1053
|
+
`,Di=class extends Le{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=[...Le.styles,Ft,Mt,Wt,xr]}render(){let t=$r(this.price,this.buyer),e=this.price>0?t/this.price*100:0,i=[["first-time",P("First home")],["mover",P("Moving home")],["additional",P("Second home")]];return w`<div class="card wrap" part="wrap">
|
|
1005
1054
|
<div class="inputs">
|
|
1006
|
-
${this.heading?
|
|
1055
|
+
${this.heading?w`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:G}
|
|
1007
1056
|
<div><label for=${this.id_("price")}>${P("Price of the home (\xA3)")}</label>
|
|
1008
1057
|
<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>
|
|
1009
1058
|
<fieldset><legend>${P("Are you buying")}</legend><div class="choices">
|
|
1010
|
-
${
|
|
1059
|
+
${i.map(([a,r])=>w`<label><input type="radio" name=${this.id_("buyer")} .checked=${this.buyer===a} @change=${()=>{this.buyer=a}} />${r}</label>`)}
|
|
1011
1060
|
</div></fieldset>
|
|
1012
1061
|
</div>
|
|
1013
1062
|
<div class="result" aria-live="polite">
|
|
1014
1063
|
<p class="caption">${P("Stamp duty to pay")}</p>
|
|
1015
|
-
<output for=${this.id_("price")}>${
|
|
1016
|
-
<p class="line">${
|
|
1017
|
-
${this.buyer==="first-time"&&this.price>
|
|
1064
|
+
<output for=${this.id_("price")}>${Oi(t)}</output>
|
|
1065
|
+
<p class="line">${t?P("About {rate}% of the price",{rate:e.toFixed(1)}):P("Nothing to pay at this price")}</p>
|
|
1066
|
+
${this.buyer==="first-time"&&this.price>lt.firstTimeLimit?w`<p class="line">${P("First-time buyer relief stops above {limit}, so the usual rates apply.",{limit:Oi(lt.firstTimeLimit)})}</p>`:G}
|
|
1018
1067
|
</div>
|
|
1019
|
-
${this.smallPrint?
|
|
1020
|
-
</div>`}},
|
|
1021
|
-
<input id=${this.id_(
|
|
1068
|
+
${this.smallPrint?w`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:G}
|
|
1069
|
+
</div>`}},_i=class extends Le{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=[...Le.styles,Ft,Mt,Wt,xr]}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)=>w`<div><label for=${this.id_(i)}>${a}</label>
|
|
1070
|
+
<input id=${this.id_(i)} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this[i])} @input=${this.field(i)} /></div>`;return w`<div class="card wrap" part="wrap">
|
|
1022
1071
|
<div class="inputs">
|
|
1023
|
-
${this.heading?
|
|
1072
|
+
${this.heading?w`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:G}
|
|
1024
1073
|
${e("income",P("Your yearly income before tax (\xA3)"))}
|
|
1025
1074
|
${e("secondIncome",P("A second person\u2019s income, if buying together (\xA3)"))}
|
|
1026
1075
|
${e("deposit",P("Your deposit (\xA3)"))}
|
|
1027
1076
|
</div>
|
|
1028
1077
|
<div class="result" aria-live="polite">
|
|
1029
1078
|
<p class="caption">${P("You could borrow about")}</p>
|
|
1030
|
-
<output>${
|
|
1031
|
-
<p class="line">${P("With your deposit, that\u2019s a home of about {amount}.",{amount:
|
|
1079
|
+
<output>${Oi(t)}</output>
|
|
1080
|
+
<p class="line">${P("With your deposit, that\u2019s a home of about {amount}.",{amount:Oi(t+this.deposit)})}</p>
|
|
1032
1081
|
</div>
|
|
1033
|
-
${this.smallPrint?
|
|
1034
|
-
</div>`}},
|
|
1035
|
-
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=[...
|
|
1082
|
+
${this.smallPrint?w`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:G}
|
|
1083
|
+
</div>`}},Ot=class extends Le{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
|
|
1084
|
+
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=[...Le.styles,Ft,Mt,Wt,Tt`
|
|
1036
1085
|
:host { display: block; container-type: inline-size; }
|
|
1037
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
1038
|
-
.phone { display: inline-block; margin: ${
|
|
1086
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${u(6)}; padding: ${u(8)}; }
|
|
1087
|
+
.phone { display: inline-block; margin: ${u(3)} 0; font-family: ${d.fontHeading}; ${se("3xl")} font-weight: ${ue("bold")}; color: ${d.link}; text-decoration: none; }
|
|
1039
1088
|
.hours { margin: 0; white-space: pre-line; color: ${d.textMuted}; }
|
|
1040
|
-
.email { display: inline-flex; align-items: center; min-block-size: ${d.targetMin}; margin-block-start: ${
|
|
1041
|
-
form { display: grid; gap: ${
|
|
1042
|
-
.sub { margin: 0; ${
|
|
1043
|
-
label { display: block; ${
|
|
1044
|
-
input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
1045
|
-
.done { margin: 0; padding: ${
|
|
1046
|
-
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${
|
|
1047
|
-
`]}submit(
|
|
1089
|
+
.email { display: inline-flex; align-items: center; min-block-size: ${d.targetMin}; margin-block-start: ${u(3)}; color: ${d.link}; overflow-wrap: anywhere; }
|
|
1090
|
+
form { display: grid; gap: ${u(3)}; padding: ${u(5)}; border-radius: ${d.radiusLg}; background: ${d.surfaceInset}; }
|
|
1091
|
+
.sub { margin: 0; ${se("lg")} font-weight: ${ue("bold")}; color: ${d.text}; }
|
|
1092
|
+
label { display: block; ${se("sm")} font-weight: ${ue("semibold")}; margin-block-end: ${u(1)}; }
|
|
1093
|
+
input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${u(2)} ${u(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; }
|
|
1094
|
+
.done { margin: 0; padding: ${u(5)}; border-radius: ${d.radiusLg}; background: ${d.successSubtle}; color: ${d.successText}; font-weight: ${ue("semibold")}; }
|
|
1095
|
+
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${u(5)}; } }
|
|
1096
|
+
`]}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 w`<div class="card wrap" part="wrap">
|
|
1048
1097
|
<div>
|
|
1049
|
-
${this.heading?
|
|
1050
|
-
${this.phone?
|
|
1051
|
-
${this.hours?
|
|
1052
|
-
${this.email?
|
|
1098
|
+
${this.heading?w`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:G}
|
|
1099
|
+
${this.phone?w`<a class="phone" href=${`tel:${this.phone.replace(/[^\d+]/g,"")}`}>${this.phone}</a>`:G}
|
|
1100
|
+
${this.hours?w`<p class="hours">${this.hours}</p>`:G}
|
|
1101
|
+
${this.email?w`<a class="email" href=${`mailto:${this.email}`}>${this.email}</a>`:G}
|
|
1053
1102
|
</div>
|
|
1054
|
-
${this.callbackHeading?this.sent?
|
|
1103
|
+
${this.callbackHeading?this.sent?w`<p class="done" role="status">${this.doneText}</p>`:w`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
|
|
1055
1104
|
<p class="sub" id=${this.id_("cb")}>${this.callbackHeading}</p>
|
|
1056
1105
|
<div><label for=${this.id_("name")}>${P("Your name")}</label><input id=${this.id_("name")} name="name" autocomplete="name" required /></div>
|
|
1057
1106
|
<div><label for=${this.id_("tel")}>${P("Phone number")}</label><input id=${this.id_("tel")} name="phone" type="tel" autocomplete="tel" required /></div>
|
|
1058
1107
|
<div><label for=${this.id_("when")}>${P("Best time to call")}</label><select id=${this.id_("when")} name="when"><option value="Morning">${P("Morning")}</option><option value="Afternoon">${P("Afternoon")}</option><option value="Evening">${P("Evening")}</option></select></div>
|
|
1059
1108
|
<button class="btn" type="submit">${this.buttonText}</button>
|
|
1060
|
-
</form>`:
|
|
1061
|
-
</div>`}};
|
|
1109
|
+
</form>`:G}
|
|
1110
|
+
</div>`}};Pt.createProperty("playing",{state:!0});Ot.createProperty("sent",{state:!0});customElements.define("impakt-plan-comparison",Fi);customElements.define("impakt-video",Pt);customElements.define("impakt-regulatory-notice",Wi);customElements.define("impakt-stamp-duty-calculator",Di);customElements.define("impakt-affordability-calculator",_i);customElements.define("impakt-contact-block",Ot);import{css as sn,html as O,nothing as ge,unsafeCSS as yr}from"./atomic-ui.js";import{ImpaktElement as vr,pageLocale as kr,say as te,focusRing as on,targetSize as Ia,visuallyHidden as wr,fontSize as Ra,fontWeight as Fe,space as k,spaceAround as ln,t as g,token as Sr,type as $t,toneOf as Gi}from"./atomic-ui.js";var Ui=o=>o.reduce((t,e)=>t+e,0),zr=(o,t)=>o.find(e=>typeof e.below=="number"&&t<e.below)??o.at(-1);function Dt(o,t,e){let i=o.flatMap(s=>(t[s.id]??[]).flatMap(m=>s.choices.filter($=>$.id===m))),a=Ui(i.map(s=>s.cost??0)),r=Ui(i.map(s=>s.weeks??0));for(let s of i)a*=s.costFactor??1,r*=s.weeksFactor??1;let n=(zr(e.teams,a)?.engineers??1)+Ui(i.map(s=>s.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:zr(e.ways,a)?.text??""}}function Ha(o,t){let e=o.map(a=>typeof a.share=="number"?Math.max(1,Math.round(t*a.share)):0),i=Math.max(1,t-Ui(e));return o.map((a,r)=>typeof a.share=="number"?e[r]:i)}var Vi=class extends vr{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=[...vr.styles,ln,on,sn`
|
|
1062
1111
|
:host { display: block; container-type: inline-size; }
|
|
1063
1112
|
[hidden] { display: none !important; }
|
|
1064
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${
|
|
1065
|
-
.mono { font-family: ${
|
|
1066
|
-
.sr-only { ${
|
|
1113
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${k(10)}; align-items: start; }
|
|
1114
|
+
.mono { font-family: ${g.fontMono}; font-size: ${Ra("xs")}; letter-spacing: 0.04em; text-transform: uppercase; color: ${g.textMuted}; margin: 0; }
|
|
1115
|
+
.sr-only { ${wr} }
|
|
1067
1116
|
|
|
1068
|
-
.progress { display: grid; gap: ${
|
|
1117
|
+
.progress { display: grid; gap: ${k(2)}; margin-block-end: ${k(6)}; }
|
|
1069
1118
|
.bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }
|
|
1070
|
-
.bar i { display: block; block-size: 100%; background: ${
|
|
1119
|
+
.bar i { display: block; block-size: 100%; background: ${g.brand}; transition: inline-size 300ms ease; }
|
|
1071
1120
|
|
|
1072
1121
|
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
|
|
1073
|
-
legend { padding: 0; margin-block-end: ${
|
|
1074
|
-
.q { margin: 0; font-family: ${
|
|
1075
|
-
.hint { margin: 0 0 ${
|
|
1122
|
+
legend { padding: 0; margin-block-end: ${k(2)}; }
|
|
1123
|
+
.q { margin: 0; font-family: ${g.fontHeading}; font-weight: ${Fe("bold")}; ${$t("3xl")} letter-spacing: ${g.trackingTight}; color: ${g.textHeading}; outline: none; }
|
|
1124
|
+
.hint { margin: 0 0 ${k(6)}; color: ${g.textMuted}; }
|
|
1076
1125
|
|
|
1077
|
-
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1126
|
+
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${k(3)}; }
|
|
1078
1127
|
.choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1079
|
-
.choice { position: relative; display: grid; gap: ${
|
|
1080
|
-
.choice:hover { border-color: ${
|
|
1081
|
-
.choice input { ${
|
|
1082
|
-
.choice:has(input:checked) { border-color: ${
|
|
1083
|
-
.choice:has(input:focus-visible) { box-shadow: ${
|
|
1084
|
-
.many .choice { padding: ${
|
|
1085
|
-
.label { font-weight: ${
|
|
1086
|
-
.small { ${
|
|
1128
|
+
.choice { position: relative; display: grid; gap: ${k(1)}; align-content: start; padding: ${k(4)}; border: ${g.borderThin} solid ${g.border}; border-radius: ${g.radiusLg}; background: ${g.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
|
|
1129
|
+
.choice:hover { border-color: ${g.borderStrong}; }
|
|
1130
|
+
.choice input { ${wr} }
|
|
1131
|
+
.choice:has(input:checked) { border-color: ${g.brand}; box-shadow: inset 0 0 0 1px ${g.brand}; background: ${g.brandSubtle}; }
|
|
1132
|
+
.choice:has(input:focus-visible) { box-shadow: ${g.focusShadow}; }
|
|
1133
|
+
.many .choice { padding: ${k(3)}; }
|
|
1134
|
+
.label { font-weight: ${Fe("semibold")}; }
|
|
1135
|
+
.small { ${$t("sm")} color: ${g.textMuted}; }
|
|
1087
1136
|
/* A tick for a picked feature, drawn in the corner. */
|
|
1088
|
-
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${
|
|
1137
|
+
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${k(2)}; inset-inline-end: ${k(3)}; color: ${g.brand}; font-weight: ${Fe("bold")}; }
|
|
1089
1138
|
|
|
1090
|
-
.scale { display: grid; gap: ${
|
|
1091
|
-
.scale input { inline-size: 100%; accent-color: ${
|
|
1092
|
-
.ticks { display: flex; justify-content: space-between; ${
|
|
1093
|
-
.ticks span[aria-current] { color: ${
|
|
1139
|
+
.scale { display: grid; gap: ${k(3)}; }
|
|
1140
|
+
.scale input { inline-size: 100%; accent-color: ${g.brand}; ${Ia} }
|
|
1141
|
+
.ticks { display: flex; justify-content: space-between; ${$t("sm")} color: ${g.textMuted}; }
|
|
1142
|
+
.ticks span[aria-current] { color: ${g.text}; font-weight: ${Fe("semibold")}; }
|
|
1094
1143
|
.now { margin: 0; }
|
|
1095
1144
|
|
|
1096
|
-
.nav { display: flex; gap: ${
|
|
1097
|
-
button, .send { ${
|
|
1098
|
-
.primary, .send { background: ${
|
|
1099
|
-
.primary:hover, .send:hover { background: ${
|
|
1100
|
-
.secondary { background: transparent; color: ${
|
|
1101
|
-
.secondary:hover { background: ${
|
|
1145
|
+
.nav { display: flex; gap: ${k(3)}; margin-block-start: ${k(8)}; }
|
|
1146
|
+
button, .send { ${Ia} display: inline-flex; align-items: center; justify-content: center; gap: ${k(2)}; padding: ${k(2.5)} ${k(5)}; border-radius: ${g.radiusLg}; font: inherit; font-weight: ${Fe("semibold")}; cursor: pointer; text-decoration: none; border: ${g.borderThin} solid transparent; }
|
|
1147
|
+
.primary, .send { background: ${g.brand}; color: ${g.onBrand}; }
|
|
1148
|
+
.primary:hover, .send:hover { background: ${g.brandHover}; }
|
|
1149
|
+
.secondary { background: transparent; color: ${g.text}; border-color: ${g.borderStrong}; }
|
|
1150
|
+
.secondary:hover { background: ${g.surfaceSubtle}; }
|
|
1102
1151
|
|
|
1103
|
-
.panel { position: sticky; inset-block-start: ${
|
|
1152
|
+
.panel { position: sticky; inset-block-start: ${k(6)}; overflow: hidden; isolation: isolate; padding: ${k(8)}; border-radius: ${g.radiusXl}; background: ${g.surfaceCard}; box-shadow: ${g.shadowMd}; display: grid; gap: ${k(2)}; }
|
|
1104
1153
|
/* The glow behind the budget grows as the product does. */
|
|
1105
|
-
.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, ${
|
|
1106
|
-
.range { margin: 0; font-family: ${
|
|
1107
|
-
.weeks { margin: 0; ${
|
|
1108
|
-
.tip { margin: ${
|
|
1154
|
+
.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, ${yr(Gi(1,0))} 45%, transparent), color-mix(in srgb, ${yr(Gi(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; }
|
|
1155
|
+
.range { margin: 0; font-family: ${g.fontHeading}; font-weight: ${Fe("bold")}; font-size: ${Ra("5xl")}; line-height: 1; letter-spacing: ${g.trackingTight}; color: ${g.textHeading}; }
|
|
1156
|
+
.weeks { margin: 0; ${$t("lg")} }
|
|
1157
|
+
.tip { margin: ${k(4)} 0 0; padding-block-start: ${k(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${g.textMuted}; }
|
|
1109
1158
|
|
|
1110
|
-
.result { display: grid; gap: ${
|
|
1111
|
-
.summary { margin: 0; ${
|
|
1159
|
+
.result { display: grid; gap: ${k(6)}; }
|
|
1160
|
+
.summary { margin: 0; ${$t("xl")} text-wrap: pretty; }
|
|
1112
1161
|
.phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }
|
|
1113
1162
|
.phases i { display: block; }
|
|
1114
|
-
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${
|
|
1115
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
1163
|
+
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${k(2)} ${k(5)}; }
|
|
1164
|
+
.legend li { display: inline-flex; align-items: center; gap: ${k(2)}; }
|
|
1116
1165
|
.legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }
|
|
1117
|
-
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1118
|
-
dt { margin: 0 0 ${
|
|
1119
|
-
dd { margin: 0; font-weight: ${
|
|
1120
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
1121
|
-
.note { margin: 0; ${
|
|
1122
|
-
.status { margin: 0; ${
|
|
1166
|
+
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${k(4)}; }
|
|
1167
|
+
dt { margin: 0 0 ${k(1)}; }
|
|
1168
|
+
dd { margin: 0; font-weight: ${Fe("semibold")}; }
|
|
1169
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${k(3)}; }
|
|
1170
|
+
.note { margin: 0; ${$t("sm")} color: ${g.textMuted}; }
|
|
1171
|
+
.status { margin: 0; ${$t("sm")} }
|
|
1123
1172
|
|
|
1124
1173
|
@container (max-width: 48rem) {
|
|
1125
|
-
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
1174
|
+
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${k(8)}; }
|
|
1126
1175
|
/* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it
|
|
1127
1176
|
and it never widens the page (1.4.10). */
|
|
1128
1177
|
.panel { position: relative; inset-block-start: auto; }
|
|
@@ -1130,31 +1179,43 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1130
1179
|
}
|
|
1131
1180
|
@container (max-width: 30rem) {
|
|
1132
1181
|
.choices { grid-template-columns: minmax(0, 1fr); }
|
|
1133
|
-
.range { font-size: ${
|
|
1182
|
+
.range { font-size: ${Ra("4xl")}; }
|
|
1134
1183
|
}
|
|
1135
|
-
/*
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
.all
|
|
1141
|
-
.all .
|
|
1142
|
-
|
|
1143
|
-
.all .
|
|
1144
|
-
.all .
|
|
1145
|
-
|
|
1146
|
-
.all .
|
|
1147
|
-
.all .
|
|
1148
|
-
.all .
|
|
1184
|
+
/*
|
|
1185
|
+
* layout="all": every question at once, and the result as an ink panel beside them, as the Estimator component
|
|
1186
|
+
* (10:544) draws them: the options 642px wide and the budget 430px, 10px apart. The options are 32px inside with
|
|
1187
|
+
* their parts 16px apart; the budget is 32px inside with its parts 14px apart, its lines 12px under their rules.
|
|
1188
|
+
*/
|
|
1189
|
+
.all { --accent: ${Sr("color.accent.default","#ffd43b")}; --on-accent: ${Sr("color.accent.on","#111111")}; --gap: 14px; display: grid; grid-template-columns: minmax(0, 642fr) minmax(0, 430fr); grid-template-areas: 'questions panel' 'note panel'; grid-template-rows: auto 1fr; column-gap: ${k(2.5)}; align-items: stretch; }
|
|
1190
|
+
.all .questions { grid-area: questions; display: grid; align-content: start; gap: ${k(4)}; padding: ${k(8)} ${k(8)} 0; background: ${g.surfaceCard}; border: ${g.borderThin} solid ${g.text}; border-block-end: 0; }
|
|
1191
|
+
.all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${k(2)}; }
|
|
1192
|
+
.all .questions impakt-chip-group::part(label) { margin-block-end: ${k(4)}; line-height: 1.4; }
|
|
1193
|
+
.all .foot { grid-area: note; padding: ${k(4)} ${k(8)} ${k(8)}; background: ${g.surfaceCard}; border: ${g.borderThin} solid ${g.text}; border-block-start: 0; }
|
|
1194
|
+
/* The note in G2 Body S, 14px at 1.4. */
|
|
1195
|
+
.all .note { font-size: 0.875rem; line-height: 1.4; }
|
|
1196
|
+
.all .ink { grid-area: panel; display: flex; flex-direction: column; gap: var(--gap); padding: ${k(8)}; background: ${g.text}; color: ${g.surfaceCard}; --muted: color-mix(in srgb, ${g.surfaceCard} 72%, ${g.text}); --line: color-mix(in srgb, ${g.surfaceCard} 18%, ${g.text}); }
|
|
1197
|
+
.all .ink .mono { color: var(--muted); font-size: 0.6875rem; font-weight: ${Fe("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
1198
|
+
/* 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. Display M: 52px at 1.04 on the 1080px estimator, 40px tall on a phone. */
|
|
1199
|
+
.all .ink .range { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); font-size: clamp(2.25rem, 11cqi, 3.25rem); font-weight: ${Fe("semibold")}; line-height: 1.04; letter-spacing: -0.04em; }
|
|
1200
|
+
.all .ink .weeks { font-size: 1rem; line-height: 1.45; }
|
|
1201
|
+
.all .rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
|
|
1202
|
+
.all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${k(4)}; padding-block-start: ${k(3)}; border-block-start: ${g.borderThin} solid var(--line); font-size: 0.875rem; line-height: 1.4; }
|
|
1203
|
+
.all .rows .length { font-family: ${g.fontMono}; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); white-space: nowrap; }
|
|
1204
|
+
.all .cta { ${Ia} display: flex; align-items: center; justify-content: space-between; gap: ${k(4)}; box-sizing: border-box; min-block-size: 47px; padding: 14px ${k(5)}; font-size: 1rem; line-height: 1.2; font-weight: ${Fe("medium")}; color: var(--on-accent); background: var(--accent); text-decoration: none; }
|
|
1149
1205
|
.all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }
|
|
1150
|
-
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${
|
|
1151
|
-
.all .way { margin: 0;
|
|
1206
|
+
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${g.text}, 0 0 0 4px ${g.surfaceCard}; }
|
|
1207
|
+
.all .way { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
|
|
1208
|
+
/* On a phone (15:943, 15:974): the options 20px inside with their parts 14px apart, the budget 24 by 20 inside with its parts 12px apart, its lines 11px under their rules, and the note under the budget's action. */
|
|
1152
1209
|
@container (max-width: 48rem) {
|
|
1153
|
-
.all { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'
|
|
1154
|
-
.all .questions { padding: ${
|
|
1155
|
-
.all .
|
|
1156
|
-
.all .
|
|
1210
|
+
.all { --gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'; grid-template-rows: auto; column-gap: 0; }
|
|
1211
|
+
.all .questions { gap: 14px; padding: ${k(5)}; border-block-end: ${g.borderThin} solid ${g.text}; }
|
|
1212
|
+
.all .questions impakt-chip-group::part(label) { margin-block-start: 0; margin-block-end: 14px; }
|
|
1213
|
+
.all .foot { display: none; }
|
|
1214
|
+
.all .ink { padding: ${k(6)} ${k(5)}; }
|
|
1215
|
+
.all .rows li { padding-block-start: 11px; }
|
|
1157
1216
|
}
|
|
1217
|
+
.all .ink .note { display: none; color: var(--muted); }
|
|
1218
|
+
@container (max-width: 48rem) { .all .ink .note { display: block; } }
|
|
1158
1219
|
@media (forced-colors: active) {
|
|
1159
1220
|
.all .ink { border: 1px solid CanvasText; }
|
|
1160
1221
|
.all .cta { border: 1px solid ButtonText; }
|
|
@@ -1162,119 +1223,127 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1162
1223
|
.bar i, .phases i, .legend li::before { background: CanvasText !important; }
|
|
1163
1224
|
.glow { display: none; }
|
|
1164
1225
|
}
|
|
1165
|
-
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let
|
|
1226
|
+
`]}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(kr(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(kr(this),{type:"conjunction"}).format(e)}catch{return e.join(", ")}}weeksWord(e){return e===1?te("{n} week",{n:e}):te("{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,s)=>(s.cost??0)*(s.costFactor??1)-(n.cost??0)*(n.costFactor??1))[0];return[a.id,r?[r.id]:[]]}));return Dt(e,i,this.rules).high||1}summaryOf(e){let i=this.questions??[],a=i.find(f=>f.kind==="one"),r=a?a.choices.find(f=>f.id===this.answers[a.id]?.[0]):void 0,n=i.filter(f=>f.kind==="many"&&f.inSummary!==!1).flatMap(f=>(this.answers[f.id]??[]).map(Z=>{let ye=f.choices.find(x=>x.id===Z);return ye?ye.phrase||ye.label:Z})),s=r?r.phrase||r.label:"",m=s?n.length?te("You are building {thing} with {list}.",{thing:s,list:this.listOf(n)}):te("You are building {thing}.",{thing:s}):"",$=te("Expect {range} and about {weeks} to a first release.",{range:this.rangeOf(e),weeks:this.weeksWord(e.weeks)});return m?`${m} ${$}`:$}rangeOf(e){return te("{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=Dt(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 s=n.choices.find(m=>m.id===this.answers[n.id]?.[0]);return s?`${n.short}: ${s.label}.`:""}).filter(Boolean),r=(this.questions??[]).filter(n=>n.short&&n.kind==="many"&&n.inSummary===!1).map(n=>{let s=(this.answers[n.id]??[]).map(m=>n.choices.find($=>$.id===m)?.label??m);return s.length?`${n.short}: ${this.listOf(s)}.`:""}).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=te("Summary copied.")}catch{this.copied=te("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 s=Math.max(0,e.choices.findIndex($=>$.id===a[0])),m=e.choices[s];return O`<fieldset class=${r?"current":""} ?hidden=${!r}>
|
|
1166
1227
|
<legend>${this.heading(e.heading)}</legend>
|
|
1167
|
-
${e.hint?
|
|
1228
|
+
${e.hint?O`<p class="hint">${e.hint}</p>`:ge}
|
|
1168
1229
|
<div class="scale">
|
|
1169
|
-
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(
|
|
1170
|
-
@input=${
|
|
1171
|
-
<div class="ticks" aria-hidden="true">${e.choices.map((
|
|
1172
|
-
${
|
|
1230
|
+
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(s)} aria-label=${e.heading} aria-valuetext=${m?.label??""}
|
|
1231
|
+
@input=${$=>{let f=e.choices[Number($.target.value)];f&&this.pick(e,f,!0)}}>
|
|
1232
|
+
<div class="ticks" aria-hidden="true">${e.choices.map(($,f)=>O`<span aria-current=${f===s?"true":ge}>${$.label}</span>`)}</div>
|
|
1233
|
+
${m?.hint?O`<p class="now">${m.hint}</p>`:ge}
|
|
1173
1234
|
</div>
|
|
1174
|
-
</fieldset>`}let
|
|
1235
|
+
</fieldset>`}let n=e.kind==="many";return O`<fieldset class=${r?"current":""} ?hidden=${!r}>
|
|
1175
1236
|
<legend>${this.heading(e.heading)}</legend>
|
|
1176
|
-
${e.hint?
|
|
1177
|
-
<div class="choices ${
|
|
1178
|
-
${e.choices.map(
|
|
1179
|
-
<input type=${
|
|
1180
|
-
@change=${
|
|
1181
|
-
<span class="label">${
|
|
1182
|
-
${
|
|
1237
|
+
${e.hint?O`<p class="hint">${e.hint}</p>`:ge}
|
|
1238
|
+
<div class="choices ${n?"many":""}">
|
|
1239
|
+
${e.choices.map(s=>O`<label class="choice">
|
|
1240
|
+
<input type=${n?"checkbox":"radio"} name=${`${this.uid}-${e.id}`} value=${s.id} .checked=${a.includes(s.id)}
|
|
1241
|
+
@change=${m=>this.pick(e,s,m.target.checked)}>
|
|
1242
|
+
<span class="label">${s.label}</span>
|
|
1243
|
+
${s.hint?O`<span class="small">${s.hint}</span>`:ge}
|
|
1183
1244
|
</label>`)}
|
|
1184
1245
|
</div>
|
|
1185
|
-
</fieldset>`}renderResult(e){let
|
|
1246
|
+
</fieldset>`}renderResult(e){let i=Ha(this.phases??[],e.weeks),a=this.at===(this.questions??[]).length;return O`<div class="result ${a?"current":""}" ?hidden=${!a}>
|
|
1186
1247
|
${this.heading(this.resultHeading)}
|
|
1187
1248
|
<p class="summary">${this.summaryOf(e)}</p>
|
|
1188
|
-
${(this.phases??[]).length?
|
|
1189
|
-
<div class="phases" aria-hidden="true">${(this.phases??[]).map((r,
|
|
1190
|
-
<ul class="legend">${(this.phases??[]).map((r,
|
|
1249
|
+
${(this.phases??[]).length?O`
|
|
1250
|
+
<div class="phases" aria-hidden="true">${(this.phases??[]).map((r,n)=>O`<i style=${`flex-grow:${i[n]};background:${Gi(void 0,n)}`}></i>`)}</div>
|
|
1251
|
+
<ul class="legend">${(this.phases??[]).map((r,n)=>O`<li style=${`--c:${Gi(void 0,n)}`}>${r.label} <b>${this.weeksWord(i[n])}</b></li>`)}</ul>`:ge}
|
|
1191
1252
|
<dl>
|
|
1192
|
-
<div><dt class="mono">${
|
|
1193
|
-
${e.way?
|
|
1253
|
+
<div><dt class="mono">${te("Your team")}</dt><dd>${this.teamOf(e.engineers)}</dd></div>
|
|
1254
|
+
${e.way?O`<div><dt class="mono">${te("Way of working")}</dt><dd>${e.way}</dd></div>`:ge}
|
|
1194
1255
|
</dl>
|
|
1195
1256
|
<div class="actions">
|
|
1196
|
-
${this.contactHref?
|
|
1197
|
-
<button type="button" class="secondary" @click=${()=>this.copy()}>${
|
|
1198
|
-
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${
|
|
1257
|
+
${this.contactHref?O`<a class="send" href=${this.contactHref} @click=${r=>this.send(r)}>${this.sendLabel} <span aria-hidden="true">→</span></a>`:ge}
|
|
1258
|
+
<button type="button" class="secondary" @click=${()=>this.copy()}>${te("Copy summary")}</button>
|
|
1259
|
+
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${te("Start again")}</button>
|
|
1199
1260
|
</div>
|
|
1200
1261
|
<p class="status" role="status">${this.copied}</p>
|
|
1201
|
-
${this.note?
|
|
1202
|
-
</div>`}renderAll(e){let
|
|
1262
|
+
${this.note?O`<p class="note">${this.note}</p>`:ge}
|
|
1263
|
+
</div>`}renderAll(e){let i=this.questions??[],a=Ha(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">
|
|
1203
1264
|
<div class="questions" part="questions">
|
|
1204
|
-
${
|
|
1205
|
-
.options=${
|
|
1206
|
-
@impakt-change=${
|
|
1265
|
+
${i.map((n,s)=>{let m=this.answers[n.id]??[],$=n.kind==="many",f=n.choices.map(Z=>({value:Z.id,label:Z.label}));return O`<impakt-chip-group look="site" part="question" .label=${`${String(s+1).padStart(2,"0")} \xB7 ${n.heading}`} .description=${n.hint??""}
|
|
1266
|
+
.options=${f} ?multiple=${$} .values=${$?m:[]} .value=${$?"":m[0]??""}
|
|
1267
|
+
@impakt-change=${Z=>this.chipsChanged(n,Z)}></impakt-chip-group>`})}
|
|
1207
1268
|
</div>
|
|
1208
1269
|
<aside class="ink" part="panel">
|
|
1209
1270
|
<p class="mono">${this.budgetLabel}</p>
|
|
1210
1271
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(e)}</p>
|
|
1211
|
-
<p class="weeks">${
|
|
1212
|
-
${(this.phases??[]).length?
|
|
1213
|
-
${this.contactHref?
|
|
1214
|
-
${e.way?
|
|
1272
|
+
<p class="weeks">${te("About {weeks} to a first release",{weeks:this.weeksWord(e.weeks)})}</p>
|
|
1273
|
+
${(this.phases??[]).length?O`<ul class="rows" role="list">${(this.phases??[]).map((n,s)=>O`<li><span>${n.label}</span><span class="length">${this.weeksWord(a[s])}</span></li>`)}</ul>`:ge}
|
|
1274
|
+
${this.contactHref?O`<a class="cta" href=${this.contactHref} part="send" @click=${n=>this.send(n)}><span>${this.sendLabel}</span>${r}</a>`:ge}
|
|
1275
|
+
${e.way?O`<p class="way">${this.wayLabel||te("Way of working")}: ${e.way}</p>`:ge}
|
|
1276
|
+
${this.note?O`<p class="note">${this.note}</p>`:ge}
|
|
1215
1277
|
</aside>
|
|
1216
|
-
${this.note?
|
|
1217
|
-
</div>`}chipsChanged(e,
|
|
1278
|
+
${this.note?O`<div class="foot"><p class="note">${this.note}</p></div>`:ge}
|
|
1279
|
+
</div>`}chipsChanged(e,i){let a=i.target,r=e.kind==="many"?[...a.values??[]]:[i.detail?.value].filter(m=>!!m);this.answers={...this.answers,[e.id]:r};let n=r.at(-1),s=e.choices.find(m=>m.id===n)?.tip;s&&(this.tip=s),this.requestUpdate()}render(){let e=this.questions??[];if(this.layout==="all")return this.renderAll(Dt(e,this.answers,this.rules));let i=e.length,a=Dt(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">
|
|
1218
1280
|
<div>
|
|
1219
1281
|
<div class="progress">
|
|
1220
|
-
<p class="mono">${r?this.resultHeading:
|
|
1221
|
-
<div class="bar" aria-hidden="true"><i style=${`inline-size:${
|
|
1282
|
+
<p class="mono">${r?this.resultHeading:te("Step {step} of {steps}",{step:this.at+1,steps:i})}</p>
|
|
1283
|
+
<div class="bar" aria-hidden="true"><i style=${`inline-size:${i?r?100:(this.at+1)/(i+1)*100:0}%`}></i></div>
|
|
1222
1284
|
</div>
|
|
1223
|
-
${e.map((
|
|
1285
|
+
${e.map((s,m)=>this.renderQuestion(s,m))}
|
|
1224
1286
|
${this.renderResult(a)}
|
|
1225
|
-
${r?
|
|
1226
|
-
${this.at>0?
|
|
1227
|
-
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===
|
|
1287
|
+
${r?ge:O`<div class="nav">
|
|
1288
|
+
${this.at>0?O`<button type="button" class="secondary" @click=${()=>this.go(this.at-1)}>${te("Back")}</button>`:ge}
|
|
1289
|
+
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===i-1?te("See my estimate"):te("Next")} <span aria-hidden="true">→</span></button>
|
|
1228
1290
|
</div>`}
|
|
1229
1291
|
</div>
|
|
1230
|
-
<aside class="panel" part="panel" style=${`--s:${
|
|
1292
|
+
<aside class="panel" part="panel" style=${`--s:${n}`}>
|
|
1231
1293
|
<div class="glow" aria-hidden="true"></div>
|
|
1232
1294
|
<p class="mono">${this.budgetLabel}</p>
|
|
1233
1295
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(a)}</p>
|
|
1234
|
-
<p class="weeks">${
|
|
1296
|
+
<p class="weeks">${te("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
|
|
1235
1297
|
<p class="tip" aria-live="polite">${this.tip||this.intro}</p>
|
|
1236
1298
|
</aside>
|
|
1237
|
-
</div>`}};customElements.define("impakt-estimator",
|
|
1299
|
+
</div>`}};customElements.define("impakt-estimator",Vi);import{css as qa,html as L,nothing as F}from"./atomic-ui.js";import{ImpaktElement as Ct,focusRing as ja,hideOn as dn,fontSize as We,fontWeight as oe,linkCurrent as pn,say as mn,space as A,t as E,token as Vt,type as Yt,toneOf as Na}from"./atomic-ui.js";import{css as cn,unsafeCSS as _t}from"./atomic-ui.js";import{token as ct}from"./atomic-ui.js";var fe=ct("color.ink","#111111"),Qe=ct("color.paper","#EFEFED"),Tr=ct("color.ink-raised","#1C1C1C"),Ke=ct("color.ink-line","#2E2E2E"),Ze=ct("color.ink-muted","#A8A8A6"),be=ct("color.accent.default","#FFD43B"),$e=ct("color.accent.on","#111111"),xt=ct("color.accent.on-ink","#FFD43B"),Gt=_t("var(--impakt-band, var(--impakt-color-ink, #111111))"),Ee=_t("var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))"),et=_t("var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))"),Ut=_t("var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),tt=_t("var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),Q=cn`
|
|
1300
|
+
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1301
|
+
font-size: 0.6875rem;
|
|
1302
|
+
font-weight: 400;
|
|
1303
|
+
line-height: 1.4;
|
|
1304
|
+
letter-spacing: 0.06em;
|
|
1305
|
+
text-transform: uppercase;
|
|
1306
|
+
`,it=(o,t=3)=>Math.min(Math.max(Number(o)||t,1),6),Mr=o=>String(o).padStart(2,"0");var dt=Vt("color.ink-on","#FFFFFF"),hn=[0,1,2,3,4],Ie=E.fontMono,Yi=class extends Ct{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},look:{type:String,reflect:!0},menuActionText:{type:String,attribute:"menu-action-text"},menuActionHref:{type:String,attribute:"menu-action-href"},menuNote:{type:String,attribute:"menu-note"},menuEmail:{type:String,attribute:"menu-email"},currentText:{type:String,attribute:"current-text"},closeText:{type:String,attribute:"close-text"}}}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=[],this.look="default",this.menuActionText="",this.menuActionHref="",this.menuNote="",this.menuEmail="",this.currentText="Current",this.closeText=""}static{this.styles=[...Ct.styles,ja,qa`
|
|
1238
1307
|
:host { display: block; container-type: inline-size; }
|
|
1239
1308
|
/* With a mark, the name is set small beside it, as in the canvas header. */
|
|
1240
|
-
.brand.marked { gap: ${
|
|
1241
|
-
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${
|
|
1242
|
-
.context { font-size: ${
|
|
1243
|
-
.context .slash { margin-inline-end: ${
|
|
1309
|
+
.brand.marked { gap: ${A(3)}; font-size: ${We("md")}; letter-spacing: -0.01em; }
|
|
1310
|
+
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${E.text}; color: ${E.surfaceCard}; font-size: ${We("sm")}; font-weight: ${oe("medium")}; }
|
|
1311
|
+
.context { font-size: ${We("sm")}; white-space: nowrap; }
|
|
1312
|
+
.context .slash { margin-inline-end: ${A(2)}; opacity: 0.72; }
|
|
1244
1313
|
.presence { display: flex; }
|
|
1245
|
-
.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: ${
|
|
1314
|
+
.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: ${E.borderThin} solid ${E.text}; background: ${E.surfaceCard}; color: ${E.text}; font-family: ${Ie}; font-size: 0.625rem; line-height: 1; }
|
|
1246
1315
|
.presence .avatar:first-child { margin-inline-start: 0; }
|
|
1247
|
-
.presence .avatar.accent { background: ${
|
|
1248
|
-
.bar { display: flex; align-items: center; gap: ${
|
|
1249
|
-
.start { display: flex; align-items: center; gap: ${
|
|
1316
|
+
.presence .avatar.accent { background: ${Vt("color.accent.default","#ffd43b")}; color: ${Vt("color.accent.on","#111111")}; }
|
|
1317
|
+
.bar { display: flex; align-items: center; gap: ${A(6)}; }
|
|
1318
|
+
.start { display: flex; align-items: center; gap: ${A(3)}; flex: none; }
|
|
1250
1319
|
.middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
|
|
1251
1320
|
.middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }
|
|
1252
1321
|
slot { display: contents; }
|
|
1253
|
-
.brand { display: inline-flex; align-items: center; min-block-size: ${
|
|
1322
|
+
.brand { display: inline-flex; align-items: center; min-block-size: ${E.targetMin}; color: inherit; text-decoration: none; font-family: ${E.fontHeading}; font-weight: ${oe("semibold")}; ${Yt("2xl")} letter-spacing: -0.02em; line-height: 1; border-radius: ${E.radiusSm}; }
|
|
1254
1323
|
.brand img { display: block; block-size: 32px; inline-size: auto; }
|
|
1255
|
-
.chip { display: inline-flex; align-items: center; gap: ${
|
|
1324
|
+
.chip { display: inline-flex; align-items: center; gap: ${A(1)}; padding: 2px ${A(2)}; border-radius: ${E.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${Ie}; font-size: ${We("xs")}; }
|
|
1256
1325
|
.chip svg { inline-size: 12px; block-size: 12px; }
|
|
1257
|
-
.meta { font-family: ${
|
|
1326
|
+
.meta { font-family: ${Ie}; font-size: ${We("xs")}; opacity: 0.72; }
|
|
1258
1327
|
.middle impakt-nav { flex: 1 1 8rem; }
|
|
1259
1328
|
/* File tabs sit in one box as wide as the tabs, centred between the name and the action. */
|
|
1260
1329
|
:host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }
|
|
1261
|
-
.end { display: flex; align-items: center; gap: ${
|
|
1330
|
+
.end { display: flex; align-items: center; gap: ${A(3)}; flex: none; }
|
|
1262
1331
|
.end:empty, .start:empty { display: none; }
|
|
1263
|
-
.status { display: inline-flex; align-items: center; gap: ${
|
|
1332
|
+
.status { display: inline-flex; align-items: center; gap: ${A(2)}; padding: ${A(1)} ${A(3)}; border: ${E.borderThin} solid ${E.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${E.surfaceCard}; font-family: ${Ie}; font-size: ${We("xs")}; white-space: nowrap; }
|
|
1264
1333
|
/* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */
|
|
1265
|
-
.start .status { padding: 2px ${
|
|
1334
|
+
.start .status { padding: 2px ${A(2)}; border-color: ${E.text}; border-radius: ${E.radius}; font-size: 0.6875rem; letter-spacing: ${E.trackingWide}; text-transform: uppercase; }
|
|
1266
1335
|
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
1267
1336
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
1268
1337
|
.status .hash { opacity: 0.72; }
|
|
1269
|
-
@container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
1270
|
-
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${
|
|
1338
|
+
@container (max-width: 22rem) { :host(:not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${A(2)}; } :host(:not([fold='narrow']):not([look='canvas'])) .end { flex: 1 1 100%; } }
|
|
1339
|
+
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${A(3)}; } }
|
|
1271
1340
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
1272
1341
|
line of their own under the name and the action, and wrap there. */
|
|
1273
1342
|
@container (max-width: 40rem) {
|
|
1274
|
-
:host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
1275
|
-
:host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }
|
|
1343
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${A(1)}; }
|
|
1344
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .start { flex: 1 1 auto; }
|
|
1276
1345
|
/* Its row may be narrower than the links, which then wrap: the max-content floor below is for the measured header only. */
|
|
1277
|
-
:host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
1346
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
1278
1347
|
/* fold="narrow": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */
|
|
1279
1348
|
:host([fold='narrow']) .middle { justify-content: flex-end; }
|
|
1280
1349
|
/*
|
|
@@ -1288,30 +1357,100 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1288
1357
|
:host(:not([fold='narrow'])) .middle ::slotted(impakt-nav[folded]) { flex: none; min-inline-size: max-content; }
|
|
1289
1358
|
:host([fold='narrow']) .end > slot > impakt-button { display: none; }
|
|
1290
1359
|
}
|
|
1291
|
-
|
|
1360
|
+
/*
|
|
1361
|
+
* look="canvas": the G2 top bar (9:264, 14:715). The mark and the name in Label S, 14px medium; the "/" in the subtle
|
|
1362
|
+
* text and the file name in the muted; the Live chip with a soft edge, a 3px corner and an ink dot, in G2 Mono S.
|
|
1363
|
+
*/
|
|
1364
|
+
.menu-button, .sheet { display: none; }
|
|
1365
|
+
:host([look='canvas']) .bar { min-block-size: 56px; }
|
|
1366
|
+
:host([look='canvas']) .start { gap: 10px; }
|
|
1367
|
+
:host([look='canvas']) .brand.marked { gap: 10px; font-family: ${E.fontBody}; font-size: 0.875rem; font-weight: ${oe("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
1368
|
+
:host([look='canvas']) .mark { font-family: ${E.fontBody}; font-size: 0.875rem; font-weight: ${oe("medium")}; line-height: 1.2; }
|
|
1369
|
+
:host([look='canvas']) .context { font-family: ${E.fontBody}; font-size: 0.875rem; line-height: 1.4; color: ${E.textMuted}; }
|
|
1370
|
+
:host([look='canvas']) .context .slash { margin-inline-end: 10px; opacity: 1; color: ${Vt("color.text.subtle","currentColor")}; }
|
|
1371
|
+
:host([look='canvas']) .start .status { display: inline-flex; gap: 6px; padding: 3px 7px; background: ${E.surfaceCard}; border: 1px solid ${Vt("color.line.soft","#CFCCC5")}; border-radius: 3px; color: ${E.textMuted}; font-family: ${Ie}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
1372
|
+
:host([look='canvas']) .start .status .dot { inline-size: 6px; block-size: 6px; background: ${E.text}; }
|
|
1373
|
+
/* The filled Menu button of 14:715: "Menu" and a two-line glyph after it. */
|
|
1374
|
+
:host([look='canvas']) .menu-button { align-items: center; gap: 10px; padding: 9px 14px; border: 0; border-radius: 0; background: ${E.text}; color: ${E.surfaceCard}; font-family: ${E.fontBody}; font-size: 0.875rem; font-weight: ${oe("medium")}; line-height: 1.2; cursor: pointer; }
|
|
1375
|
+
.glyph { display: inline-block; inline-size: 14px; block-size: 6px; box-sizing: border-box; border-block: 1.5px solid currentColor; }
|
|
1376
|
+
/*
|
|
1377
|
+
* The tabs, the file name, the people and the action need about 70rem in one row. Narrower, the file name and the
|
|
1378
|
+
* people leave first, as decoration; at 60rem and under the tabs and the action give their place to the Menu button.
|
|
1379
|
+
*/
|
|
1380
|
+
@container (max-width: 70rem) { :host([look='canvas']) :is(.context, .presence) { display: none; } }
|
|
1381
|
+
@container (max-width: 60rem) {
|
|
1382
|
+
:host([look='canvas']) .middle, :host([look='canvas']) .end > slot > impakt-button.act { display: none; }
|
|
1383
|
+
:host([look='canvas']) .bar { justify-content: space-between; }
|
|
1384
|
+
:host([look='canvas']) .menu-button { display: inline-flex; }
|
|
1385
|
+
}
|
|
1386
|
+
/* The open menu (21:1688): ink in both themes, the whole screen, opened by the browser as a popover. */
|
|
1387
|
+
.sheet:popover-open { display: flex; flex-direction: column; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: 0; border: 0; overflow: auto; overscroll-behavior: contain; background: ${fe}; color: ${dt}; }
|
|
1388
|
+
.menu-bar { display: flex; align-items: center; justify-content: space-between; gap: ${A(4)}; box-sizing: border-box; min-block-size: 56px; padding: 0 ${A(4)}; border-block-end: 1px solid ${Ke}; }
|
|
1389
|
+
.menu-bar .brand.marked { gap: 10px; font-family: ${E.fontBody}; font-size: 0.875rem; font-weight: ${oe("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
1390
|
+
.menu-bar .mark { background: ${dt}; color: ${fe}; font-family: ${E.fontBody}; font-size: 0.875rem; font-weight: ${oe("medium")}; }
|
|
1391
|
+
.close { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 0; background: ${dt}; color: ${fe}; font-family: ${E.fontBody}; font-size: 0.875rem; font-weight: ${oe("medium")}; line-height: 1.2; cursor: pointer; }
|
|
1392
|
+
.menu-nav { flex: 1; padding: ${A(8)} 20px 0; }
|
|
1393
|
+
.menu-nav ol { list-style: none; margin: 0; padding: 0; }
|
|
1394
|
+
.menu-nav li { border-block-end: 1px solid ${Ke}; }
|
|
1395
|
+
.menu-nav a { display: flex; align-items: center; justify-content: space-between; gap: ${A(4)}; padding-block: 18px; color: inherit; text-decoration: none; font-family: ${E.fontHeading}; font-size: clamp(2.25rem, 13.4vw, 3.25rem); font-weight: ${oe("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
1396
|
+
.menu-nav a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
1397
|
+
.menu-nav .number { flex: none; font-family: ${Ie}; font-size: 0.8125rem; font-weight: ${oe("regular")}; line-height: 1.5; letter-spacing: 0; color: ${Ze}; }
|
|
1398
|
+
/* The page you are on is in the accent, and its number says "Current", so it is not told by colour alone. */
|
|
1399
|
+
.menu-nav a[aria-current], .menu-nav a[aria-current] .number { color: ${xt}; }
|
|
1400
|
+
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: ${A(4)}; padding: ${A(8)} 20px calc(${A(8)} + env(safe-area-inset-bottom)); }
|
|
1401
|
+
.menu-foot:empty { display: none; }
|
|
1402
|
+
.call { display: flex; align-items: center; justify-content: space-between; gap: ${A(3)}; align-self: stretch; box-sizing: border-box; min-block-size: 47px; padding: 0 20px; background: ${be}; color: ${$e}; text-decoration: none; font-family: ${E.fontBody}; font-size: 1rem; font-weight: ${oe("medium")}; line-height: 1.2; }
|
|
1403
|
+
.call:hover .words { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1404
|
+
.note { margin: 0; font-family: ${Ie}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${Ze}; }
|
|
1405
|
+
.mail { display: inline-flex; align-items: center; min-block-size: 24px; color: inherit; font-family: ${E.fontBody}; font-size: 1rem; line-height: 1.45; text-decoration: none; }
|
|
1406
|
+
.mail:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1407
|
+
/* What is slotted at the foot is read on ink too. */
|
|
1408
|
+
.menu-foot ::slotted(*) { --impakt-color-text-default: ${dt}; --impakt-color-text-heading: ${dt}; --impakt-color-text-muted: ${Ze}; --impakt-color-text-link: ${dt}; --impakt-color-text-link-hover: ${dt}; color: ${dt}; }
|
|
1409
|
+
@media (forced-colors: active) {
|
|
1410
|
+
:host([look='canvas']) .menu-button, .close, .call { border: 1px solid ButtonText; }
|
|
1411
|
+
.sheet:popover-open { border: 1px solid CanvasText; }
|
|
1412
|
+
:host([look='canvas']) .start .status .dot { background: CanvasText; }
|
|
1413
|
+
}
|
|
1414
|
+
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}renderBrand(){if(!this.brand&&!this.logoSrc)return F;let t=this.logoSrc?L`<img src=${this.logoSrc} alt=${this.logoAlt||this.brand} />`:L`${this.brand}`;return L`<a class=${this.mark?"brand marked":"brand"} href=${this.home||"/"} part="brand">${this.mark?L`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>`:F}${t}</a>`}renderMenu(){let t=this.id_("menu"),e=this.menuActionText||this.actionText,i=this.menuActionHref||this.actionHref;return L`<button class="menu-button" type="button" part="menu-button" popovertarget=${t}>${this.menuText}<span class="glyph" aria-hidden="true"></span></button>
|
|
1415
|
+
<div id=${t} class="sheet" popover="auto" part="menu" role="dialog" aria-label=${this.menuText}>
|
|
1416
|
+
<div class="menu-bar">
|
|
1417
|
+
${this.renderBrand()}
|
|
1418
|
+
<button class="close" type="button" popovertarget=${t} popovertargetaction="hide">${this.closeText||mn("Close")}<svg viewBox="0 0 10 10" width="10" height="10" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true" focusable="false"><path d="M1 1l8 8M9 1 1 9" /></svg></button>
|
|
1419
|
+
</div>
|
|
1420
|
+
<nav class="menu-nav" aria-label=${this.label||F}>
|
|
1421
|
+
<ol role="list">
|
|
1422
|
+
${(this.links??[]).map((a,r)=>{let n=pn(a.href,this.current),s=String(r+1).padStart(2,"0");return L`<li>
|
|
1423
|
+
<a href=${a.href} part="menu-link" aria-current=${n==="page"?"page":n==="section"?"true":F}
|
|
1424
|
+
><span class="words">${a.menuLabel||a.label}</span><span class="number" aria-hidden="true">${n&&this.currentText?`${this.currentText} \xB7 ${s}`:s}</span></a
|
|
1425
|
+
>
|
|
1426
|
+
</li>`})}
|
|
1427
|
+
</ol>
|
|
1428
|
+
</nav>
|
|
1429
|
+
<div class="menu-foot" part="menu-foot"><slot name="menu-foot">${e?L`<a class="call" href=${i||F}><span class="words">${e}</span><span aria-hidden="true">→</span></a>`:F}${this.menuNote?L`<p class="note">${this.menuNote}</p>`:F}${this.menuEmail?L`<a class="mail" href=${`mailto:${this.menuEmail}`}>${this.menuEmail}</a>`:F}</slot></div>
|
|
1430
|
+
</div>`}render(){let t=this.look==="canvas",e=t?"start":this.statusAt,i=this.status?L`<span class="status" part="status" style=${`--tone:${Na(this.statusTone,0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta?L` <span class="hash">${this.statusMeta}</span>`:F}</span>`:F,a=this.presence??[],r=t?"narrow":this.fold,n=this.navLook||(t?"tabs":"");return L`<div class="bar" part="bar">
|
|
1292
1431
|
<div class="start"><slot name="start">
|
|
1293
|
-
${this.
|
|
1294
|
-
${this.context?
|
|
1295
|
-
${
|
|
1296
|
-
${this.badge?
|
|
1297
|
-
${this.meta?
|
|
1298
|
-
</slot></div>
|
|
1299
|
-
<div class="middle"><slot name="middle">${(this.links??[]).length?A`<impakt-nav align="center" size="sm" fold=${this.fold} look=${this.navLook||V} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold==="narrow"?this.actionText:""} .actionHref=${this.actionHref}></impakt-nav>`:V}</slot></div>
|
|
1300
|
-
<div class="end"><slot name="presence">${t.length?A`<span class="presence" part="presence">${t.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>`:V}</slot><slot name="end">
|
|
1301
|
-
${this.statusAt==="start"?V:e}
|
|
1302
|
-
${this.actionText?A`<impakt-button variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref||V} @click=${this.act}>${this.actionText}</impakt-button>`:V}
|
|
1432
|
+
${this.renderBrand()}
|
|
1433
|
+
${this.context?L`<span class="context" part="context"><span class="slash" aria-hidden="true">/</span>${this.context}</span>`:F}
|
|
1434
|
+
${e==="start"?i:F}
|
|
1435
|
+
${this.badge?L`<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>`:F}
|
|
1436
|
+
${this.meta?L`<span class="meta" part="meta">${this.meta}</span>`:F}
|
|
1303
1437
|
</slot></div>
|
|
1304
|
-
|
|
1438
|
+
<div class="middle"><slot name="middle">${(this.links??[]).length?L`<impakt-nav align="center" size="sm" fold=${r} look=${n||F} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${r==="narrow"&&!t?this.actionText:""} .actionHref=${this.actionHref}></impakt-nav>`:F}</slot></div>
|
|
1439
|
+
<div class="end"><slot name="presence">${a.length?L`<span class="presence" part="presence">${a.map(s=>L`<span class=${s.accent?"avatar accent":"avatar"} role="img" aria-label=${s.name}>${s.initials??s.name.slice(0,1).toUpperCase()}</span>`)}</span>`:F}</slot><slot name="end">
|
|
1440
|
+
${e==="start"?F:i}
|
|
1441
|
+
${this.actionText?L`<impakt-button class="act" variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref||F} @click=${this.act}>${this.actionText}</impakt-button>`:F}
|
|
1442
|
+
</slot>${t?this.renderMenu():F}</div>
|
|
1443
|
+
</div>`}},Xi=class extends Ct{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=[...Ct.styles,ja,dn,qa`
|
|
1305
1444
|
:host { display: inline-flex; align-items: center; flex: none; }
|
|
1306
|
-
a { color: inherit; text-decoration: none; font-family: ${
|
|
1307
|
-
:host([size='sm']) a { ${
|
|
1445
|
+
a { color: inherit; text-decoration: none; font-family: ${E.fontHeading}; font-weight: ${oe("semibold")}; letter-spacing: -0.02em; line-height: 1; border-radius: ${E.radiusSm}; }
|
|
1446
|
+
:host([size='sm']) a { ${Yt("xl")} } :host([size='md']) a { ${Yt("2xl")} } :host([size='lg']) a { ${Yt("3xl")} }
|
|
1308
1447
|
img { display: block; block-size: 32px; inline-size: auto; }
|
|
1309
|
-
@media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${
|
|
1310
|
-
`]}render(){return
|
|
1448
|
+
@media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${Yt("xl")} } }
|
|
1449
|
+
`]}render(){return L`<a href=${this.href||"/"} part="link">${this.src?L`<img src=${this.src} alt=${this.alt||this.text||this.textContent?.trim()||""} />`:L`<slot>${this.text}</slot>`}</a>`}},Ji=class extends Ct{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=[...Ct.styles,ja,qa`
|
|
1311
1450
|
/* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */
|
|
1312
|
-
:host { display: block; container-type: inline-size; position: relative; padding-block: ${
|
|
1313
|
-
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${
|
|
1314
|
-
.brand { margin: 0; font-family: ${
|
|
1451
|
+
:host { display: block; container-type: inline-size; position: relative; padding-block: ${A(8)} ${A(4)}; margin-block-end: calc(-1 * ${A(8)}); }
|
|
1452
|
+
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${A(10)}; }
|
|
1453
|
+
.brand { margin: 0; font-family: ${E.fontHeading}; font-weight: ${oe("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
|
|
1315
1454
|
/* The name as a wordmark across the whole footer, under the columns. */
|
|
1316
1455
|
:host([brand-size='display']) .top { grid-template-columns: 1fr; }
|
|
1317
1456
|
:host([brand-size='display']) .top > div:first-child { order: 2; }
|
|
@@ -1321,28 +1460,28 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1321
1460
|
* on one row under it in the 13px code face (#52).
|
|
1322
1461
|
*/
|
|
1323
1462
|
:host([brand-size='display']) .top { gap: 0; }
|
|
1324
|
-
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${
|
|
1325
|
-
:host([brand-size='display']) .brand { font-weight: ${
|
|
1463
|
+
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${E.borderThin} solid currentColor; }
|
|
1464
|
+
:host([brand-size='display']) .brand { font-weight: ${oe("semibold")}; font-size: clamp(3rem, 32.3cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }
|
|
1326
1465
|
:host([brand-size='display']) :is(.legal, .tagline) { font-size: 0.8125rem; line-height: 1.5; }
|
|
1327
|
-
:host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${
|
|
1466
|
+
:host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${A(6)}; }
|
|
1328
1467
|
:host([brand-size='display']) .foot .legal { margin: 0; }
|
|
1329
1468
|
@container (min-width: 48rem) { :host([brand-size='display']) .foot { flex-wrap: nowrap; } :host([brand-size='display']) .foot .legal { flex: 0 1 auto; min-inline-size: 0; } :host([brand-size='display']) .tagline { flex: none; } }
|
|
1330
1469
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
1331
|
-
.log { margin-block-start: ${
|
|
1332
|
-
.log li { display: flex; align-items: center; gap: ${
|
|
1470
|
+
.log { margin-block-start: ${A(8)}; display: grid; gap: ${A(3)}; font-family: ${Ie}; font-size: ${We("sm")}; }
|
|
1471
|
+
.log li { display: flex; align-items: center; gap: ${A(3)}; opacity: 0.72; }
|
|
1333
1472
|
.log li:first-child { opacity: 1; }
|
|
1334
1473
|
.log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }
|
|
1335
|
-
.log .code { margin-inline-end: ${
|
|
1336
|
-
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${
|
|
1337
|
-
.h { margin: 0 0 ${
|
|
1338
|
-
.columns ul { display: grid; gap: ${
|
|
1339
|
-
a { color: inherit; text-decoration: none; font-weight: ${
|
|
1474
|
+
.log .code { margin-inline-end: ${A(3)}; }
|
|
1475
|
+
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${A(8)}; }
|
|
1476
|
+
.h { margin: 0 0 ${A(4)}; font-family: ${Ie}; font-size: ${We("xs")}; font-weight: ${oe("medium")}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
|
|
1477
|
+
.columns ul { display: grid; gap: ${A(3)}; }
|
|
1478
|
+
a { color: inherit; text-decoration: none; font-weight: ${oe("medium")}; border-radius: ${E.radiusSm}; }
|
|
1340
1479
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
1341
|
-
.legal { margin: ${
|
|
1342
|
-
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${
|
|
1480
|
+
.legal { margin: ${A(16)} 0 0; font-family: ${Ie}; font-size: ${We("xs")}; opacity: 0.72; }
|
|
1481
|
+
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${A(2)} ${A(6)}; margin-block-start: ${A(16)}; }
|
|
1343
1482
|
.foot .legal { margin: 0; }
|
|
1344
|
-
.tagline { margin: 0; font-family: ${
|
|
1345
|
-
.row { display: flex; align-items: flex-start; gap: ${
|
|
1483
|
+
.tagline { margin: 0; font-family: ${Ie}; font-size: ${We("xs")}; opacity: 0.72; text-align: end; }
|
|
1484
|
+
.row { display: flex; align-items: flex-start; gap: ${A(8)}; }
|
|
1346
1485
|
.row .columns { flex: 1; }
|
|
1347
1486
|
.row impakt-button { flex: none; }
|
|
1348
1487
|
.stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
|
|
@@ -1350,22 +1489,22 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1350
1489
|
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }
|
|
1351
1490
|
@container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
|
|
1352
1491
|
@media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
|
|
1353
|
-
`]}heading(
|
|
1492
|
+
`]}heading(t){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?L`<h3 class="h">${t}</h3>`:e===4?L`<h4 class="h">${t}</h4>`:L`<h2 class="h">${t}</h2>`}render(){let t=this.log??[];return L`<div part="footer">
|
|
1354
1493
|
<div class="top">
|
|
1355
1494
|
<div>
|
|
1356
|
-
${this.brand?
|
|
1357
|
-
${
|
|
1495
|
+
${this.brand?L`<p class="brand" part="brand">${this.brand}</p>`:F}
|
|
1496
|
+
${t.length?L`<ul class="log" part="log">${t.map((e,i)=>L`<li style=${`--tone:${Na(e.tone??(i===0?"success":"accent"),i)}`}><span class="dot" aria-hidden="true"></span><span>${e.meta?L`<span class="code">${e.meta}</span>`:F}${e.text}</span></li>`)}</ul>`:F}
|
|
1358
1497
|
</div>
|
|
1359
1498
|
<div class="row">
|
|
1360
1499
|
<div class="columns" part="columns" style=${`--count:${Math.max(1,(this.columns??[]).length)}`}>
|
|
1361
|
-
${(this.columns??[]).map(e=>
|
|
1500
|
+
${(this.columns??[]).map(e=>L`<div>${this.heading(e.heading)}<ul>${(e.links??[]).map(i=>L`<li><a href=${i.href}>${i.label}</a></li>`)}</ul></div>`)}
|
|
1362
1501
|
</div>
|
|
1363
|
-
${this.actionText?
|
|
1502
|
+
${this.actionText?L`<impakt-button variant="outline" icon-after="arrow-right" href=${this.actionHref||F} part="action">${this.actionText}</impakt-button>`:F}
|
|
1364
1503
|
</div>
|
|
1365
1504
|
</div>
|
|
1366
|
-
${this.tagline?
|
|
1367
|
-
${this.stripe?
|
|
1368
|
-
</div>`}};customElements.define("impakt-site-header",
|
|
1505
|
+
${this.tagline?L`<div class="foot">${this.legal?L`<p class="legal" part="legal">${this.legal}</p>`:L`<span></span>`}<p class="tagline" part="tagline">${this.tagline}</p></div>`:this.legal?L`<p class="legal" part="legal">${this.legal}</p>`:F}
|
|
1506
|
+
${this.stripe?L`<div class="stripe" aria-hidden="true">${hn.map(e=>L`<span style=${`background:${Na(void 0,e)}`}></span>`)}</div>`:F}
|
|
1507
|
+
</div>`}};customElements.define("impakt-site-header",Yi);customElements.define("impakt-wordmark",Xi);customElements.define("impakt-site-footer",Ji);import{html as At,css as un,nothing as Pa}from"./atomic-ui.js";import{say as Cr,ImpaktElement as Ar,fontSize as gn,fontWeight as bn,space as pt,t as Oa,token as Fa}from"./atomic-ui.js";var Qi=o=>Math.min(1,Math.max(0,o)),Ki=class extends Ar{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=Qi(-i.top/Math.max(1,i.height-a))}else if(this.drive==="page"){let i=document.documentElement;this.progress=Qi(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=[...Ar.styles,un`
|
|
1369
1508
|
:host {
|
|
1370
1509
|
display: block;
|
|
1371
1510
|
position: relative;
|
|
@@ -1379,7 +1518,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1379
1518
|
}
|
|
1380
1519
|
:host([layout='split']) .frame {
|
|
1381
1520
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
1382
|
-
gap: ${
|
|
1521
|
+
gap: ${pt(8)};
|
|
1383
1522
|
}
|
|
1384
1523
|
.stage {
|
|
1385
1524
|
position: sticky;
|
|
@@ -1404,34 +1543,34 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1404
1543
|
}
|
|
1405
1544
|
.controls {
|
|
1406
1545
|
display: flex;
|
|
1407
|
-
gap: ${
|
|
1546
|
+
gap: ${pt(3)};
|
|
1408
1547
|
align-items: center;
|
|
1409
1548
|
justify-content: center;
|
|
1410
|
-
padding-block: ${
|
|
1549
|
+
padding-block: ${pt(3)};
|
|
1411
1550
|
}
|
|
1412
1551
|
:host([bleed]) { margin-inline: calc(50% - 50vw); }
|
|
1413
1552
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1414
1553
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1415
1554
|
/* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
|
|
1416
|
-
.stage > .controls { position: absolute; inset-inline: ${
|
|
1555
|
+
.stage > .controls { position: absolute; inset-inline: ${pt(6)}; inset-block-end: ${pt(6)}; z-index: 2; padding: 0; }
|
|
1417
1556
|
.stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }
|
|
1418
1557
|
/* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
|
|
1419
1558
|
.controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
|
|
1420
1559
|
.pause {
|
|
1421
|
-
min-width: ${
|
|
1422
|
-
min-height: ${
|
|
1423
|
-
padding: ${
|
|
1560
|
+
min-width: ${Fa("target.min","24px")};
|
|
1561
|
+
min-height: ${Fa("target.min","24px")};
|
|
1562
|
+
padding: ${pt(2)} ${pt(4)};
|
|
1424
1563
|
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1425
|
-
border: 1px solid ${
|
|
1426
|
-
background: ${
|
|
1427
|
-
color: ${
|
|
1428
|
-
font-size: ${
|
|
1429
|
-
font-weight: ${
|
|
1564
|
+
border: 1px solid ${Oa.border};
|
|
1565
|
+
background: ${Oa.surfaceCard};
|
|
1566
|
+
color: ${Oa.text};
|
|
1567
|
+
font-size: ${gn("sm")};
|
|
1568
|
+
font-weight: ${bn("medium")};
|
|
1430
1569
|
cursor: pointer;
|
|
1431
1570
|
}
|
|
1432
1571
|
.pause:focus-visible {
|
|
1433
1572
|
outline: none;
|
|
1434
|
-
box-shadow: ${
|
|
1573
|
+
box-shadow: ${Fa("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1435
1574
|
}
|
|
1436
1575
|
@media (max-width: 48rem) {
|
|
1437
1576
|
:host([layout='split']) .frame {
|
|
@@ -1449,7 +1588,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1449
1588
|
.stage {
|
|
1450
1589
|
position: relative;
|
|
1451
1590
|
height: auto;
|
|
1452
|
-
gap: ${
|
|
1591
|
+
gap: ${pt(6)};
|
|
1453
1592
|
}
|
|
1454
1593
|
/* With less motion the layers are shown one after another, so every
|
|
1455
1594
|
state the scene would have moved through can still be seen. */
|
|
@@ -1457,17 +1596,17 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1457
1596
|
grid-area: auto;
|
|
1458
1597
|
}
|
|
1459
1598
|
}
|
|
1460
|
-
`]}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,
|
|
1599
|
+
`]}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=Qi(e);return}this.seekFrom=this.progress,this.seekTo=Qi(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=At`<div class="controls" part="controls">
|
|
1461
1600
|
<slot name="controls"></slot>
|
|
1462
|
-
${e&&!this.reduced?
|
|
1463
|
-
${this.paused?
|
|
1464
|
-
</button>`:
|
|
1465
|
-
</div>`,r=
|
|
1601
|
+
${e&&!this.reduced?At`<button class="pause" type="button" aria-pressed=${this.paused?"true":"false"} @click=${this.togglePause}>
|
|
1602
|
+
${this.paused?Cr("Play {name}",{name:this.label}):Cr("Pause {name}",{name:this.label})}
|
|
1603
|
+
</button>`:Pa}
|
|
1604
|
+
</div>`,r=At`<div class="stage" part="stage"><slot name="stage"></slot>${i?a:Pa}</div>`;return At`
|
|
1466
1605
|
<div class="frame" part="frame" role="region" aria-label=${this.label}>
|
|
1467
|
-
${this.layout==="split"?
|
|
1606
|
+
${this.layout==="split"?At`<div class="content" part="content"><slot></slot></div>${r}`:At`${r}<div class="content" part="content"><slot></slot></div>`}
|
|
1468
1607
|
</div>
|
|
1469
|
-
${
|
|
1470
|
-
`}};customElements.define("impakt-scene",
|
|
1608
|
+
${i?Pa:a}
|
|
1609
|
+
`}};customElements.define("impakt-scene",Ki);import{html as De,css as fn}from"./atomic-ui.js";import{say as Lr,ImpaktElement as Er,visuallyHidden as $n,fontSize as Wa,fontWeight as Br,space as Te,t as K,token as yt}from"./atomic-ui.js";var Da={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)"},Zi=class extends Er{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=[...Er.styles,fn`
|
|
1471
1610
|
:host {
|
|
1472
1611
|
display: block;
|
|
1473
1612
|
width: 100%;
|
|
@@ -1476,71 +1615,71 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1476
1615
|
}
|
|
1477
1616
|
.wrap {
|
|
1478
1617
|
display: grid;
|
|
1479
|
-
gap: ${
|
|
1480
|
-
padding: ${
|
|
1481
|
-
border-radius: ${
|
|
1482
|
-
background: ${
|
|
1483
|
-
box-shadow: ${
|
|
1484
|
-
border: 1px solid ${
|
|
1618
|
+
gap: ${Te(2)};
|
|
1619
|
+
padding: ${Te(3)} ${Te(4)};
|
|
1620
|
+
border-radius: ${yt("radius.xl","16px")};
|
|
1621
|
+
background: ${K.surfaceCard};
|
|
1622
|
+
box-shadow: ${yt("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")};
|
|
1623
|
+
border: 1px solid ${K.border};
|
|
1485
1624
|
}
|
|
1486
1625
|
input {
|
|
1487
1626
|
width: 100%;
|
|
1488
|
-
min-height: ${
|
|
1489
|
-
accent-color: ${
|
|
1627
|
+
min-height: ${yt("target.min","24px")};
|
|
1628
|
+
accent-color: ${K.brand};
|
|
1490
1629
|
margin: 0;
|
|
1491
1630
|
}
|
|
1492
1631
|
.stops {
|
|
1493
1632
|
position: relative;
|
|
1494
1633
|
display: flex;
|
|
1495
1634
|
flex-wrap: wrap;
|
|
1496
|
-
gap: ${
|
|
1635
|
+
gap: ${Te(2)};
|
|
1497
1636
|
list-style: none;
|
|
1498
1637
|
margin: 0;
|
|
1499
1638
|
padding: 0;
|
|
1500
1639
|
}
|
|
1501
1640
|
button {
|
|
1502
|
-
min-height: ${
|
|
1503
|
-
padding: ${
|
|
1641
|
+
min-height: ${yt("target.min","24px")};
|
|
1642
|
+
padding: ${Te(1)} ${Te(3)};
|
|
1504
1643
|
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1505
|
-
border: 1px solid ${
|
|
1644
|
+
border: 1px solid ${K.border};
|
|
1506
1645
|
background: transparent;
|
|
1507
|
-
color: ${
|
|
1508
|
-
font-size: ${
|
|
1509
|
-
font-weight: ${
|
|
1646
|
+
color: ${K.textMuted};
|
|
1647
|
+
font-size: ${Wa("xs")};
|
|
1648
|
+
font-weight: ${Br("medium")};
|
|
1510
1649
|
cursor: pointer;
|
|
1511
1650
|
}
|
|
1512
1651
|
button[aria-current='true'] {
|
|
1513
|
-
color: ${
|
|
1514
|
-
border-color: ${
|
|
1652
|
+
color: ${K.text};
|
|
1653
|
+
border-color: ${K.text};
|
|
1515
1654
|
}
|
|
1516
1655
|
.sr-only {
|
|
1517
|
-
${
|
|
1656
|
+
${$n}
|
|
1518
1657
|
}
|
|
1519
1658
|
/* The graph look: the code of where you are, the line of stops, where you are. */
|
|
1520
1659
|
:host([look='graph']) { max-width: none; }
|
|
1521
|
-
.graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${
|
|
1522
|
-
.mono { font-family: ${
|
|
1660
|
+
.graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${Te(6)}; align-items: center; padding: ${Te(4)} ${Te(6)}; border-radius: ${yt("radius.xl","16px")}; background: ${K.surfaceCard}; box-shadow: ${yt("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")}; border: 1px solid ${K.border}; }
|
|
1661
|
+
.mono { font-family: ${K.fontMono}; font-size: ${Wa("xs")}; letter-spacing: 0.04em; }
|
|
1523
1662
|
.head { display: grid; gap: 2px; }
|
|
1524
|
-
.head .k { color: ${
|
|
1525
|
-
.head .code { font-size: ${
|
|
1526
|
-
.head .note { color: ${
|
|
1663
|
+
.head .k { color: ${K.textMuted}; text-transform: uppercase; }
|
|
1664
|
+
.head .code { font-size: ${Wa("md")}; color: ${K.text}; }
|
|
1665
|
+
.head .note { color: ${K.textMuted}; }
|
|
1527
1666
|
.line { position: relative; block-size: 48px; }
|
|
1528
|
-
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${
|
|
1667
|
+
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${K.border}; opacity: 0.5; }
|
|
1529
1668
|
.fill { opacity: 1; background: none; display: flex; overflow: hidden; }
|
|
1530
1669
|
.fill span { block-size: 100%; }
|
|
1531
|
-
.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: ${
|
|
1670
|
+
.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: ${K.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }
|
|
1532
1671
|
.dot[data-passed] { background: var(--c); }
|
|
1533
1672
|
.dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
|
|
1534
|
-
.dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${
|
|
1535
|
-
.dot-label[data-current] { color: ${
|
|
1673
|
+
.dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${K.textMuted}; text-transform: uppercase; pointer-events: none; }
|
|
1674
|
+
.dot-label[data-current] { color: ${K.text}; font-weight: ${Br("bold")}; }
|
|
1536
1675
|
.line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
|
|
1537
1676
|
.line input:focus-visible { opacity: 1; }
|
|
1538
|
-
.where { display: grid; gap: ${
|
|
1539
|
-
.chip { display: inline-flex; align-items: center; gap: ${
|
|
1677
|
+
.where { display: grid; gap: ${Te(2)}; justify-items: end; }
|
|
1678
|
+
.chip { display: inline-flex; align-items: center; gap: ${Te(2)}; padding: ${Te(1)} ${Te(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${K.border}; color: ${K.text}; text-transform: uppercase; }
|
|
1540
1679
|
.chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
|
|
1541
|
-
.hint { color: ${
|
|
1680
|
+
.hint { color: ${K.textMuted}; text-transform: uppercase; }
|
|
1542
1681
|
/* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
|
|
1543
|
-
.chip .meta { color: ${
|
|
1682
|
+
.chip .meta { color: ${K.textMuted}; }
|
|
1544
1683
|
@media (max-width: 48rem) {
|
|
1545
1684
|
.graph { grid-template-columns: minmax(0, 1fr); }
|
|
1546
1685
|
.where { justify-items: start; }
|
|
@@ -1549,29 +1688,29 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1549
1688
|
button:focus-visible,
|
|
1550
1689
|
input:focus-visible {
|
|
1551
1690
|
outline: none;
|
|
1552
|
-
box-shadow: ${
|
|
1691
|
+
box-shadow: ${yt("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1553
1692
|
}
|
|
1554
|
-
`]}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,
|
|
1693
|
+
`]}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(($,f)=>$.at-f.at);a=r.indexOf(this.stops[a]);let n=$=>{let f=$?.tone??"brand";return typeof f=="number"?`var(--impakt-color-chart-${f}, ${Da.brand})`:Da[f]??Da.brand},s=r[a]??r[0],m=r.map(($,f)=>{let Z=f===0?0:r[f-1].at,ye=Math.min($.at,this.value);return{width:Math.round(Math.max(0,ye-Z)*1e4)/100,c:n($)}});return De`<div class="graph" part="wrap">
|
|
1555
1694
|
<div class="head mono" aria-hidden="true">
|
|
1556
1695
|
<span class="k">HEAD</span>
|
|
1557
|
-
<span class="code">${
|
|
1558
|
-
${
|
|
1696
|
+
<span class="code">${s?.meta??s?.label??""}</span>
|
|
1697
|
+
${s?.note?De`<span class="note">${s.note}</span>`:null}
|
|
1559
1698
|
</div>
|
|
1560
1699
|
<div class="line">
|
|
1561
1700
|
<div class="track"></div>
|
|
1562
|
-
<div class="fill" aria-hidden="true">${
|
|
1563
|
-
${r.map((
|
|
1564
|
-
<button type="button" class="dot" style=${`left:${
|
|
1565
|
-
<span class="sr-only">${
|
|
1701
|
+
<div class="fill" aria-hidden="true">${m.map($=>De`<span style=${`width:${$.width}%;background:${$.c}`}></span>`)}</div>
|
|
1702
|
+
${r.map(($,f)=>De`
|
|
1703
|
+
<button type="button" class="dot" style=${`left:${$.at*100}%;--c:${n($)}`} ?data-passed=${$.at<=this.value+1e-4} aria-current=${f===a?"true":"false"} @click=${()=>this.goTo($)}>
|
|
1704
|
+
<span class="sr-only">${Lr("Go to {name}",{name:$.label})}</span>
|
|
1566
1705
|
</button>
|
|
1567
|
-
<span class="dot-label mono" style=${`left:${
|
|
1568
|
-
<input type="range" min="0" max="1000" step="1" .value=${String(Math.round(this.value*1e3))} aria-label=${this.label} aria-valuetext=${
|
|
1706
|
+
<span class="dot-label mono" style=${`left:${$.at*100}%`} ?data-current=${f===a} aria-hidden="true">${$.label}</span>`)}
|
|
1707
|
+
<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} />
|
|
1569
1708
|
</div>
|
|
1570
1709
|
<div class="where" aria-hidden="true">
|
|
1571
|
-
${
|
|
1572
|
-
${this.hint?
|
|
1710
|
+
${s?De`<span class="chip mono" style=${`--c:${n(s)}`}>${s.label}${s.meta?De` <span class="meta">${s.meta}</span>`:null}</span>`:null}
|
|
1711
|
+
${this.hint?De`<span class="hint mono">${this.hint}</span>`:null}
|
|
1573
1712
|
</div>
|
|
1574
|
-
</div>`}render(){let e=this.nearest(),
|
|
1713
|
+
</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):De`
|
|
1575
1714
|
<div class="wrap" part="wrap">
|
|
1576
1715
|
<input
|
|
1577
1716
|
type="range"
|
|
@@ -1580,101 +1719,119 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1580
1719
|
step="1"
|
|
1581
1720
|
.value=${String(Math.round(this.value*1e3))}
|
|
1582
1721
|
aria-label=${this.label}
|
|
1583
|
-
aria-valuetext=${
|
|
1722
|
+
aria-valuetext=${i}
|
|
1584
1723
|
@input=${this.onInput}
|
|
1585
1724
|
/>
|
|
1586
|
-
${this.stops.length?
|
|
1587
|
-
${this.stops.map((a,r)=>
|
|
1725
|
+
${this.stops.length?De`<ul class="stops" part="stops">
|
|
1726
|
+
${this.stops.map((a,r)=>De`<li>
|
|
1588
1727
|
<button type="button" aria-current=${r===e?"true":"false"} @click=${()=>this.goTo(a)}>
|
|
1589
|
-
<span aria-hidden="true">${a.label}</span><span class="sr-only">${
|
|
1728
|
+
<span aria-hidden="true">${a.label}</span><span class="sr-only">${Lr("Go to {name}",{name:a.label})}</span>
|
|
1590
1729
|
</button>
|
|
1591
1730
|
</li>`)}
|
|
1592
1731
|
</ul>`:null}
|
|
1593
1732
|
</div>
|
|
1594
|
-
`}};customElements.define("impakt-scrubber",
|
|
1595
|
-
.h { margin: 0; color: var(--impakt-heading, ${R.textHeading}); font-family: ${R.fontHeading}; font-weight: ${
|
|
1733
|
+
`}};customElements.define("impakt-scrubber",Zi);import{css as vt,html as B,nothing as Me,svg as Lt}from"./atomic-ui.js";import{say as Be,ImpaktElement as _e,focusRing as xn,visuallyHidden as yn,fontSize as Et,fontWeight as na,space as D,spaceAround as Xt,t as R,token as vn,type as kn,iconSvg as wn,toneOf as Ga,TONE as Ir}from"./atomic-ui.js";function Ua(o,t){let e=()=>{o.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(o),()=>i.disconnect()}var Rr=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,sa=vt`.mono { font-family: ${R.fontMono}; font-size: ${Et("xs")}; letter-spacing: 0.04em; }`,Sn=(o,t,e)=>{switch(Math.min(Math.max(o||3,2),6)){case 2:return B`<h2 class=${e}>${t}</h2>`;case 4:return B`<h4 class=${e}>${t}</h4>`;case 5:return B`<h5 class=${e}>${t}</h5>`;case 6:return B`<h6 class=${e}>${t}</h6>`;default:return B`<h3 class=${e}>${t}</h3>`}},oa=vt`
|
|
1734
|
+
.h { margin: 0; color: var(--impakt-heading, ${R.textHeading}); font-family: ${R.fontHeading}; font-weight: ${na("bold")}; letter-spacing: ${R.trackingTight}; text-wrap: balance; }
|
|
1596
1735
|
.body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
|
|
1597
1736
|
.meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
|
|
1598
|
-
.sr-only { ${
|
|
1599
|
-
`,
|
|
1737
|
+
.sr-only { ${yn} }
|
|
1738
|
+
`,ea=class extends _e{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=[..._e.styles,Xt,sa,oa,vt`
|
|
1600
1739
|
:host { display: block; }
|
|
1601
|
-
article { display: flex; flex-direction: column; gap: ${
|
|
1740
|
+
article { display: flex; flex-direction: column; gap: ${D(3)}; }
|
|
1602
1741
|
.media { border-radius: ${R.radiusXl}; overflow: clip; background: ${R.surfaceInset}; }
|
|
1603
1742
|
.media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
|
|
1604
1743
|
impakt-before-after { display: block; }
|
|
1605
|
-
.h { font-size: ${
|
|
1744
|
+
.h { font-size: ${Et("3xl")}; }
|
|
1606
1745
|
.h a { color: inherit; text-decoration: none; }
|
|
1607
1746
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1608
1747
|
.h a:focus-visible { outline: none; box-shadow: ${R.focusShadow}; border-radius: ${R.radiusSm}; }
|
|
1609
|
-
ul { list-style: none; margin: ${
|
|
1610
|
-
li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${
|
|
1748
|
+
ul { list-style: none; margin: ${D(1)} 0 0; padding: 0; display: grid; gap: ${D(1)}; }
|
|
1749
|
+
li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${D(2)}; padding: ${D(1)} ${D(3)}; border-radius: ${R.radius}; }
|
|
1611
1750
|
li[data-change='added'] { background: ${R.successSubtle}; color: ${R.successText}; }
|
|
1612
1751
|
li[data-change='removed'] { background: ${R.dangerSubtle}; color: ${R.dangerText}; }
|
|
1613
1752
|
li[data-change='same'] { color: ${R.textMuted}; }
|
|
1614
|
-
.sign { font-weight: ${
|
|
1615
|
-
`]}wipe(e){let
|
|
1616
|
-
${e?
|
|
1617
|
-
${this.label?
|
|
1618
|
-
${this.heading?
|
|
1619
|
-
${this.text?
|
|
1620
|
-
${(this.items??[]).length?
|
|
1621
|
-
</article>`}},
|
|
1753
|
+
.sign { font-weight: ${na("bold")}; }
|
|
1754
|
+
`]}wipe(e){let i=this.renderRoot.querySelector("impakt-before-after");if(!i)return;if(cancelAnimationFrame(this.raf),Rr()){i.position=e;return}let a=i.position??_a,r=performance.now(),n=m=>m<.5?4*m*m*m:1-Math.pow(-2*m+2,3)/2,s=m=>{let $=Math.min(1,(m-r)/450);i.position=a+(e-a)*n($),$<1&&(this.raf=requestAnimationFrame(s))};this.raf=requestAnimationFrame(s)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf)}render(){let e=this.beforeSrc&&this.afterSrc,i=this.href?B`<a href=${this.href}>${this.heading}</a>`:this.heading,a={added:"+",removed:"\u2212",same:" "},r={added:Be("Added"),removed:Be("Removed"),same:Be("Kept")};return B`<article part="card">
|
|
1755
|
+
${e?B`<div class="media" @pointerenter=${n=>n.pointerType==="mouse"&&this.wipe(0)} @pointerleave=${n=>n.pointerType==="mouse"&&this.wipe(_a)}><impakt-before-after .position=${_a} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${Be("Before")} .afterLabel=${Be("Shipped")} .label=${Be("Compare {name} before and after",{name:this.heading})}></impakt-before-after></div>`:this.afterSrc||this.beforeSrc?B`<div class="media"><img src=${this.afterSrc||this.beforeSrc} alt=${this.afterSrc?this.afterAlt:this.beforeAlt} loading="lazy" /></div>`:Me}
|
|
1756
|
+
${this.label?B`<p class="meta mono">${this.label}</p>`:Me}
|
|
1757
|
+
${this.heading?zn(this.headingLevel,i):Me}
|
|
1758
|
+
${this.text?B`<p class="body">${this.text}</p>`:Me}
|
|
1759
|
+
${(this.items??[]).length?B`<ul class="mono" part="diff">${this.items.map(n=>B`<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>`:Me}
|
|
1760
|
+
</article>`}},ta=class extends _e{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=[..._e.styles,Xt,vt`
|
|
1622
1761
|
:host { display: block; container-type: inline-size; }
|
|
1623
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1762
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${D(12)} ${D(10)}; }
|
|
1624
1763
|
:host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }
|
|
1625
1764
|
:host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1626
1765
|
@container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
1627
|
-
`]}render(){let
|
|
1628
|
-
.label=${
|
|
1629
|
-
.beforeSrc=${
|
|
1630
|
-
.afterSrc=${
|
|
1631
|
-
.items=${
|
|
1766
|
+
`]}render(){let t=typeof location>"u"?"":location.pathname.replace(/\/$/,""),e=(this.items??[]).filter(i=>!i.href||i.href.replace(/\/$/,"")!==t);return B`<ul part="list">${e.map(i=>{let a=i.heading??i.title??"";return B`<li><impakt-release-card
|
|
1767
|
+
.label=${i.label??""} .heading=${a} .text=${i.text??""} .href=${i.href??""}
|
|
1768
|
+
.beforeSrc=${i.beforeSrc??""} .beforeAlt=${i.beforeAlt||Be("{name} as a wireframe",{name:a})}
|
|
1769
|
+
.afterSrc=${i.afterSrc??""} .afterAlt=${i.afterAlt||Be("{name} as it shipped",{name:a})}
|
|
1770
|
+
.items=${i.items??[]} .headingLevel=${this.headingLevel}></impakt-release-card></li>`})}</ul>`}},_a=42;function zn(o,t){let e=Math.min(Math.max(o||3,2),6);return e===2?B`<h2 class="h">${t}</h2>`:e===4?B`<h4 class="h">${t}</h4>`:e===5?B`<h5 class="h">${t}</h5>`:e===6?B`<h6 class="h">${t}</h6>`:B`<h3 class="h">${t}</h3>`}var ia=class extends _e{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=[..._e.styles,Xt,sa,oa,vt`
|
|
1632
1771
|
:host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
|
|
1633
1772
|
ul { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
1634
1773
|
ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
|
|
1635
|
-
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${
|
|
1774
|
+
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${D(6)}; }
|
|
1636
1775
|
.graph { position: relative; }
|
|
1637
|
-
.graph svg { position: absolute; inset-block-start: -${
|
|
1638
|
-
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
1639
|
-
.path { margin: 0 0 ${
|
|
1640
|
-
.h { font-size: ${
|
|
1776
|
+
.graph svg { position: absolute; inset-block-start: -${D(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${D(12)}); overflow: visible; }
|
|
1777
|
+
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${D(4)} ${D(10)}; align-items: start; }
|
|
1778
|
+
.path { margin: 0 0 ${D(2)}; opacity: 0.72; }
|
|
1779
|
+
.h { font-size: ${Et("3xl")}; line-height: 1.05; }
|
|
1641
1780
|
.h a { color: inherit; text-decoration: none; }
|
|
1642
1781
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1643
1782
|
.h a:focus-visible { outline: none; box-shadow: ${R.focusShadow}; border-radius: ${R.radiusSm}; }
|
|
1644
|
-
.detail { display: flex; flex-direction: column; gap: ${
|
|
1783
|
+
.detail { display: flex; flex-direction: column; gap: ${D(3)}; padding-block-start: ${D(1)}; }
|
|
1645
1784
|
.tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
|
|
1646
|
-
.end { position: relative; display: flex; align-items: center; gap: ${
|
|
1785
|
+
.end { position: relative; display: flex; align-items: center; gap: ${D(3)}; padding-block-start: ${D(4)}; }
|
|
1647
1786
|
.end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }
|
|
1648
1787
|
@container (max-width: 44rem) {
|
|
1649
1788
|
li { grid-template-columns: 56px minmax(0, 1fr); }
|
|
1650
1789
|
.graph svg { inline-size: 56px; }
|
|
1651
1790
|
.row { grid-template-columns: minmax(0, 1fr); }
|
|
1652
|
-
.h { font-size: ${
|
|
1791
|
+
.h { font-size: ${Et("2xl")}; }
|
|
1653
1792
|
}
|
|
1654
|
-
/*
|
|
1655
|
-
|
|
1656
|
-
|
|
1793
|
+
/*
|
|
1794
|
+
* The mono look, as the Branches component (12:683) draws it: rows 120px apart, a 1.5px trunk at 10px, and
|
|
1795
|
+
* each branch a fixed S-curve out to 60px by 28px down, straight to 78 and back by 110, so its shape does not
|
|
1796
|
+
* change with the row's height. The path and heading sit on the left and the line and tags in a 490px column
|
|
1797
|
+
* on the right, level with the path; a hairline closes each row 114px down. On a phone (14:989) the trunk is
|
|
1798
|
+
* at 8px, the branch reaches 40px and the words stack in one column.
|
|
1799
|
+
*/
|
|
1800
|
+
:host([look='mono']) { --trunk: currentColor; }
|
|
1801
|
+
:host([look='mono']) ul::before { inset-inline-start: 10px; inline-size: 1.5px; border-radius: 0; }
|
|
1802
|
+
:host([look='mono']) li { grid-template-columns: 86px minmax(0, 1fr); padding-block: 24px 5px; }
|
|
1803
|
+
:host([look='mono']) .graph svg { inset-block-start: -24px; inline-size: 96px; block-size: 110px; }
|
|
1657
1804
|
:host([look='mono']) .graph svg path { stroke-width: 1.5; }
|
|
1658
|
-
:host([look='mono']) .ring { position: absolute; inset-inline-start:
|
|
1659
|
-
:host([look='mono']) .ring.current { background: ${
|
|
1660
|
-
:host([look='mono']) .text {
|
|
1661
|
-
:host([look='mono'])
|
|
1662
|
-
:host([look='mono']) .path { font-size: 0.6875rem; letter-spacing: ${R.trackingWide}; text-transform: uppercase; opacity: 1; color: ${R.textMuted}; }
|
|
1663
|
-
:host([look='mono']) .h { font-size:
|
|
1664
|
-
:host([look='mono']) .
|
|
1665
|
-
:host([look='mono']) .body { color: ${R.textMuted}; opacity: 1; }
|
|
1666
|
-
:host([look='mono']) .
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
:host([look='mono']) .end::
|
|
1670
|
-
|
|
1671
|
-
:host([look='mono']) li:last-child .graph svg { block-size:
|
|
1805
|
+
:host([look='mono']) .ring { position: absolute; inset-inline-start: 55px; inset-block-start: 20px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; background: ${R.surfaceCard}; }
|
|
1806
|
+
:host([look='mono']) .ring.current { background: ${vn("color.accent.default","#ffd43b")}; }
|
|
1807
|
+
:host([look='mono']) .text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 490px); grid-template-areas: 'path detail' 'h detail'; grid-template-rows: auto 1fr; column-gap: ${D(10)}; align-content: start; padding-block-end: 20px; border-block-end: ${R.borderThin} solid ${R.rule}; }
|
|
1808
|
+
:host([look='mono']) .row { display: contents; }
|
|
1809
|
+
:host([look='mono']) .path { grid-area: path; margin: 0 0 4.6px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${R.trackingWide}; text-transform: uppercase; opacity: 1; color: ${R.textMuted}; }
|
|
1810
|
+
:host([look='mono']) .h { grid-area: h; margin: 0; font-size: 2rem; line-height: 1.1; font-weight: ${na("semibold")}; letter-spacing: -0.03em; }
|
|
1811
|
+
:host([look='mono']) .detail { grid-area: detail; gap: 8px; padding: 0; }
|
|
1812
|
+
:host([look='mono']) .body { margin: 0; font-size: 1rem; line-height: 1.45; color: ${R.textMuted}; opacity: 1; }
|
|
1813
|
+
:host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${R.trackingWide}; opacity: 1; color: ${R.textMuted}; }
|
|
1814
|
+
:host([look='mono']) .end { gap: 0; margin: 0; padding-block-start: 8px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${R.trackingWide}; text-transform: uppercase; color: ${R.textMuted}; }
|
|
1815
|
+
/* The trunk runs on, unbroken, into its end dot, which sits on the trunk; the words line up with the rows' words. */
|
|
1816
|
+
:host([look='mono']) .end::before { flex: none; inline-size: 10px; block-size: 10px; margin-inline: 5.75px calc(86px - 15.75px); background: ${R.text}; }
|
|
1817
|
+
:host([look='mono']) .end::after { content: ''; position: absolute; inset-block-start: 0; inset-inline-start: 10px; inline-size: 1.5px; block-size: 15.7px; background: var(--trunk); }
|
|
1818
|
+
:host([look='mono']) li:last-child .graph svg { block-size: 110px; }
|
|
1672
1819
|
@container (max-width: 44rem) {
|
|
1673
1820
|
/* Set on the list, since a container query cannot restyle the container itself. */
|
|
1674
|
-
:host([look='mono']) ul {
|
|
1821
|
+
:host([look='mono']) ul::before { inset-inline-start: 8px; }
|
|
1822
|
+
:host([look='mono']) li { grid-template-columns: 60px minmax(0, 1fr); padding-block: 18px 5px; }
|
|
1823
|
+
:host([look='mono']) .graph svg { inset-block-start: -18px; inline-size: 60px; block-size: 132px; }
|
|
1824
|
+
:host([look='mono']) .ring { inset-inline-start: 35px; inset-block-start: 38px; }
|
|
1825
|
+
:host([look='mono']) .text { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'path' 'h' 'detail'; padding-block-end: 12px; }
|
|
1826
|
+
:host([look='mono']) .h { font-size: 1.5rem; line-height: 1.15; }
|
|
1827
|
+
:host([look='mono']) .detail { margin-block-start: 6px; }
|
|
1828
|
+
:host([look='mono']) .body { font-size: 0.875rem; line-height: 1.43; }
|
|
1675
1829
|
:host([look='mono']) .tags { display: none; }
|
|
1676
|
-
:host([look='mono']) .end::before { margin-inline
|
|
1830
|
+
:host([look='mono']) .end::before { margin-inline: 3.75px calc(60px - 13.75px); }
|
|
1831
|
+
:host([look='mono']) .end::after { inset-inline-start: 8px; }
|
|
1677
1832
|
}
|
|
1833
|
+
:host([look='mono']) .graph .narrow { display: none; }
|
|
1834
|
+
@container (max-width: 44rem) { :host([look='mono']) .graph .wide { display: none; } :host([look='mono']) .graph .narrow { display: inline; } }
|
|
1678
1835
|
@media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }
|
|
1679
1836
|
/* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */
|
|
1680
1837
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -1683,29 +1840,32 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1683
1840
|
:host([shown]) .graph svg { clip-path: inset(0); }
|
|
1684
1841
|
:host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }
|
|
1685
1842
|
}
|
|
1686
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1843
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ua(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let e=this.look==="mono",i=a=>e?Lt`<svg aria-hidden="true" focusable="false">
|
|
1844
|
+
<path class="wide" d="M10.75 0C10.75 16 60.75 6 60.75 28V78C60.75 100 10.75 92 10.75 110" fill="none" stroke=${a} />
|
|
1845
|
+
<path class="narrow" d="M8.75 0C8.75 16 40.75 6 40.75 28V104C40.75 126 8.75 118 8.75 132" fill="none" stroke=${a} />
|
|
1846
|
+
</svg>`:Lt`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
1847
|
+
<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" />
|
|
1848
|
+
<circle cx="60" cy="86" r="8" fill=${a} />
|
|
1849
|
+
</svg>`;return B`<ul part="list">${(this.items??[]).map((a,r)=>{let n=r===this.current,s=B`${a.heading}${n&&this.currentText?B`<span class="sr-only"> (${this.currentText})</span>`:Me}`;return B`<li part="item" style=${`--i:${r}`}>
|
|
1850
|
+
<div class="graph">${i(e?"currentColor":Ga(a.tone,r))}${e?B`<span class=${n?"ring current":"ring"} aria-hidden="true"></span>`:Me}</div>
|
|
1691
1851
|
<div class="text">
|
|
1692
|
-
${a.path?
|
|
1852
|
+
${a.path?B`<p class="path mono">${a.path}</p>`:Me}
|
|
1693
1853
|
<div class="row">
|
|
1694
|
-
${
|
|
1854
|
+
${Sn(this.headingLevel,a.href?B`<a href=${a.href}>${s}</a>`:s,"h")}
|
|
1695
1855
|
<div class="detail">
|
|
1696
|
-
${a.text?
|
|
1697
|
-
${a.tags?.length?
|
|
1856
|
+
${a.text?B`<p class="body">${a.text}</p>`:Me}
|
|
1857
|
+
${a.tags?.length?B`<p class="tags mono">${a.tags.join(" \xB7 ")}</p>`:Me}
|
|
1698
1858
|
</div>
|
|
1699
1859
|
</div>
|
|
1700
1860
|
</div>
|
|
1701
1861
|
</li>`})}</ul>
|
|
1702
|
-
${this.trunk?
|
|
1862
|
+
${this.trunk?B`<p class="end mono" part="trunk">${this.trunk}</p>`:Me}`}},aa=class extends _e{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=[..._e.styles,Xt,sa,oa,vt`
|
|
1703
1863
|
:host { display: block; container-type: inline-size; }
|
|
1704
|
-
.summary { display: inline-flex; align-items: center; gap: ${
|
|
1864
|
+
.summary { display: inline-flex; align-items: center; gap: ${D(2)}; margin: 0 0 ${D(6)}; padding: ${D(1)} ${D(3)}; border-radius: ${R.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
|
|
1705
1865
|
.summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${R.success}; }
|
|
1706
1866
|
/* The rows share one grid, so the figure column fits the widest figure and every row lines up. */
|
|
1707
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${
|
|
1708
|
-
li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${
|
|
1867
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${D(6)}; }
|
|
1868
|
+
li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${D(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
|
|
1709
1869
|
/* Checks run: each tick pops in, 150 ms after the one above. */
|
|
1710
1870
|
@media (prefers-reduced-motion: no-preference) {
|
|
1711
1871
|
.tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }
|
|
@@ -1714,22 +1874,22 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1714
1874
|
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1715
1875
|
/* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */
|
|
1716
1876
|
.tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${R.success}; color: var(--impakt-color-status-success-on, #fff); }
|
|
1717
|
-
.figure { margin: 0; font-family: ${R.fontHeading}; font-weight: ${
|
|
1718
|
-
.label { margin: 0; ${
|
|
1877
|
+
.figure { margin: 0; font-family: ${R.fontHeading}; font-weight: ${na("bold")}; font-size: ${Et("5xl")}; line-height: 1; letter-spacing: ${R.trackingTight}; white-space: nowrap; }
|
|
1878
|
+
.label { margin: 0; ${kn("xl")} }
|
|
1719
1879
|
.status { margin: 0; opacity: 0.72; }
|
|
1720
1880
|
@container (max-width: 40rem) {
|
|
1721
1881
|
ul { grid-template-columns: 28px minmax(0, 1fr); }
|
|
1722
|
-
li { row-gap: ${
|
|
1882
|
+
li { row-gap: ${D(1)}; }
|
|
1723
1883
|
.label, .status { grid-column: 2; }
|
|
1724
|
-
.figure { font-size: ${
|
|
1884
|
+
.figure { font-size: ${Et("4xl")}; }
|
|
1725
1885
|
}
|
|
1726
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1727
|
-
<ul part="list">${(this.items??[]).map((
|
|
1728
|
-
<span class="tick" aria-hidden="true">${
|
|
1729
|
-
<p class="figure">${e(
|
|
1730
|
-
<p class="label">${
|
|
1731
|
-
${
|
|
1732
|
-
</li>`)}</ul>`}},
|
|
1886
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ua(this,()=>this.run())}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}run(){if(Rr())return;let e=this.items??[],i=performance.now(),a=r=>{this.counted=e.map((n,s)=>Math.min(1,Math.max(0,(r-i-s*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 B`${i}`;let s=1-Math.pow(1-r,3);return B`<span aria-hidden="true">${Math.round(Number(n[1])*s)}${n[2]}</span><span class="sr-only">${i}</span>`};return B`${this.summary?B`<p class="summary mono" part="summary">${this.summary}</p>`:Me}
|
|
1887
|
+
<ul part="list">${(this.items??[]).map((i,a)=>B`<li part="item" style=${`--i:${a}`}>
|
|
1888
|
+
<span class="tick" aria-hidden="true">${wn("check","16px")}</span>
|
|
1889
|
+
<p class="figure">${e(i.figure,a)}</p>
|
|
1890
|
+
<p class="label">${i.label}</p>
|
|
1891
|
+
${i.status?B`<p class="status mono">${i.status}</p>`:B`<span></span>`}
|
|
1892
|
+
</li>`)}</ul>`}},ra=class extends _e{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=[..._e.styles,xn,Xt,sa,oa,vt`
|
|
1733
1893
|
:host { display: block; }
|
|
1734
1894
|
/* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */
|
|
1735
1895
|
figure { margin: 0; overflow-x: auto; border-radius: ${R.radiusSm}; }
|
|
@@ -1743,140 +1903,138 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1743
1903
|
svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }
|
|
1744
1904
|
:host([shown]) svg { clip-path: inset(0 -40px 0 0); }
|
|
1745
1905
|
}
|
|
1746
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1747
|
-
<svg viewBox="0 0 ${1200} ${
|
|
1748
|
-
<line x1=${24} y1=${
|
|
1749
|
-
<path d="M${1168} ${
|
|
1750
|
-
${
|
|
1751
|
-
<path d="M${
|
|
1752
|
-
<circle cx=${
|
|
1753
|
-
<text x=${
|
|
1906
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ua(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let r=this.span>0?this.span:20,n=I=>24+Math.min(Math.max(I,0),r)/r*1116,s=this.lanes??[],m=52,$=40+(s.length+1)*m+40,f=40,Z=I=>f+(I+1)*m,ye=[];for(let I=0;I<=r;I+=Math.max(1,this.every||2))ye.push(I);let x=I=>s.findIndex(ee=>I>=ee.from&&I<=ee.to),J=I=>(this.marks??[]).some(ee=>x(ee.at)===I),_=this.unit||Be("wk"),Ye=this.label||Be("Project timeline"),He=s.map(I=>`${I.label}: ${Be("{unit} {from} to {to}",{unit:_,from:I.from,to:I.to})}`).join("; ");return B`<figure part="figure" tabindex="0">
|
|
1907
|
+
<svg viewBox="0 0 ${1200} ${$}" role="img" aria-label=${`${Ye}. ${He}${this.release?`. ${Be("{name} at {unit} {at}",{name:this.release,unit:_,at:this.releaseAt})}`:""}`}>
|
|
1908
|
+
<line x1=${24} y1=${f} x2=${1180} y2=${f} stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
1909
|
+
<path d="M${1168} ${f-7} L${1180} ${f} L${1168} ${f+7}" fill="none" stroke="currentColor" stroke-width="3" />
|
|
1910
|
+
${s.map((I,ee)=>{let wt=Ga(I.tone,ee),Ne=Z(ee),mt=n(I.from),It=n(I.to),Rt=Math.min(36,(It-mt)/3);return Lt`<g>
|
|
1911
|
+
<path d="M${mt} ${f} C${mt} ${(f+Ne)/2} ${mt+Rt} ${Ne} ${mt+Rt*1.6} ${Ne} L${It-Rt*1.6} ${Ne} C${It-Rt} ${Ne} ${It} ${(f+Ne)/2} ${It} ${f}" fill="none" stroke=${wt} stroke-width="3" />
|
|
1912
|
+
<circle cx=${mt} cy=${f} r="7" fill=${wt} />
|
|
1913
|
+
<text x=${mt+Rt*1.6} y=${J(ee)?Ne-10:Ne+20} class="halo" style=${`fill:${wt}`}>${I.label}</text>
|
|
1754
1914
|
</g>`})}
|
|
1755
|
-
${(this.marks??[]).map(
|
|
1756
|
-
${this.release?
|
|
1757
|
-
<circle cx=${
|
|
1758
|
-
<rect x=${
|
|
1759
|
-
<text x=${
|
|
1760
|
-
</g>`:
|
|
1761
|
-
${
|
|
1915
|
+
${(this.marks??[]).map(I=>{let ee=x(I.at),wt=ee>=0?Z(ee):f,Ne=ee>=0?Ga(s[ee].tone,ee):"currentColor";return Lt`<g><circle cx=${n(I.at)} cy=${wt} r="6" fill="var(--impakt-color-surface-card, #fff)" stroke=${Ne} stroke-width="3" /><text x=${n(I.at)} y=${wt+22} text-anchor="middle" class="faint">${I.label}</text></g>`})}
|
|
1916
|
+
${this.release?Lt`<g>
|
|
1917
|
+
<circle cx=${n(this.releaseAt)} cy=${f} r="10" fill=${Ir.success} />
|
|
1918
|
+
<rect x=${n(this.releaseAt)-8} y=${f-36} rx="4" width=${this.release.length*7.6+16} height="22" fill=${Ir.success} />
|
|
1919
|
+
<text x=${n(this.releaseAt)} y=${f-21} style="fill:var(--impakt-color-surface-card, #fff)">${this.release}</text>
|
|
1920
|
+
</g>`:Me}
|
|
1921
|
+
${ye.map(I=>Lt`<text x=${n(I)} y=${$-10} text-anchor="middle" class="faint">${_} ${I}</text>`)}
|
|
1762
1922
|
</svg>
|
|
1763
|
-
</figure>`}};customElements.define("impakt-release-card",
|
|
1764
|
-
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1765
|
-
font-size: 0.6875rem;
|
|
1766
|
-
font-weight: 400;
|
|
1767
|
-
line-height: 1.4;
|
|
1768
|
-
letter-spacing: 0.06em;
|
|
1769
|
-
text-transform: uppercase;
|
|
1770
|
-
`,Ye=(n,i=3)=>Math.min(Math.max(Number(n)||i,1),6),Br=n=>String(n).padStart(2,"0");var Da={note:["01","Discover","Note"],wireframe:["02","Design low-fi","Wireframe"],component:["03","Design hi-fi","Component"],code:["04","Build","Code"],live:["05","Launch","Live"]},aa=class extends ie{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=[...ie.styles,Xe`
|
|
1923
|
+
</figure>`}};customElements.define("impakt-release-card",ea);customElements.define("impakt-release-list",ta);customElements.define("impakt-branch-list",ia);customElements.define("impakt-check-list",aa);customElements.define("impakt-branch-timeline",ra);import{css as at,html as T,nothing as ie}from"./atomic-ui.js";import{ImpaktElement as le,focusRing as Tn,fontWeight as Ge,say as Hr,space as H,spaceAround as Mn,t as M,token as Cn}from"./atomic-ui.js";var Va={note:["01","Discover","Note"],wireframe:["02","Design low-fi","Wireframe"],component:["03","Design hi-fi","Component"],code:["04","Build","Code"],live:["05","Launch","Live"]},la=class extends le{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=[...le.styles,at`
|
|
1771
1924
|
:host { display: inline-block; vertical-align: middle; }
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
.index { color: ${
|
|
1775
|
-
.phase { color: ${
|
|
1776
|
-
.label { color: ${
|
|
1777
|
-
@media (prefers-color-scheme: dark) { .tag { border-color: ${gt}; } }
|
|
1925
|
+
/* The Stage tag component (8:320): G2 Mono S, 11px medium capitals at 0.06em, 10px apart, 6 by 10 inside, on the raised ink with a hairline. Its corner is a brand shape, 3px for Impakt. */
|
|
1926
|
+
.tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; background: ${Tr}; border: 1px solid ${Ke}; border-radius: ${Cn("stage-tag.radius","0px")}; ${Q}; font-weight: ${Ge("medium")}; white-space: nowrap; }
|
|
1927
|
+
.index { color: ${xt}; }
|
|
1928
|
+
.phase { color: ${Qe}; }
|
|
1929
|
+
.label { color: ${Ze}; }
|
|
1778
1930
|
@media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }
|
|
1779
|
-
`]}render(){let
|
|
1780
|
-
>${e?
|
|
1781
|
-
>`}},
|
|
1782
|
-
:host { display: block; container-type: inline-size; color: ${
|
|
1783
|
-
|
|
1931
|
+
`]}render(){let t=this.stage&&this.stage in Va?Va[this.stage]:void 0,e=this.index||t?.[0]||"",i=this.phase||(t?Hr(t[1]):""),a=this.label||(t?Hr(t[2]):"");return!e&&!i&&!a?T``:T`<span class="tag" part="tag" aria-hidden=${this.announce?ie:"true"}
|
|
1932
|
+
>${e?T`<span class="index" part="index">${e}</span>`:ie}${i?T`<span class="phase" part="phase">${i}</span>`:ie}${a?T`<span class="label" part="label">${a}</span>`:ie}</span
|
|
1933
|
+
>`}},ca=class extends le{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"},aside:{type:Boolean,reflect:!0}}}constructor(){super(),this.aside=!1,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=[...le.styles,Mn,at`
|
|
1934
|
+
:host { display: block; container-type: inline-size; color: ${M.text}; }
|
|
1935
|
+
/* The label row is the label's own 20px (12:712, 10:642), or the stage tag's 29px beside it (9:296). */
|
|
1936
|
+
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: ${H(2)} ${H(4)}; }
|
|
1937
|
+
.top.tagged { min-block-size: 29px; }
|
|
1784
1938
|
/* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */
|
|
1785
|
-
.label { margin: 0; font-family: ${
|
|
1786
|
-
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${
|
|
1787
|
-
.heading { margin: 0; font-family: ${
|
|
1939
|
+
.label { margin: 0; font-family: ${M.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${M.textMuted}; }
|
|
1940
|
+
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${H(10)}; row-gap: ${H(6)}; align-items: end; margin-block-start: ${H(6)}; }
|
|
1941
|
+
.heading { margin: 0; font-family: ${M.fontHeading}; font-weight: ${Ge("semibold")}; color: var(--impakt-color-text-heading, ${M.text}); text-wrap: balance; overflow-wrap: anywhere; }
|
|
1788
1942
|
: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; }
|
|
1789
1943
|
: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; }
|
|
1790
1944
|
/* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */
|
|
1791
1945
|
:host([size='xl']) .heading { font-size: clamp(3.25rem, 1.2128rem + 9.315cqi, 7.5rem); line-height: var(--impakt-type-display-xl-line-height, 1); letter-spacing: var(--impakt-type-display-xl-tracking, -0.05em); }
|
|
1792
|
-
|
|
1793
|
-
.
|
|
1946
|
+
/* The lead in G2 Body M, 16px at 1.45, 24px under the heading and at most 480px wide (9:385). */
|
|
1947
|
+
.lead { margin: ${H(6)} 0 0; max-inline-size: 30rem; font-size: 1rem; line-height: 1.45; color: ${M.textMuted}; }
|
|
1948
|
+
.side { display: grid; gap: ${H(6)}; justify-items: end; }
|
|
1794
1949
|
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
1795
|
-
.body.aside { align-items: center; }
|
|
1950
|
+
:host([aside]) .body, .body.aside { align-items: center; }
|
|
1796
1951
|
.side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }
|
|
1797
1952
|
.side:not(:has(.lead)) { align-self: center; }
|
|
1798
1953
|
::slotted([slot='aside']) { display: block; max-inline-size: 100%; }
|
|
1799
1954
|
@container (max-width: 47.99rem) {
|
|
1800
|
-
|
|
1955
|
+
/* On a phone the heading is 20px under the label row and the lead 16px under the heading (14:984, 14:804). */
|
|
1956
|
+
.body { grid-template-columns: minmax(0, 1fr); margin-block-start: ${H(5)}; }
|
|
1957
|
+
.main .lead { margin-block-start: ${H(4)}; }
|
|
1801
1958
|
.side { justify-items: stretch; }
|
|
1802
1959
|
.side .lead { inline-size: auto; }
|
|
1803
1960
|
}
|
|
1804
|
-
`]}render(){let
|
|
1805
|
-
<div class
|
|
1806
|
-
${this.label?
|
|
1807
|
-
<slot name="tag">${this.stage?
|
|
1961
|
+
`]}render(){let t=T`<p class="lead" part="lead"><slot name="lead">${this.lead}</slot></p>`,e=!!this.lead||this.hasSlot("lead"),i=T`<slot name="heading">${this.heading}</slot>`,a=Number(this.level)===1?T`<h1 class="heading" part="heading">${i}</h1>`:T`<h2 class="heading" part="heading">${i}</h2>`,r=this.leadPosition==="side";return T`<header part="head">
|
|
1962
|
+
<div class=${this.stage||this.hasSlot("tag")?"top tagged":"top"}>
|
|
1963
|
+
${this.label?T`<p class="label" part="label"><span aria-hidden="true"># </span>${this.label}</p>`:T`<span></span>`}
|
|
1964
|
+
<slot name="tag" @slotchange=${()=>this.requestUpdate()}>${this.stage?T`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>`:ie}</slot>
|
|
1808
1965
|
</div>
|
|
1809
1966
|
<div class=${this.hasSlot("aside")?"body aside":"body"}>
|
|
1810
|
-
<div class="main">${a}${e&&!r?
|
|
1811
|
-
<div class="side">${e&&r?
|
|
1967
|
+
<div class="main">${a}${e&&!r?t:ie}</div>
|
|
1968
|
+
<div class="side">${e&&r?t:ie}<slot name="aside" @slotchange=${this.asideChanged}></slot></div>
|
|
1812
1969
|
</div>
|
|
1813
|
-
</header>`}hasSlot(
|
|
1970
|
+
</header>`}asideChanged(t){this.aside=t.target.assignedElements().length>0}hasSlot(t){let e=this.children;return e?Array.from(e).some(i=>i.getAttribute("slot")===t):!1}},da=class extends le{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=[...le.styles,at`
|
|
1814
1971
|
:host { display: block; block-size: 100%; }
|
|
1815
|
-
article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${
|
|
1972
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${H(6)}; padding: ${H(6)}; background: ${M.surfaceCard}; color: ${M.text}; border: 1px solid ${M.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
1816
1973
|
.top { display: flex; align-items: center; justify-content: space-between; }
|
|
1817
|
-
|
|
1974
|
+
/* The Service card component (8:358): the number in G2 Mono M, 13px with no tracking; the name, line, tags and link 10px apart. */
|
|
1975
|
+
.number { font-family: ${M.fontMono}; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0; }
|
|
1818
1976
|
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }
|
|
1819
|
-
.foot { display: grid; gap: ${
|
|
1820
|
-
.heading { margin: 0; font-family: ${
|
|
1977
|
+
.foot { display: grid; gap: ${H(2.5)}; }
|
|
1978
|
+
.heading { margin: 0; font-family: ${M.fontHeading}; font-size: 1.5rem; font-weight: ${Ge("semibold")}; line-height: 1.15; letter-spacing: -0.025em; }
|
|
1821
1979
|
.heading a { color: inherit; text-decoration: none; }
|
|
1822
1980
|
.heading a::after { content: ''; position: absolute; inset: 0; }
|
|
1823
1981
|
.heading a:focus-visible { outline: none; }
|
|
1824
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
1825
|
-
.text { margin: 0; font-size: 0.
|
|
1826
|
-
.tags { margin: ${
|
|
1827
|
-
.more {
|
|
1828
|
-
article:has(a):hover, article:focus-within, :host([featured]) article { background: ${
|
|
1829
|
-
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${
|
|
1830
|
-
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${
|
|
1982
|
+
.heading a:focus-visible::after { box-shadow: ${M.focusShadow}; }
|
|
1983
|
+
.text { margin: 0; font-size: 0.875rem; line-height: 1.4; color: ${M.textMuted}; }
|
|
1984
|
+
.tags { margin: 0; ${Q}; font-weight: ${Ge("medium")}; color: ${M.textMuted}; }
|
|
1985
|
+
.more { ${Q}; font-weight: ${Ge("medium")}; }
|
|
1986
|
+
article:has(a):hover, article:focus-within, :host([featured]) article { background: ${fe}; color: ${Qe}; border-color: ${fe}; }
|
|
1987
|
+
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${Ze}; }
|
|
1988
|
+
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${xt}; }
|
|
1831
1989
|
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
1832
1990
|
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
1833
|
-
`]}render(){let
|
|
1991
|
+
`]}render(){let t=it(this.headingLevel);return T`<article part="card">
|
|
1834
1992
|
<div class="top" aria-hidden="true">
|
|
1835
1993
|
<span class="number" part="number">${this.number}</span>
|
|
1836
1994
|
<span class="dot" part="dot"></span>
|
|
1837
1995
|
</div>
|
|
1838
1996
|
<div class="foot">
|
|
1839
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
1840
|
-
${this.href?
|
|
1997
|
+
<div class="heading" part="heading" role="heading" aria-level=${t}>
|
|
1998
|
+
${this.href?T`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}
|
|
1841
1999
|
</div>
|
|
1842
|
-
${this.text?
|
|
1843
|
-
${this.tags?
|
|
1844
|
-
${this.href&&this.linkText?
|
|
2000
|
+
${this.text?T`<p class="text" part="text">${this.text}</p>`:ie}
|
|
2001
|
+
${this.tags?T`<p class="tags" part="tags">${this.tags}</p>`:ie}
|
|
2002
|
+
${this.href&&this.linkText?T`<span class="more" part="more" aria-hidden="true">${this.linkText} →</span>`:ie}
|
|
1845
2003
|
</div>
|
|
1846
|
-
</article>`}},
|
|
2004
|
+
</article>`}},pa=class extends le{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=[...le.styles,at`
|
|
1847
2005
|
:host { display: inline-block; position: relative; pointer-events: none; }
|
|
1848
2006
|
.cursor { display: inline-flex; align-items: flex-start; }
|
|
1849
2007
|
svg { display: block; flex: none; }
|
|
1850
|
-
.arrow { fill: ${
|
|
1851
|
-
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${
|
|
1852
|
-
:host([variant='outline']) .name { background: ${
|
|
1853
|
-
:host([variant='accent']) .name { background: ${
|
|
2008
|
+
.arrow { fill: ${fe}; stroke: ${Qe}; }
|
|
2009
|
+
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${Q}; font-weight: ${Ge("medium")}; white-space: nowrap; background: ${fe}; color: ${Qe}; border: 1px solid ${fe}; }
|
|
2010
|
+
:host([variant='outline']) .name { background: ${M.surfaceCard}; color: ${M.text}; border-color: ${M.text}; }
|
|
2011
|
+
:host([variant='accent']) .name { background: ${be}; color: ${$e}; border-color: ${$e}; }
|
|
1854
2012
|
:host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }
|
|
1855
2013
|
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }
|
|
1856
2014
|
@media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }
|
|
1857
2015
|
@media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }
|
|
1858
|
-
`]}render(){return
|
|
2016
|
+
`]}render(){return T`<span class="cursor" part="cursor" aria-hidden="true">
|
|
1859
2017
|
<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>
|
|
1860
|
-
${this.name?
|
|
1861
|
-
</span>`}},
|
|
2018
|
+
${this.name?T`<span class="name" part="name">${this.name}</span>`:ie}
|
|
2019
|
+
</span>`}},ma=class extends le{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=[...le.styles,at`
|
|
1862
2020
|
:host { display: inline-block; max-inline-size: 18rem; }
|
|
1863
|
-
.note { display: inline-flex; align-items: center; gap: ${
|
|
2021
|
+
.note { display: inline-flex; align-items: center; gap: ${H(2)}; }
|
|
1864
2022
|
:host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }
|
|
1865
2023
|
:host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }
|
|
1866
|
-
p { margin: 0; font-family: var(--impakt-font-family-hand, ${
|
|
1867
|
-
svg { flex: none; color: ${
|
|
2024
|
+
p { margin: 0; font-family: var(--impakt-font-family-hand, ${M.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${M.textMuted}; }
|
|
2025
|
+
svg { flex: none; color: ${M.textMuted}; }
|
|
1868
2026
|
:host([arrow='left']) svg { transform: scaleX(-1); }
|
|
1869
2027
|
:host([arrow='down']) svg { transform: rotate(90deg); }
|
|
1870
2028
|
:host([arrow='up']) svg { transform: rotate(-90deg); }
|
|
1871
2029
|
@media (forced-colors: active) { p, svg { color: CanvasText; } }
|
|
1872
|
-
`]}render(){let
|
|
1873
|
-
:host { display: block; color: ${
|
|
1874
|
-
dl { margin: 0; display: grid; gap: ${
|
|
1875
|
-
:host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${
|
|
1876
|
-
:host([layout='columns']) .fact { border-block-start: 1px solid ${
|
|
1877
|
-
dt { ${
|
|
1878
|
-
dd { margin: ${
|
|
1879
|
-
:host([layout='columns']) dd { margin-block-start: ${
|
|
2030
|
+
`]}render(){let t=this.arrow&&this.arrow!=="none"?T`<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>`:ie;return T`<div class="note" part="note" aria-hidden=${this.decorative?"true":ie}><p part="text"><slot>${this.text}</slot></p>${t}</div>`}},ha=class extends le{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=[...le.styles,Tn,at`
|
|
2031
|
+
:host { display: block; color: ${M.text}; }
|
|
2032
|
+
dl { margin: 0; display: grid; gap: ${H(5)}; }
|
|
2033
|
+
:host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${H(5)}; row-gap: ${H(6)}; }
|
|
2034
|
+
:host([layout='columns']) .fact { border-block-start: 1px solid ${M.text}; padding-block-start: ${H(4)}; }
|
|
2035
|
+
dt { ${Q}; color: ${M.textMuted}; }
|
|
2036
|
+
dd { margin: ${H(2)} 0 0; font-family: ${M.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }
|
|
2037
|
+
:host([layout='columns']) dd { margin-block-start: ${H(3)}; }
|
|
1880
2038
|
.sm { font-size: 1rem; }
|
|
1881
2039
|
.md { font-size: 1.125rem; }
|
|
1882
2040
|
.lg { font-size: 1.5rem; letter-spacing: -0.01em; }
|
|
@@ -1884,205 +2042,208 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1884
2042
|
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
|
|
1885
2043
|
a:hover { text-decoration-thickness: 2px; }
|
|
1886
2044
|
@media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }
|
|
1887
|
-
`]}render(){return this.items.length?
|
|
1888
|
-
${this.items.map(
|
|
1889
|
-
<dt part="label">${
|
|
1890
|
-
<dd part="value" class=${
|
|
2045
|
+
`]}render(){return this.items.length?T`<dl part="list" aria-label=${this.label||ie}>
|
|
2046
|
+
${this.items.map(t=>T`<div class="fact" part="fact">
|
|
2047
|
+
<dt part="label">${t.label}</dt>
|
|
2048
|
+
<dd part="value" class=${t.size??this.size}>${t.href?T`<a href=${t.href}>${t.value}</a>`:t.value}</dd>
|
|
1891
2049
|
</div>`)}
|
|
1892
|
-
</dl>`:
|
|
1893
|
-
:host { display: block; container-type: inline-size; color: ${
|
|
1894
|
-
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${
|
|
1895
|
-
li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${
|
|
1896
|
-
.n { font-family: ${
|
|
1897
|
-
.heading { margin: 0; font-family: ${
|
|
1898
|
-
.text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${
|
|
2050
|
+
</dl>`:T``}},ua=class extends le{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=[...le.styles,at`
|
|
2051
|
+
:host { display: block; container-type: inline-size; color: ${M.text}; }
|
|
2052
|
+
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${M.text}; }
|
|
2053
|
+
li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${H(10)}; align-items: center; padding-block: ${H(6)}; border-block-end: 1px solid ${M.rule}; }
|
|
2054
|
+
.n { font-family: ${M.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${M.textMuted}; }
|
|
2055
|
+
.heading { margin: 0; font-family: ${M.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${Ge("semibold")}; line-height: 1.15; letter-spacing: -0.025em; }
|
|
2056
|
+
.text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${M.textMuted}; }
|
|
1899
2057
|
@container (max-width: 47.99rem) {
|
|
1900
|
-
li { grid-template-columns: minmax(0, 1fr); row-gap: ${
|
|
2058
|
+
li { grid-template-columns: minmax(0, 1fr); row-gap: ${H(2)}; }
|
|
1901
2059
|
}
|
|
1902
2060
|
@media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }
|
|
1903
|
-
`]}render(){if(!this.items.length)return
|
|
1904
|
-
${this.items.map((
|
|
1905
|
-
<span class="n" aria-hidden="true">${
|
|
1906
|
-
<div class="heading" role="heading" aria-level=${
|
|
1907
|
-
${
|
|
2061
|
+
`]}render(){if(!this.items.length)return T``;let t=it(this.headingLevel),e=Number.isFinite(Number(this.start))?Number(this.start):1;return T`<ol part="list" role="list" start=${e} aria-label=${this.label||ie}>
|
|
2062
|
+
${this.items.map((i,a)=>T`<li part="item">
|
|
2063
|
+
<span class="n" aria-hidden="true">${Mr(e+a)}</span>
|
|
2064
|
+
<div class="heading" role="heading" aria-level=${t} part="heading">${i.heading}</div>
|
|
2065
|
+
${i.text?T`<p class="text" part="text">${i.text}</p>`:T`<span></span>`}
|
|
1908
2066
|
</li>`)}
|
|
1909
|
-
</ol>`}},
|
|
1910
|
-
:host { display: block; color: ${
|
|
1911
|
-
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${
|
|
1912
|
-
section { border-block-start: 1px solid ${
|
|
1913
|
-
.heading { margin: 0; ${
|
|
1914
|
-
ul { margin: ${
|
|
1915
|
-
li { font-family: ${
|
|
2067
|
+
</ol>`}},ga=class extends le{static{this.properties={columns:{type:Array},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.columns=[],this.headingLevel=3}static{this.styles=[...le.styles,at`
|
|
2068
|
+
:host { display: block; color: ${M.text}; }
|
|
2069
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${H(8)} ${H(5)}; }
|
|
2070
|
+
section { border-block-start: 1px solid ${M.text}; padding-block-start: ${H(4)}; }
|
|
2071
|
+
.heading { margin: 0; ${Q}; color: ${M.textMuted}; }
|
|
2072
|
+
ul { margin: ${H(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${H(2)}; }
|
|
2073
|
+
li { font-family: ${M.fontHeading}; font-size: 1.5rem; font-weight: ${Ge("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
1916
2074
|
@media (forced-colors: active) { section { border-color: CanvasText; } }
|
|
1917
|
-
`]}render(){if(!this.columns.length)return
|
|
1918
|
-
${this.columns.map(e=>
|
|
1919
|
-
<div class="heading" role="heading" aria-level=${
|
|
1920
|
-
<ul role="list" part="list">${(e.items??[]).map(
|
|
2075
|
+
`]}render(){if(!this.columns.length)return T``;let t=it(this.headingLevel);return T`<div class="grid" part="grid">
|
|
2076
|
+
${this.columns.map(e=>T`<section part="column">
|
|
2077
|
+
<div class="heading" role="heading" aria-level=${t} part="heading">${e.heading}</div>
|
|
2078
|
+
<ul role="list" part="list">${(e.items??[]).map(i=>T`<li part="item">${i}</li>`)}</ul>
|
|
1921
2079
|
</section>`)}
|
|
1922
|
-
</div>`}},
|
|
2080
|
+
</div>`}},ba=class extends le{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=[...le.styles,at`
|
|
1923
2081
|
:host { display: block; block-size: 100%; container-type: inline-size; }
|
|
1924
|
-
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${
|
|
1925
|
-
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${
|
|
1926
|
-
.hours { margin: 0; ${
|
|
1927
|
-
.tag { margin: 0; padding: 3px 6px; ${
|
|
1928
|
-
.name { margin: ${
|
|
1929
|
-
.region { margin: ${
|
|
1930
|
-
.text { margin: ${
|
|
1931
|
-
@container (max-width: 22rem) { article { padding: ${
|
|
2082
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${H(2)}; padding: ${H(8)}; background: ${M.surfaceCard}; color: ${M.text}; border: 1px solid ${M.text}; }
|
|
2083
|
+
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${H(2)}; }
|
|
2084
|
+
.hours { margin: 0; ${Q}; color: ${M.textMuted}; }
|
|
2085
|
+
.tag { margin: 0; padding: 3px 6px; ${Q}; font-weight: ${Ge("medium")}; background: ${be}; color: ${$e}; }
|
|
2086
|
+
.name { margin: ${H(2)} 0 0; font-family: ${M.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${Ge("semibold")}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
|
|
2087
|
+
.region { margin: ${H(2)} 0 0; font-size: 1rem; line-height: 1.4; }
|
|
2088
|
+
.text { margin: ${H(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${M.textMuted}; }
|
|
2089
|
+
@container (max-width: 22rem) { article { padding: ${H(5)}; } }
|
|
1932
2090
|
@media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }
|
|
1933
|
-
`]}render(){let
|
|
1934
|
-
${this.hours||this.tag?
|
|
1935
|
-
<div class="name" role="heading" aria-level=${
|
|
1936
|
-
${this.region?
|
|
1937
|
-
${this.text?
|
|
1938
|
-
</article>`}};customElements.define("impakt-stage-tag",
|
|
1939
|
-
|
|
1940
|
-
|
|
2091
|
+
`]}render(){let t=it(this.headingLevel);return T`<article part="card">
|
|
2092
|
+
${this.hours||this.tag?T`<div class="top">${this.hours?T`<p class="hours" part="hours">${this.hours}</p>`:T`<span></span>`}${this.tag?T`<p class="tag" part="tag">${this.tag}</p>`:ie}</div>`:ie}
|
|
2093
|
+
<div class="name" role="heading" aria-level=${t} part="name">${this.name}</div>
|
|
2094
|
+
${this.region?T`<p class="region" part="region">${this.region}</p>`:ie}
|
|
2095
|
+
${this.text?T`<p class="text" part="text">${this.text}</p>`:ie}
|
|
2096
|
+
</article>`}};customElements.define("impakt-stage-tag",la);customElements.define("impakt-section-head",ca);customElements.define("impakt-service-card",da);customElements.define("impakt-cursor",pa);customElements.define("impakt-hand-note",ma);customElements.define("impakt-facts",ha);customElements.define("impakt-numbered-list",ua);customElements.define("impakt-column-list",ga);customElements.define("impakt-office-card",ba);import{css as Qt,html as X,nothing as xe,svg as An}from"./atomic-ui.js";import{ImpaktElement as Ve,fontWeight as Jt,say as Nr,space as pe,t as Ue,visuallyHidden as Ln}from"./atomic-ui.js";var qr=40,Bt=40,fa=class extends Ve{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=[...Ve.styles,Qt`
|
|
2097
|
+
/* On a band, the band's own pattern shows through and the "main" label hangs above the drawing (10:483); outside one the line draws its own ink panel, with room in it for that label. */
|
|
2098
|
+
:host { display: block; container-type: inline-size; background: var(--impakt-band-panel, ${Gt}); color: ${Ee}; }
|
|
2099
|
+
.visual { display: none; position: relative; margin-block-start: var(--impakt-band-panel-inset, 32px); }
|
|
1941
2100
|
.visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
|
|
1942
|
-
.visual path { fill: none; stroke: ${
|
|
1943
|
-
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${
|
|
1944
|
-
|
|
2101
|
+
.visual path { fill: none; stroke: ${Ee}; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
|
|
2102
|
+
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${Ee}; background: ${Gt}; transform: translate(-50%, -50%); }
|
|
2103
|
+
/* A flagged point is filled in the accent (10:483); the current one is filled and 2px larger, so it is not told by colour alone. */
|
|
2104
|
+
.ring.flagged, .ring.current { background: ${be}; }
|
|
2105
|
+
.ring.current { inline-size: 12px; block-size: 12px; }
|
|
1945
2106
|
/* Each label keeps to the space between its point and the next, wrapping rather than running into its neighbour. */
|
|
1946
|
-
.vlabel { position: absolute; transform: translateX(-50%); ${
|
|
1947
|
-
.lineLabel { position: absolute; inset-inline-start: 0; ${
|
|
1948
|
-
.flag { display: inline-block; padding: 4px 8px; ${
|
|
2107
|
+
.vlabel { position: absolute; transform: translateX(-50%); ${Q}; color: ${et}; inline-size: max-content; max-inline-size: var(--slot); text-align: center; text-wrap: balance; }
|
|
2108
|
+
.lineLabel { position: absolute; inset-inline-start: 0; ${Q}; color: ${et}; }
|
|
2109
|
+
.flag { display: inline-block; padding: 4px 8px; ${Q}; font-weight: ${Jt("medium")}; background: ${be}; color: ${$e}; white-space: nowrap; }
|
|
1949
2110
|
.visual .flag { position: absolute; transform: translate(-50%, -100%); }
|
|
1950
2111
|
|
|
1951
|
-
ol { margin: 0; padding: ${
|
|
1952
|
-
li { position: relative; padding: 0 0 ${
|
|
1953
|
-
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 ${
|
|
1954
|
-
li[aria-current]::before { background: ${
|
|
1955
|
-
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: ${
|
|
1956
|
-
.rlabel { ${
|
|
1957
|
-
li .flag { margin-inline-start: ${
|
|
2112
|
+
ol { margin: 0; padding: ${pe(6)} ${pe(4)}; list-style: none; }
|
|
2113
|
+
li { position: relative; padding: 0 0 ${pe(5)} 28px; }
|
|
2114
|
+
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 ${Ee}; background: ${Gt}; }
|
|
2115
|
+
li[aria-current]::before { background: ${be}; }
|
|
2116
|
+
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: ${Ee}; }
|
|
2117
|
+
.rlabel { ${Q}; font-size: 0.75rem; color: ${Ee}; }
|
|
2118
|
+
li .flag { margin-inline-start: ${pe(2)}; }
|
|
1958
2119
|
|
|
1959
2120
|
@container (min-width: 60rem) {
|
|
1960
2121
|
.visual { display: block; }
|
|
1961
|
-
ol { ${
|
|
2122
|
+
ol { ${Ln} }
|
|
1962
2123
|
}
|
|
1963
2124
|
@media (forced-colors: active) {
|
|
1964
2125
|
.visual path { stroke: CanvasText; }
|
|
1965
2126
|
.ring, li::before { border-color: CanvasText; background: Canvas; }
|
|
1966
|
-
.ring.current, li[aria-current]::before { background: Highlight; }
|
|
2127
|
+
.ring.current, .ring.flagged, li[aria-current]::before { background: Highlight; }
|
|
1967
2128
|
li::after { background: CanvasText; }
|
|
1968
2129
|
.flag { border: 1px solid CanvasText; }
|
|
1969
2130
|
}
|
|
1970
|
-
`]}render(){let
|
|
1971
|
-
<svg viewBox="0 0 1000 ${r}" preserveAspectRatio="none" focusable="false">${
|
|
1972
|
-
${this.lineLabel?
|
|
1973
|
-
${
|
|
1974
|
-
${
|
|
1975
|
-
${
|
|
2131
|
+
`]}render(){let t=this.nodes??[];if(!t.length)return X``;let e=t.length,i=x=>Math.max(0,Math.min(4,Number(x.depth)||0)),a=Math.max(...t.map(i)),r=Math.round(Bt+a*qr+55),n=t.map((x,J)=>{let _=Number(x.at);return x.at!=null&&Number.isFinite(_)?Math.max(0,Math.min(1,_)):(J+.5)/e}),s=t.map((x,J)=>({x:n[J]*1e3,y:Bt+i(x)*qr})),m=`M0 ${s[0].y} L${s[0].x} ${s[0].y}`;for(let x=1;x<e;x++){let J=s[x-1],_=s[x],Ye=(He,I)=>{let ee=(He.x+I.x)/2;return` C${ee} ${He.y} ${ee} ${I.y} ${I.x} ${I.y}`};if(J.y===_.y)m+=` L${_.x} ${_.y}`;else if(J.y>Bt&&_.y>Bt){let He={x:(J.x+_.x)/2,y:Bt};m+=Ye(J,He)+Ye(He,_)}else m+=Ye(J,_)}m+=` L1000 ${s[e-1].y}`;let $=x=>`${n[x]*100}%`,f=t.some(x=>x.at!=null),Z=x=>{let J=Math.min(x>0?n[x]-n[x-1]:1,x<e-1?n[x+1]-n[x]:1);return f?`calc(${J*100}cqi + 0.25rem)`:`calc(${100/e}cqi - 0.5rem)`},ye=t.filter(x=>x.label||x.flag);return X`<div class="visual" part="drawing" aria-hidden="true" style="block-size:${r}px">
|
|
2132
|
+
<svg viewBox="0 0 1000 ${r}" preserveAspectRatio="none" focusable="false">${An`<path d=${m} />`}</svg>
|
|
2133
|
+
${this.lineLabel?X`<span class="lineLabel" style="inset-block-start:${Bt-66}px">${this.lineLabel}</span>`:xe}
|
|
2134
|
+
${t.map((x,J)=>{let _=s[J].y,Ye=i(x)===0,He=ee=>`inset-inline-start:${$(J)};${ee};--slot:${Z(J)}`,I=x.label?Ye?x.flag?xe:X`<span class="vlabel" style=${He(`inset-block-end:${r-_+12}px`)}>${x.label}</span>`:X`<span class="vlabel" style=${He(`inset-block-start:${_+14}px`)}>${x.label}</span>`:xe;return X`<span class="ring${x.current?" current":""}${x.flag?" flagged":""}" style="inset-inline-start:${$(J)};inset-block-start:${_}px"></span>
|
|
2135
|
+
${I}
|
|
2136
|
+
${x.flag?X`<span class="flag" style="inset-inline-start:${$(J)};inset-block-start:${_-15}px">${x.flag}</span>`:xe}`})}
|
|
1976
2137
|
</div>
|
|
1977
2138
|
<ol part="list" role="list" aria-label=${this.label||xe}>
|
|
1978
|
-
${
|
|
1979
|
-
<span class="rlabel">${
|
|
2139
|
+
${ye.map(x=>X`<li part="item" aria-current=${x.current?"step":xe}>
|
|
2140
|
+
<span class="rlabel">${x.label}</span>${x.flag?X`<span class="flag">${x.flag}</span>`:xe}
|
|
1980
2141
|
</li>`)}
|
|
1981
|
-
</ol>`}}
|
|
2142
|
+
</ol>`}},$a=class extends Ve{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=[...Ve.styles,Qt`
|
|
1982
2143
|
:host { display: block; }
|
|
1983
2144
|
ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; }
|
|
1984
|
-
li { box-sizing: border-box; min-block-size: 150px; padding: ${
|
|
1985
|
-
li.highlight { background: ${
|
|
1986
|
-
.day { margin: 0; ${
|
|
1987
|
-
.heading { margin: ${
|
|
1988
|
-
.text { margin: ${
|
|
1989
|
-
li.highlight :is(.day, .text) { color: ${
|
|
2145
|
+
li { box-sizing: border-box; min-block-size: 150px; padding: ${pe(5)}; background: ${Ut}; border: 1px solid ${tt}; color: ${Ee}; }
|
|
2146
|
+
li.highlight { background: ${be}; border-color: ${be}; color: ${$e}; }
|
|
2147
|
+
.day { margin: 0; ${Q}; color: ${et}; }
|
|
2148
|
+
.heading { margin: ${pe(2)} 0 0; font-family: ${Ue.fontHeading}; font-size: 2rem; font-weight: ${Jt("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2149
|
+
.text { margin: ${pe(3)} 0 0; font-size: 0.875rem; line-height: 1.45; color: ${et}; }
|
|
2150
|
+
li.highlight :is(.day, .text) { color: ${$e}; }
|
|
1990
2151
|
@media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }
|
|
1991
|
-
`]}render(){if(!this.days?.length)return
|
|
1992
|
-
${this.days.map(e=>
|
|
2152
|
+
`]}render(){if(!this.days?.length)return X``;let t=it(this.headingLevel);return X`<ol part="list" role="list" aria-label=${this.label||xe}>
|
|
2153
|
+
${this.days.map(e=>X`<li part="day" class=${e.highlight?"highlight":""}>
|
|
1993
2154
|
<p class="day">${e.day}</p>
|
|
1994
|
-
<div class="heading" role="heading" aria-level=${
|
|
1995
|
-
${e.text?
|
|
2155
|
+
<div class="heading" role="heading" aria-level=${t}>${e.heading}</div>
|
|
2156
|
+
${e.text?X`<p class="text">${e.text}</p>`:xe}
|
|
1996
2157
|
</li>`)}
|
|
1997
|
-
</ol>`}},
|
|
2158
|
+
</ol>`}},xa=class extends Ve{static{this.properties={label:{type:String},text:{type:String}}}constructor(){super(),this.label="",this.text=""}static{this.styles=[...Ve.styles,Qt`
|
|
1998
2159
|
:host { display: block; }
|
|
1999
|
-
.panel { padding: ${
|
|
2000
|
-
.label { margin: 0 0 ${
|
|
2001
|
-
.text { margin: 0; max-inline-size: 26em; font-family: ${
|
|
2002
|
-
@media (prefers-color-scheme: dark) { .panel { border-color: ${
|
|
2003
|
-
@media (max-width: 30rem) { .panel { padding: ${
|
|
2160
|
+
.panel { padding: ${pe(8)} ${pe(8)} ${pe(10)}; background: ${fe}; color: ${Qe}; border: 1px solid ${fe}; }
|
|
2161
|
+
.label { margin: 0 0 ${pe(4)}; ${Q}; font-weight: ${Jt("medium")}; color: ${xt}; }
|
|
2162
|
+
.text { margin: 0; max-inline-size: 26em; font-family: ${Ue.fontHeading}; font-size: clamp(1.5rem, 1rem + 2vw, 2rem); font-weight: ${Jt("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
2163
|
+
@media (prefers-color-scheme: dark) { .panel { border-color: ${Ke}; } }
|
|
2164
|
+
@media (max-width: 30rem) { .panel { padding: ${pe(6)}; } }
|
|
2004
2165
|
@media (forced-colors: active) { .panel { border-color: CanvasText; } }
|
|
2005
|
-
`]}render(){return
|
|
2006
|
-
${this.label?
|
|
2166
|
+
`]}render(){return X`<div class="panel" part="panel">
|
|
2167
|
+
${this.label?X`<p class="label" part="label">${this.label}</p>`:xe}
|
|
2007
2168
|
<p class="text" part="text"><slot>${this.text}</slot></p>
|
|
2008
|
-
</div>`}},
|
|
2169
|
+
</div>`}},ya=class extends Ve{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=[...Ve.styles,Qt`
|
|
2009
2170
|
:host { display: block; block-size: 100%; }
|
|
2010
|
-
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${
|
|
2011
|
-
.top { display: flex; justify-content: space-between; align-items: center; gap: ${
|
|
2012
|
-
.number { font-family: ${
|
|
2013
|
-
.impact { margin: 0; padding: 3px 7px; ${
|
|
2014
|
-
:host([impact='high']) .impact { background: ${
|
|
2015
|
-
.statement { margin: 0; font-family: ${
|
|
2016
|
-
.metric { margin: 0; ${
|
|
2171
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${pe(4)}; padding: ${pe(6)}; background: ${Ue.surfaceCard}; color: ${Ue.text}; border: 1px solid ${Ue.text}; }
|
|
2172
|
+
.top { display: flex; justify-content: space-between; align-items: center; gap: ${pe(2)}; flex-wrap: wrap; min-block-size: 22px; }
|
|
2173
|
+
.number { font-family: ${Ue.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }
|
|
2174
|
+
.impact { margin: 0; padding: 3px 7px; ${Q}; font-weight: ${Jt("medium")}; border: 1px solid ${Ue.text}; color: ${Ue.text}; }
|
|
2175
|
+
:host([impact='high']) .impact { background: ${be}; color: ${$e}; border-color: ${$e}; }
|
|
2176
|
+
.statement { margin: 0; font-family: ${Ue.fontHeading}; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }
|
|
2177
|
+
.metric { margin: 0; ${Q}; color: ${Ue.textMuted}; }
|
|
2017
2178
|
@media (forced-colors: active) { article, .impact { border-color: CanvasText; } }
|
|
2018
|
-
`]}render(){let
|
|
2019
|
-
${this.number||e?
|
|
2179
|
+
`]}render(){let t={high:"High impact",medium:"Medium impact",low:"Low impact"},e=this.impactLabel||(this.impact&&t[this.impact]?Nr(t[this.impact]):"");return X`<article part="card">
|
|
2180
|
+
${this.number||e?X`<div class="top">
|
|
2020
2181
|
<span class="number" part="number">${this.number}</span>
|
|
2021
|
-
${e?
|
|
2182
|
+
${e?X`<p class="impact" part="impact">${e}</p>`:xe}
|
|
2022
2183
|
</div>`:xe}
|
|
2023
|
-
${this.statement?
|
|
2024
|
-
${this.metric?
|
|
2025
|
-
</article>`}},
|
|
2184
|
+
${this.statement?X`<p class="statement" part="statement">${this.statement}</p>`:xe}
|
|
2185
|
+
${this.metric?X`<p class="metric" part="metric">${Nr("Metric")} · ${this.metric}</p>`:xe}
|
|
2186
|
+
</article>`}},va=class extends Ve{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=[...Ve.styles,Qt`
|
|
2026
2187
|
:host { display: block; }
|
|
2027
|
-
.frame { border: 1px solid ${
|
|
2028
|
-
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${
|
|
2029
|
-
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${
|
|
2030
|
-
.dot:first-child { background: ${
|
|
2031
|
-
.caption { margin-inline-start: ${
|
|
2188
|
+
.frame { border: 1px solid ${tt}; background: ${Gt}; color: ${Ee}; }
|
|
2189
|
+
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${pe(3)}; background: ${Ut}; border-block-end: 1px solid ${tt}; overflow: hidden; }
|
|
2190
|
+
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${tt}; }
|
|
2191
|
+
.dot:first-child { background: ${be}; }
|
|
2192
|
+
.caption { margin-inline-start: ${pe(1.5)}; ${Q}; color: ${et}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2032
2193
|
.canvas { position: relative; }
|
|
2033
|
-
.canvas.empty { background-image: linear-gradient(to right, ${
|
|
2194
|
+
.canvas.empty { background-image: linear-gradient(to right, ${tt} 1px, transparent 1px), linear-gradient(to bottom, ${tt} 1px, transparent 1px); background-size: 28px 28px; }
|
|
2034
2195
|
::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }
|
|
2035
2196
|
@media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
2036
|
-
`]}render(){return
|
|
2197
|
+
`]}render(){return X`<div class="frame" part="frame">
|
|
2037
2198
|
<div class="bar" part="bar" aria-hidden="true">
|
|
2038
2199
|
<span class="dot"></span><span class="dot"></span><span class="dot"></span>
|
|
2039
|
-
${this.caption?
|
|
2200
|
+
${this.caption?X`<span class="caption" part="caption">${this.caption}</span>`:xe}
|
|
2040
2201
|
</div>
|
|
2041
2202
|
<div class="canvas ${this.filled?"":"empty"}" part="canvas" style=${this.filled?"":`aspect-ratio: ${this.ratio||"16 / 9"}`}>
|
|
2042
2203
|
<slot @slotchange=${this.onSlot}></slot>
|
|
2043
2204
|
</div>
|
|
2044
|
-
</div>`}onSlot(
|
|
2205
|
+
</div>`}onSlot(t){this.filled=t.target.assignedElements().length>0}};customElements.define("impakt-process-line",fa);customElements.define("impakt-week-strip",$a);customElements.define("impakt-callout",xa);customElements.define("impakt-hypothesis-card",ya);customElements.define("impakt-browser-frame",va);import{css as En,html as kt,nothing as Kt}from"./atomic-ui.js";import{ImpaktElement as jr,fontWeight as Pr,space as Zt,t as Re}from"./atomic-ui.js";var ka=class extends jr{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=[...jr.styles,En`
|
|
2045
2206
|
:host { display: block; container-type: inline-size; }
|
|
2046
2207
|
ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }
|
|
2047
2208
|
li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }
|
|
2048
2209
|
li:not(:first-child) { flex-basis: 56px; }
|
|
2049
|
-
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${
|
|
2050
|
-
:host([on-ink]) .arrow { color: ${
|
|
2210
|
+
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${Re.text}; }
|
|
2211
|
+
:host([on-ink]) .arrow { color: ${Ee}; }
|
|
2051
2212
|
.arrow svg { display: block; }
|
|
2052
|
-
.via { font-size: 0.75rem; line-height: 1.2; color: ${
|
|
2053
|
-
:host([on-ink]) .via { color: ${
|
|
2054
|
-
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${
|
|
2055
|
-
:host([size='lg']) .box { padding: ${
|
|
2056
|
-
.box.soft { background: ${
|
|
2057
|
-
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${
|
|
2058
|
-
.box.ink { background: ${
|
|
2059
|
-
.box.accent { background: ${
|
|
2060
|
-
.label { margin: 0 0 ${
|
|
2061
|
-
.text { margin: ${
|
|
2213
|
+
.via { font-size: 0.75rem; line-height: 1.2; color: ${Re.textMuted}; }
|
|
2214
|
+
:host([on-ink]) .via { color: ${et}; }
|
|
2215
|
+
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${Zt(4)} ${Zt(5)}; border: 1px solid ${Re.text}; background: ${Re.surfaceCard}; color: ${Re.text}; }
|
|
2216
|
+
:host([size='lg']) .box { padding: ${Zt(6)}; }
|
|
2217
|
+
.box.soft { background: ${Re.surfaceSubtle}; }
|
|
2218
|
+
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${Ut}; border-color: ${tt}; color: ${Ee}; }
|
|
2219
|
+
.box.ink { background: ${fe}; border-color: ${Ke}; color: ${Qe}; }
|
|
2220
|
+
.box.accent { background: ${be}; border-color: ${be}; color: ${$e}; }
|
|
2221
|
+
.label { margin: 0 0 ${Zt(2)}; ${Q}; color: ${Re.textMuted}; }
|
|
2222
|
+
.text { margin: ${Zt(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${Re.textMuted}; }
|
|
2062
2223
|
/* On the soft fill the muted words are drawn a step toward the ink, so they read at 4.5:1 for a brand whose soft fill is its own tint. */
|
|
2063
|
-
.soft :is(.label, .text) { color: color-mix(in srgb, ${
|
|
2064
|
-
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${
|
|
2065
|
-
.ink :is(.label, .text) { color: ${
|
|
2066
|
-
.accent :is(.label, .text) { color: ${
|
|
2067
|
-
.heading { margin: 0; font-family: ${
|
|
2068
|
-
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${
|
|
2224
|
+
.soft :is(.label, .text) { color: color-mix(in srgb, ${Re.textMuted} 80%, ${Re.text}); }
|
|
2225
|
+
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${et}; }
|
|
2226
|
+
.ink :is(.label, .text) { color: ${Ze}; }
|
|
2227
|
+
.accent :is(.label, .text) { color: ${$e}; }
|
|
2228
|
+
.heading { margin: 0; font-family: ${Re.fontHeading}; font-size: 1.125rem; font-weight: ${Pr("medium")}; line-height: 1.25; letter-spacing: -0.01em; }
|
|
2229
|
+
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${Pr("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2069
2230
|
@container (max-width: 47.99rem) {
|
|
2070
2231
|
ol, li { flex-direction: column; }
|
|
2071
2232
|
.arrow { inline-size: auto; block-size: 48px; flex-direction: row; }
|
|
2072
2233
|
.arrow svg { transform: rotate(90deg); }
|
|
2073
2234
|
}
|
|
2074
2235
|
@media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }
|
|
2075
|
-
`]}render(){if(!this.steps?.length)return
|
|
2076
|
-
${this.steps.map((e,
|
|
2077
|
-
${
|
|
2236
|
+
`]}render(){if(!this.steps?.length)return kt``;let t=it(this.headingLevel);return kt`<ol part="list" role="list" aria-label=${this.label||Kt}>
|
|
2237
|
+
${this.steps.map((e,i)=>kt`<li part="step">
|
|
2238
|
+
${i>0?kt`<span class="arrow" part="arrow">
|
|
2078
2239
|
<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>
|
|
2079
|
-
${e.connector?
|
|
2080
|
-
</span>`:
|
|
2240
|
+
${e.connector?kt`<span class="via">${e.connector}</span>`:Kt}
|
|
2241
|
+
</span>`:Kt}
|
|
2081
2242
|
<div class="box ${e.tone??"card"}" part="box">
|
|
2082
|
-
${e.label?
|
|
2083
|
-
<div class="heading" role="heading" aria-level=${
|
|
2084
|
-
${e.text?
|
|
2243
|
+
${e.label?kt`<p class="label">${e.label}</p>`:Kt}
|
|
2244
|
+
<div class="heading" role="heading" aria-level=${t}>${e.heading}</div>
|
|
2245
|
+
${e.text?kt`<p class="text">${e.text}</p>`:Kt}
|
|
2085
2246
|
</div>
|
|
2086
2247
|
</li>`)}
|
|
2087
|
-
</ol>`}};customElements.define("impakt-flow",
|
|
2248
|
+
</ol>`}};customElements.define("impakt-flow",ka);export{_i as ImpaktAffordabilityCalculator,si as ImpaktAnnouncement,Ni as ImpaktBeforeAfter,ia as ImpaktBranchList,ra as ImpaktBranchTimeline,va as ImpaktBrowserFrame,xa as ImpaktCallout,di as ImpaktCardGrid,Si as ImpaktCarousel,aa as ImpaktCheckList,ga as ImpaktColumnList,Ot as ImpaktContactBlock,Ai as ImpaktCtaBanner,pa as ImpaktCursor,Vi as ImpaktEstimator,ha as ImpaktFacts,$i as ImpaktFaq,ai as ImpaktFeatureList,ka as ImpaktFlow,zi as ImpaktGallery,ma as ImpaktHandNote,ii as ImpaktHero,ki as ImpaktHighlight,ya as ImpaktHypothesisCard,gi as ImpaktJourneyButton,ji as ImpaktLocationCard,Ti as ImpaktLogoCloud,Ci as ImpaktMediaSplit,Hi as ImpaktMortgageCalculator,Ei as ImpaktNewsletter,ua as ImpaktNumberedList,yi as ImpaktOffer,ba as ImpaktOfficeCard,Fi as ImpaktPlanComparison,vi as ImpaktPostCard,fa as ImpaktProcessLine,ri as ImpaktQuote,Wi as ImpaktRegulatoryNotice,ea as ImpaktReleaseCard,ta as ImpaktReleaseList,Li as ImpaktReviews,Ki as ImpaktScene,Zi as ImpaktScrubber,oi as ImpaktSearchBar,ca as ImpaktSectionHead,da as ImpaktServiceCard,Ji as ImpaktSiteFooter,Yi as ImpaktSiteHeader,xi as ImpaktSiteMenu,Ri as ImpaktSitePlan,la as ImpaktStageTag,Di as ImpaktStampDutyCalculator,ni as ImpaktStat,fi as ImpaktStatRow,Mi as ImpaktSteps,qi as ImpaktStickyBar,Pt as ImpaktVideo,$a as ImpaktWeekStrip,Xi as ImpaktWordmark,bi as ImpaktWorkList,Nt as JOURNEY_STAGES,lt as SDLT,Va as STAGE_WORDS,fr as embedOf,Dt as estimate,dr as gallerySpan,mr as monthlyPayment,Ha as phaseWeeks,$r as stampDuty};
|
|
2088
2249
|
//# sourceMappingURL=atomic-ui-blocks.js.map
|