@atomic-ui/blocks 0.13.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/custom-elements.json +2961 -9573
- package/dist/{chunk-B6I3GVJ5.js → chunk-3G3NP4UC.js} +9 -4
- package/dist/chunk-3G3NP4UC.js.map +1 -0
- package/dist/{chunk-H262HKSL.js → chunk-7OFH762N.js} +53 -23
- package/dist/chunk-7OFH762N.js.map +1 -0
- package/dist/{chunk-WTVF3JRL.js → chunk-GDATDR2Q.js} +24 -7
- package/dist/chunk-GDATDR2Q.js.map +1 -0
- package/dist/chunk-GQ2I44OU.js +226 -0
- package/dist/chunk-GQ2I44OU.js.map +1 -0
- package/dist/chunk-HISF6RYK.js +199 -0
- package/dist/chunk-HISF6RYK.js.map +1 -0
- package/dist/{chunk-53V2GY6L.js → chunk-LJGOTYDJ.js} +76 -69
- package/dist/chunk-LJGOTYDJ.js.map +1 -0
- package/dist/{chunk-WIVKJL64.js → chunk-OBBPBN4S.js} +73 -164
- package/dist/chunk-OBBPBN4S.js.map +1 -0
- package/dist/chunk-OHXEZPBB.js +109 -0
- package/dist/chunk-OHXEZPBB.js.map +1 -0
- package/dist/{chunk-FNGN2F6Y.js → chunk-VOONXP5H.js} +30 -59
- package/dist/chunk-VOONXP5H.js.map +1 -0
- package/dist/chunk-XSKGWT2D.js +84 -0
- package/dist/chunk-XSKGWT2D.js.map +1 -0
- package/dist/components/changelog.d.ts +0 -288
- package/dist/components/changelog.js +3 -12
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +8 -1
- package/dist/components/g2-case.js +1 -1
- package/dist/components/g2-site.d.ts +49 -41
- package/dist/components/g2-site.js +1 -3
- package/dist/components/journey.d.ts +13 -2
- package/dist/components/journey.js +1 -1
- package/dist/components/marketing.d.ts +0 -283
- package/dist/components/marketing.js +3 -13
- package/dist/components/organisms.d.ts +0 -489
- package/dist/components/organisms.js +3 -19
- package/dist/components/selling.d.ts +0 -255
- package/dist/components/selling.js +3 -15
- package/dist/components/site.d.ts +8 -53
- package/dist/components/site.js +3 -5
- package/dist/components/studio.d.ts +42 -98
- package/dist/components/studio.js +1 -3
- package/dist/index.d.ts +9 -13
- package/dist/index.js +25 -103
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +832 -1622
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/dist/standalone/index.html +18 -26
- package/package.json +3 -3
- package/specimen/index.html +18 -26
- package/dist/chunk-53V2GY6L.js.map +0 -1
- package/dist/chunk-B6I3GVJ5.js.map +0 -1
- package/dist/chunk-FNGN2F6Y.js.map +0 -1
- package/dist/chunk-H262HKSL.js.map +0 -1
- package/dist/chunk-IT2NA25D.js +0 -571
- package/dist/chunk-IT2NA25D.js.map +0 -1
- package/dist/chunk-MMADM6OW.js +0 -782
- package/dist/chunk-MMADM6OW.js.map +0 -1
- package/dist/chunk-NHWD2LUR.js +0 -255
- package/dist/chunk-NHWD2LUR.js.map +0 -1
- package/dist/chunk-R7SSIE2E.js +0 -362
- package/dist/chunk-R7SSIE2E.js.map +0 -1
- package/dist/chunk-WIVKJL64.js.map +0 -1
- package/dist/chunk-WTVF3JRL.js.map +0 -1
- package/dist/chunk-XB6FD4SF.js +0 -438
- package/dist/chunk-XB6FD4SF.js.map +0 -1
- package/dist/chunk-YXMXLVK7.js +0 -230
- package/dist/chunk-YXMXLVK7.js.map +0 -1
- package/dist/chunk-ZD75GU6J.js +0 -75
- package/dist/chunk-ZD75GU6J.js.map +0 -1
- package/dist/chunk-ZODL5HD4.js +0 -535
- package/dist/chunk-ZODL5HD4.js.map +0 -1
- package/dist/components/card-grid.d.ts +0 -72
- package/dist/components/card-grid.js +0 -7
- package/dist/components/card-grid.js.map +0 -1
- package/dist/components/property.d.ts +0 -389
- package/dist/components/property.js +0 -17
- package/dist/components/property.js.map +0 -1
- package/dist/components/scene.d.ts +0 -138
- package/dist/components/scene.js +0 -7
- package/dist/components/scene.js.map +0 -1
- package/dist/components/scrubber.d.ts +0 -86
- package/dist/components/scrubber.js +0 -7
- package/dist/components/scrubber.js.map +0 -1
|
@@ -1,181 +1,60 @@
|
|
|
1
|
-
/* @atomic-ui/blocks version 0.
|
|
2
|
-
import"./atomic-ui.js";import{css as
|
|
3
|
-
.h { margin: 0; color: ${
|
|
4
|
-
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${
|
|
5
|
-
.body { margin: 0; line-height: ${
|
|
6
|
-
`,
|
|
1
|
+
/* @atomic-ui/blocks version 0.15.0, standalone. Load atomic-ui.js from @atomic-ui/ui first, from the same folder. */
|
|
2
|
+
import"./atomic-ui.js";import{css as vi,html as Ee,nothing as st}from"./atomic-ui.js";import{ImpaktElement as $i,fontSize as ki,fontWeight as Zt,lineHeight as yi,space as oe,spaceAround as aa,t as O,token as na,type as ra,iconSvg as oa}from"./atomic-ui.js";var sa=(l,i,e)=>Ee`<div class=${e} role="heading" aria-level=${l}>${i}</div>`,la=vi`
|
|
3
|
+
.h { margin: 0; color: ${O.textHeading}; font-family: ${O.fontHeading}; font-weight: ${Zt("bold")}; line-height: ${yi("tight")}; }
|
|
4
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${O.brand})); ${ra("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${O.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${Zt("semibold")}); letter-spacing: ${O.trackingWide}; text-transform: uppercase; }
|
|
5
|
+
.body { margin: 0; line-height: ${yi("normal")}; max-inline-size: 65ch; }
|
|
6
|
+
`,lt=class extends $i{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=[...$i.styles,aa,la,vi`
|
|
7
7
|
:host { display: block; container-type: inline-size; }
|
|
8
|
-
|
|
9
|
-
.hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
|
|
10
|
-
.words { display: flex; flex-direction: column; gap: ${y(4)}; }
|
|
11
|
-
:host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }
|
|
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
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${y(3)} ${y(4)}; align-items: center; margin-block-start: ${y(2)}; }
|
|
16
|
-
:host([align='center']) .actions { justify-content: center; }
|
|
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
|
-
@container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }
|
|
19
|
-
/* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */
|
|
20
|
-
.cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${y(32)} max(${y(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${y(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }
|
|
21
|
-
.cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
|
|
22
|
-
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }
|
|
23
|
-
.cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
|
|
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
|
-
.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)}; ${rt("sm")} font-weight: ${qe("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${S.radiusXl}; }
|
|
27
|
-
.finder { position: relative; z-index: 1; margin-block-start: ${y(12)}; }
|
|
28
|
-
.cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }
|
|
29
|
-
.cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }
|
|
30
|
-
@container (max-width: 64rem) { .chip { display: none; } }
|
|
31
|
-
@container (max-width: 30rem) { .finder { display: none; } }
|
|
32
|
-
@container (max-width: 48rem) { .finder { margin-block-start: ${y(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${y(32)} ${y(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }
|
|
33
|
-
`]}render(){if(this.treatment==="cover"&&this.imageSrc)return j`<div class="cover" part="hero">
|
|
34
|
-
${this.ratingText?j`<div class="chip-line"><div class="chip">${ti("star","20px")}${this.ratingText}</div></div>`:ce}
|
|
35
|
-
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
36
|
-
<div class="words">
|
|
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
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="finder"><slot name="search"></slot></div>
|
|
43
|
-
</div>`;let t=!!this.imageSrc&&this.align!=="center";return j`<div class="hero ${t?"pictured":""}" part="hero">
|
|
44
|
-
<div class="words">
|
|
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
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
49
|
-
</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
|
-
:host { display: block; container-type: inline-size; }
|
|
53
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${y(8)} ${y(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
8
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${oe(8)} ${oe(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
54
9
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
55
10
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
56
|
-
li { display: flex; flex-direction: column; gap: ${
|
|
57
|
-
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${
|
|
58
|
-
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${
|
|
59
|
-
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${
|
|
11
|
+
li { display: flex; flex-direction: column; gap: ${oe(2)}; }
|
|
12
|
+
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${oe(4)}; align-items: start; }
|
|
13
|
+
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${oe(1)}; }
|
|
14
|
+
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${O.radiusLg}; background: ${O.brandSubtle}; color: ${O.brand}; margin-block-end: ${oe(2)}; }
|
|
60
15
|
:host([layout='inline']) .icon { margin: 0; }
|
|
61
|
-
.h { font-size: ${
|
|
62
|
-
.body { color: ${
|
|
16
|
+
.h { font-size: ${ki("lg")}; }
|
|
17
|
+
.body { color: ${O.text}; }
|
|
63
18
|
/* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */
|
|
64
|
-
:host([look='ruled']) li { gap: ${
|
|
19
|
+
:host([look='ruled']) li { gap: ${oe(3)}; padding-block-start: ${oe(5)}; border-block-start: ${O.borderThin} solid ${O.text}; }
|
|
65
20
|
: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: ${
|
|
68
|
-
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${
|
|
21
|
+
:host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${Zt("semibold")}; letter-spacing: -0.02em; line-height: 1.2; }
|
|
22
|
+
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${O.textMuted}; }
|
|
23
|
+
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${oe(3)}; }
|
|
69
24
|
/* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */
|
|
70
|
-
:host([look='numbered']) ul { gap: ${
|
|
71
|
-
:host([look='numbered']) li { gap: ${
|
|
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: ${
|
|
25
|
+
:host([look='numbered']) ul { gap: ${oe(3)}; }
|
|
26
|
+
:host([look='numbered']) li { gap: ${oe(4)}; padding: ${oe(6)}; background: ${O.surfaceCard}; border: ${O.borderThin} solid ${O.text}; border-radius: ${O.radiusSm}; }
|
|
27
|
+
.top { display: flex; align-items: center; justify-content: space-between; font-family: ${O.fontMono}; font-size: ${ki("sm")}; color: ${O.text}; }
|
|
28
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${O.text}; }
|
|
29
|
+
.dot.attention { background: ${na("color.accent.default","#ffd43b")}; box-shadow: inset 0 0 0 1px ${O.text}; }
|
|
75
30
|
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
76
31
|
@media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }
|
|
77
32
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
78
33
|
@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>`}},
|
|
84
|
-
:host { display: block; }
|
|
85
|
-
figure { margin: 0; display: flex; flex-direction: column; gap: ${y(4)}; max-inline-size: 48rem; }
|
|
86
|
-
:host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }
|
|
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
|
-
blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
|
|
90
|
-
figcaption { display: flex; align-items: center; gap: ${y(3)}; }
|
|
91
|
-
img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
|
|
92
|
-
.name { font-weight: ${qe("semibold")}; }
|
|
93
|
-
.detail { color: ${S.textMuted}; font-size: ${nt("sm")}; }
|
|
94
|
-
`]}render(){return j`<figure part="figure">
|
|
95
|
-
<blockquote part="quote">${this.quote}</blockquote>
|
|
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
|
-
:host { display: block; }
|
|
99
|
-
.stat { display: flex; flex-direction: column; gap: ${y(1)}; }
|
|
100
|
-
:host([align='center']) .stat { align-items: center; text-align: center; }
|
|
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
|
-
:host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
|
|
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
|
-
: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)}; ${rt("sm")} text-align: center; color: ${S.onBrand}; background: ${S.brand}; }
|
|
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: ${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
|
-
:host { display: block; container-type: inline-size; }
|
|
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
|
-
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${y(1)}; padding: ${y(1.5)} ${y(5)}; }
|
|
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
|
-
@container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }
|
|
121
|
-
@container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${y(2)}; } .field { flex: none; } }
|
|
122
|
-
`]}submit(t){let e=new FormData(t.currentTarget),i={};e.forEach((a,r)=>{a!==""&&(i[r]=String(a))}),this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{values:i},bubbles:!0,composed:!0})),this.action||t.preventDefault()}render(){return 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
|
-
</select></div>`})}
|
|
126
|
-
<button type="submit">${this.buttonText}</button>
|
|
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
|
-
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
129
|
-
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
130
|
-
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
131
|
-
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
132
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${Ht(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
133
|
-
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
134
|
-
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
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: ${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
|
-
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
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
|
-
.h a::after { content: ''; position: absolute; inset: 0; }
|
|
143
|
-
li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
144
|
-
.body { margin: 0; line-height: ${Ja("normal")}; }
|
|
145
|
-
/* A marketing badge: monospace capitals at 11px in a 1px outline. */
|
|
146
|
-
.badge { align-self: flex-start; padding: 2px ${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
|
-
@media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }
|
|
148
|
-
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${Ht(1)}; color: ${me.link}; font-weight: ${Sa("semibold")}; }
|
|
149
|
-
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
150
|
-
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
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
|
-
<div class="words">
|
|
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
|
-
</div>
|
|
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">
|
|
34
|
+
`]}render(){let i=this.look==="numbered";return Ee`<ul part="list">${(this.items??[]).map((e,t)=>Ee`<li part="item">
|
|
35
|
+
${i?Ee`<div class="top" aria-hidden="true"><span>${String(t+1).padStart(2,"0")}</span><span class=${e.attention?"dot attention":"dot"}></span></div>`:st}
|
|
36
|
+
${e.icon&&this.look!=="ruled"&&!i?Ee`<span class="icon">${oa(e.icon,"24px")}</span>`:st}
|
|
37
|
+
<div class="words">${sa(this.headingLevel,Ee`${e.heading}${i&&e.attention?Ee`<span class="sr"> (${e.attention})</span>`:st}`,"h")}${e.text?Ee`<p class="body">${e.text}</p>`:st}</div>
|
|
38
|
+
</li>`)}</ul>`}};customElements.define("impakt-feature-list",lt);import{css as ca,html as ae,nothing as wi,unsafeCSS as y}from"./atomic-ui.js";import{ImpaktElement as zi,R as ct,focusRing as da,fontWeight as ye,say as ve,space as Si,t as w,token as Kt}from"./atomic-ui.js";var Ve=["note","wireframe","component","code","live"],dt=l=>Ve.includes(l),ei=l=>Ve.indexOf(l),pa=ae`<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
39
|
<path d="M0 6h18M13 1l5 5-5 5" />
|
|
161
|
-
</svg>`,
|
|
40
|
+
</svg>`,ha=ae`<svg class="pointer" viewBox="0 0 16 20" width="16" height="20" aria-hidden="true" focusable="false">
|
|
162
41
|
<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>`,
|
|
42
|
+
</svg>`,pt=(l,i,e)=>y(`--jt: var(--impakt-motion-journey-${l}-duration, ${i}ms); --je: var(--impakt-motion-journey-${l}-easing, ${e});`),ii=[{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]}],N="--impakt-journey-p",ai=8,mt=l=>`--impakt-journey-g${l}`,ht;function Ti(){if(ht!==void 0)return ht;let l=typeof CSS<"u"?CSS:void 0;if(!l?.registerProperty)return ht=!1;for(let i of[N,...Array.from({length:ai},(e,t)=>mt(t))])try{l.registerProperty({name:i,syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}return ht=!0}function ma([l,i,e,t]){let a=(n,o,r)=>3*n*(1-r)**2*r+3*o*(1-r)*r**2+r**3;return n=>{if(n<=0)return 0;if(n>=1)return 1;let o=0,r=1,m=n;for(let R=0;R<30;R+=1){let B=a(l,e,m);if(Math.abs(B-n)<1e-5)break;B<n?o=m:r=m,m=(o+r)/2}return a(i,t,m)}}var Mi=(l,i)=>ii[Math.max(0,Math.min(3,Math.max(l,i)-1))],W=l=>`clamp(0, min(calc(1 + var(${N}) - ${l}), calc(1 - var(${N}) + ${l})), 1)`,ti=`clamp(0, calc(1 - var(${N})), 1)`,Ci=`max(0, calc(var(${N}) - 3))`,Li=`max(0, calc(var(${N}) - 4))`,gt=class extends zi{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.marginNoteShown="",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"},marginNoteShown:{type:String,reflect:!0,attribute:"margin-note-shown"},specs:{type:Array},markWidth:{type:String,attribute:"mark-width"},markHeight:{type:String,attribute:"mark-height"},progress:{type:Number}}}static{this.styles=[...zi.styles,da,ca`
|
|
164
43
|
:host {
|
|
165
44
|
display: block; inline-size: min(100%, 35rem); container-type: inline-size;
|
|
166
|
-
--impakt-journey-accent: ${
|
|
167
|
-
--hand: var(--impakt-font-family-hand, ${
|
|
45
|
+
--impakt-journey-accent: ${Kt("color.accent.default","#ffd43b")}; --impakt-journey-on-accent: ${Kt("color.accent.on","#1a1a1a")};
|
|
46
|
+
--hand: var(--impakt-font-family-hand, ${w.fontBody});
|
|
168
47
|
/* 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
48
|
stage the same move runs in reverse. A tracked button sets it on the frame instead, from the scroll. */
|
|
170
|
-
${N
|
|
171
|
-
transition: ${N
|
|
172
|
-
${
|
|
49
|
+
${y(N)}: 4;
|
|
50
|
+
transition: ${y(N)} var(--jt) var(--je);
|
|
51
|
+
${pt("flatten",640,"cubic-bezier(0.65, 0, 0.35, 1)")}
|
|
173
52
|
}
|
|
174
|
-
:host([stage='note']) { ${N
|
|
175
|
-
:host([stage='wireframe']) { ${N
|
|
176
|
-
:host([stage='component']) { ${N
|
|
177
|
-
:host([stage='code']) { ${N
|
|
178
|
-
:host([stage='live']) { ${N
|
|
53
|
+
:host([stage='note']) { ${y(N)}: 0; }
|
|
54
|
+
:host([stage='wireframe']) { ${y(N)}: 1; }
|
|
55
|
+
:host([stage='component']) { ${y(N)}: 2; ${pt("ink-in",560,"cubic-bezier(0.22, 1, 0.36, 1)")} }
|
|
56
|
+
:host([stage='code']) { ${y(N)}: 3; ${pt("compile",720,"cubic-bezier(0.83, 0, 0.17, 1)")} }
|
|
57
|
+
:host([stage='live']) { ${y(N)}: 4; ${pt("ship",600,"cubic-bezier(0.34, 1.56, 0.64, 1)")} }
|
|
179
58
|
/* Travelling: it stays in view while its sections scroll past, in a column as tall as they are. */
|
|
180
59
|
:host([travel]) { position: sticky; inset-block-start: var(--impakt-journey-travel-top, 20vh); }
|
|
181
60
|
|
|
@@ -188,17 +67,23 @@ import"./atomic-ui.js";import{css as ht,html as j,nothing as ce}from"./atomic-ui
|
|
|
188
67
|
.bar { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; }
|
|
189
68
|
/* The sticky note: 290 square, turned 4° (8:362). */
|
|
190
69
|
.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: ${
|
|
192
|
-
.wire > svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${
|
|
70
|
+
.wire { background: ${w.surfaceCard}; border: ${w.borderThin} dashed ${w.textMuted}; }
|
|
71
|
+
.wire > svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${w.rule}; }
|
|
193
72
|
.solid { background: var(--impakt-journey-accent); }
|
|
194
73
|
.shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }
|
|
195
74
|
/* 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. */
|
|
196
75
|
/* The code window: 520 by 300 at 20, 40, with 6px corners (8:431). */
|
|
197
|
-
|
|
76
|
+
/*
|
|
77
|
+
* The code of 8:435: IBM Plex Mono 13px on 1.5, 44px from the window's top and 28px in, with the words on the sixth
|
|
78
|
+
* line, in the code, indented six places and followed by their arrow. Five lines go before them and the rest after;
|
|
79
|
+
* a shorter run sits up against the words, a longer one loses the lines furthest from them.
|
|
80
|
+
*/
|
|
81
|
+
.window { inset-inline: 3.57cqi; inset-block: 7.14cqi 3.57cqi; padding: 7.86cqi 5cqi 0; background: var(--impakt-color-surface-ink-raised, ${w.text}); border: ${w.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: 6px; font-family: ${w.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, ${w.surfaceCard} 78%, ${w.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: 7.5em 1.5em minmax(0, 1fr); }
|
|
198
82
|
/* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */
|
|
199
83
|
.window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }
|
|
200
84
|
.window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }
|
|
201
|
-
|
|
85
|
+
/* As in 8:435 the code is in the window's bright words and a comment stays in its muted ones, a pair the theme measures at 4.5:1. */
|
|
86
|
+
.window :is(.before, .after) > span:not(.comment, .rule) { color: var(--ik-ink-inverse, ${w.surfaceCard}); }
|
|
202
87
|
.window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }
|
|
203
88
|
|
|
204
89
|
/*
|
|
@@ -208,70 +93,79 @@ import"./atomic-ui.js";import{css as ht,html as j,nothing as ce}from"./atomic-ui
|
|
|
208
93
|
* from a strip; and the live button's shadow and fill grow to full size, past it for a moment where ship's
|
|
209
94
|
* easing overshoots.
|
|
210
95
|
*/
|
|
211
|
-
.note { opacity: ${
|
|
212
|
-
.wire { opacity: ${
|
|
213
|
-
.solid { opacity: max(${
|
|
214
|
-
.window { opacity: ${
|
|
215
|
-
.shadow { opacity: ${
|
|
96
|
+
.note { opacity: ${y(W(0))}; transform: rotate(calc(4deg * ${y(W(0))})) scale(1, calc(0.45 + 0.55 * ${y(W(0))})); }
|
|
97
|
+
.wire { opacity: ${y(W(1))}; transform: rotate(calc(4deg * ${y(ti)})) scale(calc(1 - 0.1 * ${y(ti)}), calc(1 + 3 * ${y(ti)})); }
|
|
98
|
+
.solid { opacity: max(${y(W(2))}, ${y(W(4))}); transform: scale(calc(0.92 + 0.08 * max(${y(W(2))}, min(1, ${y(Ci)})) + 0.4 * ${y(Li)})); }
|
|
99
|
+
.window { opacity: ${y(W(3))}; transform: scale(calc(0.94 + 0.06 * ${y(W(3))}), calc(0.5 + 0.5 * ${y(W(3))})); }
|
|
100
|
+
.shadow { opacity: ${y(W(4))}; transform: scale(calc(0.9 + 0.1 * min(1, ${y(Ci)}) + 0.4 * ${y(Li)})); }
|
|
216
101
|
|
|
217
102
|
/* 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. */
|
|
218
|
-
.said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
103
|
+
.said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${Si(4)}; padding-inline: 5cqi; font-family: ${w.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${ye("medium")}; line-height: 1.2; color: var(--impakt-journey-on-accent); }
|
|
219
104
|
.arrow { flex: none; }
|
|
220
105
|
/* At the note stage the words are handwritten, bold, with a line drawn under them. */
|
|
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: ${
|
|
106
|
+
.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: ${ye("bold")}; line-height: 1.1; letter-spacing: -0.01em; }
|
|
222
107
|
.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; }
|
|
223
108
|
.note .said .arrow { align-self: flex-end; }
|
|
224
|
-
.wire .said { justify-content: center; font-family: ${
|
|
225
|
-
.window .said { position: static; padding-inline:
|
|
109
|
+
.wire .said { justify-content: center; font-family: ${w.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${ye("regular")}; color: ${w.textMuted}; }
|
|
110
|
+
.window .said { position: static; gap: 0; padding-inline: 6ch 0; justify-content: flex-start; font-family: ${w.fontMono}; font-size: inherit; font-weight: ${ye("regular")}; line-height: inherit; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${w.surfaceCard})); }
|
|
226
111
|
.window .said .arrow { display: none; }
|
|
112
|
+
.window .said::after { content: ' →'; white-space: pre; }
|
|
227
113
|
|
|
228
114
|
/*
|
|
229
115
|
* The link. One element at every stage, sized to the shape the stage draws, so the keyboard, a pointer and a
|
|
230
116
|
* screen reader meet an ordinary link with the button's words. Its own words are not painted: the plates paint
|
|
231
117
|
* them, so they can morph. In forced colours the plates step aside and the link draws its words itself.
|
|
232
118
|
*/
|
|
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: ${
|
|
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: ${
|
|
235
|
-
:host([stage='wireframe']) .words { justify-content: center; font-family: ${
|
|
236
|
-
:host([stage='code']) .words { min-block-size: 44px; inset-block-start: calc(
|
|
237
|
-
a.words:focus-visible { outline: none; box-shadow: ${
|
|
119
|
+
.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: ${Si(4)}; padding-inline: 5cqi; font-family: ${w.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${ye("medium")}; line-height: 1.2; color: transparent; text-decoration: none; }
|
|
120
|
+
: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: ${ye("bold")}; line-height: 1.1; transform: rotate(4deg); }
|
|
121
|
+
:host([stage='wireframe']) .words { justify-content: center; font-family: ${w.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${ye("regular")}; }
|
|
122
|
+
:host([stage='code']) .words { min-block-size: 44px; inset-inline-start: 3.57cqi; inline-size: 92.86cqi; inset-block-start: calc(34.15cqi - 22px); justify-content: flex-start; padding-inline: calc(5cqi + 6ch) 5cqi; font-family: ${w.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${ye("regular")}; }
|
|
123
|
+
a.words:focus-visible { outline: none; box-shadow: ${w.focusShadow}; }
|
|
238
124
|
|
|
239
125
|
/* Live, it answers a pointer: the button lifts when pointed at and sits when pressed, and its fill deepens a little. */
|
|
240
|
-
|
|
241
|
-
|
|
126
|
+
/* The arrow leads (impkt-web#51): pointed at or focused, the live button's arrow slides 4px on first and the lift follows one stagger behind it, for a brand with the reveal set on. */
|
|
127
|
+
.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)) ${ct.lead}; }
|
|
128
|
+
.solid .arrow { transition: translate ${ct.arrowDuration} ${ct.arrowEasing}; }
|
|
129
|
+
:host([stage='live']) .frame:has(a.words:is(:hover, :focus-visible)) .solid .arrow { translate: ${ct.arrowDistance} 0; }
|
|
130
|
+
:host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${w.text}); translate: 0 -2px; }
|
|
242
131
|
: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)); }
|
|
243
132
|
|
|
244
133
|
/* The design notes. Each shows at its own stages, follows the stage number with the shapes, and none is read. */
|
|
245
|
-
.ann { position: absolute; pointer-events: none; color: ${
|
|
246
|
-
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${
|
|
134
|
+
.ann { position: absolute; pointer-events: none; color: ${w.text}; }
|
|
135
|
+
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${w.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); letter-spacing: ${w.trackingWide}; text-transform: uppercase; color: ${w.textMuted}; white-space: nowrap; }
|
|
247
136
|
.caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; }
|
|
248
|
-
${
|
|
137
|
+
${y(Ve.map((e,t)=>`.caption span:nth-child(${t+1}) { opacity: ${W(t)}; }`).join(`
|
|
249
138
|
`))}
|
|
250
|
-
|
|
139
|
+
/* The handwritten margin note, which a brand may leave out: Impakt's design has dropped it (impkt-design-system#83). */
|
|
140
|
+
.margin { display: ${Kt("journey.margin-note","block")}; }
|
|
141
|
+
:host([margin-note-shown='yes']) .margin { display: block; }
|
|
142
|
+
:host([margin-note-shown='no']) .margin { display: none; }
|
|
143
|
+
.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: ${y(W(0))}; }
|
|
251
144
|
/* The measures, as the redlines (8:401) draw them: the width 26px over the shell, the height 10px beside it. */
|
|
252
145
|
.width { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 21.07cqi; block-size: 2.14cqi; border-inline: 1px solid currentColor; }
|
|
253
146
|
.width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }
|
|
254
|
-
.width b, .height b { position: absolute; font-family: ${
|
|
147
|
+
.width b, .height b { position: absolute; font-family: ${w.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); font-weight: ${ye("regular")}; line-height: 1; background: var(--impakt-journey-mark-ground, ${w.surfaceCard}); padding-inline: 0.4em; }
|
|
255
148
|
.width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }
|
|
256
149
|
.height { inset-inline-start: 80.36cqi; inline-size: 2.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; border-block: 1px solid currentColor; }
|
|
257
150
|
.height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }
|
|
258
151
|
.height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }
|
|
259
|
-
.width, .height { opacity: max(${
|
|
152
|
+
.width, .height { opacity: max(${y(W(1))}, ${y(W(2))}); }
|
|
260
153
|
/* 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: ${
|
|
262
|
-
.specs span { padding: 0.36em 0.73em; font-family: ${
|
|
154
|
+
.specs { inset-inline-start: 21.43cqi; inset-block-start: 43.93cqi; display: flex; flex-wrap: wrap; gap: 1.43cqi; inline-size: 75cqi; opacity: ${y(W(2))}; }
|
|
155
|
+
.specs span { padding: 0.36em 0.73em; font-family: ${w.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); line-height: 1.4; letter-spacing: ${w.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${w.surfaceCard}; }
|
|
263
156
|
/* 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: ${
|
|
265
|
-
.pointer { display: block; fill: ${
|
|
157
|
+
.cursor { inset-inline-start: 72.14cqi; inset-block-start: 35cqi; opacity: ${y(W(4))}; }
|
|
158
|
+
.pointer { display: block; fill: ${w.text}; stroke: ${w.surfaceCard}; }
|
|
266
159
|
|
|
267
160
|
/* The gaps a scroll timeline drives, one keyframe set each. */
|
|
268
|
-
${
|
|
161
|
+
${y(Array.from({length:ai},(e,t)=>`@keyframes impakt-journey-g${t} { from { ${mt(t)}: 0; } to { ${mt(t)}: 1; } }`).join(`
|
|
269
162
|
`))}
|
|
270
163
|
|
|
271
164
|
/* Reduced motion: each stage cuts to its final state, and the live button changes colour only. */
|
|
272
165
|
@media (prefers-reduced-motion: reduce) {
|
|
273
166
|
:host { transition: none; }
|
|
274
167
|
.solid { transition: background-color 180ms; }
|
|
168
|
+
.solid .arrow { transition: none; }
|
|
275
169
|
:host([stage='live']) .frame:has(a.words:is(:hover, :active)) .solid { translate: none; }
|
|
276
170
|
}
|
|
277
171
|
@media (forced-colors: active) {
|
|
@@ -284,379 +178,296 @@ import"./atomic-ui.js";import{css as ht,html as j,nothing as ce}from"./atomic-ui
|
|
|
284
178
|
:host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; forced-color-adjust: none; }
|
|
285
179
|
.ann { color: CanvasText; }
|
|
286
180
|
}
|
|
287
|
-
`]}connectedCallback(){super.connectedCallback(),
|
|
288
|
-
<span class="ann margin" part="margin-note">${this.marginNote||
|
|
181
|
+
`]}connectedCallback(){super.connectedCallback(),Ti(),this.hasUpdated&&this.watch()}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}willUpdate(e){e.has("stage")&&!dt(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(N,String(this.progress)),this.style.setProperty("transition","none")):(this.style.removeProperty(N),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 t=this.frameEl;if(t)for(let a of[N,"animation-name","animation-duration","animation-timing-function","animation-fill-mode","animation-timeline","animation-range"])t.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(t=>dt(t.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(t=>this.crossed(t),{rootMargin:"-50% 0px -50% 0px",threshold:0});for(let t of e)this.observer.observe(t);this.reduced()||this.startScrub()}}crossed(e){let a=e.find(n=>n.isIntersecting)?.target.getAttribute("data-journey-stage");dt(a)&&this.become(a)}entered(){let e=this.ownerDocument.defaultView;if(!e)return;let t=null;for(let a of this.sections)a.getBoundingClientRect().top<e.innerHeight&&(t=a.getAttribute("data-journey-stage"));dt(t)&&this.become(t)}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")&&Ti()&&this.sections.length-1<=ai&&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 n of this.sections)this.resizeObserver.observe(n)}this.easings=ii.map(n=>ma(this.easingOf(n.name,n.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 t=this.sections[0]?.parentElement;t&&t!==this.ownerDocument.body&&t!==this.ownerDocument.documentElement;t=t.parentElement){let{overflowY:a}=e.getComputedStyle(t);if((a==="auto"||a==="scroll")&&t.scrollHeight>t.clientHeight)return!1}return!0}easingOf(e,t){let a=this.ownerDocument.defaultView?.getComputedStyle(this).getPropertyValue(`--impakt-motion-journey-${e}-easing`)??"",n=/cubic-bezier\(([^)]+)\)/.exec(a)?.[1]?.split(",").map(Number);return n?.length===4&&n.every(Number.isFinite)?n:t}gaps(){let e=this.ownerDocument.defaultView,t=e.innerHeight/2,a=this.sections.map(o=>o.getBoundingClientRect().top+e.scrollY),n=this.sections.map(o=>ei(o.getAttribute("data-journey-stage")));return a.slice(1).map((o,r)=>({from:n[r],to:n[r+1],start:a[r]-t,end:o-t}))}timeline(){let e=this.frameEl;if(!e||!this.sections.length)return;let t=this.gaps().filter(r=>r.end>r.start),a=ei(this.sections[0].getAttribute("data-journey-stage")),n=t.map((r,m)=>r.to===r.from?"":` + ${r.to-r.from} * var(${mt(m)})`).join("");e.style.setProperty(N,`calc(${a}${n})`);let o=r=>t.map(r).join(", ")||"none";e.style.setProperty("animation-name",t.length?o((r,m)=>`impakt-journey-g${m}`):"none"),e.style.setProperty("animation-duration",o(()=>"1ms")),e.style.setProperty("animation-timing-function",o(r=>{let m=Mi(r.from,r.to);return`var(--impakt-motion-journey-${m.name}-easing, cubic-bezier(${m.easing.join(", ")}))`})),e.style.setProperty("animation-fill-mode",o(()=>"both")),e.style.setProperty("animation-timeline",o(()=>"scroll(root block)")),e.style.setProperty("animation-range",o(r=>`${Math.round(r.start)}px ${Math.round(r.end)}px`))}scrub(){let e=this.ownerDocument.defaultView,t=this.frameEl;if(!e||!t||!this.sections.length)return;let a=e.innerHeight/2,n=this.sections.map(Ie=>Ie.getBoundingClientRect().top),o=0;n.forEach((Ie,Xt)=>{Ie<=a&&(o=Xt)});let r=Ie=>ei(this.sections[Ie].getAttribute("data-journey-stage")),m=o+1<this.sections.length?o+1:o,R=n[m]-n[o],B=m===o||R<=0?0:Math.min(1,Math.max(0,(a-n[o])/R)),[P,te]=[r(o),r(m)],He=P===te?0:this.easings[ii.indexOf(Mi(P,te))](B),Yt=P+He*(te-P);t.style.setProperty(N,Yt.toFixed(4))}lines(e,t){return e?.length?e.map(a=>ae`<span class=${a.trim().startsWith("//")?"comment":""}>${a}</span>`):Array.from({length:t},(a,n)=>ae`<span class="rule" style=${`inline-size:${[58,72,44][n%3]}%`}></span>`)}notes(){let e=this.captions?.length?this.captions:[ve("Note \u2014 Discover"),ve("Wireframe \u2014 Design low-fi"),ve("Component \u2014 Design hi-fi"),ve("Code \u2014 Build"),ve("Live \u2014 Launch")],t=this.specs?.length?this.specs:[ve("Fill \xB7 Accent/Signal"),ve("Radius \xB7 0"),ve("Type \xB7 Archivo 17")];return ae`<span class="ann caption" part="caption">${Ve.map((a,n)=>ae`<span>${String(n+1).padStart(2,"0")} · ${e[n]??""}</span>`)}</span>
|
|
182
|
+
<span class="ann margin" part="margin-note">${this.marginNote||ve("make it the biggest thing on the page")}</span>
|
|
289
183
|
<span class="ann width"><b>${this.markWidth}</b></span>
|
|
290
184
|
<span class="ann height"><b>${this.markHeight}</b></span>
|
|
291
|
-
<span class="ann specs" part="specs">${
|
|
292
|
-
<span class="ann cursor">${
|
|
185
|
+
<span class="ann specs" part="specs">${t.map(a=>ae`<span>${a}</span>`)}</span>
|
|
186
|
+
<span class="ann cursor">${ha}</span>`}render(){let e=ae`<span class="said"><span class="text">${this.label}</span>${pa}</span>`,t=ae`<span class="text">${this.label}</span>`;return ae`<div class="frame" part="frame" aria-hidden=${this.decorative?"true":wi}>
|
|
293
187
|
<span class="plate note" aria-hidden="true">${e}</span>
|
|
294
188
|
<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>
|
|
295
189
|
<span class="plate bar shadow" aria-hidden="true"></span>
|
|
296
190
|
<span class="plate bar solid" aria-hidden="true">${e}</span>
|
|
297
191
|
<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>
|
|
298
|
-
${this.annotations?
|
|
299
|
-
${this.decorative||!this.href?
|
|
300
|
-
</div>`}};customElements.define("impakt-journey-button",
|
|
192
|
+
${this.annotations?ae`<span class="notes" aria-hidden="true">${this.notes()}</span>`:wi}
|
|
193
|
+
${this.decorative||!this.href?ae`<span class="words" part="button">${t}</span>`:ae`<a class="words" part="button" href=${this.href}>${t}</a>`}
|
|
194
|
+
</div>`}};customElements.define("impakt-journey-button",gt);import{css as Pe,html as g,nothing as E}from"./atomic-ui.js";import{ImpaktElement as se,focusRing as Ei,fontSize as De,fontWeight as ne,lineHeight as ni,space as T,spaceAround as yt,t as s,token as ce,R as S,revealAt as qe,revealStyles as ri}from"./atomic-ui.js";var ga=g`<svg viewBox="0 0 22 22" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false">
|
|
301
195
|
<path d="M5 17 17 5M8 5h9v9" />
|
|
302
|
-
</svg>`,
|
|
303
|
-
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${
|
|
304
|
-
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${
|
|
196
|
+
</svg>`,ut=class extends se{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=[...se.styles,Ei,yt,Pe`
|
|
197
|
+
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${ce("color.accent.default","#ffd43b")}; --impakt-work-on-accent: ${ce("color.accent.on","#111111")}; }
|
|
198
|
+
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${s.borderThin} solid ${s.text}; }
|
|
305
199
|
.columns + ol { border-block-start: 0; }
|
|
306
200
|
/* 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: ${
|
|
201
|
+
li, .columns { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto 22px; align-items: center; column-gap: ${T(6)}; padding: 22px ${T(8)}; }
|
|
308
202
|
.texts li, .texts.columns { grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr) auto 22px; }
|
|
309
|
-
li { position: relative; border-block-end: ${
|
|
310
|
-
|
|
311
|
-
.
|
|
312
|
-
|
|
203
|
+
li { position: relative; isolation: isolate; border-block-end: ${s.borderThin} solid ${s.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
204
|
+
/* The ink a row turns to, a layer of its own: a brand that derives the reveal set fades it in whole, as before; Impakt wipes it in from the left in 180ms (impkt-web#51). */
|
|
205
|
+
li::before { content: ''; position: absolute; inset: 0; z-index: -1; background: ${s.text}; opacity: calc(1 - ${S.wipeFrom}); transform: scaleX(${S.wipeFrom}); transform-origin: left center; transition: transform ${S.wipeDuration} ${S.wipeEasing}, opacity ${S.wipeDuration} ${S.wipeEasing}; pointer-events: none; }
|
|
206
|
+
li:has(a):hover::before, li:has(a:focus-visible)::before { opacity: 1; transform: none; }
|
|
207
|
+
li :is(.name, .number, .meta, .text, .price, .arrow) { transition: color ${S.wipeDuration} ${S.wipeEasing}; }
|
|
208
|
+
.arrow svg { transition: translate ${S.arrowDuration} ${S.arrowEasing}; }
|
|
209
|
+
/* The row's arrow points up and along, so it slides that way, 4px in all. */
|
|
210
|
+
li:has(a):hover .arrow svg, li:has(a:focus-visible) .arrow svg { translate: calc(0.7071 * ${S.arrowDistance}) calc(-0.7071 * ${S.arrowDistance}); }
|
|
211
|
+
/* Drop (impkt-web#51): the rows drop 12px into place one after another as the list is reached, and the line under each settles. */
|
|
212
|
+
:host([data-motion]) li { animation: ik-reveal-drop ${S.drop} ${S.arrive} ${qe()} both, ik-reveal-settle ${S.drop} ${S.arrive} ${qe()} both; }
|
|
213
|
+
:host([data-motion]) .columns { animation: ik-reveal-type ${S.type} ${S.arrive} ${qe(0)} both; }
|
|
214
|
+
/* The column names (20:998): G2 Mono S on its 1.4 line, 12px over the rule, and the last name ends over the arrow's column. */
|
|
215
|
+
.columns { padding-block: 0 ${T(3)}; border-block-end: ${s.borderThin} solid ${s.text}; font-family: ${s.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${s.trackingWide}; text-transform: uppercase; color: ${s.textMuted}; }
|
|
216
|
+
.columns .last { grid-column: -3 / -1; text-align: end; }
|
|
217
|
+
.number { font-family: ${s.fontMono}; font-size: 0.8125rem; line-height: 1.5; font-variant-numeric: tabular-nums; color: ${s.textMuted}; }
|
|
313
218
|
/* Display Row: 72px on a 1080px list and 40px on a 350px phone list (8:329, 14:947). */
|
|
314
|
-
.name { font-family: ${
|
|
219
|
+
.name { font-family: ${s.fontHeading}; font-size: clamp(2rem, 1.541rem + 4.384cqi, 4.5rem); font-weight: ${ne("semibold")}; line-height: 1; letter-spacing: -0.05em; color: ${s.text}; overflow-wrap: anywhere; }
|
|
315
220
|
.texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }
|
|
316
221
|
.name a { color: inherit; text-decoration: none; }
|
|
317
222
|
/* The link is stretched over the row, so the row is one target. */
|
|
318
223
|
.name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
|
|
319
224
|
.name a:focus-visible { outline: none; }
|
|
320
|
-
.name a:focus-visible::after { box-shadow: ${
|
|
321
|
-
.text { margin: 0; font-size: ${
|
|
322
|
-
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${
|
|
323
|
-
.meta, .price { font-family: ${
|
|
225
|
+
.name a:focus-visible::after { box-shadow: ${s.focusShadow}; }
|
|
226
|
+
.text { margin: 0; font-size: ${De("md")}; line-height: ${ni("normal")}; color: ${s.textMuted}; }
|
|
227
|
+
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${T(2)}; text-align: end; }
|
|
228
|
+
.meta, .price { font-family: ${s.fontMono}; font-size: ${De("sm")}; letter-spacing: ${s.trackingWide}; text-transform: uppercase; color: ${s.textMuted}; }
|
|
324
229
|
/* The meta in G2 Mono S: 11px medium capitals at 0.06em (8:331). */
|
|
325
|
-
.meta { font-size: 0.6875rem; font-weight: ${
|
|
230
|
+
.meta { font-size: 0.6875rem; font-weight: ${ne("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
326
231
|
.price { font-size: 0.6875rem; }
|
|
327
232
|
/* Marketing badges are monospace capitals at 11px. A row that goes somewhere has a solid one; one that does not yet has an outline. */
|
|
328
|
-
.badge { display: inline-block; padding: ${
|
|
329
|
-
li:not(:has(a)) .badge { color: ${
|
|
330
|
-
.arrow { display: flex; color: ${
|
|
233
|
+
.badge { display: inline-block; padding: ${T(1)} ${T(2.5)}; font-family: ${s.fontMono}; font-size: 0.6875rem; font-weight: ${ne("medium")}; line-height: 1.4; letter-spacing: ${s.trackingWide}; text-transform: uppercase; white-space: nowrap; color: ${s.surfaceCard}; background: ${s.text}; border: ${s.borderThin} solid ${s.text}; border-radius: ${s.radiusSm}; }
|
|
234
|
+
li:not(:has(a)) .badge { color: ${s.text}; background: transparent; }
|
|
235
|
+
.arrow { display: flex; color: ${s.text}; }
|
|
331
236
|
/* 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. */
|
|
332
|
-
li
|
|
333
|
-
li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${
|
|
334
|
-
li:has(a):hover :is(.number, .meta, .text, .price), li:has(a:focus-visible) :is(.number, .meta, .text, .price), li.featured :is(.number, .meta, .text, .price) { color: color-mix(in srgb, ${
|
|
335
|
-
li:has(a):hover .badge, li:has(a:focus-visible) .badge { color: ${
|
|
237
|
+
li.featured { background: ${s.text}; }
|
|
238
|
+
li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${s.surfaceCard}; }
|
|
239
|
+
li:has(a):hover :is(.number, .meta, .text, .price), li:has(a:focus-visible) :is(.number, .meta, .text, .price), li.featured :is(.number, .meta, .text, .price) { color: color-mix(in srgb, ${s.surfaceCard} 78%, ${s.text}); }
|
|
240
|
+
li:has(a):hover .badge, li:has(a:focus-visible) .badge { color: ${s.text}; background: ${s.surfaceCard}; border-color: ${s.surfaceCard}; }
|
|
336
241
|
li:has(a):hover .arrow, li:has(a:focus-visible) .arrow, li.featured .arrow { color: var(--impakt-work-accent); }
|
|
337
242
|
li.featured .badge { color: var(--impakt-work-on-accent); background: var(--impakt-work-accent); border-color: var(--impakt-work-accent); }
|
|
338
243
|
/* The preview card follows the pointer. Only its transform changes, so it costs no layout. */
|
|
339
|
-
.preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${
|
|
244
|
+
.preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${T(2)}; background: ${s.surfaceCard}; border: ${s.borderThin} solid ${s.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); }
|
|
340
245
|
.preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
|
|
341
|
-
.preview span { display: block; padding-block-end: ${
|
|
246
|
+
.preview span { display: block; padding-block-end: ${T(2)}; font-family: ${s.fontMono}; font-size: 0.6875rem; letter-spacing: ${s.trackingWide}; text-transform: uppercase; color: ${s.textMuted}; }
|
|
342
247
|
/* 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. */
|
|
343
248
|
@container impakt-work-list (max-width: 40rem) {
|
|
344
|
-
li, .texts li { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: ${
|
|
345
|
-
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${
|
|
346
|
-
.side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${
|
|
249
|
+
li, .texts li { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: ${T(3)}; padding: 18px 14px; }
|
|
250
|
+
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${T(2)}; }
|
|
251
|
+
.side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${T(2)}; }
|
|
347
252
|
li:not(:has(.text)) .side { grid-row: 2; }
|
|
348
253
|
.arrow { grid-column: 3; grid-row: 1; }
|
|
349
254
|
li:not(:has(.text)) :is(.number, .arrow) { grid-row: 1 / span 2; }
|
|
350
255
|
.arrow svg { inline-size: 18px; block-size: 18px; }
|
|
351
256
|
.columns { display: none; }
|
|
352
257
|
}
|
|
353
|
-
@media (prefers-reduced-motion: reduce) { li { transition: none; } .preview { display: none; } }
|
|
258
|
+
@media (prefers-reduced-motion: reduce) { li, li::before, li *, .arrow svg { transition: none; } .preview { display: none; } }
|
|
354
259
|
@media (forced-colors: active) {
|
|
260
|
+
li::before { display: none; }
|
|
355
261
|
li:has(a):hover, li:has(a:focus-visible), li.featured { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }
|
|
356
262
|
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; }
|
|
357
263
|
.badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }
|
|
358
264
|
}
|
|
359
|
-
|
|
360
|
-
<span>${
|
|
361
|
-
</div>`}render(){let
|
|
362
|
-
${
|
|
363
|
-
<span class="number" aria-hidden="true">${
|
|
265
|
+
`,ri]}point(i,e){if(!e.preview||i.pointerType!=="mouse"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){this.preview&&(this.preview=null);return}let t=this.getBoundingClientRect();this.preview={src:e.preview,label:e.previewLabel??"",x:i.clientX-t.left,y:i.clientY-t.top}}columnRow(i){let e=this.columns??[];if(!e.length)return E;let[t,a,...n]=e;return g`<div class=${i?"columns texts":"columns"} part="columns" aria-hidden="true">
|
|
266
|
+
<span>${t??""}</span><span>${a??""}</span>${n.length?g`<span class="last">${n.join(" \xB7 ")}</span>`:E}
|
|
267
|
+
</div>`}render(){let i=this.items??[],e=i.some(a=>!!a.text),t=this.preview;return g`${this.columnRow(e)}<ol role="list" part="list" class=${e?"texts":""} aria-label=${this.label||E} @pointerleave=${()=>this.preview=null}>
|
|
268
|
+
${i.map((a,n)=>{let o=String(this.start+n).padStart(2,"0"),r=a.badge||a.price||a.meta;return g`<li part="row" class=${a.featured?"featured":""} style=${`--i:${n}`} @pointermove=${m=>this.point(m,a)}>
|
|
269
|
+
<span class="number" aria-hidden="true">${o}</span>
|
|
364
270
|
<div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
|
|
365
|
-
${a.href?
|
|
271
|
+
${a.href?g`<a href=${a.href} part="link">${a.name}</a>`:a.name}
|
|
366
272
|
</div>
|
|
367
|
-
${e?
|
|
368
|
-
${
|
|
369
|
-
${a.badge?
|
|
370
|
-
${a.price?
|
|
371
|
-
${a.meta?
|
|
372
|
-
</span>`:
|
|
373
|
-
${a.href?
|
|
273
|
+
${e?g`<p class="text" part="text">${a.text??""}</p>`:E}
|
|
274
|
+
${r?g`<span class="side">
|
|
275
|
+
${a.badge?g`<span class="badge" part="badge">${a.badge}</span>`:E}
|
|
276
|
+
${a.price?g`<span class="price" part="price">${a.price}</span>`:E}
|
|
277
|
+
${a.meta?g`<span class="meta" part="meta">${a.meta}</span>`:E}
|
|
278
|
+
</span>`:g`<span></span>`}
|
|
279
|
+
${a.href?g`<span class="arrow">${ga}</span>`:g`<span></span>`}
|
|
374
280
|
</li>`})}
|
|
375
|
-
</ol>${
|
|
376
|
-
${
|
|
377
|
-
</div>`:
|
|
281
|
+
</ol>${t?g`<div class="preview" part="preview" aria-hidden="true" style=${`--x:${t.x}px;--y:${t.y}px`}>
|
|
282
|
+
${t.label?g`<span>${t.label}</span>`:E}<img src=${t.src} alt="" />
|
|
283
|
+
</div>`:E}`}},bt=class extends se{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=[...se.styles,yt,Pe`
|
|
378
284
|
:host { display: block; container: impakt-stat-row / inline-size; }
|
|
379
285
|
/* 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. */
|
|
380
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${
|
|
381
|
-
li { border-block-start: ${
|
|
382
|
-
p { margin: 0; display: flex; flex-direction: column; gap: ${
|
|
383
|
-
.value { font-family: ${
|
|
384
|
-
|
|
286
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${T(6)}; }
|
|
287
|
+
li { border-block-start: ${s.borderThin} solid ${s.rule}; padding-block-start: ${T(5)}; }
|
|
288
|
+
p { margin: 0; display: flex; flex-direction: column; gap: ${T(2)}; }
|
|
289
|
+
.value { font-family: ${s.fontHeading}; font-size: clamp(2.5rem, 6cqi, 3.25rem); font-weight: ${ne("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${s.textHeading}; font-variant-numeric: tabular-nums; }
|
|
290
|
+
/* The label's lines are whole pixels, 20px at 14, as the frame sets them, so a two-line stat is 121px (9:362). */
|
|
291
|
+
.label { font-size: ${De("sm")}; line-height: 1.25rem; color: ${s.textMuted}; }
|
|
292
|
+
/* The Stat component (8:324) sets its label 230px wide under Impakt, so "of row counts matched in the restore drill" takes two lines and its stat is 121px (94:1716); another brand runs it the stat's width. */
|
|
293
|
+
.label { max-inline-size: ${ce("stat-row.label.width","none")}; }
|
|
385
294
|
/* 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
295
|
@container impakt-stat-row (max-width: 40rem) {
|
|
387
|
-
ul { gap: ${
|
|
388
|
-
li { padding-block: 14px ${
|
|
296
|
+
ul { gap: ${T(4)} ${T(5)}; }
|
|
297
|
+
li { padding-block: 14px ${T(2)}; }
|
|
389
298
|
p { gap: 6px; }
|
|
390
299
|
}
|
|
391
300
|
/* The note is meta: monospace capitals at 11px. */
|
|
392
|
-
.note { font-family: ${
|
|
393
|
-
|
|
394
|
-
${this.items.map(
|
|
395
|
-
<p><span class="value" part="value">${
|
|
301
|
+
.note { font-family: ${s.fontMono}; font-size: 0.6875rem; letter-spacing: ${s.trackingWide}; text-transform: uppercase; color: ${s.textMuted}; }
|
|
302
|
+
`,ri]}render(){return g`<ul role="list" part="list" aria-label=${this.label||E}>
|
|
303
|
+
${this.items.map((i,e)=>g`<li part="stat" style=${`--i:${e}`}>
|
|
304
|
+
<p><span class="value" part="value" data-ik-count>${i.figure}</span> <span class="label" part="label">${i.label}</span>${i.note?g` <span class="note">${i.note}</span>`:E}</p>
|
|
396
305
|
</li>`)}
|
|
397
|
-
</ul>`}}
|
|
306
|
+
</ul>`}},ft=class extends se{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=[...se.styles,yt,Pe`
|
|
398
307
|
:host { display: block; container: impakt-faq / inline-size; }
|
|
399
|
-
.head { display: flex; flex-direction: column; gap: ${
|
|
400
|
-
.eyebrow { margin: 0; font-family: ${
|
|
401
|
-
.heading { font-family: ${
|
|
402
|
-
.lead { margin: 0; font-size: ${
|
|
308
|
+
.head { display: flex; flex-direction: column; gap: ${T(4)}; margin-block-end: ${T(10)}; max-inline-size: 44rem; }
|
|
309
|
+
.eyebrow { margin: 0; font-family: ${s.fontEyebrow}; font-size: ${De("sm")}; color: var(--impakt-eyebrow, ${s.textMuted}); }
|
|
310
|
+
.heading { font-family: ${s.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${ne("semibold")}; line-height: 1.04; letter-spacing: -0.04em; color: ${s.textHeading}; }
|
|
311
|
+
.lead { margin: 0; font-size: ${De("md")}; line-height: ${ni("normal")}; color: ${s.textMuted}; }
|
|
403
312
|
/* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */
|
|
404
|
-
impakt-accordion { border-block-start: ${
|
|
405
|
-
impakt-accordion::part(item) { border-block-end: ${
|
|
406
|
-
|
|
407
|
-
impakt-accordion::part(
|
|
313
|
+
impakt-accordion { border-block-start: ${s.borderThin} solid ${s.text}; }
|
|
314
|
+
impakt-accordion::part(item) { border-block-end: ${s.borderThin} solid ${s.text}; }
|
|
315
|
+
/* The FAQ item (10:670, 21:1220): 92px with its rule, the question in Heading S (24px on 1.15 at -2.5%) centred beside the "+". Impakt keeps 24px on a phone (92:2191); another brand's question runs from 20px in a narrow column (faq.question.size). */
|
|
316
|
+
impakt-accordion::part(header) { box-sizing: border-box; min-block-size: 91px; align-items: center; padding-block: ${T(5)}; font-family: ${s.fontHeading}; font-size: ${ce("faq.question.size","clamp(1.25rem, 3.2cqi, 1.5rem)")}; font-weight: ${ne("semibold")}; line-height: 1.15; letter-spacing: -0.025em; }
|
|
317
|
+
/* The "+" sits on the question's first line, or under Impakt in the middle of the row, as the FAQ item does (8:359, 92:2191). */
|
|
318
|
+
impakt-accordion { --ik-accordion-marker-align: ${ce("faq.marker.align","flex-start")}; --ik-accordion-marker-first-line: ${ce("faq.marker.first-line","1")}; }
|
|
319
|
+
/* On a phone a one-line row is as tall as the "+" line under Impakt, 76px with its rule (92:2402); another brand keeps 92px. */
|
|
320
|
+
@container impakt-faq (max-width: 47.99rem) { impakt-accordion::part(header) { min-block-size: ${ce("faq.question.phone-min-height","91px")}; } }
|
|
321
|
+
impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${s.textMuted}; line-height: ${ni("normal")}; }
|
|
408
322
|
@media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }
|
|
409
|
-
`]}render(){let
|
|
410
|
-
${this.eyebrow?
|
|
411
|
-
${this.heading?
|
|
412
|
-
${this.lead?
|
|
413
|
-
</div>`:
|
|
414
|
-
${this.items.map(
|
|
415
|
-
</impakt-accordion>`;return this.heading?
|
|
416
|
-
/* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
|
|
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}); }
|
|
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); }
|
|
419
|
-
dialog[open] { display: flex; }
|
|
420
|
-
dialog::backdrop { background: var(--impakt-menu); }
|
|
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); }
|
|
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; }
|
|
426
|
-
nav { flex: 1; padding: ${z(6)} ${z(5)} 0; }
|
|
427
|
-
ol { list-style: none; margin: 0; padding: 0; }
|
|
428
|
-
li { border-block-end: ${l.borderThin} solid var(--impakt-menu-rule); }
|
|
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; }
|
|
430
|
-
li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
431
|
-
.number { font-family: ${l.fontMono}; font-size: ${je("sm")}; font-weight: ${re("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
|
|
432
|
-
/*
|
|
433
|
-
* The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
|
|
434
|
-
* --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
|
|
435
|
-
*/
|
|
436
|
-
a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
437
|
-
a[aria-current] .number { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
438
|
-
a[aria-current]:not(.worded) .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }
|
|
439
|
-
.foot { display: flex; flex-direction: column; gap: ${z(4)}; padding: ${z(8)} ${z(5)} calc(${z(8)} + env(safe-area-inset-bottom)); }
|
|
440
|
-
.foot[hidden] { display: none; }
|
|
441
|
-
/* What is slotted at the foot is read on ink too. */
|
|
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); }
|
|
443
|
-
@media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
|
|
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()}>
|
|
445
|
-
<div class="bar" part="bar">
|
|
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>`}
|
|
447
|
-
<button class="close" type="button" part="close" @click=${()=>this.close()}>
|
|
448
|
-
<span>${this.closeText}</span>
|
|
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>
|
|
450
|
-
</button>
|
|
451
|
-
</div>
|
|
452
|
-
<nav aria-label=${this.label} part="nav">
|
|
453
|
-
<ol role="list">
|
|
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>
|
|
457
|
-
</a>
|
|
458
|
-
</li>`})}
|
|
459
|
-
</ol>
|
|
460
|
-
</nav>
|
|
461
|
-
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
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`
|
|
323
|
+
`]}render(){let i=this.id_("heading"),e=Math.min(Math.max(this.headingLevel,1),5),t=this.eyebrow||this.heading||this.lead?g`<div class="head" part="head">
|
|
324
|
+
${this.eyebrow?g`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:E}
|
|
325
|
+
${this.heading?g`<div id=${i} class="heading" part="heading" role="heading" aria-level=${e}>${this.heading}</div>`:E}
|
|
326
|
+
${this.lead?g`<p class="lead" part="lead">${this.lead}</p>`:E}
|
|
327
|
+
</div>`:E,a=g`<impakt-accordion part="questions" exportparts="item, head, header, panel" marker="plus" .items=${this.items} .headingLevel=${e+1} .open=${this.open} .multiple=${this.multiple}>
|
|
328
|
+
${this.items.map(n=>g`<slot name=${`panel-${n.id}`} slot=${`panel-${n.id}`}>${n.body}</slot>`)}
|
|
329
|
+
</impakt-accordion>`;return this.heading?g`<section aria-labelledby=${i}>${t}${a}</section>`:g`<div>${t}${a}</div>`}},xt=class extends se{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=[...se.styles,yt,Pe`
|
|
463
330
|
:host { display: block; container: impakt-offer / inline-size; }
|
|
464
331
|
/* 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: ${
|
|
332
|
+
.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: ${T(6)}; align-items: start; }
|
|
466
333
|
.copy { grid-area: copy; }
|
|
467
334
|
.actions { grid-area: actions; }
|
|
468
335
|
ol { grid-area: points; }
|
|
469
|
-
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${
|
|
336
|
+
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${T(6)}; }
|
|
470
337
|
/* 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: ${
|
|
472
|
-
.heading { max-inline-size: 8.125em; font-family: ${
|
|
473
|
-
.lead { margin: 0; max-inline-size: 30rem; font-size: ${
|
|
338
|
+
.eyebrow { margin: 0; font-family: ${s.fontEyebrow}; font-size: 0.8125rem; line-height: 1.5; color: var(--impakt-eyebrow, ${s.textMuted}); }
|
|
339
|
+
.heading { max-inline-size: 8.125em; font-family: ${s.fontHeading}; font-size: clamp(2.25rem, 1.411rem + 3.836cqi, 4rem); font-weight: ${ne("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${s.textHeading}; }
|
|
340
|
+
.lead { margin: 0; max-inline-size: 30rem; font-size: ${De("md")}; line-height: 1.45; color: ${s.text}; }
|
|
474
341
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
475
342
|
/* 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: ${
|
|
477
|
-
.number { flex: none; font-family: ${
|
|
343
|
+
li { display: flex; gap: ${T(5)}; padding-block: ${T(5)}; border-block-start: ${s.borderThin} solid ${s.text}; font-size: 1.25rem; font-weight: ${ne("medium")}; line-height: 1.2; letter-spacing: -0.01em; color: ${s.text}; }
|
|
344
|
+
.number { flex: none; font-family: ${s.fontMono}; font-size: 0.8125rem; font-weight: ${ne("regular")}; line-height: 1.5; letter-spacing: 0; }
|
|
478
345
|
/* On a phone (15:993): everything 20px apart; the points 14px above and below, the words 16px, 14px after the number. */
|
|
479
346
|
@container impakt-offer (max-width: 44rem) {
|
|
480
|
-
.offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${
|
|
481
|
-
.copy { gap: ${
|
|
347
|
+
.offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${T(5)}; }
|
|
348
|
+
.copy { gap: ${T(5)}; }
|
|
482
349
|
.heading { line-height: 1.03; }
|
|
483
350
|
li { gap: 14px; padding-block: 14px; font-size: 1rem; }
|
|
484
351
|
}
|
|
485
|
-
`]}render(){let
|
|
352
|
+
`]}render(){let i=Math.min(Math.max(this.headingLevel,1),6);return g`<div class="offer" part="offer">
|
|
486
353
|
<div class="copy">
|
|
487
|
-
${this.eyebrow?
|
|
488
|
-
${this.heading?
|
|
489
|
-
${this.lead?
|
|
354
|
+
${this.eyebrow?g`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:E}
|
|
355
|
+
${this.heading?g`<div class="heading" part="heading" role="heading" aria-level=${i}>${this.heading}</div>`:E}
|
|
356
|
+
${this.lead?g`<p class="lead" part="lead">${this.lead}</p>`:E}
|
|
490
357
|
</div>
|
|
491
358
|
<div class="actions" part="actions"><slot name="actions"></slot></div>
|
|
492
|
-
${(this.points??[]).length?
|
|
493
|
-
${this.points.map((e,
|
|
494
|
-
</ol>`:
|
|
495
|
-
</div>`}}
|
|
359
|
+
${(this.points??[]).length?g`<ol role="list" part="points">
|
|
360
|
+
${this.points.map((e,t)=>g`<li><span class="number" aria-hidden="true">${String(t+1).padStart(2,"0")}</span><span>${e}</span></li>`)}
|
|
361
|
+
</ol>`:E}
|
|
362
|
+
</div>`}},$t=class extends se{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=[...se.styles,Ei,Pe`
|
|
496
363
|
:host { display: block; block-size: 100%; }
|
|
497
364
|
/* 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: ${
|
|
365
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: 14px; padding: ${T(6)}; background: ${s.surfaceCard}; border: ${s.borderThin} solid ${s.text}; border-radius: ${s.radius}; transition: background-color 140ms ease-out; }
|
|
499
366
|
/* The meta and the link in G2 Mono S: 11px medium capitals at 0.06em. */
|
|
500
|
-
.meta { margin: 0; font-family: ${
|
|
501
|
-
.heading { font-family: ${
|
|
367
|
+
.meta { margin: 0; font-family: ${s.fontMono}; font-size: 0.6875rem; font-weight: ${ne("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${s.textMuted}; }
|
|
368
|
+
.heading { font-family: ${s.fontHeading}; font-size: 1.5rem; font-weight: ${ne("semibold")}; line-height: 1.15; letter-spacing: -0.025em; color: ${s.text}; }
|
|
502
369
|
.heading a { color: inherit; text-decoration: none; }
|
|
503
370
|
.heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
504
371
|
.heading a:focus-visible { outline: none; }
|
|
505
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
372
|
+
.heading a:focus-visible::after { box-shadow: ${s.focusShadow}; }
|
|
506
373
|
article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
|
|
507
|
-
.text { margin: 0; font-size: 0.875rem; line-height: 1.4; color: ${
|
|
508
|
-
.more { font-family: ${
|
|
374
|
+
.text { margin: 0; font-size: 0.875rem; line-height: 1.4; color: ${s.textMuted}; }
|
|
375
|
+
.more { font-family: ${s.fontMono}; font-size: 0.6875rem; font-weight: ${ne("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${s.text}; }
|
|
376
|
+
/* The link's arrow slides forward when the card is pointed at or focused (impkt-web#51). */
|
|
377
|
+
.go { display: inline-block; transition: translate ${S.arrowDuration} ${S.arrowEasing}; }
|
|
378
|
+
article:has(a):hover .go, article:focus-within .go { translate: ${S.arrowDistance} 0; }
|
|
379
|
+
@media (prefers-reduced-motion: reduce) { .go { transition: none; } }
|
|
509
380
|
/* On a phone (15:1020): 20px inside and 12px apart. */
|
|
510
|
-
@media (max-width: 47.99rem) { article { gap: ${
|
|
381
|
+
@media (max-width: 47.99rem) { article { gap: ${T(3)}; padding: ${T(5)}; } }
|
|
511
382
|
@media (forced-colors: active) { article { border-color: CanvasText; } }
|
|
512
|
-
`]}render(){let
|
|
513
|
-
${this.meta?
|
|
514
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
515
|
-
${this.text?
|
|
516
|
-
${this.linkText&&this.href?
|
|
517
|
-
</article>`}},
|
|
383
|
+
`]}render(){let i=Math.min(Math.max(this.headingLevel,1),6);return g`<article part="card">
|
|
384
|
+
${this.meta?g`<p class="meta" part="meta">${this.meta}</p>`:E}
|
|
385
|
+
<div class="heading" part="heading" role="heading" aria-level=${i}>${this.href?g`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}</div>
|
|
386
|
+
${this.text?g`<p class="text" part="text">${this.text}</p>`:E}
|
|
387
|
+
${this.linkText&&this.href?g`<span class="more" aria-hidden="true">${this.linkText} <span class="go">→</span></span>`:E}
|
|
388
|
+
</article>`}},kt=class extends se{static{this.properties={label:{type:String},cursor:{type:String},hideLabelOn:{type:String,reflect:!0,attribute:"hide-label-on"},labelPhone:{type:String,attribute:"label-phone"}}}constructor(){super(),this.label="",this.labelPhone="",this.cursor=null,this.hideLabelOn=""}static{this.styles=[...se.styles,Pe`
|
|
518
389
|
/*
|
|
519
390
|
* The Selection (9:306): the accent behind the words with a 1.5px ink line, drawn 0.1em outside them at the sides
|
|
520
391
|
* (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
392
|
* heading. Its four 8px handles sit on its corners with the same line.
|
|
522
393
|
*/
|
|
523
|
-
:host { --x: 0.1em; --top: 0.0167em; --foot: 0.033em; display: inline-block; position: relative; isolation: isolate; color: ${
|
|
524
|
-
.box { position: absolute; z-index: -1; inset: var(--top) calc(-1 * var(--x)) var(--foot); box-sizing: border-box; background: ${
|
|
525
|
-
.handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${
|
|
526
|
-
.handle
|
|
527
|
-
.handle
|
|
528
|
-
.handle
|
|
529
|
-
.handle
|
|
530
|
-
/*
|
|
531
|
-
|
|
532
|
-
|
|
394
|
+
:host { --x: 0.1em; --trail: var(--impakt-highlight-trail, 0.05em); --top: 0.0167em; --foot: 0.033em; display: inline-block; position: relative; isolation: isolate; margin-inline-end: calc(var(--x) + var(--trail) + 0.05em); color: ${ce("color.accent.on","#1a1a1a")}; }
|
|
395
|
+
.box { position: absolute; z-index: -1; inset: var(--top) calc(-1 * var(--x) - var(--trail)) var(--foot) calc(-1 * var(--x)); box-sizing: border-box; background: ${ce("color.accent.default","#ffd43b")}; border: 1.5px solid ${ce("color.accent.on","#1a1a1a")}; }
|
|
396
|
+
.handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${s.surfaceCard}; border: 1.5px solid ${ce("color.accent.on","#1a1a1a")}; }
|
|
397
|
+
.handle.h1 { inset-block-start: calc(var(--top) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
398
|
+
.handle.h2 { inset-block-start: calc(var(--top) - 4px); inset-inline-end: calc(-1 * var(--x) - var(--trail) - 4px); }
|
|
399
|
+
.handle.h3 { inset-block-end: calc(var(--foot) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
400
|
+
.handle.h4 { inset-block-end: calc(var(--foot) - 4px); inset-inline-end: calc(-1 * var(--x) - var(--trail) - 4px); }
|
|
401
|
+
/*
|
|
402
|
+
* The label is meta: monospace capitals at 11px, square, 8px under the box and level with its edge (9:311). It is
|
|
403
|
+
* placed by a holder in the heading's own size, so the box's em measures are the heading's, not the label's.
|
|
404
|
+
*/
|
|
405
|
+
.label-at { position: absolute; inset-block-start: calc(100% - var(--foot) + 8px); inset-inline-start: calc(-1 * var(--x)); line-height: 0; }
|
|
406
|
+
.label { display: block; padding: 3px 7px; white-space: nowrap; font-family: ${s.fontMono}; font-size: 0.6875rem; font-weight: ${ne("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${s.surfaceCard}; background: ${s.text}; border-radius: ${s.radiusSm}; }
|
|
407
|
+
/* A phone tag, such as "Design" under "Design · H1 / 120" (90:1297, 92:2191, 96:2290), stands in for the label on a phone. */
|
|
408
|
+
.label.phone { display: none; }
|
|
409
|
+
@media (max-width: 40rem) { .label.phone { display: block; } .label.wide:has(+ .label.phone) { display: none; } :host([hide-label-on='phone']) .label-at { display: none; } }
|
|
533
410
|
/* 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; }
|
|
535
|
-
.cursor svg { display: block; flex: none; color: ${
|
|
536
|
-
.tag { margin-block-start: 18px; padding: 3px 6px; white-space: nowrap; font-family: ${
|
|
411
|
+
.cursor { position: absolute; inset-block-start: calc(100% - var(--foot) - 16px); inset-inline-start: calc(100% + var(--x) + var(--trail) - 4px); display: flex; align-items: flex-start; pointer-events: none; line-height: 1; }
|
|
412
|
+
.cursor svg { display: block; flex: none; color: ${s.text}; stroke: ${s.surfaceCard}; }
|
|
413
|
+
.tag { margin-block-start: 18px; padding: 3px 6px; white-space: nowrap; font-family: ${s.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${s.surfaceCard}; background: ${s.text}; }
|
|
537
414
|
@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
|
-
|
|
415
|
+
/* Selection draw (impkt-web#51): the frame is dragged out from its top-left corner over the words, then its handles appear; the size label counts up as it does. Until the frame is there the words keep the page's text colour. */
|
|
416
|
+
.label { --ik-count-duration: ${S.select}; }
|
|
417
|
+
:host([data-motion]) { animation: ik-highlight-words ${S.select} ${S.shape} ${qe(0)} both; }
|
|
418
|
+
:host([data-motion]) .box { animation: ik-highlight-draw ${S.select} ${S.shape} ${qe(0)} both; }
|
|
419
|
+
:host([data-motion]) :is(.label, .cursor) { animation: ik-reveal-fade ${S.mark} ${S.arrive} ${qe(0)} both; }
|
|
420
|
+
:host([data-motion]) .handle { animation: ik-reveal-mark ${S.mark} ${S.arrive} ${qe(0,"var(--impakt-motion-reveal-select-duration, 260ms)")} both; }
|
|
421
|
+
@keyframes ik-highlight-draw { from { clip-path: inset(0 100% 100% 0); } to { clip-path: inset(0 0 0 0); } }
|
|
422
|
+
@keyframes ik-highlight-words { from { color: ${s.text}; } }
|
|
423
|
+
`,ri]}render(){return g`<span class="box" part="box" aria-hidden="true"></span><slot></slot><span class="handle h1" aria-hidden="true"></span><span class="handle h2" aria-hidden="true"></span><span class="handle h3" aria-hidden="true"></span><span class="handle h4" aria-hidden="true"></span>${this.label||this.labelPhone?g`<span class="label-at" aria-hidden="true">${this.label?g`<span class="label wide" part="label" aria-hidden="true" data-ik-count="text">${this.label}</span>`:E}${this.labelPhone?g`<span class="label phone" part="label label-phone" aria-hidden="true" data-ik-count="text">${this.labelPhone}</span>`:E}</span>`:E}${this.cursor!=null?g`<span class="cursor" part="cursor" aria-hidden="true"
|
|
539
424
|
><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
|
|
540
|
-
>${this.cursor?
|
|
541
|
-
>`:
|
|
542
|
-
.
|
|
543
|
-
.
|
|
544
|
-
.
|
|
545
|
-
`,
|
|
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; }
|
|
548
|
-
.lead { margin: 0; color: ${p.textMuted}; text-wrap: pretty; }
|
|
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)}; }
|
|
551
|
-
:host([per-view='2']) { --most: 2; }
|
|
552
|
-
:host([per-view='3']) { --most: 3; }
|
|
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}; }
|
|
554
|
-
.track::-webkit-scrollbar { display: none; }
|
|
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; }
|
|
556
|
-
/* Whole slides only: a slice of the next one reads as content spilling out of the page. */
|
|
557
|
-
@container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
|
|
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}; }
|
|
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; }
|
|
563
|
-
.dot[aria-current='true'] span { inline-size: 24px; background: ${p.brand}; }
|
|
564
|
-
.buttons { display: flex; gap: ${h(2)}; }
|
|
565
|
-
section { position: relative; }
|
|
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} }
|
|
568
|
-
@media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
|
|
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}
|
|
570
|
-
@mouseenter=${()=>this.hold(!0)} @mouseleave=${()=>this.hold(!1)} @focusin=${()=>this.hold(!0)} @focusout=${()=>this.hold(!1)}>
|
|
571
|
-
<div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
|
|
572
|
-
<div class="controls" part="controls">
|
|
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>
|
|
574
|
-
<div class="buttons">
|
|
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>
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
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`
|
|
582
|
-
:host { display: block; container-type: inline-size; }
|
|
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; }
|
|
584
|
-
:host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
|
|
585
|
-
li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
|
|
586
|
-
:host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
|
|
587
|
-
.open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${p.surfaceInset}; border-radius: ${p.radiusXl}; overflow: hidden; cursor: zoom-in; }
|
|
588
|
-
.open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }
|
|
589
|
-
.open:hover img { transform: scale(1.03); }
|
|
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); } }
|
|
591
|
-
dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
|
|
592
|
-
dialog::backdrop { background: rgb(10 14 12 / 0.9); }
|
|
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; }
|
|
596
|
-
.middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${p.radiusLg}; }
|
|
597
|
-
figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
|
|
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>
|
|
601
|
-
</li>`})}</ul>
|
|
602
|
-
<dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
|
|
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>
|
|
605
|
-
<div class="middle">
|
|
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>
|
|
609
|
-
</div>
|
|
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`
|
|
613
|
-
:host { display: block; }
|
|
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)}; }
|
|
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; }
|
|
617
|
-
li:hover img { filter: none; opacity: 1; }
|
|
618
|
-
a { display: block; border-radius: ${p.radiusSm}; }
|
|
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`
|
|
425
|
+
>${this.cursor?g`<span class="tag">${this.cursor}</span>`:E}</span
|
|
426
|
+
>`:E}`}};customElements.define("impakt-work-list",ut);customElements.define("impakt-stat-row",bt);customElements.define("impakt-faq",ft);customElements.define("impakt-offer",xt);customElements.define("impakt-post-card",$t);customElements.define("impakt-highlight",kt);import{css as Ri,html as vt,nothing as wt}from"./atomic-ui.js";import{ImpaktElement as Ai,fontWeight as Je,lineHeight as ua,space as Y,spaceAround as ba,t as X,type as zt}from"./atomic-ui.js";var fa=Ri`
|
|
427
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${X.brand})); ${zt("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${X.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${Je("semibold")}); letter-spacing: ${X.trackingWide}; text-transform: uppercase; }
|
|
428
|
+
.h { margin: 0; color: ${X.textHeading}; font-family: ${X.fontHeading}; font-weight: ${Je("bold")}; letter-spacing: ${X.trackingTight}; text-wrap: balance; }
|
|
429
|
+
.lead { margin: 0; color: ${X.textMuted}; text-wrap: pretty; }
|
|
430
|
+
`,St=class extends Ai{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=[...Ai.styles,ba,fa,Ri`
|
|
621
431
|
:host { display: block; container-type: inline-size; }
|
|
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: ${
|
|
623
|
-
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${
|
|
624
|
-
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${
|
|
625
|
-
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${
|
|
626
|
-
.h { ${
|
|
627
|
-
.meta { margin: 0; ${
|
|
628
|
-
.body { margin: 0; color: ${
|
|
432
|
+
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${Y(6)}; }
|
|
433
|
+
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${Y(2)}; }
|
|
434
|
+
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${X.brand}; color: ${X.onBrand}; ${zt("sm")} font-weight: ${Je("bold")}; position: relative; z-index: 1; margin-block-end: ${Y(2)}; }
|
|
435
|
+
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${Y(6)} + 8px); block-size: 2px; background: ${X.rule}; }
|
|
436
|
+
.h { ${zt("lg")} letter-spacing: 0; }
|
|
437
|
+
.meta { margin: 0; ${zt("sm")} color: ${X.textMuted}; font-family: ${X.fontMono}; letter-spacing: 0.02em; }
|
|
438
|
+
.body { margin: 0; color: ${X.textMuted}; line-height: ${ua("normal")}; text-wrap: pretty; }
|
|
629
439
|
:host([orientation='vertical']) ol { grid-auto-flow: row; }
|
|
630
440
|
:host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
631
441
|
:host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
632
|
-
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
442
|
+
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${Y(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
633
443
|
@container (max-width: 40rem) {
|
|
634
444
|
ol { grid-auto-flow: row; }
|
|
635
445
|
li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
636
446
|
li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
637
|
-
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
447
|
+
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${Y(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
638
448
|
}
|
|
639
449
|
/* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */
|
|
640
|
-
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${
|
|
450
|
+
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${Y(5)}; border-block-start: 1px solid var(--rule); }
|
|
641
451
|
:host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }
|
|
642
452
|
/* 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: ${
|
|
644
|
-
:host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; font-weight: ${
|
|
645
|
-
:host([look='ruled']:not([tones])) .h { font-size: 1.25rem; font-weight: ${
|
|
646
|
-
|
|
453
|
+
:host([look='ruled']:not([tones])) li { padding-block-start: ${Y(4)}; }
|
|
454
|
+
:host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; font-weight: ${Je("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
455
|
+
:host([look='ruled']:not([tones])) .h { font-size: 1.25rem; font-weight: ${Je("medium")}; line-height: 1.2; letter-spacing: -0.01em; }
|
|
456
|
+
/* The text sets 20px lines at 14px, as the frame lays them out (10:515), so a four-line step is 80px of text. */
|
|
457
|
+
:host([look='ruled']:not([tones])) .body { font-size: 0.875rem; line-height: 1.25rem; }
|
|
647
458
|
:host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' · '; }
|
|
648
|
-
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${
|
|
459
|
+
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${Y(4)} - 1px); }
|
|
649
460
|
:host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }
|
|
650
461
|
:host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
|
|
651
|
-
:host([look='ruled']) ol { gap: ${
|
|
462
|
+
:host([look='ruled']) ol { gap: ${Y(5)}; }
|
|
652
463
|
/* 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. */
|
|
653
464
|
@container (max-width: 40rem) {
|
|
654
465
|
:host([look='ruled']) ol { gap: 0; }
|
|
655
|
-
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${
|
|
466
|
+
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${Y(6)}; min-block-size: 0; border-block-start: 0; }
|
|
656
467
|
: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; }
|
|
657
|
-
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${
|
|
658
|
-
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${
|
|
659
|
-
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${
|
|
468
|
+
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${Y(6)} + 2px); inset-inline-start: 0; inline-size: 10px; block-size: 10px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; background: ${X.surfaceCard}; }
|
|
469
|
+
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${Y(6)} + 7px); }
|
|
470
|
+
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${Y(6)} + 7px); }
|
|
660
471
|
:host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }
|
|
661
472
|
/* 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
473
|
:host([look='ruled']:not([tones])) li, :host([look='ruled']:not([tones])) li[aria-current] { gap: 6px; padding: 0 0 28px 26px; }
|
|
@@ -665,513 +476,175 @@ import"./atomic-ui.js";import{css as ht,html as j,nothing as ce}from"./atomic-ui
|
|
|
665
476
|
:host([look='ruled']:not([tones])) li:first-child::before { inset-block-start: 14px; }
|
|
666
477
|
:host([look='ruled']:not([tones])) li:last-child::before { display: none; }
|
|
667
478
|
/* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */
|
|
668
|
-
:host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${
|
|
669
|
-
:host([look='ruled'][tones]) li::after { inset-block: ${
|
|
479
|
+
:host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${X.text}; }
|
|
480
|
+
:host([look='ruled'][tones]) li::after { inset-block: ${Y(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; }
|
|
670
481
|
}
|
|
671
482
|
@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; } }
|
|
672
|
-
`]}render(){return
|
|
673
|
-
${
|
|
674
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${
|
|
675
|
-
${
|
|
676
|
-
</li>`)}</ol>`}}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
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")}; }
|
|
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}; }
|
|
689
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${h(3)} ${h(4)}; align-items: center; margin-block-start: ${h(2)}; }
|
|
690
|
-
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${p.radius2xl}; box-shadow: ${p.shadowXl}; }
|
|
691
|
-
.picture { position: relative; }
|
|
692
|
-
.picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
|
|
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; }
|
|
694
|
-
@container (max-width: 48rem) {
|
|
695
|
-
.split { grid-template-columns: minmax(0, 1fr); gap: ${h(8)}; }
|
|
696
|
-
:host([image-side='start']) .picture { order: 0; }
|
|
697
|
-
.h { ${U("3xl")} }
|
|
698
|
-
}
|
|
699
|
-
`]}render(){return C`<div class="split" part="split">
|
|
700
|
-
<div class="words">
|
|
701
|
-
${this.eyebrow?C`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:Y}
|
|
702
|
-
<div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
|
|
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}
|
|
705
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
706
|
-
</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`
|
|
709
|
-
:host { display: block; container-type: inline-size; }
|
|
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}; }
|
|
711
|
-
:host([tone='subtle']) .panel { background: ${p.surfaceSubtle}; box-shadow: none; }
|
|
712
|
-
:host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.shadowMd};
|
|
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. */
|
|
714
|
-
--impakt-button-primary: ${p.onBrand}; --impakt-button-on-primary: ${p.brand}; --impakt-button-primary-hover: color-mix(in srgb, ${p.onBrand} 86%, ${p.brand}); --impakt-color-text-inverse: ${p.brand}; }
|
|
715
|
-
/* Only the words take the light colours: a button in the actions keeps its own. */
|
|
716
|
-
:host([tone='brand']) .words { --impakt-color-text-heading: ${p.onBrand}; --impakt-color-text-default: ${p.onBrand}; --impakt-color-text-muted: ${p.onBrand}; --impakt-color-text-link: ${p.onBrand}; }
|
|
717
|
-
/* A soft glow in the corner, so a flat colour has some depth. Decoration only. */
|
|
718
|
-
:host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${p.onBrand} 18%, transparent), transparent); pointer-events: none; }
|
|
719
|
-
.photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
720
|
-
.panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }
|
|
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%); }
|
|
722
|
-
.panel.pictured .words, .panel.pictured .actions { z-index: 1; }
|
|
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%); } }
|
|
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)}; }
|
|
728
|
-
:host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
|
|
729
|
-
:host([align='center']) .panel { flex-direction: column; text-align: center; }
|
|
730
|
-
:host([align='center']) .words { align-items: center; }
|
|
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; } }
|
|
732
|
-
@media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
|
|
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}
|
|
735
|
-
<div class="words">
|
|
736
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
|
|
737
|
-
${this.lead?C`<p class="lead">${this.lead}</p>`:Y}
|
|
738
|
-
</div>
|
|
739
|
-
<div class="actions"><slot name="actions"></slot></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`
|
|
741
|
-
:host { display: block; container-type: inline-size; }
|
|
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)); }
|
|
745
|
-
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
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")}; }
|
|
750
|
-
.face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
751
|
-
.name { font-weight: ${Ae("semibold")}; ${U("sm")} }
|
|
752
|
-
.about { color: ${p.textMuted}; ${U("sm")} }
|
|
753
|
-
@container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
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`
|
|
760
|
-
:host { display: block; container-type: inline-size; }
|
|
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; }
|
|
768
|
-
button:hover { background: ${p.brandHover}; }
|
|
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")}; }
|
|
771
|
-
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
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">
|
|
773
|
-
<div class="words">
|
|
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}
|
|
776
|
-
</div>
|
|
777
|
-
<div aria-live="polite">${this.done?C`<p class="done">${this.doneText}</p>`:C`<form @submit=${this.submit}>
|
|
778
|
-
<label for=${e}>${this.label}</label>
|
|
779
|
-
<input id=${e} type="email" name="email" autocomplete="email" required />
|
|
780
|
-
<button type="submit">${this.buttonText}</button>
|
|
781
|
-
${this.smallPrint?C`<p class="note">${this.smallPrint}</p>`:Y}
|
|
782
|
-
</form>`}</div>
|
|
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`
|
|
784
|
-
:host { display: block; container-type: inline-size; }
|
|
785
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${b(6)}; align-items: start; }
|
|
786
|
-
.plan { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; background: ${c.surfaceSubtle}; box-shadow: ${c.shadowMd}; line-height: 0; }
|
|
787
|
-
.plan img { inline-size: 100%; block-size: auto; }
|
|
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; }
|
|
789
|
-
.pin:hover { transform: scale(1.12); }
|
|
790
|
-
.pin.reserved { color: ${c.text}; background: ${c.warningSubtle}; border-color: ${c.warning}; border-style: dashed; }
|
|
791
|
-
.pin.sold { color: ${c.textMuted}; background: ${c.surfaceCard}; border-color: ${c.border}; border-radius: ${c.radius}; }
|
|
792
|
-
.pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${c.shadowLg}, 0 0 0 3px ${c.brand}; }
|
|
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); }
|
|
794
|
-
.hint { margin: 0; color: ${c.textMuted}; }
|
|
795
|
-
.name { margin: 0; font-family: ${c.fontHeading}; ${ne("2xl")} font-weight: ${we("bold")}; color: ${c.textHeading}; }
|
|
796
|
-
.sub { margin: 0; color: ${c.textMuted}; }
|
|
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)); }
|
|
799
|
-
.status.reserved { color: ${c.warningText}; background: ${c.warningSubtle}; }
|
|
800
|
-
.status.sold { color: ${c.text}; background: ${c.surfaceSubtle}; }
|
|
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}; }
|
|
802
|
-
.go:hover { background: ${c.brandHover}; }
|
|
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)}; }
|
|
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); }
|
|
806
|
-
.key.reserved { background: ${c.warningSubtle}; border: 2px dashed ${c.warning}; }
|
|
807
|
-
.key.sold { background: ${c.surfaceCard}; border: 2px solid ${c.border}; border-radius: 3px; }
|
|
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}); }
|
|
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); }
|
|
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}; } }
|
|
811
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
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">
|
|
817
|
-
<div>
|
|
818
|
-
<div class="plan" part="plan">
|
|
819
|
-
<img src=${this.imageSrc} alt=${this.imageAlt} />
|
|
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>`})}
|
|
821
|
-
</div>
|
|
822
|
-
<ul class="legend">
|
|
823
|
-
<li><span class="key"></span>${this.availableText}</li>
|
|
824
|
-
<li><span class="key reserved"></span>${this.reservedText}</li>
|
|
825
|
-
<li><span class="key sold"></span>${this.soldText}</li>
|
|
826
|
-
</ul>
|
|
827
|
-
</div>
|
|
828
|
-
<div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
|
|
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`
|
|
830
|
-
:host { display: block; container-type: inline-size; }
|
|
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); }
|
|
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}; }
|
|
837
|
-
input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${c.brand}; }
|
|
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)}; }
|
|
844
|
-
dt { opacity: 0.85; }
|
|
845
|
-
dd { margin: 0; font-weight: ${we("semibold")}; }
|
|
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). */
|
|
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">
|
|
850
|
-
<div class="inputs">
|
|
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>
|
|
854
|
-
<div class="two">
|
|
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>
|
|
857
|
-
</div>
|
|
858
|
-
</div>
|
|
859
|
-
<div class="result">
|
|
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>
|
|
862
|
-
<dl>
|
|
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>
|
|
865
|
-
</dl>
|
|
866
|
-
</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`
|
|
869
|
-
.frame { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowLg}; line-height: 0; --at: 50%; }
|
|
870
|
-
img { display: block; inline-size: 100%; block-size: auto; }
|
|
871
|
-
.after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
|
|
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)}; }
|
|
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; }
|
|
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}; }
|
|
877
|
-
input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
|
|
878
|
-
.frame:has(input:focus-visible) .grip { box-shadow: ${c.focusShadow}; }
|
|
879
|
-
`]}render(){return V`<div class="frame" part="frame" style="--at:${this.position}%">
|
|
880
|
-
<img src=${this.beforeSrc} alt=${this.beforeAlt} />
|
|
881
|
-
<img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
|
|
882
|
-
<span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
|
|
883
|
-
<span class="tag a" aria-hidden="true">${this.afterLabel}</span>
|
|
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`
|
|
887
|
-
:host { display: block; }
|
|
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; }
|
|
889
|
-
.bar.on { transform: none; visibility: visible; }
|
|
890
|
-
.spacer { block-size: 5rem; }
|
|
891
|
-
.h { font-family: ${c.fontHeading}; ${ne("md")} font-weight: ${we("bold")}; color: ${c.textHeading}; }
|
|
892
|
-
.t { ${ne("xs")} color: ${c.textMuted}; }
|
|
893
|
-
.words { min-inline-size: 0; }
|
|
894
|
-
.actions { display: flex; flex: none; gap: ${b(2)}; }
|
|
895
|
-
@media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
|
|
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>
|
|
897
|
-
<section class="bar ${this.shown?"on":""}" part="bar" aria-label=${this.label}>
|
|
898
|
-
<div class="words">
|
|
899
|
-
${this.heading?V`<div class="h">${this.heading}</div>`:ke}
|
|
900
|
-
${this.lead?V`<div class="t">${this.lead}</div>`:ke}
|
|
901
|
-
</div>
|
|
902
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
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`
|
|
904
|
-
:host { display: block; container-type: inline-size; }
|
|
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); }
|
|
906
|
-
.wrap.solo { grid-template-columns: minmax(0, 1fr); }
|
|
907
|
-
.map { min-block-size: 16rem; background: ${c.surfaceSubtle}; }
|
|
908
|
-
.map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
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}; }
|
|
913
|
-
.row a { display: inline-flex; align-items: center; min-block-size: ${c.targetMin}; margin-block-start: -2px; }
|
|
914
|
-
a { color: ${c.link}; }
|
|
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)}; }
|
|
917
|
-
li span:last-child { color: ${c.textMuted}; text-align: end; }
|
|
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}; }
|
|
919
|
-
.go:hover { background: ${c.brandHover}; }
|
|
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}
|
|
923
|
-
<div class="info">
|
|
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}
|
|
930
|
-
</div>
|
|
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`
|
|
932
|
-
.card { background: ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-shadow: ${d.shadowSm}, 0 0 0 1px ${d.hairline}; }
|
|
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; }
|
|
935
|
-
.btn:hover { background: ${d.brandHover}; }
|
|
936
|
-
.btn.quiet { color: ${d.link}; background: transparent; box-shadow: inset 0 0 0 ${d.borderThin} ${d.border}; }
|
|
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`
|
|
483
|
+
`]}render(){return vt`<ol part="list">${(this.items??[]).map((i,e)=>vt`<li part="step" aria-current=${e===this.current?"step":wt} style=${this.look==="ruled"?`--chart:var(--impakt-color-chart-${e%5+1}, var(--impakt-color-brand-default, #1f4ed8))`:wt}>
|
|
484
|
+
${i.meta?vt`<p class="meta">${i.meta}</p>`:wt}
|
|
485
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>${i.heading}</div>
|
|
486
|
+
${i.text?vt`<p class="body">${i.text}</p>`:wt}
|
|
487
|
+
</li>`)}</ol>`}};customElements.define("impakt-steps",St);import{css as oi,html as A,nothing as de}from"./atomic-ui.js";import{say as We,pageLocale as xa,ImpaktElement as Tt,focusRing as Hi,targetSize as Ii,visuallyHidden as $a,fontWeight as we,space as M,spaceAround as qi,t as p,token as Ge,type as ze}from"./atomic-ui.js";var Oi=oi`
|
|
488
|
+
.card { background: ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-shadow: ${p.shadowSm}, 0 0 0 1px ${p.hairline}; }
|
|
489
|
+
.h { margin: 0; font-family: ${p.fontHeading}; ${ze("2xl")} font-weight: ${we("bold")}; color: ${p.textHeading}; }
|
|
490
|
+
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${M(2.5)} ${M(5)}; font: inherit; font-weight: ${we("semibold")}; color: ${p.onBrand}; text-decoration: none; background: ${p.brand}; border: 0; border-radius: ${p.radiusLg}; cursor: pointer; }
|
|
491
|
+
.btn:hover { background: ${p.brandHover}; }
|
|
492
|
+
.btn.quiet { color: ${p.link}; background: transparent; box-shadow: inset 0 0 0 ${p.borderThin} ${p.border}; }
|
|
493
|
+
.small { margin: 0; ${ze("xs")} color: ${p.textMuted}; }
|
|
494
|
+
.visually-hidden { ${$a} }
|
|
495
|
+
`,Bi=A`<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>`,Mt=class extends Tt{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=[...Tt.styles,Hi,Ii,qi,Oi,oi`
|
|
940
496
|
:host { display: block; container-type: inline-size; }
|
|
941
|
-
.h { margin-block-end: ${
|
|
942
|
-
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${
|
|
943
|
-
.plan { --plan-accent: ${
|
|
497
|
+
.h { margin-block-end: ${M(5)}; }
|
|
498
|
+
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${M(4)}; }
|
|
499
|
+
.plan { --plan-accent: ${Ge("color.accent.default","#ffd43b")}; --plan-on-accent: ${Ge("color.accent.on","#111111")}; position: relative; display: flex; flex-direction: column; gap: ${M(3)}; padding: ${M(6)}; color: ${p.text}; border: ${p.borderThin} solid ${p.text}; border-radius: ${p.radiusSm}; box-shadow: none; }
|
|
944
500
|
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
945
|
-
.plan.top { background: ${
|
|
946
|
-
.badge { align-self: flex-start; padding: 2px ${
|
|
947
|
-
.name { margin: 0; ${
|
|
948
|
-
.price { margin: 0; font-family: ${
|
|
501
|
+
.plan.top { background: ${p.text}; color: ${p.surfaceCard}; --plan-muted: color-mix(in srgb, ${p.surfaceCard} 72%, ${p.text}); }
|
|
502
|
+
.badge { align-self: flex-start; padding: 2px ${M(2)}; font-family: ${p.fontMono}; font-size: 0.6875rem; font-weight: ${we("medium")}; line-height: 1.4; letter-spacing: ${p.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
503
|
+
.name { margin: 0; ${ze("lg")} font-weight: ${we("medium")}; color: inherit; }
|
|
504
|
+
.price { margin: 0; font-family: ${p.fontHeading}; ${ze("4xl")} font-weight: ${we("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
949
505
|
/* 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. */
|
|
950
506
|
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
951
|
-
.period { margin-inline-start: ${
|
|
952
|
-
.note { margin: 0; ${
|
|
953
|
-
ul { flex: 1; margin: 0; padding: ${
|
|
954
|
-
li { display: flex; gap: ${
|
|
955
|
-
li[data-has='false'] { color: var(--plan-muted, ${
|
|
507
|
+
.period { margin-inline-start: ${M(1)}; font-family: ${p.fontMono}; font-size: 0.8125rem; font-weight: ${we("regular")}; letter-spacing: 0; color: var(--plan-muted, ${p.textMuted}); }
|
|
508
|
+
.note { margin: 0; ${ze("sm")} color: var(--plan-muted, ${p.textMuted}); }
|
|
509
|
+
ul { flex: 1; margin: 0; padding: ${M(3)} 0 0; list-style: none; display: grid; gap: ${M(2)}; align-content: start; }
|
|
510
|
+
li { display: flex; gap: ${M(2)}; ${ze("sm")} }
|
|
511
|
+
li[data-has='false'] { color: var(--plan-muted, ${p.textMuted}); }
|
|
956
512
|
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
957
513
|
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
958
|
-
.plan .btn { justify-content: space-between; gap: ${
|
|
959
|
-
.plan .btn:hover { background: ${
|
|
514
|
+
.plan .btn { justify-content: space-between; gap: ${M(4)}; color: ${p.surfaceCard}; background: ${p.text}; border-radius: ${p.radiusSm}; box-shadow: none; }
|
|
515
|
+
.plan .btn:hover { background: ${p.brandHover}; }
|
|
960
516
|
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
961
|
-
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${
|
|
517
|
+
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${p.surfaceCard}); }
|
|
962
518
|
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
963
|
-
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
964
|
-
`]}has(
|
|
965
|
-
${this.heading?
|
|
519
|
+
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${M(6)}; } }
|
|
520
|
+
`]}has(i,e){return i.includes.split(",").map(t=>t.trim().toLowerCase()).includes(e.label.trim().toLowerCase())}choose(i,e){this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plan:i},bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}render(){return A`
|
|
521
|
+
${this.heading?A`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:de}
|
|
966
522
|
<div class="grid" style=${`--cols: ${Math.max(1,this.plans.length)}`}>
|
|
967
|
-
${this.plans.map(
|
|
968
|
-
${
|
|
969
|
-
<h3 class="name" id=${this.id_(`n-${
|
|
970
|
-
<p class="price">${
|
|
971
|
-
${
|
|
972
|
-
<ul>${this.rows.map(e=>{let
|
|
973
|
-
${
|
|
523
|
+
${this.plans.map(i=>A`<section class="card plan ${i.badge?"top":""}" aria-labelledby=${this.id_(`n-${i.id}`)}>
|
|
524
|
+
${i.badge?A`<span class="badge">${i.badge}</span>`:de}
|
|
525
|
+
<h3 class="name" id=${this.id_(`n-${i.id}`)}>${i.name}</h3>
|
|
526
|
+
<p class="price">${i.price}${i.period?A` <span class="period">${i.period}</span>`:de}</p>
|
|
527
|
+
${i.note?A`<p class="note">${i.note}</p>`:de}
|
|
528
|
+
<ul>${this.rows.map(e=>{let t=this.has(i,e);return A`<li data-has=${String(t)}><span class="mark" aria-hidden="true">${t?"\u221A":"\u2013"}</span><span>${e.label}${t?A`<span class="visually-hidden">: ${We("included")}</span>`:A`<span class="not"> · ${We("not included")}</span>`}</span></li>`})}</ul>
|
|
529
|
+
${i.href?A`<a class="btn" href=${i.href} @click=${e=>this.choose(i,e)}><span>${this.buttonText}<span class="visually-hidden"> ${i.name}</span></span>${Bi}</a>`:A`<button class="btn" type="button" @click=${e=>this.choose(i,e)}><span>${this.buttonText}<span class="visually-hidden"> ${i.name}</span></span>${Bi}</button>`}
|
|
974
530
|
</section>`)}
|
|
975
|
-
</div>`}};function
|
|
531
|
+
</div>`}};function ji(l,i){let e=/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(l),t=i&&!/^en\b/i.test(i)?`&hl=${encodeURIComponent(i.split("-")[0])}&cc_lang_pref=${encodeURIComponent(i.split("-")[0])}`:"";if(e)return`https://www.youtube-nocookie.com/embed/${e[1]}?autoplay=1&rel=0${t}`;let a=/vimeo\.com\/(?:video\/)?(\d+)/.exec(l);return a?`https://player.vimeo.com/video/${a[1]}?autoplay=1&dnt=1`:null}var Qe=class extends Tt{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=[...Tt.styles,Hi,qi,Oi,oi`
|
|
976
532
|
:host { display: block; }
|
|
977
|
-
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${
|
|
533
|
+
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${p.radiusXl}; background: #111; }
|
|
978
534
|
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
979
535
|
:host([ratio='1:1']) .frame { aspect-ratio: 1; }
|
|
980
536
|
:host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }
|
|
981
537
|
iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }
|
|
982
538
|
.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; }
|
|
983
|
-
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${
|
|
539
|
+
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${p.brand}; box-shadow: ${p.shadowLg}; }
|
|
984
540
|
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
985
|
-
.label { position: absolute; inset-inline: ${
|
|
986
|
-
.foot { margin: ${
|
|
987
|
-
.foot a { color: ${
|
|
541
|
+
.label { position: absolute; inset-inline: ${M(5)}; inset-block-end: ${M(4)}; ${ze("lg")} font-weight: ${we("semibold")}; text-align: start; }
|
|
542
|
+
.foot { margin: ${M(2)} 0 0; ${ze("sm")} }
|
|
543
|
+
.foot a { color: ${p.link}; }
|
|
988
544
|
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
989
545
|
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
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: ${
|
|
991
|
-
.bar { display: flex; align-items: center; gap: ${
|
|
546
|
+
.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: ${p.borderThin} solid var(--stage-rule); }
|
|
547
|
+
.bar { display: flex; align-items: center; gap: ${M(1.5)}; padding: ${M(3)} ${M(4)}; border-block-end: ${p.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
992
548
|
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
993
|
-
.bar .dot:first-child { background: ${
|
|
994
|
-
.bar .caption { margin-inline-start: ${
|
|
549
|
+
.bar .dot:first-child { background: ${Ge("color.accent.default","#ffd43b")}; }
|
|
550
|
+
.bar .caption { margin-inline-start: ${M(1.5)}; font-family: ${p.fontMono}; font-size: 0.6875rem; letter-spacing: ${p.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
995
551
|
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
996
552
|
:host([look='window']) .play { background: none; color: inherit; }
|
|
997
553
|
:host([look='window']) .disc { display: none; }
|
|
998
|
-
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${
|
|
999
|
-
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${
|
|
554
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${M(3)}; max-inline-size: calc(100% - 2 * ${M(5)}); box-sizing: border-box; padding: ${M(3)} ${M(5)}; ${ze("md")} font-weight: ${we("medium")}; color: ${Ge("color.accent.on","#111111")}; background: ${Ge("color.accent.default","#ffd43b")}; }
|
|
555
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${Ge("color.accent.default","#ffd43b")} 88%, #ffffff); }
|
|
1000
556
|
:host([look='window']) .play:focus-visible { outline: none; }
|
|
1001
|
-
:host([look='window']) .play:focus-visible .label { box-shadow: ${
|
|
1002
|
-
.length { font-family: ${
|
|
1003
|
-
.transcript { margin-block-start: ${
|
|
1004
|
-
.transcript summary { ${
|
|
557
|
+
:host([look='window']) .play:focus-visible .label { box-shadow: ${p.focusShadow}; }
|
|
558
|
+
.length { font-family: ${p.fontMono}; font-size: 0.6875rem; letter-spacing: ${p.trackingWide}; text-transform: uppercase; }
|
|
559
|
+
.transcript { margin-block-start: ${M(3)}; border-block: ${p.borderThin} solid ${p.text}; }
|
|
560
|
+
.transcript summary { ${Ii} display: flex; align-items: center; gap: ${M(2)}; padding-block: ${M(3)}; cursor: pointer; font-weight: ${we("medium")}; list-style: none; }
|
|
1005
561
|
.transcript summary::-webkit-details-marker { display: none; }
|
|
1006
|
-
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${
|
|
562
|
+
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${p.fontMono}; }
|
|
1007
563
|
.transcript[open] summary::before { content: '−'; }
|
|
1008
|
-
.transcript .words { padding-block-end: ${
|
|
564
|
+
.transcript .words { padding-block-end: ${M(4)}; color: ${p.textMuted}; display: grid; gap: ${M(3)}; max-inline-size: 65ch; }
|
|
1009
565
|
.transcript p { margin: 0; }
|
|
1010
566
|
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
1011
|
-
`]}render(){let
|
|
567
|
+
`]}render(){let i=ji(this.videoSrc,xa(this)),e;this.videoSrc?i&&this.playing?e=A`<iframe src=${i} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`:i?e=A`${this.posterSrc?A`<img src=${this.posterSrc} alt="" />`:de}
|
|
1012
568
|
<button class="play" type="button" @click=${()=>{this.playing=!0}}>
|
|
1013
569
|
<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>
|
|
1014
|
-
<span class="label">${this.playText}${this.duration?
|
|
1015
|
-
</button>`:e=
|
|
570
|
+
<span class="label">${this.playText}${this.duration?A` <span class="length">${this.duration}</span>`:de}<span class="visually-hidden">: ${this.label}</span></span>
|
|
571
|
+
</button>`:e=A`<video controls preload="metadata" poster=${this.posterSrc||de} aria-label=${this.label}>
|
|
1016
572
|
<source src=${this.videoSrc} />
|
|
1017
|
-
${this.captionsSrc?
|
|
1018
|
-
</video>`:e=
|
|
1019
|
-
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?
|
|
1020
|
-
${
|
|
1021
|
-
</div>`:
|
|
1022
|
-
${a.length?
|
|
1023
|
-
${this.transcriptHref?
|
|
1024
|
-
:host { display: block; }
|
|
1025
|
-
.box { padding: ${u(5)}; border-inline-start: 6px solid ${d.warning}; border-radius: ${d.radiusLg}; background: ${d.warningSubtle}; }
|
|
1026
|
-
:host([kind='insurance']) .box { border-color: ${d.info}; background: ${d.infoSubtle}; }
|
|
1027
|
-
strong { display: block; margin-block-end: ${u(1)}; ${se("md")} color: ${d.text}; }
|
|
1028
|
-
p { margin: 0; color: ${d.text}; }
|
|
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). */
|
|
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`
|
|
1036
|
-
:host { display: block; container-type: inline-size; }
|
|
1037
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
|
|
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; }
|
|
1040
|
-
fieldset { margin: 0; padding: 0; border: 0; }
|
|
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; }
|
|
1043
|
-
.choices input { accent-color: ${d.brand}; }
|
|
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}; }
|
|
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). */
|
|
1051
|
-
.foot .small { color: ${d.text}; }
|
|
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">
|
|
1054
|
-
<div class="inputs">
|
|
1055
|
-
${this.heading?w`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:G}
|
|
1056
|
-
<div><label for=${this.id_("price")}>${P("Price of the home (\xA3)")}</label>
|
|
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>
|
|
1058
|
-
<fieldset><legend>${P("Are you buying")}</legend><div class="choices">
|
|
1059
|
-
${i.map(([a,r])=>w`<label><input type="radio" name=${this.id_("buyer")} .checked=${this.buyer===a} @change=${()=>{this.buyer=a}} />${r}</label>`)}
|
|
1060
|
-
</div></fieldset>
|
|
1061
|
-
</div>
|
|
1062
|
-
<div class="result" aria-live="polite">
|
|
1063
|
-
<p class="caption">${P("Stamp duty to pay")}</p>
|
|
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}
|
|
1067
|
-
</div>
|
|
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">
|
|
1071
|
-
<div class="inputs">
|
|
1072
|
-
${this.heading?w`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:G}
|
|
1073
|
-
${e("income",P("Your yearly income before tax (\xA3)"))}
|
|
1074
|
-
${e("secondIncome",P("A second person\u2019s income, if buying together (\xA3)"))}
|
|
1075
|
-
${e("deposit",P("Your deposit (\xA3)"))}
|
|
1076
|
-
</div>
|
|
1077
|
-
<div class="result" aria-live="polite">
|
|
1078
|
-
<p class="caption">${P("You could borrow about")}</p>
|
|
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>
|
|
1081
|
-
</div>
|
|
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`
|
|
1085
|
-
:host { display: block; container-type: inline-size; }
|
|
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; }
|
|
1088
|
-
.hours { margin: 0; white-space: pre-line; color: ${d.textMuted}; }
|
|
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">
|
|
1097
|
-
<div>
|
|
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}
|
|
1102
|
-
</div>
|
|
1103
|
-
${this.callbackHeading?this.sent?w`<p class="done" role="status">${this.doneText}</p>`:w`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
|
|
1104
|
-
<p class="sub" id=${this.id_("cb")}>${this.callbackHeading}</p>
|
|
1105
|
-
<div><label for=${this.id_("name")}>${P("Your name")}</label><input id=${this.id_("name")} name="name" autocomplete="name" required /></div>
|
|
1106
|
-
<div><label for=${this.id_("tel")}>${P("Phone number")}</label><input id=${this.id_("tel")} name="phone" type="tel" autocomplete="tel" required /></div>
|
|
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>
|
|
1108
|
-
<button class="btn" type="submit">${this.buttonText}</button>
|
|
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`
|
|
573
|
+
${this.captionsSrc?A`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />`:de}
|
|
574
|
+
</video>`:e=A`<div class="empty">${We("Add a video address")}</div>`;let t=A`<div class="frame" part="frame">${e}</div>`,a=(this.transcript??"").split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean);return A`${this.look==="window"?A`<div class="window" part="window">
|
|
575
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?A`<span class="caption">${this.caption}</span>`:de}</div>
|
|
576
|
+
${t}
|
|
577
|
+
</div>`:t}
|
|
578
|
+
${a.length?A`<details class="transcript" part="transcript"><summary>${this.transcriptText||We("Read the transcript")}</summary><div class="words">${a.map(n=>A`<p>${n}</p>`)}</div></details>`:de}
|
|
579
|
+
${this.transcriptHref?A`<p class="foot"><a href=${this.transcriptHref}>${We("Read the transcript")}<span class="visually-hidden">${We(" of {video}",{video:this.label})}</span></a></p>`:de}`}};Qe.createProperty("playing",{state:!0});customElements.define("impakt-plan-comparison",Mt);customElements.define("impakt-video",Qe);import{css as ka,html as C,nothing as U,unsafeCSS as Ni}from"./atomic-ui.js";import{ImpaktElement as Fi,R as si,pageLocale as Di,say as j,focusRing as ya,targetSize as li,visuallyHidden as Pi,fontSize as ci,fontWeight as ue,space as h,spaceAround as va,t as c,token as Wi,type as Oe,toneOf as Ct}from"./atomic-ui.js";var Lt=l=>l.reduce((i,e)=>i+e,0),Gi=(l,i)=>l.find(e=>typeof e.below=="number"&&i<e.below)??l.at(-1);function Ye(l,i,e){let t=l.flatMap(r=>(i[r.id]??[]).flatMap(m=>r.choices.filter(R=>R.id===m))),a=Lt(t.map(r=>r.cost??0)),n=Lt(t.map(r=>r.weeks??0));for(let r of t)a*=r.costFactor??1,n*=r.weeksFactor??1;let o=(Gi(e.teams,a)?.engineers??1)+Lt(t.map(r=>r.engineers??0));return{cost:a,low:Math.round(a*e.low),high:Math.round(a*e.high),weeks:Math.max(e.minWeeks,Math.round(n)),engineers:o,way:Gi(e.ways,a)?.text??""}}function di(l,i){let e=l.map(a=>typeof a.share=="number"?Math.max(1,Math.round(i*a.share)):0),t=Math.max(1,i-Lt(e));return l.map((a,n)=>typeof a.share=="number"?e[n]:t)}var Et=class extends Fi{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=[...Fi.styles,va,ya,ka`
|
|
1111
580
|
:host { display: block; container-type: inline-size; }
|
|
1112
581
|
[hidden] { display: none !important; }
|
|
1113
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${
|
|
1114
|
-
.mono { font-family: ${
|
|
1115
|
-
.sr-only { ${
|
|
582
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${h(10)}; align-items: start; }
|
|
583
|
+
.mono { font-family: ${c.fontMono}; font-size: ${ci("xs")}; letter-spacing: 0.04em; text-transform: uppercase; color: ${c.textMuted}; margin: 0; }
|
|
584
|
+
.sr-only { ${Pi} }
|
|
1116
585
|
|
|
1117
|
-
.progress { display: grid; gap: ${
|
|
586
|
+
.progress { display: grid; gap: ${h(2)}; margin-block-end: ${h(6)}; }
|
|
1118
587
|
.bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }
|
|
1119
|
-
.bar i { display: block; block-size: 100%; background: ${
|
|
588
|
+
.bar i { display: block; block-size: 100%; background: ${c.brand}; transition: inline-size 300ms ease; }
|
|
1120
589
|
|
|
1121
590
|
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
|
|
1122
|
-
legend { padding: 0; margin-block-end: ${
|
|
1123
|
-
.q { margin: 0; font-family: ${
|
|
1124
|
-
.hint { margin: 0 0 ${
|
|
591
|
+
legend { padding: 0; margin-block-end: ${h(2)}; }
|
|
592
|
+
.q { margin: 0; font-family: ${c.fontHeading}; font-weight: ${ue("bold")}; ${Oe("3xl")} letter-spacing: ${c.trackingTight}; color: ${c.textHeading}; outline: none; }
|
|
593
|
+
.hint { margin: 0 0 ${h(6)}; color: ${c.textMuted}; }
|
|
1125
594
|
|
|
1126
|
-
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
595
|
+
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(3)}; }
|
|
1127
596
|
.choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1128
|
-
.choice { position: relative; display: grid; gap: ${
|
|
1129
|
-
.choice:hover { border-color: ${
|
|
1130
|
-
.choice input { ${
|
|
1131
|
-
.choice:has(input:checked) { border-color: ${
|
|
1132
|
-
.choice:has(input:focus-visible) { box-shadow: ${
|
|
1133
|
-
.many .choice { padding: ${
|
|
1134
|
-
.label { font-weight: ${
|
|
1135
|
-
.small { ${
|
|
597
|
+
.choice { position: relative; display: grid; gap: ${h(1)}; align-content: start; padding: ${h(4)}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; background: ${c.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
|
|
598
|
+
.choice:hover { border-color: ${c.borderStrong}; }
|
|
599
|
+
.choice input { ${Pi} }
|
|
600
|
+
.choice:has(input:checked) { border-color: ${c.brand}; box-shadow: inset 0 0 0 1px ${c.brand}; background: ${c.brandSubtle}; }
|
|
601
|
+
.choice:has(input:focus-visible) { box-shadow: ${c.focusShadow}; }
|
|
602
|
+
.many .choice { padding: ${h(3)}; }
|
|
603
|
+
.label { font-weight: ${ue("semibold")}; }
|
|
604
|
+
.small { ${Oe("sm")} color: ${c.textMuted}; }
|
|
1136
605
|
/* A tick for a picked feature, drawn in the corner. */
|
|
1137
|
-
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${
|
|
606
|
+
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${h(2)}; inset-inline-end: ${h(3)}; color: ${c.brand}; font-weight: ${ue("bold")}; }
|
|
1138
607
|
|
|
1139
|
-
.scale { display: grid; gap: ${
|
|
1140
|
-
.scale input { inline-size: 100%; accent-color: ${
|
|
1141
|
-
.ticks { display: flex; justify-content: space-between; ${
|
|
1142
|
-
.ticks span[aria-current] { color: ${
|
|
608
|
+
.scale { display: grid; gap: ${h(3)}; }
|
|
609
|
+
.scale input { inline-size: 100%; accent-color: ${c.brand}; ${li} }
|
|
610
|
+
.ticks { display: flex; justify-content: space-between; ${Oe("sm")} color: ${c.textMuted}; }
|
|
611
|
+
.ticks span[aria-current] { color: ${c.text}; font-weight: ${ue("semibold")}; }
|
|
1143
612
|
.now { margin: 0; }
|
|
1144
613
|
|
|
1145
|
-
.nav { display: flex; gap: ${
|
|
1146
|
-
button, .send { ${
|
|
1147
|
-
.primary, .send { background: ${
|
|
1148
|
-
.primary:hover, .send:hover { background: ${
|
|
1149
|
-
|
|
1150
|
-
.
|
|
614
|
+
.nav { display: flex; gap: ${h(3)}; margin-block-start: ${h(8)}; }
|
|
615
|
+
button, .send { ${li} display: inline-flex; align-items: center; justify-content: center; gap: ${h(2)}; padding: ${h(2.5)} ${h(5)}; border-radius: ${c.radiusLg}; font: inherit; font-weight: ${ue("semibold")}; cursor: pointer; text-decoration: none; border: ${c.borderThin} solid transparent; }
|
|
616
|
+
.primary, .send { background: ${c.brand}; color: ${c.onBrand}; }
|
|
617
|
+
.primary:hover, .send:hover { background: ${c.brandHover}; }
|
|
618
|
+
/* The arrow slides forward when its button or link is pointed at or focused (impkt-web#51), 4px for Impakt and not at all for a brand that derives it. */
|
|
619
|
+
.go { display: inline-block; flex: none; transition: translate ${si.arrowDuration} ${si.arrowEasing}; }
|
|
620
|
+
:is(a, button):is(:hover, :focus-visible) .go { translate: ${si.arrowDistance} 0; }
|
|
621
|
+
@media (prefers-reduced-motion: reduce) { .go { transition: none; } }
|
|
622
|
+
.secondary { background: transparent; color: ${c.text}; border-color: ${c.borderStrong}; }
|
|
623
|
+
.secondary:hover { background: ${c.surfaceSubtle}; }
|
|
1151
624
|
|
|
1152
|
-
.panel { position: sticky; inset-block-start: ${
|
|
625
|
+
.panel { position: sticky; inset-block-start: ${h(6)}; overflow: hidden; isolation: isolate; padding: ${h(8)}; border-radius: ${c.radiusXl}; background: ${c.surfaceCard}; box-shadow: ${c.shadowMd}; display: grid; gap: ${h(2)}; }
|
|
1153
626
|
/* The glow behind the budget grows as the product does. */
|
|
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, ${
|
|
1155
|
-
.range { margin: 0; font-family: ${
|
|
1156
|
-
.weeks { margin: 0; ${
|
|
1157
|
-
.tip { margin: ${
|
|
627
|
+
.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, ${Ni(Ct(1,0))} 45%, transparent), color-mix(in srgb, ${Ni(Ct(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; }
|
|
628
|
+
.range { margin: 0; font-family: ${c.fontHeading}; font-weight: ${ue("bold")}; font-size: ${ci("5xl")}; line-height: 1; letter-spacing: ${c.trackingTight}; color: ${c.textHeading}; }
|
|
629
|
+
.weeks { margin: 0; ${Oe("lg")} }
|
|
630
|
+
.tip { margin: ${h(4)} 0 0; padding-block-start: ${h(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${c.textMuted}; }
|
|
1158
631
|
|
|
1159
|
-
.result { display: grid; gap: ${
|
|
1160
|
-
.summary { margin: 0; ${
|
|
632
|
+
.result { display: grid; gap: ${h(6)}; }
|
|
633
|
+
.summary { margin: 0; ${Oe("xl")} text-wrap: pretty; }
|
|
1161
634
|
.phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }
|
|
1162
635
|
.phases i { display: block; }
|
|
1163
|
-
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${
|
|
1164
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
636
|
+
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${h(2)} ${h(5)}; }
|
|
637
|
+
.legend li { display: inline-flex; align-items: center; gap: ${h(2)}; }
|
|
1165
638
|
.legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }
|
|
1166
|
-
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1167
|
-
dt { margin: 0 0 ${
|
|
1168
|
-
dd { margin: 0; font-weight: ${
|
|
1169
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
1170
|
-
.note { margin: 0; ${
|
|
1171
|
-
.status { margin: 0; ${
|
|
639
|
+
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(4)}; }
|
|
640
|
+
dt { margin: 0 0 ${h(1)}; }
|
|
641
|
+
dd { margin: 0; font-weight: ${ue("semibold")}; }
|
|
642
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${h(3)}; }
|
|
643
|
+
.note { margin: 0; ${Oe("sm")} color: ${c.textMuted}; }
|
|
644
|
+
.status { margin: 0; ${Oe("sm")} }
|
|
1172
645
|
|
|
1173
646
|
@container (max-width: 48rem) {
|
|
1174
|
-
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
647
|
+
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${h(8)}; }
|
|
1175
648
|
/* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it
|
|
1176
649
|
and it never widens the page (1.4.10). */
|
|
1177
650
|
.panel { position: relative; inset-block-start: auto; }
|
|
@@ -1179,39 +652,39 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1179
652
|
}
|
|
1180
653
|
@container (max-width: 30rem) {
|
|
1181
654
|
.choices { grid-template-columns: minmax(0, 1fr); }
|
|
1182
|
-
.range { font-size: ${
|
|
655
|
+
.range { font-size: ${ci("4xl")}; }
|
|
1183
656
|
}
|
|
1184
657
|
/*
|
|
1185
658
|
* layout="all": every question at once, and the result as an ink panel beside them, as the Estimator component
|
|
1186
659
|
* (10:544) draws them: the options 642px wide and the budget 430px, 10px apart. The options are 32px inside with
|
|
1187
660
|
* their parts 16px apart; the budget is 32px inside with its parts 14px apart, its lines 12px under their rules.
|
|
1188
661
|
*/
|
|
1189
|
-
.all { --accent: ${
|
|
1190
|
-
.all .questions { grid-area: questions; display: grid; align-content: start; gap: ${
|
|
1191
|
-
.all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${
|
|
1192
|
-
.all .questions impakt-chip-group::part(label) { margin-block-end: ${
|
|
1193
|
-
.all .foot { grid-area: note; padding: ${
|
|
662
|
+
.all { --accent: ${Wi("color.accent.default","#ffd43b")}; --on-accent: ${Wi("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: ${h(2.5)}; align-items: stretch; }
|
|
663
|
+
.all .questions { grid-area: questions; display: grid; align-content: start; gap: ${h(4)}; padding: ${h(8)} ${h(8)} 0; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.text}; border-block-end: 0; }
|
|
664
|
+
.all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${h(2)}; }
|
|
665
|
+
.all .questions impakt-chip-group::part(label) { margin-block-end: ${h(4)}; line-height: 1.4; }
|
|
666
|
+
.all .foot { grid-area: note; padding: ${h(4)} ${h(8)} ${h(8)}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.text}; border-block-start: 0; }
|
|
1194
667
|
/* The note in G2 Body S, 14px at 1.4. */
|
|
1195
668
|
.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: ${
|
|
1197
|
-
.all .ink .mono { color: var(--muted); font-size: 0.6875rem; font-weight: ${
|
|
669
|
+
.all .ink { grid-area: panel; display: flex; flex-direction: column; gap: var(--gap); padding: ${h(8)}; background: ${c.text}; color: ${c.surfaceCard}; --muted: color-mix(in srgb, ${c.surfaceCard} 72%, ${c.text}); --line: color-mix(in srgb, ${c.surfaceCard} 18%, ${c.text}); }
|
|
670
|
+
.all .ink .mono { color: var(--muted); font-size: 0.6875rem; font-weight: ${ue("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
1198
671
|
/* 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: ${
|
|
672
|
+
.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: ${ue("semibold")}; line-height: 1.04; letter-spacing: -0.04em; }
|
|
1200
673
|
.all .ink .weeks { font-size: 1rem; line-height: 1.45; }
|
|
1201
674
|
.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: ${
|
|
1203
|
-
.all .rows .length { font-family: ${
|
|
1204
|
-
.all .cta { ${
|
|
675
|
+
.all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${h(4)}; padding-block-start: ${h(3)}; border-block-start: ${c.borderThin} solid var(--line); font-size: 0.875rem; line-height: 1.4; }
|
|
676
|
+
.all .rows .length { font-family: ${c.fontMono}; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); white-space: nowrap; }
|
|
677
|
+
.all .cta { ${li} display: flex; align-items: center; justify-content: space-between; gap: ${h(4)}; box-sizing: border-box; min-block-size: 47px; padding: 14px ${h(5)}; font-size: 1rem; line-height: 1.2; font-weight: ${ue("medium")}; color: var(--on-accent); background: var(--accent); text-decoration: none; }
|
|
1205
678
|
.all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }
|
|
1206
|
-
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${
|
|
679
|
+
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${c.text}, 0 0 0 4px ${c.surfaceCard}; }
|
|
1207
680
|
.all .way { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
|
|
1208
681
|
/* 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. */
|
|
1209
682
|
@container (max-width: 48rem) {
|
|
1210
683
|
.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: ${
|
|
684
|
+
.all .questions { gap: 14px; padding: ${h(5)}; border-block-end: ${c.borderThin} solid ${c.text}; }
|
|
1212
685
|
.all .questions impakt-chip-group::part(label) { margin-block-start: 0; margin-block-end: 14px; }
|
|
1213
686
|
.all .foot { display: none; }
|
|
1214
|
-
.all .ink { padding: ${
|
|
687
|
+
.all .ink { padding: ${h(6)} ${h(5)}; }
|
|
1215
688
|
.all .rows li { padding-block-start: 11px; }
|
|
1216
689
|
}
|
|
1217
690
|
.all .ink .note { display: none; color: var(--muted); }
|
|
@@ -1223,124 +696,126 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1223
696
|
.bar i, .phases i, .legend li::before { background: CanvasText !important; }
|
|
1224
697
|
.glow { display: none; }
|
|
1225
698
|
}
|
|
1226
|
-
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let
|
|
699
|
+
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let t=(e.start??[]).filter(a=>e.choices.some(n=>n.id===a));return e.kind==="many"?[e.id,t]:[e.id,[t[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(Di(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(Di(this),{type:"conjunction"}).format(e)}catch{return e.join(", ")}}weeksWord(e){return e===1?j("{n} week",{n:e}):j("{n} weeks",{n:e})}get most(){let e=this.questions??[],t=Object.fromEntries(e.map(a=>{if(a.kind==="many")return[a.id,a.choices.map(o=>o.id)];let n=[...a.choices].sort((o,r)=>(r.cost??0)*(r.costFactor??1)-(o.cost??0)*(o.costFactor??1))[0];return[a.id,n?[n.id]:[]]}));return Ye(e,t,this.rules).high||1}summaryOf(e){let t=this.questions??[],a=t.find(B=>B.kind==="one"),n=a?a.choices.find(B=>B.id===this.answers[a.id]?.[0]):void 0,o=t.filter(B=>B.kind==="many"&&B.inSummary!==!1).flatMap(B=>(this.answers[B.id]??[]).map(P=>{let te=B.choices.find(He=>He.id===P);return te?te.phrase||te.label:P})),r=n?n.phrase||n.label:"",m=r?o.length?j("You are building {thing} with {list}.",{thing:r,list:this.listOf(o)}):j("You are building {thing}.",{thing:r}):"",R=j("Expect {range} and about {weeks} to a first release.",{range:this.rangeOf(e),weeks:this.weeksWord(e.weeks)});return m?`${m} ${R}`:R}rangeOf(e){return j("{low} to {high}",{low:this.money(e.low),high:this.money(e.high)})}teamOf(e){return e===1?this.teamTextOne:this.teamText.replace("{n}",String(e))}pick(e,t,a){let n=this.answers[e.id]??[];this.answers={...this.answers,[e.id]:e.kind==="many"?a?[...n.filter(o=>o!==t.id),t.id]:n.filter(o=>o!==t.id):[t.id]},a&&t.tip&&(this.tip=t.tip),this.requestUpdate()}go(e){let t=(this.questions??[]).length;this.at=Math.max(0,Math.min(t,e)),this.copied="",this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot.querySelector(".current .q")?.focus({preventScroll:!0}))}result(){let e=Ye(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 t=[this.summaryOf(e),`${this.teamOf(e.engineers)}.`];e.way&&t.push(`${e.way}.`);let a=(this.questions??[]).filter(o=>o.short&&o.kind!=="many").map(o=>{let r=o.choices.find(m=>m.id===this.answers[o.id]?.[0]);return r?`${o.short}: ${r.label}.`:""}).filter(Boolean),n=(this.questions??[]).filter(o=>o.short&&o.kind==="many"&&o.inSummary===!1).map(o=>{let r=(this.answers[o.id]??[]).map(m=>o.choices.find(R=>R.id===m)?.label??m);return r.length?`${o.short}: ${this.listOf(r)}.`:""}).filter(Boolean);return[...t,...n,...a].join(" ")}send(e){let t=this.result();try{sessionStorage.setItem("impakt.estimate",t.summary)}catch{}this.dispatchEvent(new CustomEvent("impakt-estimate",{detail:t,bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}async copy(){let e=this.result().summary;try{await navigator.clipboard.writeText(e),this.copied=j("Summary copied.")}catch{this.copied=j("Copying is blocked here. Select the summary above instead.")}this.requestUpdate()}heading(e){let t=Math.min(Math.max(this.headingLevel||2,2),6);return C`<div class="q" role="heading" aria-level=${t} tabindex="-1">${e}</div>`}renderQuestion(e,t){let a=this.answers[e.id]??[],n=t===this.at;if(e.kind==="scale"){let r=Math.max(0,e.choices.findIndex(R=>R.id===a[0])),m=e.choices[r];return C`<fieldset class=${n?"current":""} ?hidden=${!n}>
|
|
1227
700
|
<legend>${this.heading(e.heading)}</legend>
|
|
1228
|
-
${e.hint?
|
|
701
|
+
${e.hint?C`<p class="hint">${e.hint}</p>`:U}
|
|
1229
702
|
<div class="scale">
|
|
1230
|
-
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(
|
|
1231
|
-
@input=${
|
|
1232
|
-
<div class="ticks" aria-hidden="true">${e.choices.map((
|
|
1233
|
-
${m?.hint?
|
|
703
|
+
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(r)} aria-label=${e.heading} aria-valuetext=${m?.label??""}
|
|
704
|
+
@input=${R=>{let B=e.choices[Number(R.target.value)];B&&this.pick(e,B,!0)}}>
|
|
705
|
+
<div class="ticks" aria-hidden="true">${e.choices.map((R,B)=>C`<span aria-current=${B===r?"true":U}>${R.label}</span>`)}</div>
|
|
706
|
+
${m?.hint?C`<p class="now">${m.hint}</p>`:U}
|
|
1234
707
|
</div>
|
|
1235
|
-
</fieldset>`}let
|
|
708
|
+
</fieldset>`}let o=e.kind==="many";return C`<fieldset class=${n?"current":""} ?hidden=${!n}>
|
|
1236
709
|
<legend>${this.heading(e.heading)}</legend>
|
|
1237
|
-
${e.hint?
|
|
1238
|
-
<div class="choices ${
|
|
1239
|
-
${e.choices.map(
|
|
1240
|
-
<input type=${
|
|
1241
|
-
@change=${m=>this.pick(e,
|
|
1242
|
-
<span class="label">${
|
|
1243
|
-
${
|
|
710
|
+
${e.hint?C`<p class="hint">${e.hint}</p>`:U}
|
|
711
|
+
<div class="choices ${o?"many":""}">
|
|
712
|
+
${e.choices.map(r=>C`<label class="choice">
|
|
713
|
+
<input type=${o?"checkbox":"radio"} name=${`${this.uid}-${e.id}`} value=${r.id} .checked=${a.includes(r.id)}
|
|
714
|
+
@change=${m=>this.pick(e,r,m.target.checked)}>
|
|
715
|
+
<span class="label">${r.label}</span>
|
|
716
|
+
${r.hint?C`<span class="small">${r.hint}</span>`:U}
|
|
1244
717
|
</label>`)}
|
|
1245
718
|
</div>
|
|
1246
|
-
</fieldset>`}renderResult(e){let
|
|
719
|
+
</fieldset>`}renderResult(e){let t=di(this.phases??[],e.weeks),a=this.at===(this.questions??[]).length;return C`<div class="result ${a?"current":""}" ?hidden=${!a}>
|
|
1247
720
|
${this.heading(this.resultHeading)}
|
|
1248
721
|
<p class="summary">${this.summaryOf(e)}</p>
|
|
1249
|
-
${(this.phases??[]).length?
|
|
1250
|
-
<div class="phases" aria-hidden="true">${(this.phases??[]).map((
|
|
1251
|
-
<ul class="legend">${(this.phases??[]).map((
|
|
722
|
+
${(this.phases??[]).length?C`
|
|
723
|
+
<div class="phases" aria-hidden="true">${(this.phases??[]).map((n,o)=>C`<i style=${`flex-grow:${t[o]};background:${Ct(void 0,o)}`}></i>`)}</div>
|
|
724
|
+
<ul class="legend">${(this.phases??[]).map((n,o)=>C`<li style=${`--c:${Ct(void 0,o)}`}>${n.label} <b>${this.weeksWord(t[o])}</b></li>`)}</ul>`:U}
|
|
1252
725
|
<dl>
|
|
1253
|
-
<div><dt class="mono">${
|
|
1254
|
-
${e.way?
|
|
726
|
+
<div><dt class="mono">${j("Your team")}</dt><dd>${this.teamOf(e.engineers)}</dd></div>
|
|
727
|
+
${e.way?C`<div><dt class="mono">${j("Way of working")}</dt><dd>${e.way}</dd></div>`:U}
|
|
1255
728
|
</dl>
|
|
1256
729
|
<div class="actions">
|
|
1257
|
-
${this.contactHref?
|
|
1258
|
-
<button type="button" class="secondary" @click=${()=>this.copy()}>${
|
|
1259
|
-
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${
|
|
730
|
+
${this.contactHref?C`<a class="send" href=${this.contactHref} @click=${n=>this.send(n)}>${this.sendLabel} <span class="go" aria-hidden="true">→</span></a>`:U}
|
|
731
|
+
<button type="button" class="secondary" @click=${()=>this.copy()}>${j("Copy summary")}</button>
|
|
732
|
+
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${j("Start again")}</button>
|
|
1260
733
|
</div>
|
|
1261
734
|
<p class="status" role="status">${this.copied}</p>
|
|
1262
|
-
${this.note?
|
|
1263
|
-
</div>`}renderAll(e){let
|
|
735
|
+
${this.note?C`<p class="note">${this.note}</p>`:U}
|
|
736
|
+
</div>`}renderAll(e){let t=this.questions??[],a=di(this.phases??[],e.weeks),n=C`<svg class="go" 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 C`<div class="all">
|
|
1264
737
|
<div class="questions" part="questions">
|
|
1265
|
-
${
|
|
1266
|
-
.options=${
|
|
1267
|
-
@impakt-change=${
|
|
738
|
+
${t.map((o,r)=>{let m=this.answers[o.id]??[],R=o.kind==="many",B=o.choices.map(P=>({value:P.id,label:P.label}));return C`<impakt-chip-group look="site" part="question" .label=${`${String(r+1).padStart(2,"0")} \xB7 ${o.heading}`} .description=${o.hint??""}
|
|
739
|
+
.options=${B} ?multiple=${R} .values=${R?m:[]} .value=${R?"":m[0]??""}
|
|
740
|
+
@impakt-change=${P=>this.chipsChanged(o,P)}></impakt-chip-group>`})}
|
|
1268
741
|
</div>
|
|
1269
742
|
<aside class="ink" part="panel">
|
|
1270
743
|
<p class="mono">${this.budgetLabel}</p>
|
|
1271
744
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(e)}</p>
|
|
1272
|
-
<p class="weeks">${
|
|
1273
|
-
${(this.phases??[]).length?
|
|
1274
|
-
${this.contactHref?
|
|
1275
|
-
${e.way?
|
|
1276
|
-
${this.note?
|
|
745
|
+
<p class="weeks">${j("About {weeks} to a first release",{weeks:this.weeksWord(e.weeks)})}</p>
|
|
746
|
+
${(this.phases??[]).length?C`<ul class="rows" role="list">${(this.phases??[]).map((o,r)=>C`<li><span>${o.label}</span><span class="length">${this.weeksWord(a[r])}</span></li>`)}</ul>`:U}
|
|
747
|
+
${this.contactHref?C`<a class="cta" href=${this.contactHref} part="send" @click=${o=>this.send(o)}><span>${this.sendLabel}</span>${n}</a>`:U}
|
|
748
|
+
${e.way?C`<p class="way">${this.wayLabel||j("Way of working")}: ${e.way}</p>`:U}
|
|
749
|
+
${this.note?C`<p class="note">${this.note}</p>`:U}
|
|
1277
750
|
</aside>
|
|
1278
|
-
${this.note?
|
|
1279
|
-
</div>`}chipsChanged(e,
|
|
751
|
+
${this.note?C`<div class="foot"><p class="note">${this.note}</p></div>`:U}
|
|
752
|
+
</div>`}chipsChanged(e,t){let a=t.target,n=e.kind==="many"?[...a.values??[]]:[t.detail?.value].filter(m=>!!m);this.answers={...this.answers,[e.id]:n};let o=n.at(-1),r=e.choices.find(m=>m.id===o)?.tip;r&&(this.tip=r),this.requestUpdate()}render(){let e=this.questions??[];if(this.layout==="all")return this.renderAll(Ye(e,this.answers,this.rules));let t=e.length,a=Ye(e,this.answers,this.rules),n=this.at>=t,o=(.6+Math.min(1,a.high/this.most)*1.1).toFixed(2);return C`<div class="wrap">
|
|
1280
753
|
<div>
|
|
1281
754
|
<div class="progress">
|
|
1282
|
-
<p class="mono">${
|
|
1283
|
-
<div class="bar" aria-hidden="true"><i style=${`inline-size:${
|
|
755
|
+
<p class="mono">${n?this.resultHeading:j("Step {step} of {steps}",{step:this.at+1,steps:t})}</p>
|
|
756
|
+
<div class="bar" aria-hidden="true"><i style=${`inline-size:${t?n?100:(this.at+1)/(t+1)*100:0}%`}></i></div>
|
|
1284
757
|
</div>
|
|
1285
|
-
${e.map((
|
|
758
|
+
${e.map((r,m)=>this.renderQuestion(r,m))}
|
|
1286
759
|
${this.renderResult(a)}
|
|
1287
|
-
${
|
|
1288
|
-
${this.at>0?
|
|
1289
|
-
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===
|
|
760
|
+
${n?U:C`<div class="nav">
|
|
761
|
+
${this.at>0?C`<button type="button" class="secondary" @click=${()=>this.go(this.at-1)}>${j("Back")}</button>`:U}
|
|
762
|
+
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===t-1?j("See my estimate"):j("Next")} <span class="go" aria-hidden="true">→</span></button>
|
|
1290
763
|
</div>`}
|
|
1291
764
|
</div>
|
|
1292
|
-
<aside class="panel" part="panel" style=${`--s:${
|
|
765
|
+
<aside class="panel" part="panel" style=${`--s:${o}`}>
|
|
1293
766
|
<div class="glow" aria-hidden="true"></div>
|
|
1294
767
|
<p class="mono">${this.budgetLabel}</p>
|
|
1295
768
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(a)}</p>
|
|
1296
|
-
<p class="weeks">${
|
|
769
|
+
<p class="weeks">${j("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
|
|
1297
770
|
<p class="tip" aria-live="polite">${this.tip||this.intro}</p>
|
|
1298
771
|
</aside>
|
|
1299
|
-
</div>`}};customElements.define("impakt-estimator",
|
|
772
|
+
</div>`}};customElements.define("impakt-estimator",Et);import{css as Vi,html as $,nothing as L}from"./atomic-ui.js";import{ImpaktElement as At,R as pi,focusRing as Ji,fontSize as xe,fontWeight as F,linkCurrent as za,say as Sa,space as u,t as x,token as Ke,type as Ta,toneOf as hi}from"./atomic-ui.js";import{css as wa,unsafeCSS as Xe}from"./atomic-ui.js";import{token as Ae}from"./atomic-ui.js";var G=Ae("color.ink","#111111"),be=Ae("color.paper","#EFEFED"),_i=Ae("color.ink-raised","#1C1C1C"),Se=Ae("color.ink-line","#2E2E2E"),fe=Ae("color.ink-muted","#A8A8A6"),V=Ae("color.accent.default","#FFD43B"),Z=Ae("color.accent.on","#111111"),je=Ae("color.accent.on-ink","#FFD43B"),_e=Xe("var(--impakt-band, var(--impakt-color-ink, #111111))"),le=Xe("var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))"),Te=Xe("var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))"),Ze=Xe("var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),Me=Xe("var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),H=wa`
|
|
1300
773
|
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1301
774
|
font-size: 0.6875rem;
|
|
1302
775
|
font-weight: 400;
|
|
1303
776
|
line-height: 1.4;
|
|
1304
777
|
letter-spacing: 0.06em;
|
|
1305
778
|
text-transform: uppercase;
|
|
1306
|
-
`,
|
|
779
|
+
`,Ce=(l,i=3)=>Math.min(Math.max(Number(l)||i,1),6),Ui=l=>String(l).padStart(2,"0");var Re=Ke("color.ink-on","#FFFFFF"),Ma=[0,1,2,3,4],pe=x.fontMono,Rt=class extends At{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=[...At.styles,Ji,Vi`
|
|
1307
780
|
:host { display: block; container-type: inline-size; }
|
|
1308
781
|
/* With a mark, the name is set small beside it, as in the canvas header. */
|
|
1309
|
-
.brand.marked { gap: ${
|
|
1310
|
-
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${
|
|
1311
|
-
.context { font-size: ${
|
|
1312
|
-
.context .slash { margin-inline-end: ${
|
|
782
|
+
.brand.marked { gap: ${u(3)}; font-size: ${xe("md")}; letter-spacing: -0.01em; }
|
|
783
|
+
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${x.text}; color: ${x.surfaceCard}; font-size: ${xe("sm")}; font-weight: ${F("medium")}; }
|
|
784
|
+
.context { font-size: ${xe("sm")}; white-space: nowrap; }
|
|
785
|
+
.context .slash { margin-inline-end: ${u(2)}; opacity: 0.72; }
|
|
1313
786
|
.presence { display: flex; }
|
|
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: ${
|
|
787
|
+
.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: ${x.borderThin} solid ${x.text}; background: ${x.surfaceCard}; color: ${x.text}; font-family: ${pe}; font-size: 0.625rem; line-height: 1; }
|
|
1315
788
|
.presence .avatar:first-child { margin-inline-start: 0; }
|
|
1316
|
-
.presence .avatar.accent { background: ${
|
|
1317
|
-
.
|
|
1318
|
-
|
|
789
|
+
.presence .avatar.accent { background: ${Ke("color.accent.default","#ffd43b")}; color: ${Ke("color.accent.on","#111111")}; }
|
|
790
|
+
.presence .avatar.ink { background: ${x.text}; color: ${x.surfaceCard}; }
|
|
791
|
+
@media (forced-colors: active) { .presence .avatar.ink { forced-color-adjust: none; background: CanvasText; color: Canvas; } }
|
|
792
|
+
.bar { display: flex; align-items: center; gap: ${u(6)}; }
|
|
793
|
+
.start { display: flex; align-items: center; gap: ${u(3)}; flex: none; }
|
|
1319
794
|
.middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
|
|
1320
795
|
.middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }
|
|
1321
796
|
slot { display: contents; }
|
|
1322
|
-
.brand { display: inline-flex; align-items: center; min-block-size: ${
|
|
797
|
+
.brand { display: inline-flex; align-items: center; min-block-size: ${x.targetMin}; color: inherit; text-decoration: none; font-family: ${x.fontHeading}; font-weight: ${F("semibold")}; ${Ta("2xl")} letter-spacing: -0.02em; line-height: 1; border-radius: ${x.radiusSm}; }
|
|
1323
798
|
.brand img { display: block; block-size: 32px; inline-size: auto; }
|
|
1324
|
-
.chip { display: inline-flex; align-items: center; gap: ${
|
|
799
|
+
.chip { display: inline-flex; align-items: center; gap: ${u(1)}; padding: 2px ${u(2)}; border-radius: ${x.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${pe}; font-size: ${xe("xs")}; }
|
|
1325
800
|
.chip svg { inline-size: 12px; block-size: 12px; }
|
|
1326
|
-
.meta { font-family: ${
|
|
801
|
+
.meta { font-family: ${pe}; font-size: ${xe("xs")}; opacity: 0.72; }
|
|
1327
802
|
.middle impakt-nav { flex: 1 1 8rem; }
|
|
1328
803
|
/* File tabs sit in one box as wide as the tabs, centred between the name and the action. */
|
|
1329
804
|
:host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }
|
|
1330
|
-
.end { display: flex; align-items: center; gap: ${
|
|
805
|
+
.end { display: flex; align-items: center; gap: ${u(3)}; flex: none; }
|
|
1331
806
|
.end:empty, .start:empty { display: none; }
|
|
1332
|
-
.status { display: inline-flex; align-items: center; gap: ${
|
|
807
|
+
.status { display: inline-flex; align-items: center; gap: ${u(2)}; padding: ${u(1)} ${u(3)}; border: ${x.borderThin} solid ${x.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${x.surfaceCard}; font-family: ${pe}; font-size: ${xe("xs")}; white-space: nowrap; }
|
|
1333
808
|
/* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */
|
|
1334
|
-
.start .status { padding: 2px ${
|
|
809
|
+
.start .status { padding: 2px ${u(2)}; border-color: ${x.text}; border-radius: ${x.radius}; font-size: 0.6875rem; letter-spacing: ${x.trackingWide}; text-transform: uppercase; }
|
|
1335
810
|
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
1336
811
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
1337
812
|
.status .hash { opacity: 0.72; }
|
|
1338
|
-
@container (max-width: 22rem) { :host(:not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
1339
|
-
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${
|
|
813
|
+
@container (max-width: 22rem) { :host(:not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${u(2)}; } :host(:not([fold='narrow']):not([look='canvas'])) .end { flex: 1 1 100%; } }
|
|
814
|
+
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${u(3)}; } }
|
|
1340
815
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
1341
816
|
line of their own under the name and the action, and wrap there. */
|
|
1342
817
|
@container (max-width: 40rem) {
|
|
1343
|
-
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
818
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${u(1)}; }
|
|
1344
819
|
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .start { flex: 1 1 auto; }
|
|
1345
820
|
/* Its row may be narrower than the links, which then wrap: the max-content floor below is for the measured header only. */
|
|
1346
821
|
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
@@ -1362,16 +837,22 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1362
837
|
* 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
838
|
*/
|
|
1364
839
|
.menu-button, .sheet { display: none; }
|
|
1365
|
-
|
|
840
|
+
/* The bar keeps the frame's 16px gutters of its own, and the tab track hugs its tabs, centred between the name and the end. */
|
|
841
|
+
:host([look='canvas']) .bar { min-block-size: 56px; padding-inline: 16px; }
|
|
842
|
+
:host([look='canvas']) .middle impakt-nav { flex: 0 1 auto; }
|
|
843
|
+
:host([look='canvas']) .end { gap: 16px; }
|
|
844
|
+
/* The people of 9:285: 22px avatars 4px over each other, their letters in G2 Mono S. */
|
|
845
|
+
:host([look='canvas']) .presence .avatar { margin-inline-start: -4px; font-size: 0.6875rem; letter-spacing: 0.06em; text-indent: 0.06em; }
|
|
846
|
+
:host([look='canvas']) .presence .avatar:first-child { margin-inline-start: 0; }
|
|
1366
847
|
:host([look='canvas']) .start { gap: 10px; }
|
|
1367
|
-
:host([look='canvas']) .brand.marked { gap: 10px; font-family: ${
|
|
1368
|
-
:host([look='canvas']) .mark { font-family: ${
|
|
1369
|
-
:host([look='canvas']) .context { font-family: ${
|
|
1370
|
-
:host([look='canvas']) .context .slash { margin-inline-end: 10px; opacity: 1; color: ${
|
|
1371
|
-
:host([look='canvas']) .start .status { display: inline-flex; gap: 6px; padding: 3px 7px; background: ${
|
|
1372
|
-
:host([look='canvas']) .start .status .dot { inline-size: 6px; block-size: 6px; background: ${
|
|
848
|
+
:host([look='canvas']) .brand.marked { gap: 10px; font-family: ${x.fontBody}; font-size: 0.875rem; font-weight: ${F("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
849
|
+
:host([look='canvas']) .mark { font-family: ${x.fontBody}; font-size: 0.875rem; font-weight: ${F("medium")}; line-height: 1.2; }
|
|
850
|
+
:host([look='canvas']) .context { font-family: ${x.fontBody}; font-size: 0.875rem; line-height: 1.4; color: ${x.textMuted}; }
|
|
851
|
+
:host([look='canvas']) .context .slash { margin-inline-end: 10px; opacity: 1; color: ${Ke("color.text.subtle","currentColor")}; }
|
|
852
|
+
:host([look='canvas']) .start .status { display: inline-flex; gap: 6px; padding: 3px 7px; background: ${x.surfaceCard}; border: 1px solid ${Ke("color.line.soft","#CFCCC5")}; border-radius: 3px; color: ${x.textMuted}; font-family: ${pe}; font-size: 0.6875rem; font-weight: ${F("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
853
|
+
:host([look='canvas']) .start .status .dot { inline-size: 6px; block-size: 6px; background: ${x.text}; }
|
|
1373
854
|
/* 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: ${
|
|
855
|
+
:host([look='canvas']) .menu-button { align-items: center; gap: 10px; padding: 9px 14px; border: 0; border-radius: 0; background: ${x.text}; color: ${x.surfaceCard}; font-family: ${x.fontBody}; font-size: 0.875rem; font-weight: ${F("medium")}; line-height: 1.2; cursor: pointer; }
|
|
1375
856
|
.glyph { display: inline-block; inline-size: 14px; block-size: 6px; box-sizing: border-box; border-block: 1.5px solid currentColor; }
|
|
1376
857
|
/*
|
|
1377
858
|
* The tabs, the file name, the people and the action need about 70rem in one row. Narrower, the file name and the
|
|
@@ -1384,73 +865,71 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1384
865
|
:host([look='canvas']) .menu-button { display: inline-flex; }
|
|
1385
866
|
}
|
|
1386
867
|
/* 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: ${
|
|
1388
|
-
.menu-bar { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
1389
|
-
.menu-bar .brand.marked { gap: 10px; font-family: ${
|
|
1390
|
-
.menu-bar .mark { background: ${
|
|
1391
|
-
.close { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 0; background: ${
|
|
1392
|
-
.menu-nav { flex: 1; padding: ${
|
|
868
|
+
.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: ${G}; color: ${Re}; }
|
|
869
|
+
.menu-bar { display: flex; align-items: center; justify-content: space-between; gap: ${u(4)}; box-sizing: border-box; min-block-size: 56px; padding: 0 ${u(4)}; border-block-end: 1px solid ${Se}; }
|
|
870
|
+
.menu-bar .brand.marked { gap: 10px; font-family: ${x.fontBody}; font-size: 0.875rem; font-weight: ${F("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
871
|
+
.menu-bar .mark { background: ${Re}; color: ${G}; font-family: ${x.fontBody}; font-size: 0.875rem; font-weight: ${F("medium")}; }
|
|
872
|
+
.close { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 0; background: ${Re}; color: ${G}; font-family: ${x.fontBody}; font-size: 0.875rem; font-weight: ${F("medium")}; line-height: 1.2; cursor: pointer; }
|
|
873
|
+
.menu-nav { flex: 1; padding: ${u(8)} 20px 0; }
|
|
1393
874
|
.menu-nav ol { list-style: none; margin: 0; padding: 0; }
|
|
1394
|
-
.menu-nav li { border-block-end: 1px solid ${
|
|
1395
|
-
.menu-nav a { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
875
|
+
.menu-nav li { border-block-end: 1px solid ${Se}; }
|
|
876
|
+
.menu-nav a { display: flex; align-items: center; justify-content: space-between; gap: ${u(4)}; padding-block: 18px; color: inherit; text-decoration: none; font-family: ${x.fontHeading}; font-size: clamp(2.25rem, 13.4vw, 3.25rem); font-weight: ${F("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
1396
877
|
.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: ${
|
|
878
|
+
.menu-nav .number { flex: none; font-family: ${pe}; font-size: 0.8125rem; font-weight: ${F("regular")}; line-height: 1.5; letter-spacing: 0; color: ${fe}; }
|
|
1398
879
|
/* 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: ${
|
|
1400
|
-
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: ${
|
|
880
|
+
.menu-nav a[aria-current], .menu-nav a[aria-current] .number { color: ${je}; }
|
|
881
|
+
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: ${u(4)}; padding: ${u(8)} 20px calc(${u(8)} + env(safe-area-inset-bottom)); }
|
|
1401
882
|
.menu-foot:empty { display: none; }
|
|
1402
|
-
.call { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
883
|
+
.call { display: flex; align-items: center; justify-content: space-between; gap: ${u(3)}; align-self: stretch; box-sizing: border-box; min-block-size: 47px; padding: 0 20px; background: ${V}; color: ${Z}; text-decoration: none; font-family: ${x.fontBody}; font-size: 1rem; font-weight: ${F("medium")}; line-height: 1.2; }
|
|
1403
884
|
.call:hover .words { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1404
|
-
|
|
1405
|
-
.
|
|
885
|
+
/* The call's arrow slides forward when it is pointed at or focused (impkt-web#51). */
|
|
886
|
+
.call .go { display: inline-block; transition: translate ${pi.arrowDuration} ${pi.arrowEasing}; }
|
|
887
|
+
.call:is(:hover, :focus-visible) .go { translate: ${pi.arrowDistance} 0; }
|
|
888
|
+
@media (prefers-reduced-motion: reduce) { .call .go { transition: none; } }
|
|
889
|
+
.note { margin: 0; font-family: ${pe}; font-size: 0.6875rem; font-weight: ${F("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${fe}; }
|
|
890
|
+
.mail { display: inline-flex; align-items: center; min-block-size: 24px; color: inherit; font-family: ${x.fontBody}; font-size: 1rem; line-height: 1.45; text-decoration: none; }
|
|
1406
891
|
.mail:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1407
892
|
/* What is slotted at the foot is read on ink too. */
|
|
1408
|
-
.menu-foot ::slotted(*) { --impakt-color-text-default: ${
|
|
893
|
+
.menu-foot ::slotted(*) { --impakt-color-text-default: ${Re}; --impakt-color-text-heading: ${Re}; --impakt-color-text-muted: ${fe}; --impakt-color-text-link: ${Re}; --impakt-color-text-link-hover: ${Re}; color: ${Re}; }
|
|
1409
894
|
@media (forced-colors: active) {
|
|
1410
895
|
:host([look='canvas']) .menu-button, .close, .call { border: 1px solid ButtonText; }
|
|
1411
896
|
.sheet:popover-open { border: 1px solid CanvasText; }
|
|
1412
897
|
:host([look='canvas']) .start .status .dot { background: CanvasText; }
|
|
1413
898
|
}
|
|
1414
|
-
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}renderBrand(){if(!this.brand&&!this.logoSrc)return
|
|
1415
|
-
<div id=${
|
|
899
|
+
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}renderBrand(){if(!this.brand&&!this.logoSrc)return L;let i=this.logoSrc?$`<img src=${this.logoSrc} alt=${this.logoAlt||this.brand} />`:$`${this.brand}`;return $`<a class=${this.mark?"brand marked":"brand"} href=${this.home||"/"} part="brand">${this.mark?$`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>`:L}${i}</a>`}renderMenu(){let i=this.id_("menu"),e=this.menuActionText||this.actionText,t=this.menuActionHref||this.actionHref;return $`<button class="menu-button" type="button" part="menu-button" popovertarget=${i}>${this.menuText}<span class="glyph" aria-hidden="true"></span></button>
|
|
900
|
+
<div id=${i} class="sheet" popover="auto" part="menu" role="dialog" aria-label=${this.menuText}>
|
|
1416
901
|
<div class="menu-bar">
|
|
1417
902
|
${this.renderBrand()}
|
|
1418
|
-
<button class="close" type="button" popovertarget=${
|
|
903
|
+
<button class="close" type="button" popovertarget=${i} popovertargetaction="hide">${this.closeText||Sa("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
904
|
</div>
|
|
1420
|
-
<nav class="menu-nav" aria-label=${this.label||
|
|
905
|
+
<nav class="menu-nav" aria-label=${this.label||L}>
|
|
1421
906
|
<ol role="list">
|
|
1422
|
-
${(this.links??[]).map((a,
|
|
1423
|
-
<a href=${a.href} part="menu-link" aria-current=${
|
|
1424
|
-
><span class="words">${a.menuLabel||a.label}</span><span class="number" aria-hidden="true">${
|
|
907
|
+
${(this.links??[]).map((a,n)=>{let o=za(a.href,this.current),r=String(n+1).padStart(2,"0");return $`<li>
|
|
908
|
+
<a href=${a.href} part="menu-link" aria-current=${o==="page"?"page":o==="section"?"true":L}
|
|
909
|
+
><span class="words">${a.menuLabel||a.label}</span><span class="number" aria-hidden="true">${o&&this.currentText?`${this.currentText} \xB7 ${r}`:r}</span></a
|
|
1425
910
|
>
|
|
1426
911
|
</li>`})}
|
|
1427
912
|
</ol>
|
|
1428
913
|
</nav>
|
|
1429
|
-
<div class="menu-foot" part="menu-foot"><slot name="menu-foot">${e
|
|
1430
|
-
</div>`}render(){let
|
|
914
|
+
<div class="menu-foot" part="menu-foot"><slot name="menu-foot">${e?$`<a class="call" href=${t||L}><span class="words">${e}</span><span class="go" aria-hidden="true">→</span></a>`:L}${this.menuNote?$`<p class="note">${this.menuNote}</p>`:L}${this.menuEmail?$`<a class="mail" href=${`mailto:${this.menuEmail}`}>${this.menuEmail}</a>`:L}</slot></div>
|
|
915
|
+
</div>`}render(){let i=this.look==="canvas",e=i?"start":this.statusAt,t=this.status?$`<span class="status" part="status" style=${`--tone:${hi(this.statusTone,0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta?$` <span class="hash">${this.statusMeta}</span>`:L}</span>`:L,a=this.presence??[],n=i?"narrow":this.fold,o=this.navLook||(i?"tabs":"");return $`<div class="bar" part="bar">
|
|
1431
916
|
<div class="start"><slot name="start">
|
|
1432
917
|
${this.renderBrand()}
|
|
1433
|
-
${this.context
|
|
1434
|
-
${e==="start"?
|
|
1435
|
-
${this.badge
|
|
1436
|
-
${this.meta
|
|
918
|
+
${this.context?$`<span class="context" part="context"><span class="slash" aria-hidden="true">/</span>${this.context}</span>`:L}
|
|
919
|
+
${e==="start"?t:L}
|
|
920
|
+
${this.badge?$`<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>`:L}
|
|
921
|
+
${this.meta?$`<span class="meta" part="meta">${this.meta}</span>`:L}
|
|
1437
922
|
</slot></div>
|
|
1438
|
-
<div class="middle"><slot name="middle">${(this.links??[]).length
|
|
1439
|
-
<div class="end"><slot name="presence">${a.length
|
|
1440
|
-
${e==="start"?
|
|
1441
|
-
${this.actionText
|
|
1442
|
-
</slot>${
|
|
1443
|
-
</div>`}},
|
|
1444
|
-
:host { display: inline-flex; align-items: center; flex: none; }
|
|
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")} }
|
|
1447
|
-
img { display: block; block-size: 32px; inline-size: auto; }
|
|
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`
|
|
923
|
+
<div class="middle"><slot name="middle">${(this.links??[]).length?$`<impakt-nav align="center" size="sm" fold=${n} look=${o||L} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${n==="narrow"&&!i?this.actionText:""} .actionHref=${this.actionHref}></impakt-nav>`:L}</slot></div>
|
|
924
|
+
<div class="end"><slot name="presence">${a.length?$`<span class="presence" part="presence">${a.map(r=>$`<span class=${r.ink?"avatar ink":r.accent?"avatar accent":"avatar"} role="img" aria-label=${r.name}>${r.initials??r.name.slice(0,1).toUpperCase()}</span>`)}</span>`:L}</slot><slot name="end">
|
|
925
|
+
${e==="start"?L:t}
|
|
926
|
+
${this.actionText?$`<impakt-button class="act" variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref||L} @click=${this.act}>${this.actionText}</impakt-button>`:L}
|
|
927
|
+
</slot>${i?this.renderMenu():L}</div>
|
|
928
|
+
</div>`}},Bt=class extends At{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=[...At.styles,Ji,Vi`
|
|
1450
929
|
/* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */
|
|
1451
|
-
:host { display: block; container-type: inline-size; position: relative; padding-block: ${
|
|
1452
|
-
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${
|
|
1453
|
-
.brand { margin: 0; font-family: ${
|
|
930
|
+
:host { display: block; container-type: inline-size; position: relative; padding-block: ${u(8)} ${u(4)}; margin-block-end: calc(-1 * ${u(8)}); }
|
|
931
|
+
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${u(10)}; }
|
|
932
|
+
.brand { margin: 0; font-family: ${x.fontHeading}; font-weight: ${F("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
|
|
1454
933
|
/* The name as a wordmark across the whole footer, under the columns. */
|
|
1455
934
|
:host([brand-size='display']) .top { grid-template-columns: 1fr; }
|
|
1456
935
|
:host([brand-size='display']) .top > div:first-child { order: 2; }
|
|
@@ -1460,335 +939,89 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1460
939
|
* on one row under it in the 13px code face (#52).
|
|
1461
940
|
*/
|
|
1462
941
|
:host([brand-size='display']) .top { gap: 0; }
|
|
1463
|
-
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${
|
|
1464
|
-
:host([brand-size='display']) .brand { font-weight: ${
|
|
942
|
+
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${x.borderThin} solid currentColor; }
|
|
943
|
+
:host([brand-size='display']) .brand { font-weight: ${F("semibold")}; font-size: clamp(3rem, 32.3cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }
|
|
1465
944
|
:host([brand-size='display']) :is(.legal, .tagline) { font-size: 0.8125rem; line-height: 1.5; }
|
|
1466
|
-
:host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${
|
|
945
|
+
:host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${u(6)}; }
|
|
1467
946
|
:host([brand-size='display']) .foot .legal { margin: 0; }
|
|
1468
947
|
@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; } }
|
|
948
|
+
/*
|
|
949
|
+
* The G2 footer's link row (10:729, 96:2492): each column as wide as its words, and the columns and the action spread
|
|
950
|
+
* across the row with equal space between them, so on a 1080px column they start at 0, 201, 499 and 682 and the
|
|
951
|
+
* action ends at the row's end; the action is the frame's 170px button with its arrow at the far end (#88).
|
|
952
|
+
*/
|
|
953
|
+
/* Each column in the frame (96:2493): the heading in G2 Mono S, then the links in Body M, 23px lines 8px apart, so four links are 139px. */
|
|
954
|
+
:host([brand-size='display']) .h { margin-block-end: ${u(2)}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; }
|
|
955
|
+
:host([brand-size='display']) .columns ul { gap: ${u(2)}; }
|
|
956
|
+
:host([brand-size='display']) .columns :is(li, a) { font-size: 1rem; line-height: 1.45; font-weight: ${F("regular")}; }
|
|
957
|
+
@container (min-width: 48.01rem) { :host([brand-size='display']) .row { justify-content: space-between; } :host([brand-size='display']) .row .columns { display: contents; } :host([brand-size='display']) .columns > div { flex: none; white-space: nowrap; } :host([brand-size='display']) .row impakt-button { inline-size: 170px; } }
|
|
1469
958
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
1470
|
-
.log { margin-block-start: ${
|
|
1471
|
-
.log li { display: flex; align-items: center; gap: ${
|
|
959
|
+
.log { margin-block-start: ${u(8)}; display: grid; gap: ${u(3)}; font-family: ${pe}; font-size: ${xe("sm")}; }
|
|
960
|
+
.log li { display: flex; align-items: center; gap: ${u(3)}; opacity: 0.72; }
|
|
1472
961
|
.log li:first-child { opacity: 1; }
|
|
1473
962
|
.log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }
|
|
1474
|
-
.log .code { margin-inline-end: ${
|
|
1475
|
-
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${
|
|
1476
|
-
.h { margin: 0 0 ${
|
|
1477
|
-
.columns ul { display: grid; gap: ${
|
|
1478
|
-
a { color: inherit; text-decoration: none; font-weight: ${
|
|
963
|
+
.log .code { margin-inline-end: ${u(3)}; }
|
|
964
|
+
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${u(8)}; }
|
|
965
|
+
.h { margin: 0 0 ${u(4)}; font-family: ${pe}; font-size: ${xe("xs")}; font-weight: ${F("medium")}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
|
|
966
|
+
.columns ul { display: grid; gap: ${u(3)}; }
|
|
967
|
+
a { color: inherit; text-decoration: none; font-weight: ${F("medium")}; border-radius: ${x.radiusSm}; }
|
|
1479
968
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
1480
|
-
.legal { margin: ${
|
|
1481
|
-
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${
|
|
969
|
+
.legal { margin: ${u(16)} 0 0; font-family: ${pe}; font-size: ${xe("xs")}; opacity: 0.72; }
|
|
970
|
+
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${u(2)} ${u(6)}; margin-block-start: ${u(16)}; }
|
|
1482
971
|
.foot .legal { margin: 0; }
|
|
1483
|
-
.tagline { margin: 0; font-family: ${
|
|
1484
|
-
.row { display: flex; align-items: flex-start; gap: ${
|
|
972
|
+
.tagline { margin: 0; font-family: ${pe}; font-size: ${xe("xs")}; opacity: 0.72; text-align: end; }
|
|
973
|
+
.row { display: flex; align-items: flex-start; gap: ${u(8)}; }
|
|
1485
974
|
.row .columns { flex: 1; }
|
|
1486
975
|
.row impakt-button { flex: none; }
|
|
1487
976
|
.stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
|
|
1488
977
|
.stripe span { flex: 1; }
|
|
1489
978
|
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }
|
|
979
|
+
/* The G2 footer on a phone (15:1099, 96:2593): two 165px columns 20px apart, the second row 28px under the first. */
|
|
980
|
+
@container (max-width: 48rem) { :host([brand-size='display']) .columns { gap: 28px 20px; } }
|
|
1490
981
|
@container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
|
|
1491
982
|
@media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
|
|
1492
|
-
`]}heading(
|
|
983
|
+
`]}heading(i){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?$`<h3 class="h">${i}</h3>`:e===4?$`<h4 class="h">${i}</h4>`:$`<h2 class="h">${i}</h2>`}render(){let i=this.log??[];return $`<div part="footer">
|
|
1493
984
|
<div class="top">
|
|
1494
985
|
<div>
|
|
1495
|
-
${this.brand
|
|
1496
|
-
${
|
|
986
|
+
${this.brand?$`<p class="brand" part="brand">${this.brand}</p>`:L}
|
|
987
|
+
${i.length?$`<ul class="log" part="log">${i.map((e,t)=>$`<li style=${`--tone:${hi(e.tone??(t===0?"success":"accent"),t)}`}><span class="dot" aria-hidden="true"></span><span>${e.meta?$`<span class="code">${e.meta}</span>`:L}${e.text}</span></li>`)}</ul>`:L}
|
|
1497
988
|
</div>
|
|
1498
989
|
<div class="row">
|
|
1499
990
|
<div class="columns" part="columns" style=${`--count:${Math.max(1,(this.columns??[]).length)}`}>
|
|
1500
|
-
${(this.columns??[]).map(e
|
|
991
|
+
${(this.columns??[]).map(e=>$`<div>${this.heading(e.heading)}<ul>${(e.links??[]).map(t=>$`<li><a href=${t.href}>${t.label}</a></li>`)}</ul></div>`)}
|
|
1501
992
|
</div>
|
|
1502
|
-
${this.actionText
|
|
993
|
+
${this.actionText?$`<impakt-button variant="outline" icon-after="arrow-right" ?spread=${this.brandSize==="display"} href=${this.actionHref||L} part="action">${this.actionText}</impakt-button>`:L}
|
|
1503
994
|
</div>
|
|
1504
995
|
</div>
|
|
1505
|
-
${this.tagline
|
|
1506
|
-
${this.stripe
|
|
1507
|
-
</div>`}};customElements.define("impakt-site-header",
|
|
1508
|
-
|
|
1509
|
-
display: block;
|
|
1510
|
-
position: relative;
|
|
1511
|
-
}
|
|
1512
|
-
:host([drive='view'][layout='stage']) {
|
|
1513
|
-
min-height: calc(var(--impakt-scene-length, 3) * 100svh);
|
|
1514
|
-
}
|
|
1515
|
-
.frame {
|
|
1516
|
-
display: grid;
|
|
1517
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1518
|
-
}
|
|
1519
|
-
:host([layout='split']) .frame {
|
|
1520
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
1521
|
-
gap: ${pt(8)};
|
|
1522
|
-
}
|
|
1523
|
-
.stage {
|
|
1524
|
-
position: sticky;
|
|
1525
|
-
top: 0;
|
|
1526
|
-
height: 100svh;
|
|
1527
|
-
display: grid;
|
|
1528
|
-
place-items: center;
|
|
1529
|
-
overflow: clip;
|
|
1530
|
-
}
|
|
1531
|
-
/* What is on the stage is layered, as in a motion tool: each thing sits
|
|
1532
|
-
over the one before, so a later layer's timeline can reveal it over an
|
|
1533
|
-
earlier one. */
|
|
1534
|
-
.stage ::slotted(*) {
|
|
1535
|
-
grid-area: 1 / 1;
|
|
1536
|
-
max-width: 100%;
|
|
1537
|
-
}
|
|
1538
|
-
:host([drive='loop']) .stage,
|
|
1539
|
-
:host([drive='scrubber']) .stage {
|
|
1540
|
-
position: relative;
|
|
1541
|
-
height: auto;
|
|
1542
|
-
min-height: 60svh;
|
|
1543
|
-
}
|
|
1544
|
-
.controls {
|
|
1545
|
-
display: flex;
|
|
1546
|
-
gap: ${pt(3)};
|
|
1547
|
-
align-items: center;
|
|
1548
|
-
justify-content: center;
|
|
1549
|
-
padding-block: ${pt(3)};
|
|
1550
|
-
}
|
|
1551
|
-
:host([bleed]) { margin-inline: calc(50% - 50vw); }
|
|
1552
|
-
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1553
|
-
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1554
|
-
/* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
|
|
1555
|
-
.stage > .controls { position: absolute; inset-inline: ${pt(6)}; inset-block-end: ${pt(6)}; z-index: 2; padding: 0; }
|
|
1556
|
-
.stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }
|
|
1557
|
-
/* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
|
|
1558
|
-
.controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
|
|
1559
|
-
.pause {
|
|
1560
|
-
min-width: ${Fa("target.min","24px")};
|
|
1561
|
-
min-height: ${Fa("target.min","24px")};
|
|
1562
|
-
padding: ${pt(2)} ${pt(4)};
|
|
1563
|
-
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1564
|
-
border: 1px solid ${Oa.border};
|
|
1565
|
-
background: ${Oa.surfaceCard};
|
|
1566
|
-
color: ${Oa.text};
|
|
1567
|
-
font-size: ${gn("sm")};
|
|
1568
|
-
font-weight: ${bn("medium")};
|
|
1569
|
-
cursor: pointer;
|
|
1570
|
-
}
|
|
1571
|
-
.pause:focus-visible {
|
|
1572
|
-
outline: none;
|
|
1573
|
-
box-shadow: ${Fa("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1574
|
-
}
|
|
1575
|
-
@media (max-width: 48rem) {
|
|
1576
|
-
:host([layout='split']) .frame {
|
|
1577
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1578
|
-
}
|
|
1579
|
-
:host([layout='split']) .stage {
|
|
1580
|
-
height: 50svh;
|
|
1581
|
-
z-index: 1;
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1585
|
-
:host {
|
|
1586
|
-
min-height: 0 !important;
|
|
1587
|
-
}
|
|
1588
|
-
.stage {
|
|
1589
|
-
position: relative;
|
|
1590
|
-
height: auto;
|
|
1591
|
-
gap: ${pt(6)};
|
|
1592
|
-
}
|
|
1593
|
-
/* With less motion the layers are shown one after another, so every
|
|
1594
|
-
state the scene would have moved through can still be seen. */
|
|
1595
|
-
.stage ::slotted(*) {
|
|
1596
|
-
grid-area: auto;
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
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">
|
|
1600
|
-
<slot name="controls"></slot>
|
|
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`
|
|
1605
|
-
<div class="frame" part="frame" role="region" aria-label=${this.label}>
|
|
1606
|
-
${this.layout==="split"?At`<div class="content" part="content"><slot></slot></div>${r}`:At`${r}<div class="content" part="content"><slot></slot></div>`}
|
|
1607
|
-
</div>
|
|
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`
|
|
1610
|
-
:host {
|
|
1611
|
-
display: block;
|
|
1612
|
-
width: 100%;
|
|
1613
|
-
max-width: 48rem;
|
|
1614
|
-
margin-inline: auto;
|
|
1615
|
-
}
|
|
1616
|
-
.wrap {
|
|
1617
|
-
display: grid;
|
|
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};
|
|
1624
|
-
}
|
|
1625
|
-
input {
|
|
1626
|
-
width: 100%;
|
|
1627
|
-
min-height: ${yt("target.min","24px")};
|
|
1628
|
-
accent-color: ${K.brand};
|
|
1629
|
-
margin: 0;
|
|
1630
|
-
}
|
|
1631
|
-
.stops {
|
|
1632
|
-
position: relative;
|
|
1633
|
-
display: flex;
|
|
1634
|
-
flex-wrap: wrap;
|
|
1635
|
-
gap: ${Te(2)};
|
|
1636
|
-
list-style: none;
|
|
1637
|
-
margin: 0;
|
|
1638
|
-
padding: 0;
|
|
1639
|
-
}
|
|
1640
|
-
button {
|
|
1641
|
-
min-height: ${yt("target.min","24px")};
|
|
1642
|
-
padding: ${Te(1)} ${Te(3)};
|
|
1643
|
-
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1644
|
-
border: 1px solid ${K.border};
|
|
1645
|
-
background: transparent;
|
|
1646
|
-
color: ${K.textMuted};
|
|
1647
|
-
font-size: ${Wa("xs")};
|
|
1648
|
-
font-weight: ${Br("medium")};
|
|
1649
|
-
cursor: pointer;
|
|
1650
|
-
}
|
|
1651
|
-
button[aria-current='true'] {
|
|
1652
|
-
color: ${K.text};
|
|
1653
|
-
border-color: ${K.text};
|
|
1654
|
-
}
|
|
1655
|
-
.sr-only {
|
|
1656
|
-
${$n}
|
|
1657
|
-
}
|
|
1658
|
-
/* The graph look: the code of where you are, the line of stops, where you are. */
|
|
1659
|
-
:host([look='graph']) { max-width: none; }
|
|
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; }
|
|
1662
|
-
.head { display: grid; gap: 2px; }
|
|
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}; }
|
|
1666
|
-
.line { position: relative; block-size: 48px; }
|
|
1667
|
-
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${K.border}; opacity: 0.5; }
|
|
1668
|
-
.fill { opacity: 1; background: none; display: flex; overflow: hidden; }
|
|
1669
|
-
.fill span { block-size: 100%; }
|
|
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; }
|
|
1671
|
-
.dot[data-passed] { background: var(--c); }
|
|
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); }
|
|
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")}; }
|
|
1675
|
-
.line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
|
|
1676
|
-
.line input:focus-visible { opacity: 1; }
|
|
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; }
|
|
1679
|
-
.chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
|
|
1680
|
-
.hint { color: ${K.textMuted}; text-transform: uppercase; }
|
|
1681
|
-
/* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
|
|
1682
|
-
.chip .meta { color: ${K.textMuted}; }
|
|
1683
|
-
@media (max-width: 48rem) {
|
|
1684
|
-
.graph { grid-template-columns: minmax(0, 1fr); }
|
|
1685
|
-
.where { justify-items: start; }
|
|
1686
|
-
.dot-label:not([data-current]) { display: none; }
|
|
1687
|
-
}
|
|
1688
|
-
button:focus-visible,
|
|
1689
|
-
input:focus-visible {
|
|
1690
|
-
outline: none;
|
|
1691
|
-
box-shadow: ${yt("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1692
|
-
}
|
|
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">
|
|
1694
|
-
<div class="head mono" aria-hidden="true">
|
|
1695
|
-
<span class="k">HEAD</span>
|
|
1696
|
-
<span class="code">${s?.meta??s?.label??""}</span>
|
|
1697
|
-
${s?.note?De`<span class="note">${s.note}</span>`:null}
|
|
1698
|
-
</div>
|
|
1699
|
-
<div class="line">
|
|
1700
|
-
<div class="track"></div>
|
|
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>
|
|
1705
|
-
</button>
|
|
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} />
|
|
1708
|
-
</div>
|
|
1709
|
-
<div class="where" aria-hidden="true">
|
|
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}
|
|
1712
|
-
</div>
|
|
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`
|
|
1714
|
-
<div class="wrap" part="wrap">
|
|
1715
|
-
<input
|
|
1716
|
-
type="range"
|
|
1717
|
-
min="0"
|
|
1718
|
-
max="1000"
|
|
1719
|
-
step="1"
|
|
1720
|
-
.value=${String(Math.round(this.value*1e3))}
|
|
1721
|
-
aria-label=${this.label}
|
|
1722
|
-
aria-valuetext=${i}
|
|
1723
|
-
@input=${this.onInput}
|
|
1724
|
-
/>
|
|
1725
|
-
${this.stops.length?De`<ul class="stops" part="stops">
|
|
1726
|
-
${this.stops.map((a,r)=>De`<li>
|
|
1727
|
-
<button type="button" aria-current=${r===e?"true":"false"} @click=${()=>this.goTo(a)}>
|
|
1728
|
-
<span aria-hidden="true">${a.label}</span><span class="sr-only">${Lr("Go to {name}",{name:a.label})}</span>
|
|
1729
|
-
</button>
|
|
1730
|
-
</li>`)}
|
|
1731
|
-
</ul>`:null}
|
|
1732
|
-
</div>
|
|
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; }
|
|
996
|
+
${this.tagline?$`<div class="foot">${this.legal?$`<p class="legal" part="legal">${this.legal}</p>`:$`<span></span>`}<p class="tagline" part="tagline">${this.tagline}</p></div>`:this.legal?$`<p class="legal" part="legal">${this.legal}</p>`:L}
|
|
997
|
+
${this.stripe?$`<div class="stripe" aria-hidden="true">${Ma.map(e=>$`<span style=${`background:${hi(void 0,e)}`}></span>`)}</div>`:L}
|
|
998
|
+
</div>`}};customElements.define("impakt-site-header",Rt);customElements.define("impakt-site-footer",Bt);import{css as gi,html as K,nothing as Ue,svg as Qi}from"./atomic-ui.js";import{ImpaktElement as Yi,visuallyHidden as Ca,fontSize as mi,fontWeight as Xi,space as he,spaceAround as La,t as _,token as Ea,toneOf as Aa}from"./atomic-ui.js";function Ra(l,i){let e=()=>{l.setAttribute("shown",""),i?.()};if(typeof IntersectionObserver!="function")return e(),()=>{};let t=new IntersectionObserver(a=>{a.some(n=>n.isIntersecting)&&(e(),t.disconnect())},{threshold:.25});return t.observe(l),()=>t.disconnect()}var Ba=gi`.mono { font-family: ${_.fontMono}; font-size: ${mi("xs")}; letter-spacing: 0.04em; }`,Ha=(l,i,e)=>{switch(Math.min(Math.max(l||3,2),6)){case 2:return K`<h2 class=${e}>${i}</h2>`;case 4:return K`<h4 class=${e}>${i}</h4>`;case 5:return K`<h5 class=${e}>${i}</h5>`;case 6:return K`<h6 class=${e}>${i}</h6>`;default:return K`<h3 class=${e}>${i}</h3>`}},Ia=gi`
|
|
999
|
+
.h { margin: 0; color: var(--impakt-heading, ${_.textHeading}); font-family: ${_.fontHeading}; font-weight: ${Xi("bold")}; letter-spacing: ${_.trackingTight}; text-wrap: balance; }
|
|
1735
1000
|
.body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
|
|
1736
1001
|
.meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
|
|
1737
|
-
.sr-only { ${
|
|
1738
|
-
`,
|
|
1739
|
-
:host { display: block; }
|
|
1740
|
-
article { display: flex; flex-direction: column; gap: ${D(3)}; }
|
|
1741
|
-
.media { border-radius: ${R.radiusXl}; overflow: clip; background: ${R.surfaceInset}; }
|
|
1742
|
-
.media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
|
|
1743
|
-
impakt-before-after { display: block; }
|
|
1744
|
-
.h { font-size: ${Et("3xl")}; }
|
|
1745
|
-
.h a { color: inherit; text-decoration: none; }
|
|
1746
|
-
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1747
|
-
.h a:focus-visible { outline: none; box-shadow: ${R.focusShadow}; border-radius: ${R.radiusSm}; }
|
|
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}; }
|
|
1750
|
-
li[data-change='added'] { background: ${R.successSubtle}; color: ${R.successText}; }
|
|
1751
|
-
li[data-change='removed'] { background: ${R.dangerSubtle}; color: ${R.dangerText}; }
|
|
1752
|
-
li[data-change='same'] { color: ${R.textMuted}; }
|
|
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`
|
|
1761
|
-
:host { display: block; container-type: inline-size; }
|
|
1762
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${D(12)} ${D(10)}; }
|
|
1763
|
-
:host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }
|
|
1764
|
-
:host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1765
|
-
@container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
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`
|
|
1002
|
+
.sr-only { ${Ca} }
|
|
1003
|
+
`,Ht=class extends Yi{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=[...Yi.styles,La,Ba,Ia,gi`
|
|
1771
1004
|
:host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
|
|
1772
1005
|
ul { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
1773
1006
|
ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
|
|
1774
|
-
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${
|
|
1007
|
+
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${he(6)}; }
|
|
1775
1008
|
.graph { position: relative; }
|
|
1776
|
-
.graph svg { position: absolute; inset-block-start: -${
|
|
1777
|
-
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
1778
|
-
.path { margin: 0 0 ${
|
|
1779
|
-
.h { font-size: ${
|
|
1009
|
+
.graph svg { position: absolute; inset-block-start: -${he(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${he(12)}); overflow: visible; }
|
|
1010
|
+
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${he(4)} ${he(10)}; align-items: start; }
|
|
1011
|
+
.path { margin: 0 0 ${he(2)}; opacity: 0.72; }
|
|
1012
|
+
.h { font-size: ${mi("3xl")}; line-height: 1.05; }
|
|
1780
1013
|
.h a { color: inherit; text-decoration: none; }
|
|
1781
1014
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1782
|
-
.h a:focus-visible { outline: none; box-shadow: ${
|
|
1783
|
-
.detail { display: flex; flex-direction: column; gap: ${
|
|
1015
|
+
.h a:focus-visible { outline: none; box-shadow: ${_.focusShadow}; border-radius: ${_.radiusSm}; }
|
|
1016
|
+
.detail { display: flex; flex-direction: column; gap: ${he(3)}; padding-block-start: ${he(1)}; }
|
|
1784
1017
|
.tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
|
|
1785
|
-
.end { position: relative; display: flex; align-items: center; gap: ${
|
|
1018
|
+
.end { position: relative; display: flex; align-items: center; gap: ${he(3)}; padding-block-start: ${he(4)}; }
|
|
1786
1019
|
.end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }
|
|
1787
1020
|
@container (max-width: 44rem) {
|
|
1788
1021
|
li { grid-template-columns: 56px minmax(0, 1fr); }
|
|
1789
1022
|
.graph svg { inline-size: 56px; }
|
|
1790
1023
|
.row { grid-template-columns: minmax(0, 1fr); }
|
|
1791
|
-
.h { font-size: ${
|
|
1024
|
+
.h { font-size: ${mi("2xl")}; }
|
|
1792
1025
|
}
|
|
1793
1026
|
/*
|
|
1794
1027
|
* The mono look, as the Branches component (12:683) draws it: rows 120px apart, a 1.5px trunk at 10px, and
|
|
@@ -1802,18 +1035,19 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1802
1035
|
:host([look='mono']) li { grid-template-columns: 86px minmax(0, 1fr); padding-block: 24px 5px; }
|
|
1803
1036
|
:host([look='mono']) .graph svg { inset-block-start: -24px; inline-size: 96px; block-size: 110px; }
|
|
1804
1037
|
:host([look='mono']) .graph svg path { stroke-width: 1.5; }
|
|
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: ${
|
|
1806
|
-
:host([look='mono']) .ring.current { background: ${
|
|
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: ${
|
|
1038
|
+
: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: ${_.surfaceCard}; }
|
|
1039
|
+
:host([look='mono']) .ring.current { background: ${Ea("color.accent.default","#ffd43b")}; }
|
|
1040
|
+
: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: ${he(10)}; align-content: start; padding-block-end: 20px; border-block-end: ${_.borderThin} solid ${_.rule}; }
|
|
1808
1041
|
: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: ${
|
|
1810
|
-
:host([look='mono']) .h { grid-area: h; margin: 0; font-size: 2rem; line-height: 1.1; font-weight: ${
|
|
1042
|
+
:host([look='mono']) .path { grid-area: path; margin: 0 0 4.6px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${_.trackingWide}; text-transform: uppercase; opacity: 1; color: ${_.textMuted}; }
|
|
1043
|
+
:host([look='mono']) .h { grid-area: h; margin: 0; font-size: 2rem; line-height: 1.1; font-weight: ${Xi("semibold")}; letter-spacing: -0.03em; }
|
|
1811
1044
|
: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: ${
|
|
1813
|
-
:host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${
|
|
1814
|
-
|
|
1045
|
+
:host([look='mono']) .body { margin: 0; font-size: 1rem; line-height: 1.45; color: ${_.textMuted}; opacity: 1; }
|
|
1046
|
+
:host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${_.trackingWide}; opacity: 1; color: ${_.textMuted}; }
|
|
1047
|
+
/* The main line's label sits 14px under the last rule and the block ends 17px under it, 520px for four rows (12:716). */
|
|
1048
|
+
:host([look='mono']) .end { gap: 0; margin: 0; padding-block: 8px 17px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${_.trackingWide}; text-transform: uppercase; color: ${_.textMuted}; }
|
|
1815
1049
|
/* 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: ${
|
|
1050
|
+
:host([look='mono']) .end::before { flex: none; inline-size: 10px; block-size: 10px; margin-inline: 5.75px calc(86px - 15.75px); background: ${_.text}; }
|
|
1817
1051
|
: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
1052
|
:host([look='mono']) li:last-child .graph svg { block-size: 110px; }
|
|
1819
1053
|
@container (max-width: 44rem) {
|
|
@@ -1822,11 +1056,13 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1822
1056
|
:host([look='mono']) li { grid-template-columns: 60px minmax(0, 1fr); padding-block: 18px 5px; }
|
|
1823
1057
|
:host([look='mono']) .graph svg { inset-block-start: -18px; inline-size: 60px; block-size: 132px; }
|
|
1824
1058
|
:host([look='mono']) .ring { inset-inline-start: 35px; inset-block-start: 38px; }
|
|
1825
|
-
|
|
1059
|
+
/* On a phone the rows are 150px apart whatever their words, as they are 120px apart on a wide screen (14:989). */
|
|
1060
|
+
:host([look='mono']) .text { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'path' 'h' 'detail'; box-sizing: border-box; min-block-size: 127px; padding-block-end: 12px; }
|
|
1826
1061
|
:host([look='mono']) .h { font-size: 1.5rem; line-height: 1.15; }
|
|
1827
1062
|
:host([look='mono']) .detail { margin-block-start: 6px; }
|
|
1828
1063
|
:host([look='mono']) .body { font-size: 0.875rem; line-height: 1.43; }
|
|
1829
1064
|
:host([look='mono']) .tags { display: none; }
|
|
1065
|
+
:host([look='mono']) .end { padding-block-end: 13px; }
|
|
1830
1066
|
:host([look='mono']) .end::before { margin-inline: 3.75px calc(60px - 13.75px); }
|
|
1831
1067
|
:host([look='mono']) .end::after { inset-inline-start: 8px; }
|
|
1832
1068
|
}
|
|
@@ -1840,112 +1076,54 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1840
1076
|
:host([shown]) .graph svg { clip-path: inset(0); }
|
|
1841
1077
|
:host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }
|
|
1842
1078
|
}
|
|
1843
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1079
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=Ra(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let e=this.look==="mono",t=a=>e?Qi`<svg aria-hidden="true" focusable="false">
|
|
1844
1080
|
<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
1081
|
<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>`:
|
|
1082
|
+
</svg>`:Qi`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
1847
1083
|
<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
1084
|
<circle cx="60" cy="86" r="8" fill=${a} />
|
|
1849
|
-
</svg>`;return
|
|
1850
|
-
<div class="graph">${
|
|
1085
|
+
</svg>`;return K`<ul part="list">${(this.items??[]).map((a,n)=>{let o=n===this.current,r=K`${a.heading}${o&&this.currentText?K`<span class="sr-only"> (${this.currentText})</span>`:Ue}`;return K`<li part="item" style=${`--i:${n}`}>
|
|
1086
|
+
<div class="graph">${t(e?"currentColor":Aa(a.tone,n))}${e?K`<span class=${o?"ring current":"ring"} aria-hidden="true"></span>`:Ue}</div>
|
|
1851
1087
|
<div class="text">
|
|
1852
|
-
${a.path?
|
|
1088
|
+
${a.path?K`<p class="path mono">${a.path}</p>`:Ue}
|
|
1853
1089
|
<div class="row">
|
|
1854
|
-
${
|
|
1090
|
+
${Ha(this.headingLevel,a.href?K`<a href=${a.href}>${r}</a>`:r,"h")}
|
|
1855
1091
|
<div class="detail">
|
|
1856
|
-
${a.text?
|
|
1857
|
-
${a.tags?.length?
|
|
1092
|
+
${a.text?K`<p class="body">${a.text}</p>`:Ue}
|
|
1093
|
+
${a.tags?.length?K`<p class="tags mono">${a.tags.join(" \xB7 ")}</p>`:Ue}
|
|
1858
1094
|
</div>
|
|
1859
1095
|
</div>
|
|
1860
1096
|
</div>
|
|
1861
1097
|
</li>`})}</ul>
|
|
1862
|
-
${this.trunk?
|
|
1863
|
-
:host { display: block; container-type: inline-size; }
|
|
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); }
|
|
1865
|
-
.summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${R.success}; }
|
|
1866
|
-
/* The rows share one grid, so the figure column fits the widest figure and every row lines up. */
|
|
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); }
|
|
1869
|
-
/* Checks run: each tick pops in, 150 ms after the one above. */
|
|
1870
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
1871
|
-
.tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }
|
|
1872
|
-
:host([shown]) .tick { transform: scale(1); }
|
|
1873
|
-
}
|
|
1874
|
-
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1875
|
-
/* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */
|
|
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); }
|
|
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")} }
|
|
1879
|
-
.status { margin: 0; opacity: 0.72; }
|
|
1880
|
-
@container (max-width: 40rem) {
|
|
1881
|
-
ul { grid-template-columns: 28px minmax(0, 1fr); }
|
|
1882
|
-
li { row-gap: ${D(1)}; }
|
|
1883
|
-
.label, .status { grid-column: 2; }
|
|
1884
|
-
.figure { font-size: ${Et("4xl")}; }
|
|
1885
|
-
}
|
|
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`
|
|
1893
|
-
:host { display: block; }
|
|
1894
|
-
/* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */
|
|
1895
|
-
figure { margin: 0; overflow-x: auto; border-radius: ${R.radiusSm}; }
|
|
1896
|
-
svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }
|
|
1897
|
-
text { font-family: ${R.fontMono}; font-size: 12px; fill: currentColor; }
|
|
1898
|
-
.faint { opacity: 0.5; }
|
|
1899
|
-
/* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */
|
|
1900
|
-
.halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }
|
|
1901
|
-
/* Graph draw: the graph opens left to right, so each demo appears as the line reaches it. */
|
|
1902
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
1903
|
-
svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }
|
|
1904
|
-
:host([shown]) svg { clip-path: inset(0 -40px 0 0); }
|
|
1905
|
-
}
|
|
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>
|
|
1914
|
-
</g>`})}
|
|
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>`)}
|
|
1922
|
-
</svg>
|
|
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`
|
|
1098
|
+
${this.trunk?K`<p class="end mono" part="trunk">${this.trunk}</p>`:Ue}`}};customElements.define("impakt-branch-list",Ht);import{css as Be,html as b,nothing as D}from"./atomic-ui.js";import{ImpaktElement as J,R as q,focusRing as qa,fontWeight as me,revealAt as It,revealStyles as fi,say as Zi,space as k,spaceAround as Oa,t as f,token as ui}from"./atomic-ui.js";var bi={note:["01","Discover","Note"],wireframe:["02","Design low-fi","Wireframe"],component:["03","Design hi-fi","Component"],code:["04","Build","Code"],live:["05","Launch","Live"]},qt=class extends J{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=[...J.styles,Be`
|
|
1924
1099
|
:host { display: inline-block; vertical-align: middle; }
|
|
1925
1100
|
/* 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: ${
|
|
1927
|
-
.index { color: ${
|
|
1928
|
-
.phase { color: ${
|
|
1929
|
-
.label { color: ${
|
|
1101
|
+
.tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; background: ${_i}; border: 1px solid ${Se}; border-radius: ${ui("stage-tag.radius","0px")}; ${H}; font-weight: ${me("medium")}; white-space: nowrap; }
|
|
1102
|
+
.index { color: ${je}; }
|
|
1103
|
+
.phase { color: ${be}; }
|
|
1104
|
+
.label { color: ${fe}; }
|
|
1930
1105
|
@media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1106
|
+
/* Labels type in (impkt-web#51): the tag types its words in from the left in 240ms as its section arrives. All of them are in the page from the start. */
|
|
1107
|
+
:host([data-motion]) .tag { animation: ik-reveal-type ${q.type} ${q.arrive} ${It(0)} both; }
|
|
1108
|
+
`,fi]}render(){let i=this.stage&&this.stage in bi?bi[this.stage]:void 0,e=this.index||i?.[0]||"",t=this.phase||(i?Zi(i[1]):""),a=this.label||(i?Zi(i[2]):"");return!e&&!t&&!a?b``:b`<span class="tag" part="tag" aria-hidden=${this.announce?D:"true"}
|
|
1109
|
+
>${e?b`<span class="index" part="index">${e}</span>`:D}${t?b`<span class="phase" part="phase">${t}</span>`:D}${a?b`<span class="label" part="label">${a}</span>`:D}</span
|
|
1110
|
+
>`}},Ot=class extends J{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=[...J.styles,Oa,Be`
|
|
1111
|
+
:host { display: block; container-type: inline-size; color: ${f.text}; }
|
|
1935
1112
|
/* 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: ${
|
|
1113
|
+
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: ${k(2)} ${k(4)}; }
|
|
1937
1114
|
.top.tagged { min-block-size: 29px; }
|
|
1938
1115
|
/* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */
|
|
1939
|
-
.label { margin: 0; font-family: ${
|
|
1940
|
-
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${
|
|
1941
|
-
.heading { margin: 0; font-family: ${
|
|
1116
|
+
.label { margin: 0; font-family: ${f.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${f.textMuted}; }
|
|
1117
|
+
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${k(10)}; row-gap: ${k(6)}; align-items: end; margin-block-start: ${k(6)}; }
|
|
1118
|
+
.heading { margin: 0; font-family: ${f.fontHeading}; font-weight: ${me("semibold")}; color: var(--impakt-color-text-heading, ${f.text}); text-wrap: balance; overflow-wrap: anywhere; }
|
|
1942
1119
|
: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; }
|
|
1943
|
-
|
|
1120
|
+
/* Display L sets a section title 680px wide at 64px, with a side lead or without (21:1080, 20:1160, 34:644). */
|
|
1121
|
+
:host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 10.625em; }
|
|
1944
1122
|
/* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */
|
|
1945
1123
|
: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); }
|
|
1946
1124
|
/* The lead in G2 Body M, 16px at 1.45, 24px under the heading and at most 480px wide (9:385). */
|
|
1947
|
-
.lead { margin: ${
|
|
1948
|
-
.side { display: grid; gap: ${
|
|
1125
|
+
.lead { margin: ${k(6)} 0 0; max-inline-size: 30rem; font-size: 1rem; line-height: 1.45; color: ${f.textMuted}; }
|
|
1126
|
+
.side { display: grid; gap: ${k(6)}; justify-items: end; }
|
|
1949
1127
|
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
1950
1128
|
:host([aside]) .body, .body.aside { align-items: center; }
|
|
1951
1129
|
.side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }
|
|
@@ -1953,173 +1131,195 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1953
1131
|
::slotted([slot='aside']) { display: block; max-inline-size: 100%; }
|
|
1954
1132
|
@container (max-width: 47.99rem) {
|
|
1955
1133
|
/* 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: ${
|
|
1957
|
-
|
|
1958
|
-
.
|
|
1959
|
-
|
|
1134
|
+
.body { grid-template-columns: minmax(0, 1fr); row-gap: 0; margin-block-start: ${k(5)}; }
|
|
1135
|
+
/* A row with a stage tag in it keeps 24px under it, as the 53px label row of 15:1058 does. */
|
|
1136
|
+
.top.tagged + .body { margin-block-start: ${k(6)}; }
|
|
1137
|
+
/* Display L in a narrow column is the brand's phone size: Impakt sets Mobile Display L, 36px on 1.04 (92:2191, 90:1297, 94:2538); another brand keeps the fluid size. */
|
|
1138
|
+
:host([size='l']) .heading { font-size: ${ui("section-head.l.phone-size","clamp(2.5rem, 1.2rem + 5cqi, 4rem)")}; line-height: ${ui("section-head.l.phone-line-height","1")}; }
|
|
1139
|
+
.main .lead { margin-block-start: ${k(4)}; }
|
|
1140
|
+
/* The side column takes room only for what it shows: a side lead 16px under the heading (14:986), an aside 24px under what is above it. An empty one, or an aside hidden on a phone, leaves no gap (15:1017, 15:1039, 15:940). */
|
|
1141
|
+
.side { justify-items: stretch; gap: 0; }
|
|
1142
|
+
.side .lead { inline-size: auto; max-inline-size: none; margin-block-start: ${k(4)}; }
|
|
1143
|
+
::slotted([slot='aside']) { margin-block-start: ${k(6)}; }
|
|
1960
1144
|
}
|
|
1961
|
-
|
|
1145
|
+
/* Labels type in (impkt-web#51): the mono label types in as the section arrives. The heading and the lead, which are read, never move. */
|
|
1146
|
+
:host([data-motion]) .label { animation: ik-reveal-type ${q.type} ${q.arrive} ${It(0)} both; }
|
|
1147
|
+
`,fi]}render(){let i=b`<p class="lead" part="lead"><slot name="lead">${this.lead}</slot></p>`,e=!!this.lead||this.hasSlot("lead"),t=b`<slot name="heading">${this.heading}</slot>`,a=Number(this.level)===1?b`<h1 class="heading" part="heading">${t}</h1>`:b`<h2 class="heading" part="heading">${t}</h2>`,n=this.leadPosition==="side";return b`<header part="head">
|
|
1962
1148
|
<div class=${this.stage||this.hasSlot("tag")?"top tagged":"top"}>
|
|
1963
|
-
${this.label?
|
|
1964
|
-
<slot name="tag" @slotchange=${()=>this.requestUpdate()}>${this.stage?
|
|
1149
|
+
${this.label?b`<p class="label" part="label"><span aria-hidden="true"># </span>${this.label}</p>`:b`<span></span>`}
|
|
1150
|
+
<slot name="tag" @slotchange=${()=>this.requestUpdate()}>${this.stage?b`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>`:D}</slot>
|
|
1965
1151
|
</div>
|
|
1966
1152
|
<div class=${this.hasSlot("aside")?"body aside":"body"}>
|
|
1967
|
-
<div class="main">${a}${e&&!
|
|
1968
|
-
<div class="side">${e&&
|
|
1153
|
+
<div class="main">${a}${e&&!n?i:D}</div>
|
|
1154
|
+
<div class="side">${e&&n?i:D}<slot name="aside" @slotchange=${this.asideChanged}></slot></div>
|
|
1969
1155
|
</div>
|
|
1970
|
-
</header>`}asideChanged(
|
|
1156
|
+
</header>`}asideChanged(i){this.aside=i.target.assignedElements().length>0}hasSlot(i){let e=this.children;return e?Array.from(e).some(t=>t.getAttribute("slot")===i):!1}},jt=class extends J{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},size:{type:String,reflect:!0},look:{type:String,reflect:!0}}}constructor(){super(),this.featured=!1,this.size="default",this.look="card",this.number="",this.heading="",this.text="",this.tags="",this.href="",this.linkText="Learn more",this.headingLevel=3}static{this.styles=[...J.styles,Be`
|
|
1971
1157
|
:host { display: block; block-size: 100%; }
|
|
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: ${
|
|
1158
|
+
article { position: relative; isolation: isolate; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${k(6)}; padding: ${k(6)}; background: ${f.surfaceCard}; color: ${f.text}; border: 1px solid ${f.text}; transition: color ${q.wipeDuration} ${q.wipeEasing}, border-color ${q.wipeDuration} ${q.wipeEasing}; }
|
|
1159
|
+
/* The ink a card turns to, a layer of its own: a brand that derives the reveal set fades it in whole, as before; Impakt wipes it in from the left in 180ms (impkt-web#51). */
|
|
1160
|
+
article::before { content: ''; position: absolute; inset: 0; z-index: -1; background: ${G}; opacity: calc(1 - ${q.wipeFrom}); transform: scaleX(${q.wipeFrom}); transform-origin: left center; transition: transform ${q.wipeDuration} ${q.wipeEasing}, opacity ${q.wipeDuration} ${q.wipeEasing}; pointer-events: none; }
|
|
1161
|
+
article:has(a):hover::before, article:focus-within::before { opacity: 1; transform: none; }
|
|
1162
|
+
.go { display: inline-block; transition: translate ${q.arrowDuration} ${q.arrowEasing}; }
|
|
1163
|
+
article:has(a):hover .go, article:focus-within .go { translate: ${q.arrowDistance} 0; }
|
|
1164
|
+
/* Drop (impkt-web#51): the card drops 12px into place as its row is reached, after the one before it, and the line under it settles. */
|
|
1165
|
+
:host([data-motion]) article { animation: ik-reveal-drop ${q.drop} ${q.arrive} ${It(0)} both, ik-reveal-settle ${q.drop} ${q.arrive} ${It(0)} both; }
|
|
1973
1166
|
.top { display: flex; align-items: center; justify-content: space-between; }
|
|
1974
1167
|
/* 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: ${
|
|
1168
|
+
.number { font-family: ${f.fontMono}; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0; }
|
|
1976
1169
|
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }
|
|
1977
|
-
.foot { display: grid; gap: ${
|
|
1978
|
-
|
|
1170
|
+
.foot { display: grid; gap: ${k(2.5)}; }
|
|
1171
|
+
/* The frame sets whole-pixel lines (8:344): the name 28px at 24, the line 20px at 14 and the tags 15px at 11. */
|
|
1172
|
+
.heading { margin: 0; font-family: ${f.fontHeading}; font-size: 1.5rem; font-weight: ${me("semibold")}; line-height: 1.75rem; letter-spacing: -0.025em; }
|
|
1979
1173
|
.heading a { color: inherit; text-decoration: none; }
|
|
1980
1174
|
.heading a::after { content: ''; position: absolute; inset: 0; }
|
|
1981
1175
|
.heading a:focus-visible { outline: none; }
|
|
1982
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
1983
|
-
.text { margin: 0; font-size: 0.875rem; line-height: 1.
|
|
1984
|
-
.tags { margin: 0; ${
|
|
1985
|
-
.more { ${
|
|
1986
|
-
article:has(a):hover, article:focus-within
|
|
1987
|
-
|
|
1988
|
-
article:has(a):hover :is(.
|
|
1176
|
+
.heading a:focus-visible::after { box-shadow: ${f.focusShadow}; }
|
|
1177
|
+
.text { margin: 0; font-size: 0.875rem; line-height: 1.25rem; color: ${f.textMuted}; }
|
|
1178
|
+
.tags { margin: 0; ${H}; line-height: 0.9375rem; font-weight: ${me("medium")}; color: ${f.textMuted}; }
|
|
1179
|
+
.more { ${H}; font-weight: ${me("medium")}; }
|
|
1180
|
+
article:has(a):hover, article:focus-within { color: ${be}; border-color: ${G}; }
|
|
1181
|
+
:host([featured]) article { background: ${G}; color: ${be}; border-color: ${G}; }
|
|
1182
|
+
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${fe}; }
|
|
1183
|
+
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${je}; }
|
|
1989
1184
|
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
1990
|
-
|
|
1991
|
-
|
|
1185
|
+
/* Compact (90:1141, 96:2454): as tall as its words, the name straight under the number; on a phone 28px under it (90:1335, 96:2557). */
|
|
1186
|
+
:host([size='compact']) article { min-block-size: 0; justify-content: flex-start; gap: 0; }
|
|
1187
|
+
@media (max-width: 47.99rem) { :host([size='compact']) article { gap: ${k(7)}; } }
|
|
1188
|
+
/* Tile (92:1978, 94:1785): as tall as its words, 24px in, every line 10px apart; the number in G2 Mono S, 11px medium capitals on 1.4 in the muted colour, with no dot. On a phone 20px in (92:2240, 94:2065). */
|
|
1189
|
+
:host([look='tile']) article { min-block-size: 0; justify-content: flex-start; gap: ${k(2.5)}; padding: ${k(6)}; }
|
|
1190
|
+
:host([look='tile']) .number { ${H}; font-weight: ${me("medium")}; color: ${f.textMuted}; }
|
|
1191
|
+
:host([look='tile']) article:has(a):hover .number, :host([look='tile']) article:focus-within .number, :host([look='tile'][featured]) .number { color: ${fe}; }
|
|
1192
|
+
@media (max-width: 47.99rem) { :host([look='tile']) article { gap: ${k(2.5)}; padding: ${k(5)}; } }
|
|
1193
|
+
@media (prefers-reduced-motion: reduce) { article, article::before, .go { transition: none; } }
|
|
1194
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } article::before { display: none; } }
|
|
1195
|
+
`,fi]}render(){let i=Ce(this.headingLevel);return b`<article part="card">
|
|
1992
1196
|
<div class="top" aria-hidden="true">
|
|
1993
1197
|
<span class="number" part="number">${this.number}</span>
|
|
1994
|
-
|
|
1198
|
+
${this.look==="tile"?D:b`<span class="dot" part="dot"></span>`}
|
|
1995
1199
|
</div>
|
|
1996
1200
|
<div class="foot">
|
|
1997
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
1998
|
-
${this.href?
|
|
1201
|
+
<div class="heading" part="heading" role="heading" aria-level=${i}>
|
|
1202
|
+
${this.href?b`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}
|
|
1999
1203
|
</div>
|
|
2000
|
-
${this.text?
|
|
2001
|
-
${this.tags?
|
|
2002
|
-
${this.href&&this.linkText?
|
|
1204
|
+
${this.text?b`<p class="text" part="text">${this.text}</p>`:D}
|
|
1205
|
+
${this.tags?b`<p class="tags" part="tags">${this.tags}</p>`:D}
|
|
1206
|
+
${this.href&&this.linkText?b`<span class="more" part="more" aria-hidden="true">${this.linkText} <span class="go">→</span></span>`:D}
|
|
2003
1207
|
</div>
|
|
2004
|
-
</article>`}},
|
|
1208
|
+
</article>`}},Nt=class extends J{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=[...J.styles,Be`
|
|
2005
1209
|
:host { display: inline-block; position: relative; pointer-events: none; }
|
|
2006
1210
|
.cursor { display: inline-flex; align-items: flex-start; }
|
|
2007
1211
|
svg { display: block; flex: none; }
|
|
2008
|
-
.arrow { fill: ${
|
|
2009
|
-
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${
|
|
2010
|
-
:host([variant='outline']) .name { background: ${
|
|
2011
|
-
:host([variant='accent']) .name { background: ${
|
|
1212
|
+
.arrow { fill: ${G}; stroke: ${be}; }
|
|
1213
|
+
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${H}; font-weight: ${me("medium")}; white-space: nowrap; background: ${G}; color: ${be}; border: 1px solid ${G}; }
|
|
1214
|
+
:host([variant='outline']) .name { background: ${f.surfaceCard}; color: ${f.text}; border-color: ${f.text}; }
|
|
1215
|
+
:host([variant='accent']) .name { background: ${V}; color: ${Z}; border-color: ${Z}; }
|
|
2012
1216
|
:host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }
|
|
2013
1217
|
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }
|
|
2014
1218
|
@media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }
|
|
2015
1219
|
@media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }
|
|
2016
|
-
`]}render(){return
|
|
1220
|
+
`]}render(){return b`<span class="cursor" part="cursor" aria-hidden="true">
|
|
2017
1221
|
<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>
|
|
2018
|
-
${this.name?
|
|
2019
|
-
</span>`}},
|
|
2020
|
-
:host { display:
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
:
|
|
2028
|
-
|
|
2029
|
-
@media (forced-colors: active) { p, svg { color: CanvasText; } }
|
|
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)}; }
|
|
2038
|
-
.sm { font-size: 1rem; }
|
|
1222
|
+
${this.name?b`<span class="name" part="name">${this.name}</span>`:D}
|
|
1223
|
+
</span>`}},Ft=class extends J{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="sm",this.label=""}static{this.styles=[...J.styles,qa,Be`
|
|
1224
|
+
:host { display: block; color: ${f.text}; }
|
|
1225
|
+
/* Stacked, as the contact page's direct line (20:1163): 28px apart, each value 8px under its label. */
|
|
1226
|
+
dl { margin: 0; display: grid; gap: 28px; }
|
|
1227
|
+
/* In columns (21:1336, 34:627): each under an ink rule, the label 14px under it and the value 8px under the label, so a row of one line is 61px. */
|
|
1228
|
+
:host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${k(5)}; row-gap: ${k(6)}; }
|
|
1229
|
+
:host([layout='columns']) .fact { border-block-start: 1px solid ${f.text}; padding-block-start: 14px; }
|
|
1230
|
+
dt { ${H}; color: ${f.textMuted}; }
|
|
1231
|
+
dd { margin: ${k(2)} 0 0; font-family: ${f.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }
|
|
1232
|
+
.sm { font-size: 1rem; line-height: 1.45; }
|
|
2039
1233
|
.md { font-size: 1.125rem; }
|
|
2040
1234
|
.lg { font-size: 1.5rem; letter-spacing: -0.01em; }
|
|
2041
1235
|
.xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }
|
|
2042
1236
|
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
|
|
2043
1237
|
a:hover { text-decoration-thickness: 2px; }
|
|
1238
|
+
/* Stacked, a value that is a link stands alone, so it is not underlined until it is pointed at or focused (20:1163). */
|
|
1239
|
+
:host([layout='stacked']) a { text-decoration: none; }
|
|
1240
|
+
:host([layout='stacked']) a:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-thickness: 2px; }
|
|
2044
1241
|
@media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }
|
|
2045
|
-
`]}render(){return this.items.length?
|
|
2046
|
-
${this.items.map(
|
|
2047
|
-
<dt part="label">${
|
|
2048
|
-
<dd part="value" class=${
|
|
1242
|
+
`]}render(){return this.items.length?b`<dl part="list" aria-label=${this.label||D}>
|
|
1243
|
+
${this.items.map(i=>b`<div class="fact" part="fact">
|
|
1244
|
+
<dt part="label">${i.label}</dt>
|
|
1245
|
+
<dd part="value" class=${i.size??this.size}>${i.href?b`<a href=${i.href}>${i.value}</a>`:i.value}</dd>
|
|
2049
1246
|
</div>`)}
|
|
2050
|
-
</dl>`:
|
|
2051
|
-
:host { display: block; container-type: inline-size; color: ${
|
|
2052
|
-
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
.
|
|
1247
|
+
</dl>`:b``}},Dt=class extends J{static{this.properties={items:{type:Array},start:{type:Number},headingLevel:{type:Number,attribute:"heading-level"},label:{type:String},split:{type:String,reflect:!0}}}constructor(){super(),this.items=[],this.start=1,this.headingLevel=3,this.label="",this.split="heading"}static{this.styles=[...J.styles,Be`
|
|
1248
|
+
:host { display: block; container-type: inline-size; color: ${f.text}; }
|
|
1249
|
+
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${f.text}; }
|
|
1250
|
+
/* The Item of 21:1389 and 34:714: 24px above and below, the number in G2 Mono M, the heading in Display S at 1.1 and the text in Body M, so a row of one line is 84px. */
|
|
1251
|
+
li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${k(10)}; align-items: center; padding-block: ${k(6)}; border-block-end: 1px solid ${f.rule}; }
|
|
1252
|
+
:host([split='text']) li { grid-template-columns: 60px minmax(0, 460fr) minmax(0, 480fr); }
|
|
1253
|
+
.n { font-family: ${f.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${f.textMuted}; }
|
|
1254
|
+
.heading { margin: 0; font-family: ${f.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${me("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
1255
|
+
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${f.textMuted}; }
|
|
2057
1256
|
@container (max-width: 47.99rem) {
|
|
2058
|
-
li { grid-template-columns: minmax(0, 1fr); row-gap: ${
|
|
1257
|
+
li { grid-template-columns: minmax(0, 1fr); row-gap: ${k(2)}; }
|
|
2059
1258
|
}
|
|
2060
1259
|
@media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }
|
|
2061
|
-
`]}render(){if(!this.items.length)return
|
|
2062
|
-
${this.items.map((
|
|
2063
|
-
<span class="n" aria-hidden="true">${
|
|
2064
|
-
<div class="heading" role="heading" aria-level=${
|
|
2065
|
-
${
|
|
1260
|
+
`]}render(){if(!this.items.length)return b``;let i=Ce(this.headingLevel),e=Number.isFinite(Number(this.start))?Number(this.start):1;return b`<ol part="list" role="list" start=${e} aria-label=${this.label||D}>
|
|
1261
|
+
${this.items.map((t,a)=>b`<li part="item">
|
|
1262
|
+
<span class="n" aria-hidden="true">${Ui(e+a)}</span>
|
|
1263
|
+
<div class="heading" role="heading" aria-level=${i} part="heading">${t.heading}</div>
|
|
1264
|
+
${t.text?b`<p class="text" part="text">${t.text}</p>`:b`<span></span>`}
|
|
2066
1265
|
</li>`)}
|
|
2067
|
-
</ol>`}},
|
|
2068
|
-
:host { display: block; color: ${
|
|
2069
|
-
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${
|
|
2070
|
-
section { border-block-start: 1px solid ${
|
|
2071
|
-
.heading { margin: 0; ${
|
|
2072
|
-
ul { margin: ${
|
|
2073
|
-
li { font-family: ${
|
|
1266
|
+
</ol>`}},Pt=class extends J{static{this.properties={columns:{type:Array},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.columns=[],this.headingLevel=3}static{this.styles=[...J.styles,Be`
|
|
1267
|
+
:host { display: block; color: ${f.text}; }
|
|
1268
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${k(8)} ${k(5)}; }
|
|
1269
|
+
section { border-block-start: 1px solid ${f.text}; padding-block-start: ${k(4)}; }
|
|
1270
|
+
.heading { margin: 0; ${H}; color: ${f.textMuted}; }
|
|
1271
|
+
ul { margin: ${k(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${k(2)}; }
|
|
1272
|
+
li { font-family: ${f.fontHeading}; font-size: 1.5rem; font-weight: ${me("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
2074
1273
|
@media (forced-colors: active) { section { border-color: CanvasText; } }
|
|
2075
|
-
`]}render(){if(!this.columns.length)return
|
|
2076
|
-
${this.columns.map(e=>
|
|
2077
|
-
<div class="heading" role="heading" aria-level=${
|
|
2078
|
-
<ul role="list" part="list">${(e.items??[]).map(
|
|
1274
|
+
`]}render(){if(!this.columns.length)return b``;let i=Ce(this.headingLevel);return b`<div class="grid" part="grid">
|
|
1275
|
+
${this.columns.map(e=>b`<section part="column">
|
|
1276
|
+
<div class="heading" role="heading" aria-level=${i} part="heading">${e.heading}</div>
|
|
1277
|
+
<ul role="list" part="list">${(e.items??[]).map(t=>b`<li part="item">${t}</li>`)}</ul>
|
|
2079
1278
|
</section>`)}
|
|
2080
|
-
</div>`}},
|
|
1279
|
+
</div>`}},Wt=class extends J{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=[...J.styles,Be`
|
|
2081
1280
|
:host { display: block; block-size: 100%; container-type: inline-size; }
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
.
|
|
2085
|
-
.
|
|
2086
|
-
.
|
|
2087
|
-
.
|
|
2088
|
-
.
|
|
2089
|
-
|
|
1281
|
+
/* The office of 21:1201: 32px inside and its parts 12px apart, the region in Label L (16px on 1.2) and the line in Body M (16px on 1.45). */
|
|
1282
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: 12px; padding: ${k(8)}; background: ${f.surfaceCard}; color: ${f.text}; border: 1px solid ${f.text}; }
|
|
1283
|
+
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${k(2)}; }
|
|
1284
|
+
.hours { margin: 0; ${H}; color: ${f.textMuted}; }
|
|
1285
|
+
.tag { margin: 0; padding: 3px 6px; ${H}; font-weight: ${me("medium")}; background: ${V}; color: ${Z}; }
|
|
1286
|
+
.name { margin: 0; font-family: ${f.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${me("semibold")}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
|
|
1287
|
+
.region { margin: 0; font-size: 1rem; line-height: 1.2; }
|
|
1288
|
+
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${f.textMuted}; }
|
|
1289
|
+
@container (max-width: 22rem) { article { padding: ${k(5)}; } }
|
|
2090
1290
|
@media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }
|
|
2091
|
-
`]}render(){let
|
|
2092
|
-
${this.hours||this.tag?
|
|
2093
|
-
<div class="name" role="heading" aria-level=${
|
|
2094
|
-
${this.region?
|
|
2095
|
-
${this.text?
|
|
2096
|
-
</article>`}};customElements.define("impakt-stage-tag",
|
|
1291
|
+
`]}render(){let i=Ce(this.headingLevel);return b`<article part="card">
|
|
1292
|
+
${this.hours||this.tag?b`<div class="top">${this.hours?b`<p class="hours" part="hours">${this.hours}</p>`:b`<span></span>`}${this.tag?b`<p class="tag" part="tag">${this.tag}</p>`:D}</div>`:D}
|
|
1293
|
+
<div class="name" role="heading" aria-level=${i} part="name">${this.name}</div>
|
|
1294
|
+
${this.region?b`<p class="region" part="region">${this.region}</p>`:D}
|
|
1295
|
+
${this.text?b`<p class="text" part="text">${this.text}</p>`:D}
|
|
1296
|
+
</article>`}};customElements.define("impakt-stage-tag",qt);customElements.define("impakt-section-head",Ot);customElements.define("impakt-service-card",jt);customElements.define("impakt-cursor",Nt);customElements.define("impakt-facts",Ft);customElements.define("impakt-numbered-list",Dt);customElements.define("impakt-column-list",Pt);customElements.define("impakt-office-card",Wt);import{css as it,html as I,nothing as ee,svg as ja}from"./atomic-ui.js";import{ImpaktElement as ke,R as ie,fontWeight as tt,revealAt as et,revealStyles as Na,say as Ki,space as re,t as $e,visuallyHidden as Fa}from"./atomic-ui.js";var ea=40,Ne=40,Gt=class extends ke{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=[...ke.styles,it`
|
|
2097
1297
|
/* 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, ${
|
|
1298
|
+
:host { display: block; container-type: inline-size; background: var(--impakt-band-panel, ${_e}); color: ${le}; }
|
|
2099
1299
|
.visual { display: none; position: relative; margin-block-start: var(--impakt-band-panel-inset, 32px); }
|
|
2100
1300
|
.visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
|
|
2101
|
-
.visual path { fill: none; stroke: ${
|
|
2102
|
-
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${
|
|
1301
|
+
.visual path { fill: none; stroke: ${le}; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
|
|
1302
|
+
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${le}; background: ${_e}; transform: translate(-50%, -50%); }
|
|
2103
1303
|
/* 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: ${
|
|
1304
|
+
.ring.flagged, .ring.current { background: ${V}; }
|
|
2105
1305
|
.ring.current { inline-size: 12px; block-size: 12px; }
|
|
2106
1306
|
/* Each label keeps to the space between its point and the next, wrapping rather than running into its neighbour. */
|
|
2107
|
-
.vlabel { position: absolute; transform: translateX(-50%); ${
|
|
2108
|
-
.lineLabel { position: absolute; inset-inline-start: 0; ${
|
|
2109
|
-
.flag { display: inline-block; padding: 4px 8px; ${
|
|
1307
|
+
.vlabel { position: absolute; transform: translateX(-50%); ${H}; color: ${Te}; inline-size: max-content; max-inline-size: var(--slot); text-align: center; text-wrap: balance; }
|
|
1308
|
+
.lineLabel { position: absolute; inset-inline-start: 0; ${H}; color: ${Te}; }
|
|
1309
|
+
.flag { display: inline-block; padding: 4px 8px; ${H}; font-weight: ${tt("medium")}; background: ${V}; color: ${Z}; white-space: nowrap; }
|
|
2110
1310
|
.visual .flag { position: absolute; transform: translate(-50%, -100%); }
|
|
2111
1311
|
|
|
2112
|
-
ol { margin: 0; padding: ${
|
|
2113
|
-
li { position: relative; padding: 0 0 ${
|
|
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 ${
|
|
2115
|
-
li[aria-current]::before { background: ${
|
|
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: ${
|
|
2117
|
-
.rlabel { ${
|
|
2118
|
-
li .flag { margin-inline-start: ${
|
|
1312
|
+
ol { margin: 0; padding: ${re(6)} ${re(4)}; list-style: none; }
|
|
1313
|
+
li { position: relative; padding: 0 0 ${re(5)} 28px; }
|
|
1314
|
+
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 ${le}; background: ${_e}; }
|
|
1315
|
+
li[aria-current]::before { background: ${V}; }
|
|
1316
|
+
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: ${le}; }
|
|
1317
|
+
.rlabel { ${H}; font-size: 0.75rem; color: ${le}; }
|
|
1318
|
+
li .flag { margin-inline-start: ${re(2)}; }
|
|
2119
1319
|
|
|
2120
1320
|
@container (min-width: 60rem) {
|
|
2121
1321
|
.visual { display: block; }
|
|
2122
|
-
ol { ${
|
|
1322
|
+
ol { ${Fa} }
|
|
2123
1323
|
}
|
|
2124
1324
|
@media (forced-colors: active) {
|
|
2125
1325
|
.visual path { stroke: CanvasText; }
|
|
@@ -2128,122 +1328,132 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
2128
1328
|
li::after { background: CanvasText; }
|
|
2129
1329
|
.flag { border: 1px solid CanvasText; }
|
|
2130
1330
|
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
1331
|
+
/* Line draw (impkt-web#51): the line strokes on left to right, the points and their words appear in order, and the flagged points fill last. */
|
|
1332
|
+
:host([data-motion]) .visual svg { animation: ik-line-draw ${ie.line} ${ie.shape} ${et(0)} both; }
|
|
1333
|
+
:host([data-motion]) .lineLabel { animation: ik-reveal-type ${ie.type} ${ie.arrive} ${et(0)} both; }
|
|
1334
|
+
:host([data-motion]) .ring { animation: ik-reveal-mark ${ie.mark} ${ie.arrive} ${et()} both; }
|
|
1335
|
+
:host([data-motion]) :is(.vlabel, .visual .flag) { animation: ik-reveal-fade ${ie.mark} ${ie.arrive} ${et()} both; }
|
|
1336
|
+
:host([data-motion]) .ring.flagged { animation: ik-reveal-mark ${ie.mark} ${ie.arrive} ${et()} both, ik-line-fill ${ie.mark} ${ie.arrive} calc(var(--ik-reveal-delay, 0ms) + max(var(--n, 0) * ${ie.stagger}, ${ie.line})) both; }
|
|
1337
|
+
@keyframes ik-line-draw { from { clip-path: inset(-12px 100% -12px -12px); } to { clip-path: inset(-12px -12px -12px -12px); } }
|
|
1338
|
+
@keyframes ik-line-fill { from { background: ${_e}; } }
|
|
1339
|
+
`,Na]}render(){let i=this.nodes??[];if(!i.length)return I``;let e=i.length,t=d=>Math.max(0,Math.min(4,Number(d.depth)||0)),a=Math.max(...i.map(t)),n=Math.round(Ne+a*ea+55),o=i.map((d,v)=>{let z=Number(d.at);return d.at!=null&&Number.isFinite(z)?Math.max(0,Math.min(1,z)):(v+.5)/e}),r=i.map((d,v)=>({x:o[v]*1e3,y:Ne+t(d)*ea})),m=r.map((d,v)=>{let z=1;for(let Q=v-1;Q>=0&&r[Q].y===d.y;Q--)z++;for(let Q=v+1;Q<e&&r[Q].y===d.y;Q++)z++;return z}),R=40/1080*1e3,B=d=>Math.round(d*100)/100,P=(d,v,z,Q)=>{let Le=B((d+z)/2);return` L${B(d)} ${v} C${Le} ${v} ${Le} ${Q} ${B(z)} ${Q}`},te=`M0 ${r[0].y} L${r[0].x} ${r[0].y}`;for(let d=1;d<e;d++){let v=r[d-1],z=r[d],Q=z.x-v.x;if(v.y===z.y){te+=` L${z.x} ${z.y}`;continue}if(v.y>Ne&&z.y>Ne){let xi=Math.min(R,Q/2);te+=P(v.x,v.y,v.x+xi,Ne)+P(z.x-xi,Ne,z.x,z.y);continue}let Le=Math.min(R,Q),rt=z.y>v.y,ot=rt?m[d]===1:m[d-1]===1;te+=(rt?!ot:ot)?P(v.x,v.y,v.x+Le,z.y):P(z.x-Le,v.y,z.x,z.y),te+=` L${z.x} ${z.y}`}te+=` L1000 ${r[e-1].y}`;let He=d=>`${o[d]*100}%`,Yt=i.some(d=>d.at!=null),Ie=d=>{let v=Math.min(d>0?o[d]-o[d-1]:1,d<e-1?o[d+1]-o[d]:1);return Yt?`calc(${v*100}cqi + 0.25rem)`:`calc(${100/e}cqi - 0.5rem)`},Xt=i.filter(d=>d.label||d.flag);return I`<div class="visual" part="drawing" aria-hidden="true" style="block-size:${n}px;--n:${e}">
|
|
1340
|
+
<svg viewBox="0 0 1000 ${n}" preserveAspectRatio="none" focusable="false">${ja`<path d=${te} />`}</svg>
|
|
1341
|
+
${this.lineLabel?I`<span class="lineLabel" style="inset-block-start:${Ne-66}px">${this.lineLabel}</span>`:ee}
|
|
1342
|
+
${i.map((d,v)=>{let z=r[v].y,Q=t(d)===0,Le=ot=>`inset-inline-start:${He(v)};${ot};--slot:${Ie(v)};--i:${v}`,rt=d.label?Q?d.flag?ee:I`<span class="vlabel" style=${Le(`inset-block-end:${n-z+12}px`)}>${d.label}</span>`:I`<span class="vlabel" style=${Le(`inset-block-start:${z+14}px`)}>${d.label}</span>`:ee;return I`<span class="ring${d.current?" current":""}${d.flag?" flagged":""}" style="inset-inline-start:${He(v)};inset-block-start:${z}px;--i:${v}"></span>
|
|
1343
|
+
${rt}
|
|
1344
|
+
${d.flag?I`<span class="flag" style="inset-inline-start:${He(v)};inset-block-start:${z-15}px;--i:${v}">${d.flag}</span>`:ee}`})}
|
|
2137
1345
|
</div>
|
|
2138
|
-
<ol part="list" role="list" aria-label=${this.label||
|
|
2139
|
-
${
|
|
2140
|
-
<span class="rlabel">${
|
|
1346
|
+
<ol part="list" role="list" aria-label=${this.label||ee}>
|
|
1347
|
+
${Xt.map(d=>I`<li part="item" aria-current=${d.current?"step":ee}>
|
|
1348
|
+
<span class="rlabel">${d.label}</span>${d.flag?I`<span class="flag">${d.flag}</span>`:ee}
|
|
2141
1349
|
</li>`)}
|
|
2142
|
-
</ol>`}}
|
|
1350
|
+
</ol>`}},_t=class extends ke{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=[...ke.styles,it`
|
|
2143
1351
|
:host { display: block; }
|
|
2144
1352
|
ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; }
|
|
2145
|
-
li { box-sizing: border-box; min-block-size: 150px; padding: ${
|
|
2146
|
-
li.highlight { background: ${
|
|
2147
|
-
.day { margin: 0; ${
|
|
2148
|
-
.heading { margin: ${
|
|
2149
|
-
.text { margin: ${
|
|
2150
|
-
li.highlight :is(.day, .text) { color: ${
|
|
1353
|
+
li { box-sizing: border-box; min-block-size: 150px; padding: ${re(5)}; background: ${Ze}; border: 1px solid ${Me}; color: ${le}; }
|
|
1354
|
+
li.highlight { background: ${V}; border-color: ${V}; color: ${Z}; }
|
|
1355
|
+
.day { margin: 0; ${H}; color: ${Te}; }
|
|
1356
|
+
.heading { margin: ${re(2)} 0 0; font-family: ${$e.fontHeading}; font-size: 2rem; font-weight: ${tt("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
1357
|
+
.text { margin: ${re(3)} 0 0; font-size: 0.875rem; line-height: 1.45; color: ${Te}; }
|
|
1358
|
+
li.highlight :is(.day, .text) { color: ${Z}; }
|
|
2151
1359
|
@media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }
|
|
2152
|
-
`]}render(){if(!this.days?.length)return
|
|
2153
|
-
${this.days.map(e=>
|
|
1360
|
+
`]}render(){if(!this.days?.length)return I``;let i=Ce(this.headingLevel);return I`<ol part="list" role="list" aria-label=${this.label||ee}>
|
|
1361
|
+
${this.days.map(e=>I`<li part="day" class=${e.highlight?"highlight":""}>
|
|
2154
1362
|
<p class="day">${e.day}</p>
|
|
2155
|
-
<div class="heading" role="heading" aria-level=${
|
|
2156
|
-
${e.text?
|
|
1363
|
+
<div class="heading" role="heading" aria-level=${i}>${e.heading}</div>
|
|
1364
|
+
${e.text?I`<p class="text">${e.text}</p>`:ee}
|
|
2157
1365
|
</li>`)}
|
|
2158
|
-
</ol>`}},
|
|
1366
|
+
</ol>`}},Ut=class extends ke{static{this.properties={label:{type:String},text:{type:String}}}constructor(){super(),this.label="",this.text=""}static{this.styles=[...ke.styles,it`
|
|
2159
1367
|
:host { display: block; }
|
|
2160
|
-
|
|
2161
|
-
.
|
|
2162
|
-
.
|
|
2163
|
-
|
|
2164
|
-
@media (
|
|
1368
|
+
/* The "How might we" panel of 21:1381: 32px inside its edge, the label 12px over the question, and the question in Display S, 32px on 1.1 at -3%, at most 900px wide. */
|
|
1369
|
+
.panel { padding: calc(${re(8)} - 1px); background: ${G}; color: ${be}; border: 1px solid ${G}; }
|
|
1370
|
+
.label { margin: 0 0 12px; ${H}; font-weight: ${tt("medium")}; color: ${je}; }
|
|
1371
|
+
.text { margin: 0; max-inline-size: 28.125em; font-family: ${$e.fontHeading}; font-size: clamp(1.5rem, 1rem + 2vw, 2rem); font-weight: ${tt("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
1372
|
+
@media (prefers-color-scheme: dark) { .panel { border-color: ${Se}; } }
|
|
1373
|
+
@media (max-width: 30rem) { .panel { padding: ${re(6)}; } }
|
|
2165
1374
|
@media (forced-colors: active) { .panel { border-color: CanvasText; } }
|
|
2166
|
-
`]}render(){return
|
|
2167
|
-
${this.label?
|
|
1375
|
+
`]}render(){return I`<div class="panel" part="panel">
|
|
1376
|
+
${this.label?I`<p class="label" part="label">${this.label}</p>`:ee}
|
|
2168
1377
|
<p class="text" part="text"><slot>${this.text}</slot></p>
|
|
2169
|
-
</div>`}},
|
|
1378
|
+
</div>`}},Vt=class extends ke{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=[...ke.styles,it`
|
|
2170
1379
|
:host { display: block; block-size: 100%; }
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
.
|
|
2174
|
-
.
|
|
2175
|
-
|
|
2176
|
-
.
|
|
2177
|
-
.
|
|
1380
|
+
/* The hypothesis of 21:1417: 24px inside, its parts 14px apart, the statement 20px on 1.2, so a two-line card is 164px. */
|
|
1381
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: 14px; padding: ${re(6)}; background: ${$e.surfaceCard}; color: ${$e.text}; border: 1px solid ${$e.text}; }
|
|
1382
|
+
.top { display: flex; justify-content: space-between; align-items: center; gap: ${re(2)}; flex-wrap: wrap; min-block-size: 22px; }
|
|
1383
|
+
.number { font-family: ${$e.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }
|
|
1384
|
+
.impact { margin: 0; padding: 3px 7px; ${H}; font-weight: ${tt("medium")}; border: 1px solid ${$e.text}; color: ${$e.text}; }
|
|
1385
|
+
:host([impact='high']) .impact { background: ${V}; color: ${Z}; border-color: ${Z}; }
|
|
1386
|
+
.statement { margin: 0; font-family: ${$e.fontHeading}; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; }
|
|
1387
|
+
.metric { margin: 0; ${H}; color: ${$e.textMuted}; }
|
|
2178
1388
|
@media (forced-colors: active) { article, .impact { border-color: CanvasText; } }
|
|
2179
|
-
`]}render(){let
|
|
2180
|
-
${this.number||e?
|
|
1389
|
+
`]}render(){let i={high:"High impact",medium:"Medium impact",low:"Low impact"},e=this.impactLabel||(this.impact&&i[this.impact]?Ki(i[this.impact]):"");return I`<article part="card">
|
|
1390
|
+
${this.number||e?I`<div class="top">
|
|
2181
1391
|
<span class="number" part="number">${this.number}</span>
|
|
2182
|
-
${e?
|
|
2183
|
-
</div>`:
|
|
2184
|
-
${this.statement?
|
|
2185
|
-
${this.metric?
|
|
2186
|
-
</article>`}},
|
|
1392
|
+
${e?I`<p class="impact" part="impact">${e}</p>`:ee}
|
|
1393
|
+
</div>`:ee}
|
|
1394
|
+
${this.statement?I`<p class="statement" part="statement">${this.statement}</p>`:ee}
|
|
1395
|
+
${this.metric?I`<p class="metric" part="metric">${Ki("Metric")} · ${this.metric}</p>`:ee}
|
|
1396
|
+
</article>`}},Jt=class extends ke{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=[...ke.styles,it`
|
|
2187
1397
|
:host { display: block; }
|
|
2188
|
-
.frame { border: 1px solid ${
|
|
2189
|
-
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${
|
|
2190
|
-
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${
|
|
2191
|
-
.dot:first-child { background: ${
|
|
2192
|
-
.caption { margin-inline-start: ${
|
|
1398
|
+
.frame { border: 1px solid ${Me}; background: ${_e}; color: ${le}; }
|
|
1399
|
+
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${re(3)}; background: ${Ze}; border-block-end: 1px solid ${Me}; overflow: hidden; }
|
|
1400
|
+
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${Me}; }
|
|
1401
|
+
.dot:first-child { background: ${V}; }
|
|
1402
|
+
.caption { margin-inline-start: ${re(1.5)}; ${H}; color: ${Te}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2193
1403
|
.canvas { position: relative; }
|
|
2194
|
-
.canvas.empty { background-image: linear-gradient(to right, ${
|
|
1404
|
+
.canvas.empty { background-image: linear-gradient(to right, ${Me} 1px, transparent 1px), linear-gradient(to bottom, ${Me} 1px, transparent 1px); background-size: 28px 28px; }
|
|
2195
1405
|
::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }
|
|
2196
1406
|
@media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
2197
|
-
`]}render(){return
|
|
1407
|
+
`]}render(){return I`<div class="frame" part="frame">
|
|
2198
1408
|
<div class="bar" part="bar" aria-hidden="true">
|
|
2199
1409
|
<span class="dot"></span><span class="dot"></span><span class="dot"></span>
|
|
2200
|
-
${this.caption?
|
|
1410
|
+
${this.caption?I`<span class="caption" part="caption">${this.caption}</span>`:ee}
|
|
2201
1411
|
</div>
|
|
2202
1412
|
<div class="canvas ${this.filled?"":"empty"}" part="canvas" style=${this.filled?"":`aspect-ratio: ${this.ratio||"16 / 9"}`}>
|
|
2203
1413
|
<slot @slotchange=${this.onSlot}></slot>
|
|
2204
1414
|
</div>
|
|
2205
|
-
</div>`}onSlot(
|
|
1415
|
+
</div>`}onSlot(i){this.filled=i.target.assignedElements().length>0}};customElements.define("impakt-process-line",Gt);customElements.define("impakt-week-strip",_t);customElements.define("impakt-callout",Ut);customElements.define("impakt-hypothesis-card",Vt);customElements.define("impakt-browser-frame",Jt);import{css as Da,html as Fe,nothing as at}from"./atomic-ui.js";import{ImpaktElement as ta,fontWeight as ia,space as nt,t as ge}from"./atomic-ui.js";var Qt=class extends ta{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=[...ta.styles,Da`
|
|
2206
1416
|
:host { display: block; container-type: inline-size; }
|
|
2207
1417
|
ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }
|
|
2208
1418
|
li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }
|
|
2209
1419
|
li:not(:first-child) { flex-basis: 56px; }
|
|
2210
|
-
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${
|
|
2211
|
-
:host([on-ink]) .arrow { color: ${
|
|
1420
|
+
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${ge.text}; }
|
|
1421
|
+
:host([on-ink]) .arrow { color: ${le}; }
|
|
2212
1422
|
.arrow svg { display: block; }
|
|
2213
|
-
.via { font-size: 0.75rem; line-height: 1.2; color: ${
|
|
2214
|
-
:host([on-ink]) .via { color: ${
|
|
2215
|
-
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${
|
|
2216
|
-
:host([size='lg']) .box { padding: ${
|
|
2217
|
-
.box.soft { background: ${
|
|
2218
|
-
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${
|
|
2219
|
-
.box.ink { background: ${
|
|
2220
|
-
.box.accent { background: ${
|
|
2221
|
-
.label { margin: 0 0 ${
|
|
2222
|
-
.text { margin: ${
|
|
1423
|
+
.via { font-size: 0.75rem; line-height: 1.2; color: ${ge.textMuted}; }
|
|
1424
|
+
:host([on-ink]) .via { color: ${Te}; }
|
|
1425
|
+
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${nt(4)} ${nt(5)}; border: 1px solid ${ge.text}; background: ${ge.surfaceCard}; color: ${ge.text}; }
|
|
1426
|
+
:host([size='lg']) .box { padding: ${nt(6)}; }
|
|
1427
|
+
.box.soft { background: ${ge.surfaceSubtle}; }
|
|
1428
|
+
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${Ze}; border-color: ${Me}; color: ${le}; }
|
|
1429
|
+
.box.ink { background: ${G}; border-color: ${Se}; color: ${be}; }
|
|
1430
|
+
.box.accent { background: ${V}; border-color: ${V}; color: ${Z}; }
|
|
1431
|
+
.label { margin: 0 0 ${nt(2)}; ${H}; color: ${ge.textMuted}; }
|
|
1432
|
+
.text { margin: ${nt(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${ge.textMuted}; }
|
|
2223
1433
|
/* 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. */
|
|
2224
|
-
.soft :is(.label, .text) { color: color-mix(in srgb, ${
|
|
2225
|
-
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${
|
|
2226
|
-
.ink :is(.label, .text) { color: ${
|
|
2227
|
-
.accent :is(.label, .text) { color: ${
|
|
2228
|
-
.heading { margin: 0; font-family: ${
|
|
2229
|
-
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${
|
|
1434
|
+
.soft :is(.label, .text) { color: color-mix(in srgb, ${ge.textMuted} 80%, ${ge.text}); }
|
|
1435
|
+
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${Te}; }
|
|
1436
|
+
.ink :is(.label, .text) { color: ${fe}; }
|
|
1437
|
+
.accent :is(.label, .text) { color: ${Z}; }
|
|
1438
|
+
.heading { margin: 0; font-family: ${ge.fontHeading}; font-size: 1.125rem; font-weight: ${ia("medium")}; line-height: 1.25; letter-spacing: -0.01em; }
|
|
1439
|
+
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${ia("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2230
1440
|
@container (max-width: 47.99rem) {
|
|
2231
1441
|
ol, li { flex-direction: column; }
|
|
2232
1442
|
.arrow { inline-size: auto; block-size: 48px; flex-direction: row; }
|
|
2233
1443
|
.arrow svg { transform: rotate(90deg); }
|
|
2234
1444
|
}
|
|
2235
1445
|
@media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }
|
|
2236
|
-
`]}render(){if(!this.steps?.length)return
|
|
2237
|
-
${this.steps.map((e,
|
|
2238
|
-
${
|
|
1446
|
+
`]}render(){if(!this.steps?.length)return Fe``;let i=Ce(this.headingLevel);return Fe`<ol part="list" role="list" aria-label=${this.label||at}>
|
|
1447
|
+
${this.steps.map((e,t)=>Fe`<li part="step">
|
|
1448
|
+
${t>0?Fe`<span class="arrow" part="arrow">
|
|
2239
1449
|
<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>
|
|
2240
|
-
${e.connector?
|
|
2241
|
-
</span>`:
|
|
1450
|
+
${e.connector?Fe`<span class="via">${e.connector}</span>`:at}
|
|
1451
|
+
</span>`:at}
|
|
2242
1452
|
<div class="box ${e.tone??"card"}" part="box">
|
|
2243
|
-
${e.label?
|
|
2244
|
-
<div class="heading" role="heading" aria-level=${
|
|
2245
|
-
${e.text?
|
|
1453
|
+
${e.label?Fe`<p class="label">${e.label}</p>`:at}
|
|
1454
|
+
<div class="heading" role="heading" aria-level=${i}>${e.heading}</div>
|
|
1455
|
+
${e.text?Fe`<p class="text">${e.text}</p>`:at}
|
|
2246
1456
|
</div>
|
|
2247
1457
|
</li>`)}
|
|
2248
|
-
</ol>`}};customElements.define("impakt-flow",
|
|
1458
|
+
</ol>`}};customElements.define("impakt-flow",Qt);export{Ht as ImpaktBranchList,Jt as ImpaktBrowserFrame,Ut as ImpaktCallout,Pt as ImpaktColumnList,Nt as ImpaktCursor,Et as ImpaktEstimator,Ft as ImpaktFacts,ft as ImpaktFaq,lt as ImpaktFeatureList,Qt as ImpaktFlow,kt as ImpaktHighlight,Vt as ImpaktHypothesisCard,gt as ImpaktJourneyButton,Dt as ImpaktNumberedList,xt as ImpaktOffer,Wt as ImpaktOfficeCard,Mt as ImpaktPlanComparison,$t as ImpaktPostCard,Gt as ImpaktProcessLine,Ot as ImpaktSectionHead,jt as ImpaktServiceCard,Bt as ImpaktSiteFooter,Rt as ImpaktSiteHeader,qt as ImpaktStageTag,bt as ImpaktStatRow,St as ImpaktSteps,Qe as ImpaktVideo,_t as ImpaktWeekStrip,ut as ImpaktWorkList,Ve as JOURNEY_STAGES,bi as STAGE_WORDS,ji as embedOf,Ye as estimate,di as phaseWeeks};
|
|
2249
1459
|
//# sourceMappingURL=atomic-ui-blocks.js.map
|