@atomic-ui/blocks 0.14.0 → 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 +2978 -9654
- 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-Q366ZM2X.js → chunk-LJGOTYDJ.js} +17 -41
- package/dist/chunk-LJGOTYDJ.js.map +1 -0
- package/dist/{chunk-BW5ZMKES.js → chunk-OBBPBN4S.js} +17 -144
- 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-NZQZRBKV.js → chunk-VOONXP5H.js} +15 -57
- 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/g2-site.d.ts +27 -40
- package/dist/components/g2-site.js +1 -3
- 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 +6 -52
- package/dist/components/site.js +3 -5
- package/dist/components/studio.d.ts +10 -95
- package/dist/components/studio.js +1 -3
- package/dist/index.d.ts +9 -13
- package/dist/index.js +23 -101
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +751 -1642
- 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-BW5ZMKES.js.map +0 -1
- package/dist/chunk-GZTBAT6P.js +0 -574
- package/dist/chunk-GZTBAT6P.js.map +0 -1
- package/dist/chunk-NHWD2LUR.js +0 -255
- package/dist/chunk-NHWD2LUR.js.map +0 -1
- package/dist/chunk-NZQZRBKV.js.map +0 -1
- package/dist/chunk-Q366ZM2X.js.map +0 -1
- package/dist/chunk-R7SSIE2E.js +0 -362
- package/dist/chunk-R7SSIE2E.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-ZM2HLQOG.js +0 -783
- package/dist/chunk-ZM2HLQOG.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: ${v(4)}; }
|
|
11
|
-
:host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }
|
|
12
|
-
.h { ${lt("5xl")} letter-spacing: ${T.trackingTight}; text-wrap: balance; }
|
|
13
|
-
.body { ${lt("lg")} color: ${T.textMuted}; text-wrap: pretty; }
|
|
14
|
-
@container (max-width: 40rem) { .h { ${lt("4xl")} } }
|
|
15
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${v(3)} ${v(4)}; align-items: center; margin-block-start: ${v(2)}; }
|
|
16
|
-
:host([align='center']) .actions { justify-content: center; }
|
|
17
|
-
img { display: block; inline-size: 100%; block-size: auto; border-radius: ${T.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${T.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: ${v(32)} max(${v(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${v(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: ${v(2)}; align-self: flex-start; padding: ${v(2)} ${v(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: ${v(14)}; inset-inline-end: ${v(9)}; display: inline-flex; align-items: center; gap: ${v(2.5)}; padding: ${v(3)} ${v(4.5)}; ${lt("sm")} font-weight: ${De("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${T.radiusXl}; }
|
|
27
|
-
.finder { position: relative; z-index: 1; margin-block-start: ${v(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: ${v(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${v(32)} ${v(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 O`<div class="cover" part="hero">
|
|
34
|
-
${this.ratingText?O`<div class="chip-line"><div class="chip">${si("star","20px")}${this.ratingText}</div></div>`:he}
|
|
35
|
-
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
36
|
-
<div class="words">
|
|
37
|
-
${this.eyebrow?O`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon!=="none"?si(this.eyebrowIcon,"16px"):he}${this.eyebrow}</p>`:he}
|
|
38
|
-
${La(this.level,O`<slot name="heading">${this.heading}</slot>`,"h")}
|
|
39
|
-
${this.lead?O`<p class="body">${this.lead}</p>`:he}
|
|
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 O`<div class="hero ${t?"pictured":""}" part="hero">
|
|
44
|
-
<div class="words">
|
|
45
|
-
${this.eyebrow?O`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:he}
|
|
46
|
-
${La(this.level,O`<slot name="heading">${this.heading}</slot>`,"h")}
|
|
47
|
-
${this.lead?O`<p class="body">${this.lead}</p>`:he}
|
|
48
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
49
|
-
</div>
|
|
50
|
-
${t?O`<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />`:he}
|
|
51
|
-
</div>`}},li=class extends Be{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=[...Be.styles,mi,or,bt`
|
|
52
|
-
:host { display: block; container-type: inline-size; }
|
|
53
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${v(8)} ${v(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: ${v(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: ${T.fontHeading}; font-size: ${ct("lg")}; line-height: ${ni("normal")}; color: inherit; }
|
|
88
|
-
:host([size='lg']) blockquote { font-size: ${ct("2xl")}; line-height: ${ni("tight")}; }
|
|
89
|
-
blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
|
|
90
|
-
figcaption { display: flex; align-items: center; gap: ${v(3)}; }
|
|
91
|
-
img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
|
|
92
|
-
.name { font-weight: ${De("semibold")}; }
|
|
93
|
-
.detail { color: ${T.textMuted}; font-size: ${ct("sm")}; }
|
|
94
|
-
`]}render(){return O`<figure part="figure">
|
|
95
|
-
<blockquote part="quote">${this.quote}</blockquote>
|
|
96
|
-
${this.person?O`<figcaption>${this.imageSrc?O`<img src=${this.imageSrc} alt="" />`:he}<span><span class="name">${this.person}</span>${this.about?O`<br /><span class="detail">${this.about}</span>`:he}</span></figcaption>`:he}
|
|
97
|
-
</figure>`}},di=class extends Be{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=[...Be.styles,bt`
|
|
98
|
-
:host { display: block; }
|
|
99
|
-
.stat { display: flex; flex-direction: column; gap: ${v(1)}; }
|
|
100
|
-
:host([align='center']) .stat { align-items: center; text-align: center; }
|
|
101
|
-
.value { font-family: ${T.fontHeading}; font-size: ${ct("3xl")}; font-weight: ${De("bold")}; line-height: 1; color: ${T.textHeading}; }
|
|
102
|
-
:host([size='lg']) .value { font-size: ${ct("5xl")}; }
|
|
103
|
-
:host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
|
|
104
|
-
.label { font-weight: ${De("semibold")}; }
|
|
105
|
-
.detail { color: ${T.textMuted}; font-size: ${ct("sm")}; }
|
|
106
|
-
`]}render(){return O`<p class="stat" part="stat" style="margin:0"><span class="value">${this.figure}</span> <span class="label">${this.label}</span>${this.note?O` <span class="detail">${this.note}</span>`:he}</p>`}},pi=class extends Be{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=[...Be.styles,bt`
|
|
107
|
-
:host { display: block; }
|
|
108
|
-
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${v(2)} ${v(3)}; padding: ${v(2.5)} ${v(5)}; ${lt("sm")} text-align: center; color: ${T.onBrand}; background: ${T.brand}; }
|
|
109
|
-
:host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }
|
|
110
|
-
a { display: inline-flex; align-items: center; gap: ${v(1)}; min-block-size: ${T.targetMin}; color: inherit; font-weight: ${De("semibold")}; }
|
|
111
|
-
`]}render(){return O`<div class="bar" part="bar"><span>${this.message}</span>${this.linkText&&this.href?O`<a href=${this.href}>${this.linkText}${si("arrow-right","14px")}</a>`:he}</div>`}},hi=class extends Be{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=[...Be.styles,mi,bt`
|
|
112
|
-
:host { display: block; container-type: inline-size; }
|
|
113
|
-
form { display: flex; align-items: center; padding: ${v(3)}; background: ${T.surfaceCard}; color: ${T.text}; border-radius: ${T.radius2xl}; box-shadow: ${T.shadowXl}; }
|
|
114
|
-
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${v(1)}; padding: ${v(1.5)} ${v(5)}; }
|
|
115
|
-
label { ${lt("sm")} color: ${T.textMuted}; }
|
|
116
|
-
select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${lt("sm")} font-weight: ${De("semibold")}; color: ${T.text}; background: transparent; border: 0; border-radius: ${T.radiusSm}; cursor: pointer; }
|
|
117
|
-
select:focus-visible, button:focus-visible { outline: 2px solid ${T.brand}; outline-offset: 2px; }
|
|
118
|
-
button { flex: none; min-block-size: 48px; padding: ${v(3)} ${v(6)}; font: inherit; font-weight: ${De("semibold")}; color: ${T.onBrand}; background: ${T.brand}; border: 0; border-radius: ${T.radiusLg}; cursor: pointer; }
|
|
119
|
-
button:hover { background: ${T.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: ${v(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 O`<form role="search" aria-label=${this.label} method="get" action=${this.action||he} @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 O`<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=>O`<option value=${r}>${r}</option>`)}
|
|
125
|
-
</select></div>`})}
|
|
126
|
-
<button type="submit">${this.buttonText}</button>
|
|
127
|
-
</form>`}};customElements.define("impakt-search-bar",hi);customElements.define("impakt-announcement",pi);customElements.define("impakt-hero",oi);customElements.define("impakt-feature-list",li);customElements.define("impakt-quote",ci);customElements.define("impakt-stat",di);import{css as Zr,html as ft,nothing as ui}from"./atomic-ui.js";import{ImpaktElement as lr,focusRing as en,fontSize as tn,fontWeight as Ea,lineHeight as cr,space as Ot,spaceAround as an,t as ge,iconSvg as rn}from"./atomic-ui.js";var gi=class extends lr{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=[...lr.styles,en,an,Zr`
|
|
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: ${Ot(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: ${ge.surfaceCard}; border: ${ge.borderThin} solid ${ge.text}; border-radius: ${ge.radiusXl}; box-shadow: none; overflow: hidden; }
|
|
137
|
-
img { border-block-end: ${ge.borderThin} solid ${ge.text}; }
|
|
138
|
-
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
139
|
-
.words { display: flex; flex-direction: column; gap: ${Ot(2)}; padding: ${Ot(5)}; flex: 1; }
|
|
140
|
-
.h { margin: 0; color: ${ge.textHeading}; font-family: ${ge.fontHeading}; font-size: ${tn("lg")}; font-weight: ${Ea("bold")}; line-height: ${cr("tight")}; }
|
|
141
|
-
.h a { color: inherit; text-decoration: none; border-radius: ${ge.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: ${cr("normal")}; }
|
|
145
|
-
/* A marketing badge: monospace capitals at 11px in a 1px outline. */
|
|
146
|
-
.badge { align-self: flex-start; padding: 2px ${Ot(2)}; border-radius: ${ge.radiusSm}; font-family: ${ge.fontMono}; font-size: 0.6875rem; font-weight: ${Ea("medium")}; line-height: 1.4; letter-spacing: ${ge.trackingWide}; text-transform: uppercase; color: ${ge.text}; background: transparent; border: ${ge.borderThin} solid ${ge.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: ${Ot(1)}; color: ${ge.link}; font-weight: ${Ea("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 ft`<ul part="list">${(this.items??[]).map(t=>ft`<li class=${t.href?"linked":""} part="card">
|
|
152
|
-
${t.imageSrc?ft`<img src=${t.imageSrc} alt=${t.imageAlt??""} loading="lazy" />`:ui}
|
|
153
|
-
<div class="words">
|
|
154
|
-
${t.badge?ft`<span class="badge">${t.badge}</span>`:ui}
|
|
155
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.href?ft`<a href=${t.href}>${t.heading}</a>`:t.heading}</div>
|
|
156
|
-
${t.text?ft`<p class="body">${t.text}</p>`:ui}
|
|
157
|
-
${t.href?ft`<span class="more" aria-hidden="true">${rn("arrow-right","1em")}</span>`:ui}
|
|
158
|
-
</div>
|
|
159
|
-
</li>`)}</ul>`}};customElements.define("impakt-card-grid",gi);import{css as nn,html as Te,nothing as dr,unsafeCSS as N}from"./atomic-ui.js";import{ImpaktElement as pr,R as bi,focusRing as sn,fontWeight as et,say as tt,space as hr,t as q,token as Ba}from"./atomic-ui.js";var Ft=["note","wireframe","component","code","live"],fi=o=>Ft.includes(o),Ia=o=>Ft.indexOf(o),on=Te`<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,8 +67,8 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}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. */
|
|
@@ -199,12 +78,12 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
199
78
|
* line, in the code, indented six places and followed by their arrow. Five lines go before them and the rest after;
|
|
200
79
|
* a shorter run sits up against the words, a longer one loses the lines furthest from them.
|
|
201
80
|
*/
|
|
202
|
-
.window { inset-inline: 3.57cqi; inset-block: 7.14cqi 3.57cqi; padding: 7.86cqi 5cqi 0; background: var(--impakt-color-surface-ink-raised, ${
|
|
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); }
|
|
203
82
|
/* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */
|
|
204
83
|
.window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }
|
|
205
84
|
.window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }
|
|
206
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. */
|
|
207
|
-
.window :is(.before, .after) > span:not(.comment, .rule) { color: var(--ik-ink-inverse, ${
|
|
86
|
+
.window :is(.before, .after) > span:not(.comment, .rule) { color: var(--ik-ink-inverse, ${w.surfaceCard}); }
|
|
208
87
|
.window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }
|
|
209
88
|
|
|
210
89
|
/*
|
|
@@ -214,21 +93,21 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
214
93
|
* from a strip; and the live button's shadow and fill grow to full size, past it for a moment where ship's
|
|
215
94
|
* easing overshoots.
|
|
216
95
|
*/
|
|
217
|
-
.note { opacity: ${
|
|
218
|
-
.wire { opacity: ${
|
|
219
|
-
.solid { opacity: max(${
|
|
220
|
-
.window { opacity: ${
|
|
221
|
-
.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)})); }
|
|
222
101
|
|
|
223
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. */
|
|
224
|
-
.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); }
|
|
225
104
|
.arrow { flex: none; }
|
|
226
105
|
/* At the note stage the words are handwritten, bold, with a line drawn under them. */
|
|
227
|
-
.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; }
|
|
228
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; }
|
|
229
108
|
.note .said .arrow { align-self: flex-end; }
|
|
230
|
-
.wire .said { justify-content: center; font-family: ${
|
|
231
|
-
.window .said { position: static; gap: 0; padding-inline: 6ch 0; justify-content: flex-start; font-family: ${
|
|
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})); }
|
|
232
111
|
.window .said .arrow { display: none; }
|
|
233
112
|
.window .said::after { content: ' →'; white-space: pre; }
|
|
234
113
|
|
|
@@ -237,49 +116,49 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
237
116
|
* screen reader meet an ordinary link with the button's words. Its own words are not painted: the plates paint
|
|
238
117
|
* them, so they can morph. In forced colours the plates step aside and the link draws its words itself.
|
|
239
118
|
*/
|
|
240
|
-
.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: ${
|
|
241
|
-
: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: ${
|
|
242
|
-
:host([stage='wireframe']) .words { justify-content: center; font-family: ${
|
|
243
|
-
: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: ${
|
|
244
|
-
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}; }
|
|
245
124
|
|
|
246
125
|
/* Live, it answers a pointer: the button lifts when pointed at and sits when pressed, and its fill deepens a little. */
|
|
247
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. */
|
|
248
|
-
.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)) ${
|
|
249
|
-
.solid .arrow { transition: translate ${
|
|
250
|
-
:host([stage='live']) .frame:has(a.words:is(:hover, :focus-visible)) .solid .arrow { translate: ${
|
|
251
|
-
:host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${
|
|
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; }
|
|
252
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)); }
|
|
253
132
|
|
|
254
133
|
/* The design notes. Each shows at its own stages, follows the stage number with the shapes, and none is read. */
|
|
255
|
-
.ann { position: absolute; pointer-events: none; color: ${
|
|
256
|
-
.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; }
|
|
257
136
|
.caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; }
|
|
258
|
-
${
|
|
137
|
+
${y(Ve.map((e,t)=>`.caption span:nth-child(${t+1}) { opacity: ${W(t)}; }`).join(`
|
|
259
138
|
`))}
|
|
260
139
|
/* The handwritten margin note, which a brand may leave out: Impakt's design has dropped it (impkt-design-system#83). */
|
|
261
|
-
.margin { display: ${
|
|
140
|
+
.margin { display: ${Kt("journey.margin-note","block")}; }
|
|
262
141
|
:host([margin-note-shown='yes']) .margin { display: block; }
|
|
263
142
|
:host([margin-note-shown='no']) .margin { display: none; }
|
|
264
|
-
.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: ${
|
|
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))}; }
|
|
265
144
|
/* The measures, as the redlines (8:401) draw them: the width 26px over the shell, the height 10px beside it. */
|
|
266
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; }
|
|
267
146
|
.width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }
|
|
268
|
-
.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; }
|
|
269
148
|
.width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }
|
|
270
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; }
|
|
271
150
|
.height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }
|
|
272
151
|
.height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }
|
|
273
|
-
.width, .height { opacity: max(${
|
|
152
|
+
.width, .height { opacity: max(${y(W(1))}, ${y(W(2))}); }
|
|
274
153
|
/* The spec tags (8:417) 30px under the shell. */
|
|
275
|
-
.specs { inset-inline-start: 21.43cqi; inset-block-start: 43.93cqi; display: flex; flex-wrap: wrap; gap: 1.43cqi; inline-size: 75cqi; opacity: ${
|
|
276
|
-
.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}; }
|
|
277
156
|
/* The pointer (8:474) at 404, 196, its tip just inside the shell's corner. */
|
|
278
|
-
.cursor { inset-inline-start: 72.14cqi; inset-block-start: 35cqi; opacity: ${
|
|
279
|
-
.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}; }
|
|
280
159
|
|
|
281
160
|
/* The gaps a scroll timeline drives, one keyframe set each. */
|
|
282
|
-
${
|
|
161
|
+
${y(Array.from({length:ai},(e,t)=>`@keyframes impakt-journey-g${t} { from { ${mt(t)}: 0; } to { ${mt(t)}: 1; } }`).join(`
|
|
283
162
|
`))}
|
|
284
163
|
|
|
285
164
|
/* Reduced motion: each stage cuts to its final state, and the live button changes colour only. */
|
|
@@ -299,77 +178,77 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
299
178
|
:host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; forced-color-adjust: none; }
|
|
300
179
|
.ann { color: CanvasText; }
|
|
301
180
|
}
|
|
302
|
-
`]}connectedCallback(){super.connectedCallback(),
|
|
303
|
-
<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>
|
|
304
183
|
<span class="ann width"><b>${this.markWidth}</b></span>
|
|
305
184
|
<span class="ann height"><b>${this.markHeight}</b></span>
|
|
306
|
-
<span class="ann specs" part="specs">${
|
|
307
|
-
<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}>
|
|
308
187
|
<span class="plate note" aria-hidden="true">${e}</span>
|
|
309
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>
|
|
310
189
|
<span class="plate bar shadow" aria-hidden="true"></span>
|
|
311
190
|
<span class="plate bar solid" aria-hidden="true">${e}</span>
|
|
312
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>
|
|
313
|
-
${this.annotations?
|
|
314
|
-
${this.decorative||!this.href?
|
|
315
|
-
</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">
|
|
316
195
|
<path d="M5 17 17 5M8 5h9v9" />
|
|
317
|
-
</svg>`,
|
|
318
|
-
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${
|
|
319
|
-
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}; }
|
|
320
199
|
.columns + ol { border-block-start: 0; }
|
|
321
200
|
/* The Project row component (8:339): 22px above and below a 72px name, the number in a 54px column, 24px apart. */
|
|
322
|
-
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)}; }
|
|
323
202
|
.texts li, .texts.columns { grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr) auto 22px; }
|
|
324
|
-
li { position: relative; isolation: isolate; border-block-end: ${
|
|
203
|
+
li { position: relative; isolation: isolate; border-block-end: ${s.borderThin} solid ${s.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
325
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). */
|
|
326
|
-
li::before { content: ''; position: absolute; inset: 0; z-index: -1; background: ${
|
|
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; }
|
|
327
206
|
li:has(a):hover::before, li:has(a:focus-visible)::before { opacity: 1; transform: none; }
|
|
328
|
-
li :is(.name, .number, .meta, .text, .price, .arrow) { transition: color ${
|
|
329
|
-
.arrow svg { transition: translate ${
|
|
207
|
+
li :is(.name, .number, .meta, .text, .price, .arrow) { transition: color ${S.wipeDuration} ${S.wipeEasing}; }
|
|
208
|
+
.arrow svg { transition: translate ${S.arrowDuration} ${S.arrowEasing}; }
|
|
330
209
|
/* The row's arrow points up and along, so it slides that way, 4px in all. */
|
|
331
|
-
li:has(a):hover .arrow svg, li:has(a:focus-visible) .arrow svg { translate: calc(0.7071 * ${
|
|
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}); }
|
|
332
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. */
|
|
333
|
-
:host([data-motion]) li { animation: ik-reveal-drop ${
|
|
334
|
-
:host([data-motion]) .columns { animation: ik-reveal-type ${
|
|
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; }
|
|
335
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. */
|
|
336
|
-
.columns { padding-block: 0 ${
|
|
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}; }
|
|
337
216
|
.columns .last { grid-column: -3 / -1; text-align: end; }
|
|
338
|
-
.number { font-family: ${
|
|
217
|
+
.number { font-family: ${s.fontMono}; font-size: 0.8125rem; line-height: 1.5; font-variant-numeric: tabular-nums; color: ${s.textMuted}; }
|
|
339
218
|
/* Display Row: 72px on a 1080px list and 40px on a 350px phone list (8:329, 14:947). */
|
|
340
|
-
.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; }
|
|
341
220
|
.texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }
|
|
342
221
|
.name a { color: inherit; text-decoration: none; }
|
|
343
222
|
/* The link is stretched over the row, so the row is one target. */
|
|
344
223
|
.name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
|
|
345
224
|
.name a:focus-visible { outline: none; }
|
|
346
|
-
.name a:focus-visible::after { box-shadow: ${
|
|
347
|
-
.text { margin: 0; font-size: ${
|
|
348
|
-
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${
|
|
349
|
-
.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}; }
|
|
350
229
|
/* The meta in G2 Mono S: 11px medium capitals at 0.06em (8:331). */
|
|
351
|
-
.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; }
|
|
352
231
|
.price { font-size: 0.6875rem; }
|
|
353
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. */
|
|
354
|
-
.badge { display: inline-block; padding: ${
|
|
355
|
-
li:not(:has(a)) .badge { color: ${
|
|
356
|
-
.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}; }
|
|
357
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. */
|
|
358
|
-
li.featured { background: ${
|
|
359
|
-
li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${
|
|
360
|
-
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, ${
|
|
361
|
-
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}; }
|
|
362
241
|
li:has(a):hover .arrow, li:has(a:focus-visible) .arrow, li.featured .arrow { color: var(--impakt-work-accent); }
|
|
363
242
|
li.featured .badge { color: var(--impakt-work-on-accent); background: var(--impakt-work-accent); border-color: var(--impakt-work-accent); }
|
|
364
243
|
/* The preview card follows the pointer. Only its transform changes, so it costs no layout. */
|
|
365
|
-
.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); }
|
|
366
245
|
.preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
|
|
367
|
-
.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}; }
|
|
368
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. */
|
|
369
248
|
@container impakt-work-list (max-width: 40rem) {
|
|
370
|
-
li, .texts li { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: ${
|
|
371
|
-
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${
|
|
372
|
-
.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)}; }
|
|
373
252
|
li:not(:has(.text)) .side { grid-row: 2; }
|
|
374
253
|
.arrow { grid-column: 3; grid-row: 1; }
|
|
375
254
|
li:not(:has(.text)) :is(.number, .arrow) { grid-row: 1 / span 2; }
|
|
@@ -383,179 +262,138 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
383
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; }
|
|
384
263
|
.badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }
|
|
385
264
|
}
|
|
386
|
-
`,
|
|
387
|
-
<span>${
|
|
388
|
-
</div>`}render(){let
|
|
389
|
-
${
|
|
390
|
-
<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>
|
|
391
270
|
<div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
|
|
392
|
-
${a.href?
|
|
271
|
+
${a.href?g`<a href=${a.href} part="link">${a.name}</a>`:a.name}
|
|
393
272
|
</div>
|
|
394
|
-
${e?
|
|
395
|
-
${
|
|
396
|
-
${a.badge?
|
|
397
|
-
${a.price?
|
|
398
|
-
${a.meta?
|
|
399
|
-
</span>`:
|
|
400
|
-
${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>`}
|
|
401
280
|
</li>`})}
|
|
402
|
-
</ol>${
|
|
403
|
-
${
|
|
404
|
-
</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`
|
|
405
284
|
:host { display: block; container: impakt-stat-row / inline-size; }
|
|
406
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. */
|
|
407
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${
|
|
408
|
-
li { border-block-start: ${
|
|
409
|
-
p { margin: 0; display: flex; flex-direction: column; gap: ${
|
|
410
|
-
.value { font-family: ${
|
|
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; }
|
|
411
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). */
|
|
412
|
-
.label { font-size: ${
|
|
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")}; }
|
|
413
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. */
|
|
414
295
|
@container impakt-stat-row (max-width: 40rem) {
|
|
415
|
-
ul { gap: ${
|
|
416
|
-
li { padding-block: 14px ${
|
|
296
|
+
ul { gap: ${T(4)} ${T(5)}; }
|
|
297
|
+
li { padding-block: 14px ${T(2)}; }
|
|
417
298
|
p { gap: 6px; }
|
|
418
299
|
}
|
|
419
300
|
/* The note is meta: monospace capitals at 11px. */
|
|
420
|
-
.note { font-family: ${
|
|
421
|
-
`,
|
|
422
|
-
${this.items.map((
|
|
423
|
-
<p><span class="value" part="value" data-ik-count>${
|
|
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>
|
|
424
305
|
</li>`)}
|
|
425
|
-
</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`
|
|
426
307
|
:host { display: block; container: impakt-faq / inline-size; }
|
|
427
|
-
.head { display: flex; flex-direction: column; gap: ${
|
|
428
|
-
.eyebrow { margin: 0; font-family: ${
|
|
429
|
-
.heading { font-family: ${
|
|
430
|
-
.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}; }
|
|
431
312
|
/* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */
|
|
432
|
-
impakt-accordion { border-block-start: ${
|
|
433
|
-
impakt-accordion::part(item) { border-block-end: ${
|
|
434
|
-
/* 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 "+". */
|
|
435
|
-
impakt-accordion::part(header) { box-sizing: border-box; min-block-size: 91px; align-items: center; padding-block: ${
|
|
436
|
-
|
|
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")}; }
|
|
437
322
|
@media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }
|
|
438
|
-
`]}render(){let
|
|
439
|
-
${this.eyebrow?
|
|
440
|
-
${this.heading?
|
|
441
|
-
${this.lead?
|
|
442
|
-
</div>`:
|
|
443
|
-
${this.items.map(
|
|
444
|
-
</impakt-accordion>`;return this.heading?
|
|
445
|
-
/* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
|
|
446
|
-
: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}); }
|
|
447
|
-
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); }
|
|
448
|
-
dialog[open] { display: flex; }
|
|
449
|
-
dialog::backdrop { background: var(--impakt-menu); }
|
|
450
|
-
.bar { display: flex; align-items: center; justify-content: space-between; gap: ${M(4)}; padding: ${M(2)} ${M(4)}; border-block-end: ${l.borderThin} solid var(--impakt-menu-rule); }
|
|
451
|
-
.brand { color: inherit; text-decoration: none; font-family: ${l.fontHeading}; font-size: ${We("md")}; font-weight: ${oe("semibold")}; border-radius: ${l.radiusSm}; }
|
|
452
|
-
.brand.marked { display: inline-flex; align-items: center; gap: ${M(3)}; min-block-size: 44px; font-weight: ${oe("medium")}; }
|
|
453
|
-
.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: ${We("sm")}; }
|
|
454
|
-
.close { display: inline-flex; align-items: center; gap: ${M(2)}; min-block-size: 44px; padding: 0 ${M(4)}; font: inherit; font-size: ${We("sm")}; font-weight: ${oe("medium")}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${l.radius}; cursor: pointer; }
|
|
455
|
-
nav { flex: 1; padding: ${M(6)} ${M(5)} 0; }
|
|
456
|
-
ol { list-style: none; margin: 0; padding: 0; }
|
|
457
|
-
li { border-block-end: ${l.borderThin} solid var(--impakt-menu-rule); }
|
|
458
|
-
li a { display: flex; align-items: center; justify-content: space-between; gap: ${M(4)}; padding-block: ${M(4)}; color: inherit; text-decoration: none; font-family: ${l.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${oe("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
459
|
-
li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
460
|
-
.number { font-family: ${l.fontMono}; font-size: ${We("sm")}; font-weight: ${oe("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
|
|
461
|
-
/*
|
|
462
|
-
* The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
|
|
463
|
-
* --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
|
|
464
|
-
*/
|
|
465
|
-
a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
466
|
-
a[aria-current] .number { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
467
|
-
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; }
|
|
468
|
-
.foot { display: flex; flex-direction: column; gap: ${M(4)}; padding: ${M(8)} ${M(5)} calc(${M(8)} + env(safe-area-inset-bottom)); }
|
|
469
|
-
.foot[hidden] { display: none; }
|
|
470
|
-
/* What is slotted at the foot is read on ink too. */
|
|
471
|
-
::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); }
|
|
472
|
-
@media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
|
|
473
|
-
`]}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",""),dn(this)):(typeof i.close=="function"&&i.open?i.close():i.removeAttribute("open"),fr(this)))}disconnectedCallback(){super.disconnectedCallback(),fr(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 k`<dialog part="dialog" aria-label=${this.label} @cancel=${()=>this.close()} @close=${()=>this.close()}>
|
|
474
|
-
<div class="bar" part="bar">
|
|
475
|
-
${this.brand?k`<a class=${this.mark?"brand marked":"brand"} href=${this.home||"/"} part="brand">${this.mark?k`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>`:_}${this.brand}</a>`:k`<span></span>`}
|
|
476
|
-
<button class="close" type="button" part="close" @click=${()=>this.close()}>
|
|
477
|
-
<span>${this.closeText}</span>
|
|
478
|
-
<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>
|
|
479
|
-
</button>
|
|
480
|
-
</div>
|
|
481
|
-
<nav aria-label=${this.label} part="nav">
|
|
482
|
-
<ol role="list">
|
|
483
|
-
${(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 k`<li>
|
|
484
|
-
<a href=${e.href} class=${n?"worded":""} aria-current=${a?"page":_} part="link" @click=${()=>this.close()}>
|
|
485
|
-
<span class="words">${e.label}</span><span class="number" aria-hidden="true">${n?`${this.currentText} \xB7 ${r}`:r}</span>
|
|
486
|
-
</a>
|
|
487
|
-
</li>`})}
|
|
488
|
-
</ol>
|
|
489
|
-
</nav>
|
|
490
|
-
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
491
|
-
</dialog>`}},Ti=class extends ke{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=[...ke.styles,Ai,xt`
|
|
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`
|
|
492
330
|
:host { display: block; container: impakt-offer / inline-size; }
|
|
493
331
|
/* The Offer component (10:619): the copy 520px wide and the points 460px, 100px apart; the label, heading, lead and action 24px apart. */
|
|
494
|
-
.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; }
|
|
495
333
|
.copy { grid-area: copy; }
|
|
496
334
|
.actions { grid-area: actions; }
|
|
497
335
|
ol { grid-area: points; }
|
|
498
|
-
.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)}; }
|
|
499
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. */
|
|
500
|
-
.eyebrow { margin: 0; font-family: ${
|
|
501
|
-
.heading { max-inline-size: 8.125em; font-family: ${
|
|
502
|
-
.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}; }
|
|
503
341
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
504
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. */
|
|
505
|
-
li { display: flex; gap: ${
|
|
506
|
-
.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; }
|
|
507
345
|
/* On a phone (15:993): everything 20px apart; the points 14px above and below, the words 16px, 14px after the number. */
|
|
508
346
|
@container impakt-offer (max-width: 44rem) {
|
|
509
|
-
.offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${
|
|
510
|
-
.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)}; }
|
|
511
349
|
.heading { line-height: 1.03; }
|
|
512
350
|
li { gap: 14px; padding-block: 14px; font-size: 1rem; }
|
|
513
351
|
}
|
|
514
|
-
`]}render(){let
|
|
352
|
+
`]}render(){let i=Math.min(Math.max(this.headingLevel,1),6);return g`<div class="offer" part="offer">
|
|
515
353
|
<div class="copy">
|
|
516
|
-
${this.eyebrow?
|
|
517
|
-
${this.heading?
|
|
518
|
-
${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}
|
|
519
357
|
</div>
|
|
520
358
|
<div class="actions" part="actions"><slot name="actions"></slot></div>
|
|
521
|
-
${(this.points??[]).length?
|
|
522
|
-
${this.points.map((e,
|
|
523
|
-
</ol>`:
|
|
524
|
-
</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`
|
|
525
363
|
:host { display: block; block-size: 100%; }
|
|
526
364
|
/* The Article component (10:648): 24px inside, the meta, title, line and link 14px apart. */
|
|
527
|
-
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; }
|
|
528
366
|
/* The meta and the link in G2 Mono S: 11px medium capitals at 0.06em. */
|
|
529
|
-
.meta { margin: 0; font-family: ${
|
|
530
|
-
.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}; }
|
|
531
369
|
.heading a { color: inherit; text-decoration: none; }
|
|
532
370
|
.heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
533
371
|
.heading a:focus-visible { outline: none; }
|
|
534
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
372
|
+
.heading a:focus-visible::after { box-shadow: ${s.focusShadow}; }
|
|
535
373
|
article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
|
|
536
|
-
.text { margin: 0; font-size: 0.875rem; line-height: 1.4; color: ${
|
|
537
|
-
.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}; }
|
|
538
376
|
/* The link's arrow slides forward when the card is pointed at or focused (impkt-web#51). */
|
|
539
|
-
.go { display: inline-block; transition: translate ${
|
|
540
|
-
article:has(a):hover .go, article:focus-within .go { translate: ${
|
|
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; }
|
|
541
379
|
@media (prefers-reduced-motion: reduce) { .go { transition: none; } }
|
|
542
380
|
/* On a phone (15:1020): 20px inside and 12px apart. */
|
|
543
|
-
@media (max-width: 47.99rem) { article { gap: ${
|
|
381
|
+
@media (max-width: 47.99rem) { article { gap: ${T(3)}; padding: ${T(5)}; } }
|
|
544
382
|
@media (forced-colors: active) { article { border-color: CanvasText; } }
|
|
545
|
-
`]}render(){let
|
|
546
|
-
${this.meta?
|
|
547
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
548
|
-
${this.text?
|
|
549
|
-
${this.linkText&&this.href?
|
|
550
|
-
</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`
|
|
551
389
|
/*
|
|
552
390
|
* The Selection (9:306): the accent behind the words with a 1.5px ink line, drawn 0.1em outside them at the sides
|
|
553
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
|
|
554
392
|
* heading. Its four 8px handles sit on its corners with the same line.
|
|
555
393
|
*/
|
|
556
|
-
: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: ${
|
|
557
|
-
.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: ${
|
|
558
|
-
.handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${
|
|
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")}; }
|
|
559
397
|
.handle.h1 { inset-block-start: calc(var(--top) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
560
398
|
.handle.h2 { inset-block-start: calc(var(--top) - 4px); inset-inline-end: calc(-1 * var(--x) - var(--trail) - 4px); }
|
|
561
399
|
.handle.h3 { inset-block-end: calc(var(--foot) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
@@ -565,144 +403,71 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
565
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.
|
|
566
404
|
*/
|
|
567
405
|
.label-at { position: absolute; inset-block-start: calc(100% - var(--foot) + 8px); inset-inline-start: calc(-1 * var(--x)); line-height: 0; }
|
|
568
|
-
.label { display: block; padding: 3px 7px; white-space: nowrap; font-family: ${
|
|
569
|
-
|
|
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; } }
|
|
570
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). */
|
|
571
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; }
|
|
572
|
-
.cursor svg { display: block; flex: none; color: ${
|
|
573
|
-
.tag { margin-block-start: 18px; padding: 3px 6px; white-space: nowrap; font-family: ${
|
|
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}; }
|
|
574
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; } }
|
|
575
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. */
|
|
576
|
-
.label { --ik-count-duration: ${
|
|
577
|
-
:host([data-motion]) { animation: ik-highlight-words ${
|
|
578
|
-
:host([data-motion]) .box { animation: ik-highlight-draw ${
|
|
579
|
-
:host([data-motion]) :is(.label, .cursor) { animation: ik-reveal-fade ${
|
|
580
|
-
:host([data-motion]) .handle { animation: ik-reveal-mark ${
|
|
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; }
|
|
581
421
|
@keyframes ik-highlight-draw { from { clip-path: inset(0 100% 100% 0); } to { clip-path: inset(0 0 0 0); } }
|
|
582
|
-
@keyframes ik-highlight-words { from { color: ${
|
|
583
|
-
`,
|
|
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"
|
|
584
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
|
|
585
|
-
>${this.cursor?
|
|
586
|
-
>`:
|
|
587
|
-
.
|
|
588
|
-
.
|
|
589
|
-
.
|
|
590
|
-
`,
|
|
591
|
-
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${V("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, ${Ie("semibold")}); letter-spacing: ${p.trackingWide}; text-transform: uppercase; }
|
|
592
|
-
.h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${Ie("bold")}; letter-spacing: ${p.trackingTight}; text-wrap: balance; }
|
|
593
|
-
.lead { margin: 0; color: ${p.textMuted}; text-wrap: pretty; }
|
|
594
|
-
`,Li=class extends be{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=[...be.styles,ji,dt,vr,_e`
|
|
595
|
-
:host { display: block; container-type: inline-size; --most: 1; --gap: ${u(6)}; }
|
|
596
|
-
:host([per-view='2']) { --most: 2; }
|
|
597
|
-
:host([per-view='3']) { --most: 3; }
|
|
598
|
-
.track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${u(1)} ${u(2)}; border-radius: ${p.radiusLg}; }
|
|
599
|
-
.track::-webkit-scrollbar { display: none; }
|
|
600
|
-
::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; }
|
|
601
|
-
/* Whole slides only: a slice of the next one reads as content spilling out of the page. */
|
|
602
|
-
@container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
|
|
603
|
-
@container (max-width: 40rem) { .track { --per: 1; --gap: ${u(4)}; } }
|
|
604
|
-
.controls { display: flex; align-items: center; justify-content: space-between; gap: ${u(4)}; margin-block-start: ${u(4)}; }
|
|
605
|
-
.dots { display: flex; flex-wrap: wrap; gap: ${u(1)}; }
|
|
606
|
-
.dot { ${Oa} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${p.radiusSm}; }
|
|
607
|
-
.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; }
|
|
608
|
-
.dot[aria-current='true'] span { inline-size: 24px; background: ${p.brand}; }
|
|
609
|
-
.buttons { display: flex; gap: ${u(2)}; }
|
|
610
|
-
section { position: relative; }
|
|
611
|
-
@container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${u(4)}); inset-inline-end: 0; } }
|
|
612
|
-
.sr-only { ${hn} }
|
|
613
|
-
@media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
|
|
614
|
-
`]}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",Me("slide")),i.setAttribute("aria-label",Me("{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,h=this.slides[this.index];!n&&s&&h&&typeof s.scrollTo=="function"&&s.scrollTo({left:h.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:$r()?"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 h=Math.abs(n.offsetLeft-e.offsetLeft-e.scrollLeft);h<r&&(r=h,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&&!$r()}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 E`<section aria-roledescription=${Me("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
|
|
615
|
-
@mouseenter=${()=>this.hold(!0)} @mouseleave=${()=>this.hold(!1)} @focusin=${()=>this.hold(!0)} @focusout=${()=>this.hold(!1)}>
|
|
616
|
-
<div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
|
|
617
|
-
<div class="controls" part="controls">
|
|
618
|
-
<div class="dots">${e.length>1?e.map(i=>E`<button class="dot" type="button" aria-label=${Me("Go to slide {slide}",{slide:i+1})} aria-current=${i===this.index?"true":"false"} @click=${()=>this.go(i)}><span></span></button>`):Q}</div>
|
|
619
|
-
<div class="buttons">
|
|
620
|
-
${this.canPlay?E`<button class="round" type="button" aria-label=${Me(this.paused?"Play the slides":"Pause the slides")} @click=${this.togglePause}>${this.paused?yt("arrow-right","18px"):E`<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>`:Q}
|
|
621
|
-
<button class="round" type="button" aria-label=${Me("Previous slide")} ?disabled=${this.index===0} @click=${()=>this.go(this.index-1)}>${yt("arrow-left","18px")}</button>
|
|
622
|
-
<button class="round" type="button" aria-label=${Me("Next slide")} ?disabled=${this.index>=this.last} @click=${()=>this.go(this.index+1)}>${yt("arrow-right","18px")}</button>
|
|
623
|
-
</div>
|
|
624
|
-
</div>
|
|
625
|
-
<p class="sr-only" aria-live="polite">${Me("Slide {slide} of {slides}",{slide:this.index+1,slides:this.count})}</p>
|
|
626
|
-
</section>`}};function kr(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 Ei=class extends be{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=[...be.styles,ji,dt,vr,_e`
|
|
627
|
-
:host { display: block; container-type: inline-size; }
|
|
628
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${u(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }
|
|
629
|
-
:host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
|
|
630
|
-
li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
|
|
631
|
-
:host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
|
|
632
|
-
.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; }
|
|
633
|
-
.open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }
|
|
634
|
-
.open:hover img { transform: scale(1.03); }
|
|
635
|
-
@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); } }
|
|
636
|
-
dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
|
|
637
|
-
dialog::backdrop { background: rgb(10 14 12 / 0.9); }
|
|
638
|
-
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${u(4)}; gap: ${u(3)}; color: #fff; }
|
|
639
|
-
.bar { display: flex; align-items: center; justify-content: space-between; ${V("sm")} }
|
|
640
|
-
.middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${u(3)}; min-block-size: 0; }
|
|
641
|
-
.middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${p.radiusLg}; }
|
|
642
|
-
figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
|
|
643
|
-
.caption { margin: 0; text-align: center; ${V("sm")} }
|
|
644
|
-
`]}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 E`<ul aria-label=${this.label} part="list">${e.map((a,r)=>{let n=kr(r,e.length,this.layout);return E`<li style=${`--span-wide:${n.wide};--span-narrow:${n.narrow};--span-rows:${n.rows}`}>
|
|
645
|
-
<button class="open" type="button" aria-label=${Me("View larger: {picture}",{picture:a.alt})} @click=${s=>this.open(r,s)}><img src=${a.src} alt=${a.alt} loading="lazy" /></button>
|
|
646
|
-
</li>`})}</ul>
|
|
647
|
-
<dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
|
|
648
|
-
${i?E`<div class="stage">
|
|
649
|
-
<div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${Me("Close")} @click=${this.close}>${yt("close","18px")}</button></div>
|
|
650
|
-
<div class="middle">
|
|
651
|
-
<button class="round" type="button" aria-label=${Me("Previous picture")} @click=${()=>this.step(-1)}>${yt("arrow-left","18px")}</button>
|
|
652
|
-
<figure><img src=${i.src} alt=${i.alt} /></figure>
|
|
653
|
-
<button class="round" type="button" aria-label=${Me("Next picture")} @click=${()=>this.step(1)}>${yt("arrow-right","18px")}</button>
|
|
654
|
-
</div>
|
|
655
|
-
<p class="caption">${i.caption??i.alt}</p>
|
|
656
|
-
</div>`:Q}
|
|
657
|
-
</dialog>`}},Bi=class extends be{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=[...be.styles,ji,dt,_e`
|
|
658
|
-
:host { display: block; }
|
|
659
|
-
p { margin: 0 0 ${u(6)}; text-align: center; color: ${p.textMuted}; ${V("sm")} font-weight: ${Ie("medium")}; }
|
|
660
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${u(8)} ${u(12)}; }
|
|
661
|
-
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; }
|
|
662
|
-
li:hover img { filter: none; opacity: 1; }
|
|
663
|
-
a { display: block; border-radius: ${p.radiusSm}; }
|
|
664
|
-
`]}render(){return E`${this.heading?E`<p part="heading">${this.heading}</p>`:Q}
|
|
665
|
-
<ul part="list">${(this.items??[]).map(t=>E`<li>${t.href?E`<a href=${t.href}><img src=${t.src} alt=${t.alt} /></a>`:E`<img src=${t.src} alt=${t.alt} />`}</li>`)}</ul>`}},Ii=class extends be{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=[...be.styles,dt,Pi,_e`
|
|
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`
|
|
666
431
|
:host { display: block; container-type: inline-size; }
|
|
667
|
-
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${
|
|
668
|
-
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${
|
|
669
|
-
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${
|
|
670
|
-
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${
|
|
671
|
-
.h { ${
|
|
672
|
-
.meta { margin: 0; ${
|
|
673
|
-
.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; }
|
|
674
439
|
:host([orientation='vertical']) ol { grid-auto-flow: row; }
|
|
675
440
|
:host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
676
441
|
:host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
677
|
-
: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; }
|
|
678
443
|
@container (max-width: 40rem) {
|
|
679
444
|
ol { grid-auto-flow: row; }
|
|
680
445
|
li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
681
446
|
li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
682
|
-
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; }
|
|
683
448
|
}
|
|
684
449
|
/* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */
|
|
685
|
-
: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); }
|
|
686
451
|
:host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }
|
|
687
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). */
|
|
688
|
-
:host([look='ruled']:not([tones])) li { padding-block-start: ${
|
|
689
|
-
:host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; font-weight: ${
|
|
690
|
-
:host([look='ruled']:not([tones])) .h { font-size: 1.25rem; font-weight: ${
|
|
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; }
|
|
691
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. */
|
|
692
457
|
:host([look='ruled']:not([tones])) .body { font-size: 0.875rem; line-height: 1.25rem; }
|
|
693
458
|
:host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' · '; }
|
|
694
|
-
: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); }
|
|
695
460
|
:host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }
|
|
696
461
|
:host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
|
|
697
|
-
:host([look='ruled']) ol { gap: ${
|
|
462
|
+
:host([look='ruled']) ol { gap: ${Y(5)}; }
|
|
698
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. */
|
|
699
464
|
@container (max-width: 40rem) {
|
|
700
465
|
:host([look='ruled']) ol { gap: 0; }
|
|
701
|
-
: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; }
|
|
702
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; }
|
|
703
|
-
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${
|
|
704
|
-
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${
|
|
705
|
-
: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); }
|
|
706
471
|
:host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }
|
|
707
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. */
|
|
708
473
|
:host([look='ruled']:not([tones])) li, :host([look='ruled']:not([tones])) li[aria-current] { gap: 6px; padding: 0 0 28px 26px; }
|
|
@@ -711,517 +476,175 @@ import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui
|
|
|
711
476
|
:host([look='ruled']:not([tones])) li:first-child::before { inset-block-start: 14px; }
|
|
712
477
|
:host([look='ruled']:not([tones])) li:last-child::before { display: none; }
|
|
713
478
|
/* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */
|
|
714
|
-
:host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${
|
|
715
|
-
: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; }
|
|
716
481
|
}
|
|
717
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; } }
|
|
718
|
-
`]}render(){return
|
|
719
|
-
${
|
|
720
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${
|
|
721
|
-
${
|
|
722
|
-
</li>`)}</ol>`}}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
.lead { ${V("lg")} }
|
|
732
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${u(3)}; }
|
|
733
|
-
li { display: flex; gap: ${u(3)}; align-items: flex-start; line-height: ${yr("normal")}; }
|
|
734
|
-
.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}; }
|
|
735
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${u(3)} ${u(4)}; align-items: center; margin-block-start: ${u(2)}; }
|
|
736
|
-
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${p.radius2xl}; box-shadow: ${p.shadowXl}; }
|
|
737
|
-
.picture { position: relative; }
|
|
738
|
-
.picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
|
|
739
|
-
.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; }
|
|
740
|
-
@container (max-width: 48rem) {
|
|
741
|
-
.split { grid-template-columns: minmax(0, 1fr); gap: ${u(8)}; }
|
|
742
|
-
:host([image-side='start']) .picture { order: 0; }
|
|
743
|
-
.h { ${V("3xl")} }
|
|
744
|
-
}
|
|
745
|
-
`]}render(){return E`<div class="split" part="split">
|
|
746
|
-
<div class="words">
|
|
747
|
-
${this.eyebrow?E`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:Q}
|
|
748
|
-
<div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
|
|
749
|
-
${this.lead?E`<p class="lead">${this.lead}</p>`:Q}
|
|
750
|
-
${this.points?.length?E`<ul>${this.points.map(t=>E`<li><span class="tick">${yt("check","14px")}</span><span>${t}</span></li>`)}</ul>`:Q}
|
|
751
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
752
|
-
</div>
|
|
753
|
-
${this.imageSrc?E`<div class="picture ${this.insetSrc?"has-inset":""}"><img src=${this.imageSrc} alt=${this.imageAlt} loading="lazy" part="image" />${this.insetSrc?E`<img class="inset" src=${this.insetSrc} alt=${this.insetAlt} loading="lazy" />`:Q}</div>`:Q}
|
|
754
|
-
</div>`}},Hi=class extends be{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=[...be.styles,dt,Pi,_e`
|
|
755
|
-
:host { display: block; container-type: inline-size; }
|
|
756
|
-
.panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${u(8)}; padding: ${u(16)}; border-radius: ${p.radius2xl}; background: ${p.surfaceCard}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
|
|
757
|
-
:host([tone='subtle']) .panel { background: ${p.surfaceSubtle}; box-shadow: none; }
|
|
758
|
-
:host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.shadowMd};
|
|
759
|
-
/* A primary button on the brand panel turns over, as it does on an ink band, so it keeps an edge against the panel. */
|
|
760
|
-
--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}; }
|
|
761
|
-
/* Only the words take the light colours: a button in the actions keeps its own. */
|
|
762
|
-
: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}; }
|
|
763
|
-
/* A soft glow in the corner, so a flat colour has some depth. Decoration only. */
|
|
764
|
-
: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; }
|
|
765
|
-
.photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
766
|
-
.panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }
|
|
767
|
-
.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%); }
|
|
768
|
-
.panel.pictured .words, .panel.pictured .actions { z-index: 1; }
|
|
769
|
-
@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%); } }
|
|
770
|
-
.words { position: relative; display: flex; flex-direction: column; gap: ${u(3)}; max-inline-size: 40rem; }
|
|
771
|
-
.h { ${V("4xl")} }
|
|
772
|
-
.lead { ${V("lg")} }
|
|
773
|
-
.actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${u(3)}; }
|
|
774
|
-
:host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
|
|
775
|
-
:host([align='center']) .panel { flex-direction: column; text-align: center; }
|
|
776
|
-
:host([align='center']) .words { align-items: center; }
|
|
777
|
-
@container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${u(8)} ${u(6)}; } .h { ${V("3xl")} } :host([align='center']) .panel { align-items: center; } }
|
|
778
|
-
@media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
|
|
779
|
-
`]}render(){return E`<div class="panel ${this.imageSrc?"pictured":""}" part="panel">
|
|
780
|
-
${this.imageSrc?E`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />`:Q}
|
|
781
|
-
<div class="words">
|
|
782
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
|
|
783
|
-
${this.lead?E`<p class="lead">${this.lead}</p>`:Q}
|
|
784
|
-
</div>
|
|
785
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
786
|
-
</div>`}},xr=o=>E`<span class="stars" role="img" aria-label=${Me("Rated {rating} out of 5",{rating:o})}>${[1,2,3,4,5].map(t=>E`<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>`,gn=o=>o.split(/\s+/).filter(t=>/^[A-Za-z]/.test(t)&&t.toLowerCase()!=="and").slice(0,2).map(t=>t[0].toUpperCase()).join(""),Ni=class extends be{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=[...be.styles,dt,_e`
|
|
787
|
-
:host { display: block; container-type: inline-size; }
|
|
788
|
-
.top { display: flex; align-items: center; gap: ${u(3)}; margin-block-end: ${u(6)}; ${V("sm")} font-weight: ${Ie("medium")}; }
|
|
789
|
-
.stars { display: inline-flex; gap: 2px; color: ${un}; }
|
|
790
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${u(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
791
|
-
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
792
|
-
li { display: flex; flex-direction: column; gap: ${u(4)}; padding: ${u(6)}; background: ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
|
|
793
|
-
blockquote { margin: 0; flex: 1; ${V("md")} text-wrap: pretty; }
|
|
794
|
-
.who { display: flex; align-items: center; gap: ${u(3)}; }
|
|
795
|
-
.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}; ${V("sm")} font-weight: ${Ie("bold")}; }
|
|
796
|
-
.face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
797
|
-
.name { font-weight: ${Ie("semibold")}; ${V("sm")} }
|
|
798
|
-
.about { color: ${p.textMuted}; ${V("sm")} }
|
|
799
|
-
@container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
800
|
-
`]}render(){return E`${this.summary||this.rating?E`<p class="top" part="summary" style="margin-block-start:0">${this.rating?xr(Math.round(this.rating)):Q}<span>${this.summary}</span></p>`:Q}
|
|
801
|
-
<ul part="list">${(this.items??[]).map(t=>E`<li part="review">
|
|
802
|
-
${t.rating?xr(t.rating):Q}
|
|
803
|
-
<blockquote>${t.quote}</blockquote>
|
|
804
|
-
<div class="who"><span class="face" aria-hidden="true">${t.avatarSrc?E`<img src=${t.avatarSrc} alt="" />`:gn(t.person)}</span><span><span class="name">${t.person}</span>${t.about?E`<br /><span class="about">${t.about}</span>`:Q}</span></div>
|
|
805
|
-
</li>`)}</ul>`}},qi=class extends be{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=[...be.styles,ji,dt,Pi,_e`
|
|
806
|
-
:host { display: block; container-type: inline-size; }
|
|
807
|
-
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u(8)}; align-items: center; }
|
|
808
|
-
.words { display: flex; flex-direction: column; gap: ${u(2)}; }
|
|
809
|
-
.h { ${V("2xl")} }
|
|
810
|
-
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${u(1)} ${u(3)}; }
|
|
811
|
-
label { grid-column: 1 / -1; ${V("sm")} font-weight: ${Ie("semibold")}; }
|
|
812
|
-
input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${u(2.5)} ${u(3)}; font: inherit; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.border}; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; }
|
|
813
|
-
button { ${Oa} min-block-size: 44px; padding: ${u(2)} ${u(5)}; font: inherit; ${V("sm")} font-weight: ${Ie("semibold")}; color: ${p.onBrand}; background: ${p.brand}; border: 0; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; cursor: pointer; }
|
|
814
|
-
button:hover { background: ${p.brandHover}; }
|
|
815
|
-
.note { grid-column: 1 / -1; margin: ${u(1)} 0 0; color: ${p.textMuted}; ${V("sm")} }
|
|
816
|
-
.done { margin: 0; ${V("md")} font-weight: ${Ie("semibold")}; }
|
|
817
|
-
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
818
|
-
`]}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 E`<div class="wrap" part="wrap">
|
|
819
|
-
<div class="words">
|
|
820
|
-
${this.heading?E`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:Q}
|
|
821
|
-
${this.lead?E`<p class="lead">${this.lead}</p>`:Q}
|
|
822
|
-
</div>
|
|
823
|
-
<div aria-live="polite">${this.done?E`<p class="done">${this.doneText}</p>`:E`<form @submit=${this.submit}>
|
|
824
|
-
<label for=${e}>${this.label}</label>
|
|
825
|
-
<input id=${e} type="email" name="email" autocomplete="email" required />
|
|
826
|
-
<button type="submit">${this.buttonText}</button>
|
|
827
|
-
${this.smallPrint?E`<p class="note">${this.smallPrint}</p>`:Q}
|
|
828
|
-
</form>`}</div>
|
|
829
|
-
</div>`}};customElements.define("impakt-carousel",Li);customElements.define("impakt-gallery",Ei);customElements.define("impakt-logo-cloud",Bi);customElements.define("impakt-steps",Ii);customElements.define("impakt-media-split",Ri);customElements.define("impakt-cta-banner",Hi);customElements.define("impakt-reviews",Ni);customElements.define("impakt-newsletter",qi);import{css as Dt,html as Y,nothing as we}from"./atomic-ui.js";import{say as pt,pageLocale as bn,ImpaktElement as Ge,focusRing as Wt,targetSize as wr,fontWeight as Se,space as x,spaceAround as Gi,t as c,type as le,iconSvg as vt}from"./atomic-ui.js";var Oi=class extends Ge{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=[...Ge.styles,Wt,Gi,Dt`
|
|
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`
|
|
830
496
|
:host { display: block; container-type: inline-size; }
|
|
831
|
-
.
|
|
832
|
-
.
|
|
833
|
-
.plan
|
|
834
|
-
.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; ${le("xs")} line-height: 1; font-weight: ${Se("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; }
|
|
835
|
-
.pin:hover { transform: scale(1.12); }
|
|
836
|
-
.pin.reserved { color: ${c.text}; background: ${c.warningSubtle}; border-color: ${c.warning}; border-style: dashed; }
|
|
837
|
-
.pin.sold { color: ${c.textMuted}; background: ${c.surfaceCard}; border-color: ${c.border}; border-radius: ${c.radius}; }
|
|
838
|
-
.pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${c.shadowLg}, 0 0 0 3px ${c.brand}; }
|
|
839
|
-
.panel { display: flex; flex-direction: column; gap: ${x(3)}; padding: ${x(6)}; background: ${c.surfaceCard}; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowSm}, 0 0 0 1px color-mix(in srgb, ${c.text} 6%, transparent); }
|
|
840
|
-
.hint { margin: 0; color: ${c.textMuted}; }
|
|
841
|
-
.name { margin: 0; font-family: ${c.fontHeading}; ${le("2xl")} font-weight: ${Se("bold")}; color: ${c.textHeading}; }
|
|
842
|
-
.sub { margin: 0; color: ${c.textMuted}; }
|
|
843
|
-
.price { margin: 0; ${le("xl")} font-weight: ${Se("semibold")}; }
|
|
844
|
-
.status { align-self: flex-start; padding: ${x(.5)} ${x(2.5)}; ${le("xs")} font-weight: ${Se("semibold")}; color: ${c.successText}; background: ${c.successSubtle}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); }
|
|
845
|
-
.status.reserved { color: ${c.warningText}; background: ${c.warningSubtle}; }
|
|
846
|
-
.status.sold { color: ${c.text}; background: ${c.surfaceSubtle}; }
|
|
847
|
-
.go { ${wr} display: inline-flex; align-items: center; justify-content: center; gap: ${x(2)}; padding: ${x(2)} ${x(4)}; ${le("sm")} font-weight: ${Se("semibold")}; color: ${c.onBrand}; text-decoration: none; background: ${c.brand}; border-radius: ${c.radiusLg}; }
|
|
848
|
-
.go:hover { background: ${c.brandHover}; }
|
|
849
|
-
.legend { display: flex; flex-wrap: wrap; gap: ${x(4)}; margin: ${x(3)} 0 0; padding: 0; list-style: none; ${le("sm")} color: ${c.textMuted}; }
|
|
850
|
-
.legend li { display: inline-flex; align-items: center; gap: ${x(2)}; }
|
|
851
|
-
.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); }
|
|
852
|
-
.key.reserved { background: ${c.warningSubtle}; border: 2px dashed ${c.warning}; }
|
|
853
|
-
.key.sold { background: ${c.surfaceCard}; border: 2px solid ${c.border}; border-radius: 3px; }
|
|
854
|
-
: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}); }
|
|
855
|
-
: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); }
|
|
856
|
-
@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: ${x(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${c.shadowXl}; } }
|
|
857
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
858
|
-
`]}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 Y`<p class="hint">${this.hint}</p>`;let e=t.status??"available";return Y`<span class="status ${e}">${this.word(e)}</span>
|
|
859
|
-
<p class="name">${this.plotWord} ${t.number}</p>
|
|
860
|
-
${t.name||t.beds?Y`<p class="sub">${[t.name,t.beds].filter(Boolean).join(" \xB7 ")}</p>`:we}
|
|
861
|
-
${t.price?Y`<p class="price">${t.price}</p>`:we}
|
|
862
|
-
${t.href&&e!=="sold"?Y`<a class="go" href=${t.href}>${this.actionText}${vt("arrow-right","16px")}</a>`:we}`}render(){return Y`<div class="wrap" part="wrap">
|
|
863
|
-
<div>
|
|
864
|
-
<div class="plan" part="plan">
|
|
865
|
-
<img src=${this.imageSrc} alt=${this.imageAlt} />
|
|
866
|
-
${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 Y`<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>`})}
|
|
867
|
-
</div>
|
|
868
|
-
<ul class="legend">
|
|
869
|
-
<li><span class="key"></span>${this.availableText}</li>
|
|
870
|
-
<li><span class="key reserved"></span>${this.reservedText}</li>
|
|
871
|
-
<li><span class="key sold"></span>${this.soldText}</li>
|
|
872
|
-
</ul>
|
|
873
|
-
</div>
|
|
874
|
-
<div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
|
|
875
|
-
</div>`}};function Sr(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 Fi=class extends Ge{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=[...Ge.styles,Wt,Gi,Dt`
|
|
876
|
-
:host { display: block; container-type: inline-size; }
|
|
877
|
-
.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); }
|
|
878
|
-
.inputs { display: flex; flex-direction: column; gap: ${x(5)}; padding: ${x(8)}; }
|
|
879
|
-
.h { margin: 0; font-family: ${c.fontHeading}; ${le("2xl")} font-weight: ${Se("bold")}; color: ${c.textHeading}; }
|
|
880
|
-
label { display: flex; justify-content: space-between; gap: ${x(3)}; ${le("sm")} font-weight: ${Se("semibold")}; margin-block-end: ${x(1.5)}; }
|
|
881
|
-
.read { font-weight: ${Se("regular")}; color: ${c.textMuted}; }
|
|
882
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${x(2)} ${x(3)}; font: inherit; color: ${c.text}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; }
|
|
883
|
-
input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${c.brand}; }
|
|
884
|
-
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${x(4)}; }
|
|
885
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${x(2)}; padding: ${x(8)}; color: ${c.onBrand}; background: ${c.brand}; }
|
|
886
|
-
.caption { margin: 0; ${le("sm")} opacity: 0.85; }
|
|
887
|
-
output { display: block; font-family: ${c.fontHeading}; ${le("4xl")} font-weight: ${Se("bold")}; }
|
|
888
|
-
dl { display: grid; gap: ${x(2)}; margin: ${x(4)} 0 0; padding-block-start: ${x(4)}; border-block-start: 1px solid color-mix(in srgb, ${c.onBrand} 25%, transparent); ${le("sm")} }
|
|
889
|
-
dl div { display: flex; justify-content: space-between; gap: ${x(3)}; }
|
|
890
|
-
dt { opacity: 0.85; }
|
|
891
|
-
dd { margin: 0; font-weight: ${Se("semibold")}; }
|
|
892
|
-
/* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
|
|
893
|
-
.small { grid-column: 1 / -1; margin: 0; padding: ${x(4)} ${x(8)}; ${le("xs")} color: ${c.text}; background: ${c.surfaceSubtle}; }
|
|
894
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${x(5)}; } .small { padding: ${x(4)} ${x(5)}; } }
|
|
895
|
-
`]}money(t){try{return new Intl.NumberFormat(bn(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=Sr(e,this.rate,this.years);return Y`<div class="wrap" part="wrap">
|
|
896
|
-
<div class="inputs">
|
|
897
|
-
${this.heading?Y`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:we}
|
|
898
|
-
<div><label for=${this.id_("price")}>${pt("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>
|
|
899
|
-
<div><label for=${this.id_("deposit")}>${pt("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>
|
|
900
|
-
<div class="two">
|
|
901
|
-
<div><label for=${this.id_("years")}>${pt("Term")} <span class="read">${pt("{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>
|
|
902
|
-
<div><label for=${this.id_("rate")}>${pt("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>
|
|
903
|
-
</div>
|
|
904
|
-
</div>
|
|
905
|
-
<div class="result">
|
|
906
|
-
<p class="caption">${pt("Estimated monthly repayment")}</p>
|
|
907
|
-
<output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(i)}</output>
|
|
908
|
-
<dl>
|
|
909
|
-
<div><dt>${pt("You would borrow")}</dt><dd>${this.money(e)}</dd></div>
|
|
910
|
-
<div><dt>${pt("Total repayable")}</dt><dd>${this.money(i*this.years*12)}</dd></div>
|
|
911
|
-
</dl>
|
|
912
|
-
</div>
|
|
913
|
-
${this.smallPrint?Y`<p class="small">${this.smallPrint}</p>`:we}
|
|
914
|
-
</div>`}},Di=class extends Ge{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=[...Ge.styles,Wt,Gi,Dt`
|
|
915
|
-
.frame { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowLg}; line-height: 0; --at: 50%; }
|
|
916
|
-
img { display: block; inline-size: 100%; block-size: auto; }
|
|
917
|
-
.after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
|
|
918
|
-
.tag { position: absolute; inset-block-start: ${x(3)}; padding: ${x(1)} ${x(3)}; ${le("xs")} line-height: 1.4; font-weight: ${Se("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}; }
|
|
919
|
-
.tag.b { inset-inline-start: ${x(3)}; }
|
|
920
|
-
.tag.a { inset-inline-end: ${x(3)}; }
|
|
921
|
-
.line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${c.surfaceCard}; pointer-events: none; }
|
|
922
|
-
.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}; }
|
|
923
|
-
input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
|
|
924
|
-
.frame:has(input:focus-visible) .grip { box-shadow: ${c.focusShadow}; }
|
|
925
|
-
`]}render(){return Y`<div class="frame" part="frame" style="--at:${this.position}%">
|
|
926
|
-
<img src=${this.beforeSrc} alt=${this.beforeAlt} />
|
|
927
|
-
<img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
|
|
928
|
-
<span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
|
|
929
|
-
<span class="tag a" aria-hidden="true">${this.afterLabel}</span>
|
|
930
|
-
<span class="line"><span class="grip">${vt("arrow-left","14px")}${vt("arrow-right","14px")}</span></span>
|
|
931
|
-
<input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${t=>{this.position=Number(t.target.value)}} />
|
|
932
|
-
</div>`}},Wi=class extends Ge{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=[...Ge.styles,Wt,Dt`
|
|
933
|
-
:host { display: block; }
|
|
934
|
-
.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${x(4)}; padding: ${x(3)} ${x(4)} calc(${x(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; }
|
|
935
|
-
.bar.on { transform: none; visibility: visible; }
|
|
936
|
-
.spacer { block-size: 5rem; }
|
|
937
|
-
.h { font-family: ${c.fontHeading}; ${le("md")} font-weight: ${Se("bold")}; color: ${c.textHeading}; }
|
|
938
|
-
.t { ${le("xs")} color: ${c.textMuted}; }
|
|
939
|
-
.words { min-inline-size: 0; }
|
|
940
|
-
.actions { display: flex; flex: none; gap: ${x(2)}; }
|
|
941
|
-
@media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
|
|
942
|
-
`]}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 Y`<div class="spacer"></div>
|
|
943
|
-
<section class="bar ${this.shown?"on":""}" part="bar" aria-label=${this.label}>
|
|
944
|
-
<div class="words">
|
|
945
|
-
${this.heading?Y`<div class="h">${this.heading}</div>`:we}
|
|
946
|
-
${this.lead?Y`<div class="t">${this.lead}</div>`:we}
|
|
947
|
-
</div>
|
|
948
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
949
|
-
</section>`}},_i=class extends Ge{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=[...Ge.styles,Wt,Gi,Dt`
|
|
950
|
-
:host { display: block; container-type: inline-size; }
|
|
951
|
-
.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); }
|
|
952
|
-
.wrap.solo { grid-template-columns: minmax(0, 1fr); }
|
|
953
|
-
.map { min-block-size: 16rem; background: ${c.surfaceSubtle}; }
|
|
954
|
-
.map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
955
|
-
.info { display: flex; flex-direction: column; gap: ${x(3)}; padding: ${x(8)}; }
|
|
956
|
-
.h { margin: 0; font-family: ${c.fontHeading}; ${le("2xl")} font-weight: ${Se("bold")}; color: ${c.textHeading}; }
|
|
957
|
-
.row { display: flex; gap: ${x(3)}; margin: 0; white-space: pre-line; }
|
|
958
|
-
.row svg { flex: none; margin-block-start: ${x(.5)}; color: ${c.brand}; }
|
|
959
|
-
.row a { display: inline-flex; align-items: center; min-block-size: ${c.targetMin}; margin-block-start: -2px; }
|
|
960
|
-
a { color: ${c.link}; }
|
|
961
|
-
ul { display: grid; gap: ${x(1.5)}; margin: ${x(1)} 0; padding: ${x(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${c.text} 10%, transparent); ${le("sm")} }
|
|
962
|
-
li { display: flex; justify-content: space-between; gap: ${x(3)}; }
|
|
963
|
-
li span:last-child { color: ${c.textMuted}; text-align: end; }
|
|
964
|
-
.go { ${wr} align-self: flex-start; display: inline-flex; align-items: center; gap: ${x(2)}; padding: ${x(2)} ${x(4)}; ${le("sm")} font-weight: ${Se("semibold")}; color: ${c.onBrand}; text-decoration: none; background: ${c.brand}; border-radius: ${c.radiusLg}; }
|
|
965
|
-
.go:hover { background: ${c.brandHover}; }
|
|
966
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${x(5)}; } }
|
|
967
|
-
`]}render(){let t=this.directionsHref||(this.address?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}`:"");return Y`<div class="wrap ${this.mapSrc?"":"solo"}" part="wrap">
|
|
968
|
-
${this.mapSrc?Y`<div class="map"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>`:we}
|
|
969
|
-
<div class="info">
|
|
970
|
-
${this.heading?Y`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:we}
|
|
971
|
-
${this.address?Y`<p class="row">${vt("map-pin","20px")}<span>${this.address}</span></p>`:we}
|
|
972
|
-
${this.hours?Y`<p class="row">${vt("clock","20px")}<span>${this.hours}</span></p>`:we}
|
|
973
|
-
${this.phone?Y`<p class="row">${vt("phone","20px")}<a href=${`tel:${this.phone.replace(/\s+/g,"")}`}>${this.phone}</a></p>`:we}
|
|
974
|
-
${this.nearby.length?Y`<ul>${this.nearby.map(e=>Y`<li><span>${e.place}</span><span>${e.distance}</span></li>`)}</ul>`:we}
|
|
975
|
-
${t?Y`<a class="go" href=${t}>${this.directionsText}${vt("arrow-right","16px")}</a>`:we}
|
|
976
|
-
</div>
|
|
977
|
-
</div>`}};customElements.define("impakt-site-plan",Oi);customElements.define("impakt-mortgage-calculator",Fi);customElements.define("impakt-before-after",Di);customElements.define("impakt-sticky-bar",Wi);customElements.define("impakt-location-card",_i);import{css as Et,html as S,nothing as U}from"./atomic-ui.js";import{say as F,pageLocale as Mr,ImpaktElement as Re,focusRing as Ut,targetSize as Cr,visuallyHidden as fn,fontWeight as fe,space as g,spaceAround as Bt,t as d,token as Lt,type as ce}from"./atomic-ui.js";var Vt=Et`
|
|
978
|
-
.card { background: ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-shadow: ${d.shadowSm}, 0 0 0 1px ${d.hairline}; }
|
|
979
|
-
.h { margin: 0; font-family: ${d.fontHeading}; ${ce("2xl")} font-weight: ${fe("bold")}; color: ${d.textHeading}; }
|
|
980
|
-
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${g(2.5)} ${g(5)}; font: inherit; font-weight: ${fe("semibold")}; color: ${d.onBrand}; text-decoration: none; background: ${d.brand}; border: 0; border-radius: ${d.radiusLg}; cursor: pointer; }
|
|
981
|
-
.btn:hover { background: ${d.brandHover}; }
|
|
982
|
-
.btn.quiet { color: ${d.link}; background: transparent; box-shadow: inset 0 0 0 ${d.borderThin} ${d.border}; }
|
|
983
|
-
.small { margin: 0; ${ce("xs")} color: ${d.textMuted}; }
|
|
984
|
-
.visually-hidden { ${fn} }
|
|
985
|
-
`,Ui=(o,t="GBP",e=0)=>{try{return new Intl.NumberFormat(Mr(),{style:"currency",currency:t,maximumFractionDigits:e,minimumFractionDigits:e}).format(o)}catch{return String(Math.round(o))}},zr=S`<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>`,Vi=class extends Re{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=[...Re.styles,Ut,Cr,Bt,Vt,Et`
|
|
986
|
-
:host { display: block; container-type: inline-size; }
|
|
987
|
-
.h { margin-block-end: ${g(5)}; }
|
|
988
|
-
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${g(4)}; }
|
|
989
|
-
.plan { --plan-accent: ${Lt("color.accent.default","#ffd43b")}; --plan-on-accent: ${Lt("color.accent.on","#111111")}; position: relative; display: flex; flex-direction: column; gap: ${g(3)}; padding: ${g(6)}; color: ${d.text}; border: ${d.borderThin} solid ${d.text}; border-radius: ${d.radiusSm}; box-shadow: none; }
|
|
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; }
|
|
990
500
|
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
991
|
-
.plan.top { background: ${
|
|
992
|
-
.badge { align-self: flex-start; padding: 2px ${
|
|
993
|
-
.name { margin: 0; ${
|
|
994
|
-
.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; }
|
|
995
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. */
|
|
996
506
|
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
997
|
-
.period { margin-inline-start: ${
|
|
998
|
-
.note { margin: 0; ${
|
|
999
|
-
ul { flex: 1; margin: 0; padding: ${
|
|
1000
|
-
li { display: flex; gap: ${
|
|
1001
|
-
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}); }
|
|
1002
512
|
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
1003
513
|
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
1004
|
-
.plan .btn { justify-content: space-between; gap: ${
|
|
1005
|
-
.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}; }
|
|
1006
516
|
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
1007
|
-
.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}); }
|
|
1008
518
|
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
1009
|
-
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
1010
|
-
`]}has(
|
|
1011
|
-
${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}
|
|
1012
522
|
<div class="grid" style=${`--cols: ${Math.max(1,this.plans.length)}`}>
|
|
1013
|
-
${this.plans.map(
|
|
1014
|
-
${
|
|
1015
|
-
<h3 class="name" id=${this.id_(`n-${
|
|
1016
|
-
<p class="price">${
|
|
1017
|
-
${
|
|
1018
|
-
<ul>${this.rows.map(e=>{let
|
|
1019
|
-
${
|
|
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>`}
|
|
1020
530
|
</section>`)}
|
|
1021
|
-
</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`
|
|
1022
532
|
:host { display: block; }
|
|
1023
|
-
.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; }
|
|
1024
534
|
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
1025
535
|
:host([ratio='1:1']) .frame { aspect-ratio: 1; }
|
|
1026
536
|
:host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }
|
|
1027
537
|
iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }
|
|
1028
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; }
|
|
1029
|
-
.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}; }
|
|
1030
540
|
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
1031
|
-
.label { position: absolute; inset-inline: ${
|
|
1032
|
-
.foot { margin: ${
|
|
1033
|
-
.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}; }
|
|
1034
544
|
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
1035
545
|
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
1036
|
-
.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: ${
|
|
1037
|
-
.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)); }
|
|
1038
548
|
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
1039
|
-
.bar .dot:first-child { background: ${
|
|
1040
|
-
.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; }
|
|
1041
551
|
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
1042
552
|
:host([look='window']) .play { background: none; color: inherit; }
|
|
1043
553
|
:host([look='window']) .disc { display: none; }
|
|
1044
|
-
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${
|
|
1045
|
-
: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); }
|
|
1046
556
|
:host([look='window']) .play:focus-visible { outline: none; }
|
|
1047
|
-
:host([look='window']) .play:focus-visible .label { box-shadow: ${
|
|
1048
|
-
.length { font-family: ${
|
|
1049
|
-
.transcript { margin-block-start: ${
|
|
1050
|
-
.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; }
|
|
1051
561
|
.transcript summary::-webkit-details-marker { display: none; }
|
|
1052
|
-
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${
|
|
562
|
+
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${p.fontMono}; }
|
|
1053
563
|
.transcript[open] summary::before { content: '−'; }
|
|
1054
|
-
.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; }
|
|
1055
565
|
.transcript p { margin: 0; }
|
|
1056
566
|
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
1057
|
-
`]}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}
|
|
1058
568
|
<button class="play" type="button" @click=${()=>{this.playing=!0}}>
|
|
1059
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>
|
|
1060
|
-
<span class="label">${this.playText}${this.duration?
|
|
1061
|
-
</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}>
|
|
1062
572
|
<source src=${this.videoSrc} />
|
|
1063
|
-
${this.captionsSrc?
|
|
1064
|
-
</video>`:e=
|
|
1065
|
-
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?
|
|
1066
|
-
${
|
|
1067
|
-
</div>`:
|
|
1068
|
-
${a.length?
|
|
1069
|
-
${this.transcriptHref?
|
|
1070
|
-
:host { display: block; }
|
|
1071
|
-
.box { padding: ${g(5)}; border-inline-start: 6px solid ${d.warning}; border-radius: ${d.radiusLg}; background: ${d.warningSubtle}; }
|
|
1072
|
-
:host([kind='insurance']) .box { border-color: ${d.info}; background: ${d.infoSubtle}; }
|
|
1073
|
-
strong { display: block; margin-block-end: ${g(1)}; ${ce("md")} color: ${d.text}; }
|
|
1074
|
-
p { margin: 0; color: ${d.text}; }
|
|
1075
|
-
/* 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). */
|
|
1076
|
-
.firm { margin-block-start: ${g(3)}; ${ce("sm")} color: ${d.text}; }
|
|
1077
|
-
`]}render(){let t=Tr[this.kind]??Tr.custom,e=this.heading||(t.heading?F(t.heading):""),i=this.text||(t.text?F(t.text):"");return S`<aside class="box" part="box" aria-label=${e||F("Important information")}>
|
|
1078
|
-
${e?S`<strong>${e}</strong>`:U}
|
|
1079
|
-
${i?S`<p>${i}</p>`:U}
|
|
1080
|
-
${this.firm?S`<p class="firm">${this.firm}</p>`:U}
|
|
1081
|
-
</aside>`}},ht={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 Fa(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 Lr(o,t){return o<=0?0:t==="first-time"&&o<=ht.firstTimeLimit?Fa(o,ht.firstTime):t==="additional"?o<4e4?0:Fa(o,ht.standard,ht.additionalSurcharge):Fa(o,ht.standard)}var Er=Et`
|
|
1082
|
-
:host { display: block; container-type: inline-size; }
|
|
1083
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
|
|
1084
|
-
.inputs { display: flex; flex-direction: column; gap: ${g(5)}; padding: ${g(8)}; }
|
|
1085
|
-
label, legend { display: block; ${ce("sm")} font-weight: ${fe("semibold")}; margin-block-end: ${g(1.5)}; padding: 0; }
|
|
1086
|
-
fieldset { margin: 0; padding: 0; border: 0; }
|
|
1087
|
-
.choices { display: flex; flex-wrap: wrap; gap: ${g(2)}; }
|
|
1088
|
-
.choices label { display: inline-flex; align-items: center; gap: ${g(2)}; margin: 0; padding: ${g(2)} ${g(3)}; font-weight: ${fe("regular")}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; cursor: pointer; }
|
|
1089
|
-
.choices input { accent-color: ${d.brand}; }
|
|
1090
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${g(2)} ${g(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; }
|
|
1091
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${g(2)}; padding: ${g(8)}; color: ${d.onBrand}; background: ${d.brand}; }
|
|
1092
|
-
.caption { margin: 0; ${ce("sm")} opacity: 0.85; }
|
|
1093
|
-
output { display: block; font-family: ${d.fontHeading}; ${ce("4xl")} font-weight: ${fe("bold")}; }
|
|
1094
|
-
.line { margin: 0; ${ce("sm")} }
|
|
1095
|
-
.foot { grid-column: 1 / -1; padding: ${g(4)} ${g(8)}; background: ${d.surfaceSubtle}; }
|
|
1096
|
-
/* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
|
|
1097
|
-
.foot .small { color: ${d.text}; }
|
|
1098
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${g(5)}; } .foot { padding: ${g(4)} ${g(5)}; } }
|
|
1099
|
-
`,Xi=class extends Re{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=[...Re.styles,Ut,Bt,Vt,Er]}render(){let t=Lr(this.price,this.buyer),e=this.price>0?t/this.price*100:0,i=[["first-time",F("First home")],["mover",F("Moving home")],["additional",F("Second home")]];return S`<div class="card wrap" part="wrap">
|
|
1100
|
-
<div class="inputs">
|
|
1101
|
-
${this.heading?S`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:U}
|
|
1102
|
-
<div><label for=${this.id_("price")}>${F("Price of the home (\xA3)")}</label>
|
|
1103
|
-
<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>
|
|
1104
|
-
<fieldset><legend>${F("Are you buying")}</legend><div class="choices">
|
|
1105
|
-
${i.map(([a,r])=>S`<label><input type="radio" name=${this.id_("buyer")} .checked=${this.buyer===a} @change=${()=>{this.buyer=a}} />${r}</label>`)}
|
|
1106
|
-
</div></fieldset>
|
|
1107
|
-
</div>
|
|
1108
|
-
<div class="result" aria-live="polite">
|
|
1109
|
-
<p class="caption">${F("Stamp duty to pay")}</p>
|
|
1110
|
-
<output for=${this.id_("price")}>${Ui(t)}</output>
|
|
1111
|
-
<p class="line">${t?F("About {rate}% of the price",{rate:e.toFixed(1)}):F("Nothing to pay at this price")}</p>
|
|
1112
|
-
${this.buyer==="first-time"&&this.price>ht.firstTimeLimit?S`<p class="line">${F("First-time buyer relief stops above {limit}, so the usual rates apply.",{limit:Ui(ht.firstTimeLimit)})}</p>`:U}
|
|
1113
|
-
</div>
|
|
1114
|
-
${this.smallPrint?S`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:U}
|
|
1115
|
-
</div>`}},Ji=class extends Re{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=[...Re.styles,Ut,Bt,Vt,Er]}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)=>S`<div><label for=${this.id_(i)}>${a}</label>
|
|
1116
|
-
<input id=${this.id_(i)} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this[i])} @input=${this.field(i)} /></div>`;return S`<div class="card wrap" part="wrap">
|
|
1117
|
-
<div class="inputs">
|
|
1118
|
-
${this.heading?S`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:U}
|
|
1119
|
-
${e("income",F("Your yearly income before tax (\xA3)"))}
|
|
1120
|
-
${e("secondIncome",F("A second person\u2019s income, if buying together (\xA3)"))}
|
|
1121
|
-
${e("deposit",F("Your deposit (\xA3)"))}
|
|
1122
|
-
</div>
|
|
1123
|
-
<div class="result" aria-live="polite">
|
|
1124
|
-
<p class="caption">${F("You could borrow about")}</p>
|
|
1125
|
-
<output>${Ui(t)}</output>
|
|
1126
|
-
<p class="line">${F("With your deposit, that\u2019s a home of about {amount}.",{amount:Ui(t+this.deposit)})}</p>
|
|
1127
|
-
</div>
|
|
1128
|
-
${this.smallPrint?S`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:U}
|
|
1129
|
-
</div>`}},Gt=class extends Re{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
|
|
1130
|
-
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=[...Re.styles,Ut,Bt,Vt,Et`
|
|
1131
|
-
:host { display: block; container-type: inline-size; }
|
|
1132
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${g(6)}; padding: ${g(8)}; }
|
|
1133
|
-
.phone { display: inline-block; margin: ${g(3)} 0; font-family: ${d.fontHeading}; ${ce("3xl")} font-weight: ${fe("bold")}; color: ${d.link}; text-decoration: none; }
|
|
1134
|
-
.hours { margin: 0; white-space: pre-line; color: ${d.textMuted}; }
|
|
1135
|
-
.email { display: inline-flex; align-items: center; min-block-size: ${d.targetMin}; margin-block-start: ${g(3)}; color: ${d.link}; overflow-wrap: anywhere; }
|
|
1136
|
-
form { display: grid; gap: ${g(3)}; padding: ${g(5)}; border-radius: ${d.radiusLg}; background: ${d.surfaceInset}; }
|
|
1137
|
-
.sub { margin: 0; ${ce("lg")} font-weight: ${fe("bold")}; color: ${d.text}; }
|
|
1138
|
-
label { display: block; ${ce("sm")} font-weight: ${fe("semibold")}; margin-block-end: ${g(1)}; }
|
|
1139
|
-
input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${g(2)} ${g(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; }
|
|
1140
|
-
.done { margin: 0; padding: ${g(5)}; border-radius: ${d.radiusLg}; background: ${d.successSubtle}; color: ${d.successText}; font-weight: ${fe("semibold")}; }
|
|
1141
|
-
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${g(5)}; } }
|
|
1142
|
-
`]}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 S`<div class="card wrap" part="wrap">
|
|
1143
|
-
<div>
|
|
1144
|
-
${this.heading?S`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:U}
|
|
1145
|
-
${this.phone?S`<a class="phone" href=${`tel:${this.phone.replace(/[^\d+]/g,"")}`}>${this.phone}</a>`:U}
|
|
1146
|
-
${this.hours?S`<p class="hours">${this.hours}</p>`:U}
|
|
1147
|
-
${this.email?S`<a class="email" href=${`mailto:${this.email}`}>${this.email}</a>`:U}
|
|
1148
|
-
</div>
|
|
1149
|
-
${this.callbackHeading?this.sent?S`<p class="done" role="status">${this.doneText}</p>`:S`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
|
|
1150
|
-
<p class="sub" id=${this.id_("cb")}>${this.callbackHeading}</p>
|
|
1151
|
-
<div><label for=${this.id_("name")}>${F("Your name")}</label><input id=${this.id_("name")} name="name" autocomplete="name" required /></div>
|
|
1152
|
-
<div><label for=${this.id_("tel")}>${F("Phone number")}</label><input id=${this.id_("tel")} name="phone" type="tel" autocomplete="tel" required /></div>
|
|
1153
|
-
<div><label for=${this.id_("when")}>${F("Best time to call")}</label><select id=${this.id_("when")} name="when"><option value="Morning">${F("Morning")}</option><option value="Afternoon">${F("Afternoon")}</option><option value="Evening">${F("Evening")}</option></select></div>
|
|
1154
|
-
<button class="btn" type="submit">${this.buttonText}</button>
|
|
1155
|
-
</form>`:U}
|
|
1156
|
-
</div>`}};_t.createProperty("playing",{state:!0});Gt.createProperty("sent",{state:!0});customElements.define("impakt-plan-comparison",Vi);customElements.define("impakt-video",_t);customElements.define("impakt-regulatory-notice",Yi);customElements.define("impakt-stamp-duty-calculator",Xi);customElements.define("impakt-affordability-calculator",Ji);customElements.define("impakt-contact-block",Gt);import{css as $n,html as D,nothing as $e,unsafeCSS as Br}from"./atomic-ui.js";import{ImpaktElement as Ir,R as Da,pageLocale as Rr,say as re,focusRing as xn,targetSize as Wa,visuallyHidden as Hr,fontSize as _a,fontWeight as Ue,space as w,spaceAround as yn,t as b,token as Nr,type as kt,toneOf as Qi}from"./atomic-ui.js";var Ki=o=>o.reduce((t,e)=>t+e,0),qr=(o,t)=>o.find(e=>typeof e.below=="number"&&t<e.below)??o.at(-1);function Yt(o,t,e){let i=o.flatMap(s=>(t[s.id]??[]).flatMap(h=>s.choices.filter(y=>y.id===h))),a=Ki(i.map(s=>s.cost??0)),r=Ki(i.map(s=>s.weeks??0));for(let s of i)a*=s.costFactor??1,r*=s.weeksFactor??1;let n=(qr(e.teams,a)?.engineers??1)+Ki(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:qr(e.ways,a)?.text??""}}function Ga(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-Ki(e));return o.map((a,r)=>typeof a.share=="number"?e[r]:i)}var Zi=class extends Ir{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=[...Ir.styles,yn,xn,$n`
|
|
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`
|
|
1157
580
|
:host { display: block; container-type: inline-size; }
|
|
1158
581
|
[hidden] { display: none !important; }
|
|
1159
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${
|
|
1160
|
-
.mono { font-family: ${
|
|
1161
|
-
.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} }
|
|
1162
585
|
|
|
1163
|
-
.progress { display: grid; gap: ${
|
|
586
|
+
.progress { display: grid; gap: ${h(2)}; margin-block-end: ${h(6)}; }
|
|
1164
587
|
.bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }
|
|
1165
|
-
.bar i { display: block; block-size: 100%; background: ${
|
|
588
|
+
.bar i { display: block; block-size: 100%; background: ${c.brand}; transition: inline-size 300ms ease; }
|
|
1166
589
|
|
|
1167
590
|
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
|
|
1168
|
-
legend { padding: 0; margin-block-end: ${
|
|
1169
|
-
.q { margin: 0; font-family: ${
|
|
1170
|
-
.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}; }
|
|
1171
594
|
|
|
1172
|
-
.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)}; }
|
|
1173
596
|
.choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1174
|
-
.choice { position: relative; display: grid; gap: ${
|
|
1175
|
-
.choice:hover { border-color: ${
|
|
1176
|
-
.choice input { ${
|
|
1177
|
-
.choice:has(input:checked) { border-color: ${
|
|
1178
|
-
.choice:has(input:focus-visible) { box-shadow: ${
|
|
1179
|
-
.many .choice { padding: ${
|
|
1180
|
-
.label { font-weight: ${
|
|
1181
|
-
.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}; }
|
|
1182
605
|
/* A tick for a picked feature, drawn in the corner. */
|
|
1183
|
-
.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")}; }
|
|
1184
607
|
|
|
1185
|
-
.scale { display: grid; gap: ${
|
|
1186
|
-
.scale input { inline-size: 100%; accent-color: ${
|
|
1187
|
-
.ticks { display: flex; justify-content: space-between; ${
|
|
1188
|
-
.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")}; }
|
|
1189
612
|
.now { margin: 0; }
|
|
1190
613
|
|
|
1191
|
-
.nav { display: flex; gap: ${
|
|
1192
|
-
button, .send { ${
|
|
1193
|
-
.primary, .send { background: ${
|
|
1194
|
-
.primary:hover, .send:hover { background: ${
|
|
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}; }
|
|
1195
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. */
|
|
1196
|
-
.go { display: inline-block; flex: none; transition: translate ${
|
|
1197
|
-
:is(a, button):is(:hover, :focus-visible) .go { translate: ${
|
|
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; }
|
|
1198
621
|
@media (prefers-reduced-motion: reduce) { .go { transition: none; } }
|
|
1199
|
-
.secondary { background: transparent; color: ${
|
|
1200
|
-
.secondary:hover { background: ${
|
|
622
|
+
.secondary { background: transparent; color: ${c.text}; border-color: ${c.borderStrong}; }
|
|
623
|
+
.secondary:hover { background: ${c.surfaceSubtle}; }
|
|
1201
624
|
|
|
1202
|
-
.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)}; }
|
|
1203
626
|
/* The glow behind the budget grows as the product does. */
|
|
1204
|
-
.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, ${
|
|
1205
|
-
.range { margin: 0; font-family: ${
|
|
1206
|
-
.weeks { margin: 0; ${
|
|
1207
|
-
.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}; }
|
|
1208
631
|
|
|
1209
|
-
.result { display: grid; gap: ${
|
|
1210
|
-
.summary { margin: 0; ${
|
|
632
|
+
.result { display: grid; gap: ${h(6)}; }
|
|
633
|
+
.summary { margin: 0; ${Oe("xl")} text-wrap: pretty; }
|
|
1211
634
|
.phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }
|
|
1212
635
|
.phases i { display: block; }
|
|
1213
|
-
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${
|
|
1214
|
-
.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)}; }
|
|
1215
638
|
.legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }
|
|
1216
|
-
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1217
|
-
dt { margin: 0 0 ${
|
|
1218
|
-
dd { margin: 0; font-weight: ${
|
|
1219
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
1220
|
-
.note { margin: 0; ${
|
|
1221
|
-
.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")} }
|
|
1222
645
|
|
|
1223
646
|
@container (max-width: 48rem) {
|
|
1224
|
-
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
647
|
+
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${h(8)}; }
|
|
1225
648
|
/* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it
|
|
1226
649
|
and it never widens the page (1.4.10). */
|
|
1227
650
|
.panel { position: relative; inset-block-start: auto; }
|
|
@@ -1229,39 +652,39 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1229
652
|
}
|
|
1230
653
|
@container (max-width: 30rem) {
|
|
1231
654
|
.choices { grid-template-columns: minmax(0, 1fr); }
|
|
1232
|
-
.range { font-size: ${
|
|
655
|
+
.range { font-size: ${ci("4xl")}; }
|
|
1233
656
|
}
|
|
1234
657
|
/*
|
|
1235
658
|
* layout="all": every question at once, and the result as an ink panel beside them, as the Estimator component
|
|
1236
659
|
* (10:544) draws them: the options 642px wide and the budget 430px, 10px apart. The options are 32px inside with
|
|
1237
660
|
* their parts 16px apart; the budget is 32px inside with its parts 14px apart, its lines 12px under their rules.
|
|
1238
661
|
*/
|
|
1239
|
-
.all { --accent: ${
|
|
1240
|
-
.all .questions { grid-area: questions; display: grid; align-content: start; gap: ${
|
|
1241
|
-
.all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${
|
|
1242
|
-
.all .questions impakt-chip-group::part(label) { margin-block-end: ${
|
|
1243
|
-
.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; }
|
|
1244
667
|
/* The note in G2 Body S, 14px at 1.4. */
|
|
1245
668
|
.all .note { font-size: 0.875rem; line-height: 1.4; }
|
|
1246
|
-
.all .ink { grid-area: panel; display: flex; flex-direction: column; gap: var(--gap); padding: ${
|
|
1247
|
-
.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; }
|
|
1248
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. */
|
|
1249
|
-
.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; }
|
|
1250
673
|
.all .ink .weeks { font-size: 1rem; line-height: 1.45; }
|
|
1251
674
|
.all .rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
|
|
1252
|
-
.all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${
|
|
1253
|
-
.all .rows .length { font-family: ${
|
|
1254
|
-
.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; }
|
|
1255
678
|
.all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }
|
|
1256
|
-
.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}; }
|
|
1257
680
|
.all .way { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
|
|
1258
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. */
|
|
1259
682
|
@container (max-width: 48rem) {
|
|
1260
683
|
.all { --gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'; grid-template-rows: auto; column-gap: 0; }
|
|
1261
|
-
.all .questions { gap: 14px; padding: ${
|
|
684
|
+
.all .questions { gap: 14px; padding: ${h(5)}; border-block-end: ${c.borderThin} solid ${c.text}; }
|
|
1262
685
|
.all .questions impakt-chip-group::part(label) { margin-block-start: 0; margin-block-end: 14px; }
|
|
1263
686
|
.all .foot { display: none; }
|
|
1264
|
-
.all .ink { padding: ${
|
|
687
|
+
.all .ink { padding: ${h(6)} ${h(5)}; }
|
|
1265
688
|
.all .rows li { padding-block-start: 11px; }
|
|
1266
689
|
}
|
|
1267
690
|
.all .ink .note { display: none; color: var(--muted); }
|
|
@@ -1273,126 +696,126 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1273
696
|
.bar i, .phases i, .legend li::before { background: CanvasText !important; }
|
|
1274
697
|
.glow { display: none; }
|
|
1275
698
|
}
|
|
1276
|
-
`]}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}>
|
|
1277
700
|
<legend>${this.heading(e.heading)}</legend>
|
|
1278
|
-
${e.hint?
|
|
701
|
+
${e.hint?C`<p class="hint">${e.hint}</p>`:U}
|
|
1279
702
|
<div class="scale">
|
|
1280
|
-
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(
|
|
1281
|
-
@input=${
|
|
1282
|
-
<div class="ticks" aria-hidden="true">${e.choices.map((
|
|
1283
|
-
${
|
|
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}
|
|
1284
707
|
</div>
|
|
1285
|
-
</fieldset>`}let
|
|
708
|
+
</fieldset>`}let o=e.kind==="many";return C`<fieldset class=${n?"current":""} ?hidden=${!n}>
|
|
1286
709
|
<legend>${this.heading(e.heading)}</legend>
|
|
1287
|
-
${e.hint?
|
|
1288
|
-
<div class="choices ${
|
|
1289
|
-
${e.choices.map(
|
|
1290
|
-
<input type=${
|
|
1291
|
-
@change=${
|
|
1292
|
-
<span class="label">${
|
|
1293
|
-
${
|
|
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}
|
|
1294
717
|
</label>`)}
|
|
1295
718
|
</div>
|
|
1296
|
-
</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}>
|
|
1297
720
|
${this.heading(this.resultHeading)}
|
|
1298
721
|
<p class="summary">${this.summaryOf(e)}</p>
|
|
1299
|
-
${(this.phases??[]).length?
|
|
1300
|
-
<div class="phases" aria-hidden="true">${(this.phases??[]).map((
|
|
1301
|
-
<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}
|
|
1302
725
|
<dl>
|
|
1303
|
-
<div><dt class="mono">${
|
|
1304
|
-
${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}
|
|
1305
728
|
</dl>
|
|
1306
729
|
<div class="actions">
|
|
1307
|
-
${this.contactHref?
|
|
1308
|
-
<button type="button" class="secondary" @click=${()=>this.copy()}>${
|
|
1309
|
-
<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>
|
|
1310
733
|
</div>
|
|
1311
734
|
<p class="status" role="status">${this.copied}</p>
|
|
1312
|
-
${this.note?
|
|
1313
|
-
</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">
|
|
1314
737
|
<div class="questions" part="questions">
|
|
1315
|
-
${
|
|
1316
|
-
.options=${
|
|
1317
|
-
@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>`})}
|
|
1318
741
|
</div>
|
|
1319
742
|
<aside class="ink" part="panel">
|
|
1320
743
|
<p class="mono">${this.budgetLabel}</p>
|
|
1321
744
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(e)}</p>
|
|
1322
|
-
<p class="weeks">${
|
|
1323
|
-
${(this.phases??[]).length?
|
|
1324
|
-
${this.contactHref?
|
|
1325
|
-
${e.way?
|
|
1326
|
-
${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}
|
|
1327
750
|
</aside>
|
|
1328
|
-
${this.note?
|
|
1329
|
-
</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">
|
|
1330
753
|
<div>
|
|
1331
754
|
<div class="progress">
|
|
1332
|
-
<p class="mono">${
|
|
1333
|
-
<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>
|
|
1334
757
|
</div>
|
|
1335
|
-
${e.map((
|
|
758
|
+
${e.map((r,m)=>this.renderQuestion(r,m))}
|
|
1336
759
|
${this.renderResult(a)}
|
|
1337
|
-
${
|
|
1338
|
-
${this.at>0?
|
|
1339
|
-
<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>
|
|
1340
763
|
</div>`}
|
|
1341
764
|
</div>
|
|
1342
|
-
<aside class="panel" part="panel" style=${`--s:${
|
|
765
|
+
<aside class="panel" part="panel" style=${`--s:${o}`}>
|
|
1343
766
|
<div class="glow" aria-hidden="true"></div>
|
|
1344
767
|
<p class="mono">${this.budgetLabel}</p>
|
|
1345
768
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(a)}</p>
|
|
1346
|
-
<p class="weeks">${
|
|
769
|
+
<p class="weeks">${j("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
|
|
1347
770
|
<p class="tip" aria-live="polite">${this.tip||this.intro}</p>
|
|
1348
771
|
</aside>
|
|
1349
|
-
</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`
|
|
1350
773
|
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1351
774
|
font-size: 0.6875rem;
|
|
1352
775
|
font-weight: 400;
|
|
1353
776
|
line-height: 1.4;
|
|
1354
777
|
letter-spacing: 0.06em;
|
|
1355
778
|
text-transform: uppercase;
|
|
1356
|
-
`,
|
|
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`
|
|
1357
780
|
:host { display: block; container-type: inline-size; }
|
|
1358
781
|
/* With a mark, the name is set small beside it, as in the canvas header. */
|
|
1359
|
-
.brand.marked { gap: ${
|
|
1360
|
-
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${
|
|
1361
|
-
.context { font-size: ${
|
|
1362
|
-
.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; }
|
|
1363
786
|
.presence { display: flex; }
|
|
1364
|
-
.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; }
|
|
1365
788
|
.presence .avatar:first-child { margin-inline-start: 0; }
|
|
1366
|
-
.presence .avatar.accent { background: ${
|
|
1367
|
-
.presence .avatar.ink { background: ${
|
|
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}; }
|
|
1368
791
|
@media (forced-colors: active) { .presence .avatar.ink { forced-color-adjust: none; background: CanvasText; color: Canvas; } }
|
|
1369
|
-
.bar { display: flex; align-items: center; gap: ${
|
|
1370
|
-
.start { display: flex; align-items: center; gap: ${
|
|
792
|
+
.bar { display: flex; align-items: center; gap: ${u(6)}; }
|
|
793
|
+
.start { display: flex; align-items: center; gap: ${u(3)}; flex: none; }
|
|
1371
794
|
.middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
|
|
1372
795
|
.middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }
|
|
1373
796
|
slot { display: contents; }
|
|
1374
|
-
.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}; }
|
|
1375
798
|
.brand img { display: block; block-size: 32px; inline-size: auto; }
|
|
1376
|
-
.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")}; }
|
|
1377
800
|
.chip svg { inline-size: 12px; block-size: 12px; }
|
|
1378
|
-
.meta { font-family: ${
|
|
801
|
+
.meta { font-family: ${pe}; font-size: ${xe("xs")}; opacity: 0.72; }
|
|
1379
802
|
.middle impakt-nav { flex: 1 1 8rem; }
|
|
1380
803
|
/* File tabs sit in one box as wide as the tabs, centred between the name and the action. */
|
|
1381
804
|
:host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }
|
|
1382
|
-
.end { display: flex; align-items: center; gap: ${
|
|
805
|
+
.end { display: flex; align-items: center; gap: ${u(3)}; flex: none; }
|
|
1383
806
|
.end:empty, .start:empty { display: none; }
|
|
1384
|
-
.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; }
|
|
1385
808
|
/* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */
|
|
1386
|
-
.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; }
|
|
1387
810
|
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
1388
811
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
1389
812
|
.status .hash { opacity: 0.72; }
|
|
1390
|
-
@container (max-width: 22rem) { :host(:not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
1391
|
-
@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)}; } }
|
|
1392
815
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
1393
816
|
line of their own under the name and the action, and wrap there. */
|
|
1394
817
|
@container (max-width: 40rem) {
|
|
1395
|
-
: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)}; }
|
|
1396
819
|
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .start { flex: 1 1 auto; }
|
|
1397
820
|
/* Its row may be narrower than the links, which then wrap: the max-content floor below is for the measured header only. */
|
|
1398
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; }
|
|
@@ -1422,14 +845,14 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1422
845
|
:host([look='canvas']) .presence .avatar { margin-inline-start: -4px; font-size: 0.6875rem; letter-spacing: 0.06em; text-indent: 0.06em; }
|
|
1423
846
|
:host([look='canvas']) .presence .avatar:first-child { margin-inline-start: 0; }
|
|
1424
847
|
:host([look='canvas']) .start { gap: 10px; }
|
|
1425
|
-
:host([look='canvas']) .brand.marked { gap: 10px; font-family: ${
|
|
1426
|
-
:host([look='canvas']) .mark { font-family: ${
|
|
1427
|
-
:host([look='canvas']) .context { font-family: ${
|
|
1428
|
-
:host([look='canvas']) .context .slash { margin-inline-end: 10px; opacity: 1; color: ${
|
|
1429
|
-
:host([look='canvas']) .start .status { display: inline-flex; gap: 6px; padding: 3px 7px; background: ${
|
|
1430
|
-
: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}; }
|
|
1431
854
|
/* The filled Menu button of 14:715: "Menu" and a two-line glyph after it. */
|
|
1432
|
-
: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; }
|
|
1433
856
|
.glyph { display: inline-block; inline-size: 14px; block-size: 6px; box-sizing: border-box; border-block: 1.5px solid currentColor; }
|
|
1434
857
|
/*
|
|
1435
858
|
* The tabs, the file name, the people and the action need about 70rem in one row. Narrower, the file name and the
|
|
@@ -1442,77 +865,71 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1442
865
|
:host([look='canvas']) .menu-button { display: inline-flex; }
|
|
1443
866
|
}
|
|
1444
867
|
/* The open menu (21:1688): ink in both themes, the whole screen, opened by the browser as a popover. */
|
|
1445
|
-
.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: ${
|
|
1446
|
-
.menu-bar { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
1447
|
-
.menu-bar .brand.marked { gap: 10px; font-family: ${
|
|
1448
|
-
.menu-bar .mark { background: ${
|
|
1449
|
-
.close { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 0; background: ${
|
|
1450
|
-
.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; }
|
|
1451
874
|
.menu-nav ol { list-style: none; margin: 0; padding: 0; }
|
|
1452
|
-
.menu-nav li { border-block-end: 1px solid ${
|
|
1453
|
-
.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; }
|
|
1454
877
|
.menu-nav a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
1455
|
-
.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}; }
|
|
1456
879
|
/* The page you are on is in the accent, and its number says "Current", so it is not told by colour alone. */
|
|
1457
|
-
.menu-nav a[aria-current], .menu-nav a[aria-current] .number { color: ${
|
|
1458
|
-
.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)); }
|
|
1459
882
|
.menu-foot:empty { display: none; }
|
|
1460
|
-
.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; }
|
|
1461
884
|
.call:hover .words { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1462
885
|
/* The call's arrow slides forward when it is pointed at or focused (impkt-web#51). */
|
|
1463
|
-
.call .go { display: inline-block; transition: translate ${
|
|
1464
|
-
.call:is(:hover, :focus-visible) .go { translate: ${
|
|
886
|
+
.call .go { display: inline-block; transition: translate ${pi.arrowDuration} ${pi.arrowEasing}; }
|
|
887
|
+
.call:is(:hover, :focus-visible) .go { translate: ${pi.arrowDistance} 0; }
|
|
1465
888
|
@media (prefers-reduced-motion: reduce) { .call .go { transition: none; } }
|
|
1466
|
-
.note { margin: 0; font-family: ${
|
|
1467
|
-
.mail { display: inline-flex; align-items: center; min-block-size: 24px; color: inherit; font-family: ${
|
|
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; }
|
|
1468
891
|
.mail:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1469
892
|
/* What is slotted at the foot is read on ink too. */
|
|
1470
|
-
.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}; }
|
|
1471
894
|
@media (forced-colors: active) {
|
|
1472
895
|
:host([look='canvas']) .menu-button, .close, .call { border: 1px solid ButtonText; }
|
|
1473
896
|
.sheet:popover-open { border: 1px solid CanvasText; }
|
|
1474
897
|
:host([look='canvas']) .start .status .dot { background: CanvasText; }
|
|
1475
898
|
}
|
|
1476
|
-
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}renderBrand(){if(!this.brand&&!this.logoSrc)return
|
|
1477
|
-
<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}>
|
|
1478
901
|
<div class="menu-bar">
|
|
1479
902
|
${this.renderBrand()}
|
|
1480
|
-
<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>
|
|
1481
904
|
</div>
|
|
1482
|
-
<nav class="menu-nav" aria-label=${this.label||
|
|
905
|
+
<nav class="menu-nav" aria-label=${this.label||L}>
|
|
1483
906
|
<ol role="list">
|
|
1484
|
-
${(this.links??[]).map((a,
|
|
1485
|
-
<a href=${a.href} part="menu-link" aria-current=${
|
|
1486
|
-
><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
|
|
1487
910
|
>
|
|
1488
911
|
</li>`})}
|
|
1489
912
|
</ol>
|
|
1490
913
|
</nav>
|
|
1491
|
-
<div class="menu-foot" part="menu-foot"><slot name="menu-foot">${e
|
|
1492
|
-
</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">
|
|
1493
916
|
<div class="start"><slot name="start">
|
|
1494
917
|
${this.renderBrand()}
|
|
1495
|
-
${this.context
|
|
1496
|
-
${e==="start"?
|
|
1497
|
-
${this.badge
|
|
1498
|
-
${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}
|
|
1499
922
|
</slot></div>
|
|
1500
|
-
<div class="middle"><slot name="middle">${(this.links??[]).length
|
|
1501
|
-
<div class="end"><slot name="presence">${a.length
|
|
1502
|
-
${e==="start"?
|
|
1503
|
-
${this.actionText
|
|
1504
|
-
</slot>${
|
|
1505
|
-
</div>`}},
|
|
1506
|
-
:host { display: inline-flex; align-items: center; flex: none; }
|
|
1507
|
-
a { color: inherit; text-decoration: none; font-family: ${L.fontHeading}; font-weight: ${de("semibold")}; letter-spacing: -0.02em; line-height: 1; border-radius: ${L.radiusSm}; }
|
|
1508
|
-
:host([size='sm']) a { ${Kt("xl")} } :host([size='md']) a { ${Kt("2xl")} } :host([size='lg']) a { ${Kt("3xl")} }
|
|
1509
|
-
img { display: block; block-size: 32px; inline-size: auto; }
|
|
1510
|
-
@media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${Kt("xl")} } }
|
|
1511
|
-
`]}render(){return I`<a href=${this.href||"/"} part="link">${this.src?I`<img src=${this.src} alt=${this.alt||this.text||this.textContent?.trim()||""} />`:I`<slot>${this.text}</slot>`}</a>`}},ia=class extends Rt{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=[...Rt.styles,Xa,Ya`
|
|
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`
|
|
1512
929
|
/* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */
|
|
1513
|
-
:host { display: block; container-type: inline-size; position: relative; padding-block: ${
|
|
1514
|
-
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${
|
|
1515
|
-
.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; }
|
|
1516
933
|
/* The name as a wordmark across the whole footer, under the columns. */
|
|
1517
934
|
:host([brand-size='display']) .top { grid-template-columns: 1fr; }
|
|
1518
935
|
:host([brand-size='display']) .top > div:first-child { order: 2; }
|
|
@@ -1522,335 +939,89 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1522
939
|
* on one row under it in the 13px code face (#52).
|
|
1523
940
|
*/
|
|
1524
941
|
:host([brand-size='display']) .top { gap: 0; }
|
|
1525
|
-
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${
|
|
1526
|
-
: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; }
|
|
1527
944
|
:host([brand-size='display']) :is(.legal, .tagline) { font-size: 0.8125rem; line-height: 1.5; }
|
|
1528
|
-
: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)}; }
|
|
1529
946
|
:host([brand-size='display']) .foot .legal { margin: 0; }
|
|
1530
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; } }
|
|
1531
958
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
1532
|
-
.log { margin-block-start: ${
|
|
1533
|
-
.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; }
|
|
1534
961
|
.log li:first-child { opacity: 1; }
|
|
1535
962
|
.log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }
|
|
1536
|
-
.log .code { margin-inline-end: ${
|
|
1537
|
-
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${
|
|
1538
|
-
.h { margin: 0 0 ${
|
|
1539
|
-
.columns ul { display: grid; gap: ${
|
|
1540
|
-
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}; }
|
|
1541
968
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
1542
|
-
.legal { margin: ${
|
|
1543
|
-
.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)}; }
|
|
1544
971
|
.foot .legal { margin: 0; }
|
|
1545
|
-
.tagline { margin: 0; font-family: ${
|
|
1546
|
-
.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)}; }
|
|
1547
974
|
.row .columns { flex: 1; }
|
|
1548
975
|
.row impakt-button { flex: none; }
|
|
1549
976
|
.stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
|
|
1550
977
|
.stripe span { flex: 1; }
|
|
1551
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; } }
|
|
1552
981
|
@container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
|
|
1553
982
|
@media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
|
|
1554
|
-
`]}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">
|
|
1555
984
|
<div class="top">
|
|
1556
985
|
<div>
|
|
1557
|
-
${this.brand
|
|
1558
|
-
${
|
|
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}
|
|
1559
988
|
</div>
|
|
1560
989
|
<div class="row">
|
|
1561
990
|
<div class="columns" part="columns" style=${`--count:${Math.max(1,(this.columns??[]).length)}`}>
|
|
1562
|
-
${(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>`)}
|
|
1563
992
|
</div>
|
|
1564
|
-
${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}
|
|
1565
994
|
</div>
|
|
1566
995
|
</div>
|
|
1567
|
-
${this.tagline
|
|
1568
|
-
${this.stripe
|
|
1569
|
-
</div>`}};customElements.define("impakt-site-header",
|
|
1570
|
-
|
|
1571
|
-
display: block;
|
|
1572
|
-
position: relative;
|
|
1573
|
-
}
|
|
1574
|
-
:host([drive='view'][layout='stage']) {
|
|
1575
|
-
min-height: calc(var(--impakt-scene-length, 3) * 100svh);
|
|
1576
|
-
}
|
|
1577
|
-
.frame {
|
|
1578
|
-
display: grid;
|
|
1579
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1580
|
-
}
|
|
1581
|
-
:host([layout='split']) .frame {
|
|
1582
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
1583
|
-
gap: ${gt(8)};
|
|
1584
|
-
}
|
|
1585
|
-
.stage {
|
|
1586
|
-
position: sticky;
|
|
1587
|
-
top: 0;
|
|
1588
|
-
height: 100svh;
|
|
1589
|
-
display: grid;
|
|
1590
|
-
place-items: center;
|
|
1591
|
-
overflow: clip;
|
|
1592
|
-
}
|
|
1593
|
-
/* What is on the stage is layered, as in a motion tool: each thing sits
|
|
1594
|
-
over the one before, so a later layer's timeline can reveal it over an
|
|
1595
|
-
earlier one. */
|
|
1596
|
-
.stage ::slotted(*) {
|
|
1597
|
-
grid-area: 1 / 1;
|
|
1598
|
-
max-width: 100%;
|
|
1599
|
-
}
|
|
1600
|
-
:host([drive='loop']) .stage,
|
|
1601
|
-
:host([drive='scrubber']) .stage {
|
|
1602
|
-
position: relative;
|
|
1603
|
-
height: auto;
|
|
1604
|
-
min-height: 60svh;
|
|
1605
|
-
}
|
|
1606
|
-
.controls {
|
|
1607
|
-
display: flex;
|
|
1608
|
-
gap: ${gt(3)};
|
|
1609
|
-
align-items: center;
|
|
1610
|
-
justify-content: center;
|
|
1611
|
-
padding-block: ${gt(3)};
|
|
1612
|
-
}
|
|
1613
|
-
:host([bleed]) { margin-inline: calc(50% - 50vw); }
|
|
1614
|
-
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1615
|
-
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1616
|
-
/* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
|
|
1617
|
-
.stage > .controls { position: absolute; inset-inline: ${gt(6)}; inset-block-end: ${gt(6)}; z-index: 2; padding: 0; }
|
|
1618
|
-
.stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }
|
|
1619
|
-
/* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
|
|
1620
|
-
.controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
|
|
1621
|
-
.pause {
|
|
1622
|
-
min-width: ${Ka("target.min","24px")};
|
|
1623
|
-
min-height: ${Ka("target.min","24px")};
|
|
1624
|
-
padding: ${gt(2)} ${gt(4)};
|
|
1625
|
-
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1626
|
-
border: 1px solid ${Qa.border};
|
|
1627
|
-
background: ${Qa.surfaceCard};
|
|
1628
|
-
color: ${Qa.text};
|
|
1629
|
-
font-size: ${Mn("sm")};
|
|
1630
|
-
font-weight: ${Cn("medium")};
|
|
1631
|
-
cursor: pointer;
|
|
1632
|
-
}
|
|
1633
|
-
.pause:focus-visible {
|
|
1634
|
-
outline: none;
|
|
1635
|
-
box-shadow: ${Ka("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1636
|
-
}
|
|
1637
|
-
@media (max-width: 48rem) {
|
|
1638
|
-
:host([layout='split']) .frame {
|
|
1639
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1640
|
-
}
|
|
1641
|
-
:host([layout='split']) .stage {
|
|
1642
|
-
height: 50svh;
|
|
1643
|
-
z-index: 1;
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1647
|
-
:host {
|
|
1648
|
-
min-height: 0 !important;
|
|
1649
|
-
}
|
|
1650
|
-
.stage {
|
|
1651
|
-
position: relative;
|
|
1652
|
-
height: auto;
|
|
1653
|
-
gap: ${gt(6)};
|
|
1654
|
-
}
|
|
1655
|
-
/* With less motion the layers are shown one after another, so every
|
|
1656
|
-
state the scene would have moved through can still be seen. */
|
|
1657
|
-
.stage ::slotted(*) {
|
|
1658
|
-
grid-area: auto;
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
`]}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=aa(e);return}this.seekFrom=this.progress,this.seekTo=aa(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=Ht`<div class="controls" part="controls">
|
|
1662
|
-
<slot name="controls"></slot>
|
|
1663
|
-
${e&&!this.reduced?Ht`<button class="pause" type="button" aria-pressed=${this.paused?"true":"false"} @click=${this.togglePause}>
|
|
1664
|
-
${this.paused?Or("Play {name}",{name:this.label}):Or("Pause {name}",{name:this.label})}
|
|
1665
|
-
</button>`:Ja}
|
|
1666
|
-
</div>`,r=Ht`<div class="stage" part="stage"><slot name="stage"></slot>${i?a:Ja}</div>`;return Ht`
|
|
1667
|
-
<div class="frame" part="frame" role="region" aria-label=${this.label}>
|
|
1668
|
-
${this.layout==="split"?Ht`<div class="content" part="content"><slot></slot></div>${r}`:Ht`${r}<div class="content" part="content"><slot></slot></div>`}
|
|
1669
|
-
</div>
|
|
1670
|
-
${i?Ja:a}
|
|
1671
|
-
`}};customElements.define("impakt-scene",ra);import{html as Xe,css as An}from"./atomic-ui.js";import{say as Dr,ImpaktElement as Wr,visuallyHidden as Ln,fontSize as Za,fontWeight as _r,space as Ce,t as ee,token as St}from"./atomic-ui.js";var er={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)"},na=class extends Wr{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=[...Wr.styles,An`
|
|
1672
|
-
:host {
|
|
1673
|
-
display: block;
|
|
1674
|
-
width: 100%;
|
|
1675
|
-
max-width: 48rem;
|
|
1676
|
-
margin-inline: auto;
|
|
1677
|
-
}
|
|
1678
|
-
.wrap {
|
|
1679
|
-
display: grid;
|
|
1680
|
-
gap: ${Ce(2)};
|
|
1681
|
-
padding: ${Ce(3)} ${Ce(4)};
|
|
1682
|
-
border-radius: ${St("radius.xl","16px")};
|
|
1683
|
-
background: ${ee.surfaceCard};
|
|
1684
|
-
box-shadow: ${St("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")};
|
|
1685
|
-
border: 1px solid ${ee.border};
|
|
1686
|
-
}
|
|
1687
|
-
input {
|
|
1688
|
-
width: 100%;
|
|
1689
|
-
min-height: ${St("target.min","24px")};
|
|
1690
|
-
accent-color: ${ee.brand};
|
|
1691
|
-
margin: 0;
|
|
1692
|
-
}
|
|
1693
|
-
.stops {
|
|
1694
|
-
position: relative;
|
|
1695
|
-
display: flex;
|
|
1696
|
-
flex-wrap: wrap;
|
|
1697
|
-
gap: ${Ce(2)};
|
|
1698
|
-
list-style: none;
|
|
1699
|
-
margin: 0;
|
|
1700
|
-
padding: 0;
|
|
1701
|
-
}
|
|
1702
|
-
button {
|
|
1703
|
-
min-height: ${St("target.min","24px")};
|
|
1704
|
-
padding: ${Ce(1)} ${Ce(3)};
|
|
1705
|
-
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1706
|
-
border: 1px solid ${ee.border};
|
|
1707
|
-
background: transparent;
|
|
1708
|
-
color: ${ee.textMuted};
|
|
1709
|
-
font-size: ${Za("xs")};
|
|
1710
|
-
font-weight: ${_r("medium")};
|
|
1711
|
-
cursor: pointer;
|
|
1712
|
-
}
|
|
1713
|
-
button[aria-current='true'] {
|
|
1714
|
-
color: ${ee.text};
|
|
1715
|
-
border-color: ${ee.text};
|
|
1716
|
-
}
|
|
1717
|
-
.sr-only {
|
|
1718
|
-
${Ln}
|
|
1719
|
-
}
|
|
1720
|
-
/* The graph look: the code of where you are, the line of stops, where you are. */
|
|
1721
|
-
:host([look='graph']) { max-width: none; }
|
|
1722
|
-
.graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${Ce(6)}; align-items: center; padding: ${Ce(4)} ${Ce(6)}; border-radius: ${St("radius.xl","16px")}; background: ${ee.surfaceCard}; box-shadow: ${St("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")}; border: 1px solid ${ee.border}; }
|
|
1723
|
-
.mono { font-family: ${ee.fontMono}; font-size: ${Za("xs")}; letter-spacing: 0.04em; }
|
|
1724
|
-
.head { display: grid; gap: 2px; }
|
|
1725
|
-
.head .k { color: ${ee.textMuted}; text-transform: uppercase; }
|
|
1726
|
-
.head .code { font-size: ${Za("md")}; color: ${ee.text}; }
|
|
1727
|
-
.head .note { color: ${ee.textMuted}; }
|
|
1728
|
-
.line { position: relative; block-size: 48px; }
|
|
1729
|
-
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${ee.border}; opacity: 0.5; }
|
|
1730
|
-
.fill { opacity: 1; background: none; display: flex; overflow: hidden; }
|
|
1731
|
-
.fill span { block-size: 100%; }
|
|
1732
|
-
.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: ${ee.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }
|
|
1733
|
-
.dot[data-passed] { background: var(--c); }
|
|
1734
|
-
.dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
|
|
1735
|
-
.dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${ee.textMuted}; text-transform: uppercase; pointer-events: none; }
|
|
1736
|
-
.dot-label[data-current] { color: ${ee.text}; font-weight: ${_r("bold")}; }
|
|
1737
|
-
.line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
|
|
1738
|
-
.line input:focus-visible { opacity: 1; }
|
|
1739
|
-
.where { display: grid; gap: ${Ce(2)}; justify-items: end; }
|
|
1740
|
-
.chip { display: inline-flex; align-items: center; gap: ${Ce(2)}; padding: ${Ce(1)} ${Ce(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${ee.border}; color: ${ee.text}; text-transform: uppercase; }
|
|
1741
|
-
.chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
|
|
1742
|
-
.hint { color: ${ee.textMuted}; text-transform: uppercase; }
|
|
1743
|
-
/* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
|
|
1744
|
-
.chip .meta { color: ${ee.textMuted}; }
|
|
1745
|
-
@media (max-width: 48rem) {
|
|
1746
|
-
.graph { grid-template-columns: minmax(0, 1fr); }
|
|
1747
|
-
.where { justify-items: start; }
|
|
1748
|
-
.dot-label:not([data-current]) { display: none; }
|
|
1749
|
-
}
|
|
1750
|
-
button:focus-visible,
|
|
1751
|
-
input:focus-visible {
|
|
1752
|
-
outline: none;
|
|
1753
|
-
box-shadow: ${St("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1754
|
-
}
|
|
1755
|
-
`]}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((y,f)=>y.at-f.at);a=r.indexOf(this.stops[a]);let n=y=>{let f=y?.tone??"brand";return typeof f=="number"?`var(--impakt-color-chart-${f}, ${er.brand})`:er[f]??er.brand},s=r[a]??r[0],h=r.map((y,f)=>{let X=f===0?0:r[f-1].at,ie=Math.min(y.at,this.value);return{width:Math.round(Math.max(0,ie-X)*1e4)/100,c:n(y)}});return Xe`<div class="graph" part="wrap">
|
|
1756
|
-
<div class="head mono" aria-hidden="true">
|
|
1757
|
-
<span class="k">HEAD</span>
|
|
1758
|
-
<span class="code">${s?.meta??s?.label??""}</span>
|
|
1759
|
-
${s?.note?Xe`<span class="note">${s.note}</span>`:null}
|
|
1760
|
-
</div>
|
|
1761
|
-
<div class="line">
|
|
1762
|
-
<div class="track"></div>
|
|
1763
|
-
<div class="fill" aria-hidden="true">${h.map(y=>Xe`<span style=${`width:${y.width}%;background:${y.c}`}></span>`)}</div>
|
|
1764
|
-
${r.map((y,f)=>Xe`
|
|
1765
|
-
<button type="button" class="dot" style=${`left:${y.at*100}%;--c:${n(y)}`} ?data-passed=${y.at<=this.value+1e-4} aria-current=${f===a?"true":"false"} @click=${()=>this.goTo(y)}>
|
|
1766
|
-
<span class="sr-only">${Dr("Go to {name}",{name:y.label})}</span>
|
|
1767
|
-
</button>
|
|
1768
|
-
<span class="dot-label mono" style=${`left:${y.at*100}%`} ?data-current=${f===a} aria-hidden="true">${y.label}</span>`)}
|
|
1769
|
-
<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} />
|
|
1770
|
-
</div>
|
|
1771
|
-
<div class="where" aria-hidden="true">
|
|
1772
|
-
${s?Xe`<span class="chip mono" style=${`--c:${n(s)}`}>${s.label}${s.meta?Xe` <span class="meta">${s.meta}</span>`:null}</span>`:null}
|
|
1773
|
-
${this.hint?Xe`<span class="hint mono">${this.hint}</span>`:null}
|
|
1774
|
-
</div>
|
|
1775
|
-
</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):Xe`
|
|
1776
|
-
<div class="wrap" part="wrap">
|
|
1777
|
-
<input
|
|
1778
|
-
type="range"
|
|
1779
|
-
min="0"
|
|
1780
|
-
max="1000"
|
|
1781
|
-
step="1"
|
|
1782
|
-
.value=${String(Math.round(this.value*1e3))}
|
|
1783
|
-
aria-label=${this.label}
|
|
1784
|
-
aria-valuetext=${i}
|
|
1785
|
-
@input=${this.onInput}
|
|
1786
|
-
/>
|
|
1787
|
-
${this.stops.length?Xe`<ul class="stops" part="stops">
|
|
1788
|
-
${this.stops.map((a,r)=>Xe`<li>
|
|
1789
|
-
<button type="button" aria-current=${r===e?"true":"false"} @click=${()=>this.goTo(a)}>
|
|
1790
|
-
<span aria-hidden="true">${a.label}</span><span class="sr-only">${Dr("Go to {name}",{name:a.label})}</span>
|
|
1791
|
-
</button>
|
|
1792
|
-
</li>`)}
|
|
1793
|
-
</ul>`:null}
|
|
1794
|
-
</div>
|
|
1795
|
-
`}};customElements.define("impakt-scrubber",na);import{css as zt,html as R,nothing as Ae,svg as Nt}from"./atomic-ui.js";import{say as Ne,ImpaktElement as Je,focusRing as En,visuallyHidden as Bn,fontSize as qt,fontWeight as pa,space as G,spaceAround as Zt,t as H,token as In,type as Rn,iconSvg as Hn,toneOf as ir,TONE as Gr}from"./atomic-ui.js";function ar(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 Ur=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,ha=zt`.mono { font-family: ${H.fontMono}; font-size: ${qt("xs")}; letter-spacing: 0.04em; }`,Nn=(o,t,e)=>{switch(Math.min(Math.max(o||3,2),6)){case 2:return R`<h2 class=${e}>${t}</h2>`;case 4:return R`<h4 class=${e}>${t}</h4>`;case 5:return R`<h5 class=${e}>${t}</h5>`;case 6:return R`<h6 class=${e}>${t}</h6>`;default:return R`<h3 class=${e}>${t}</h3>`}},ma=zt`
|
|
1796
|
-
.h { margin: 0; color: var(--impakt-heading, ${H.textHeading}); font-family: ${H.fontHeading}; font-weight: ${pa("bold")}; letter-spacing: ${H.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; }
|
|
1797
1000
|
.body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
|
|
1798
1001
|
.meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
|
|
1799
|
-
.sr-only { ${
|
|
1800
|
-
`,
|
|
1801
|
-
:host { display: block; }
|
|
1802
|
-
article { display: flex; flex-direction: column; gap: ${G(3)}; }
|
|
1803
|
-
.media { border-radius: ${H.radiusXl}; overflow: clip; background: ${H.surfaceInset}; }
|
|
1804
|
-
.media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
|
|
1805
|
-
impakt-before-after { display: block; }
|
|
1806
|
-
.h { font-size: ${qt("3xl")}; }
|
|
1807
|
-
.h a { color: inherit; text-decoration: none; }
|
|
1808
|
-
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1809
|
-
.h a:focus-visible { outline: none; box-shadow: ${H.focusShadow}; border-radius: ${H.radiusSm}; }
|
|
1810
|
-
ul { list-style: none; margin: ${G(1)} 0 0; padding: 0; display: grid; gap: ${G(1)}; }
|
|
1811
|
-
li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${G(2)}; padding: ${G(1)} ${G(3)}; border-radius: ${H.radius}; }
|
|
1812
|
-
li[data-change='added'] { background: ${H.successSubtle}; color: ${H.successText}; }
|
|
1813
|
-
li[data-change='removed'] { background: ${H.dangerSubtle}; color: ${H.dangerText}; }
|
|
1814
|
-
li[data-change='same'] { color: ${H.textMuted}; }
|
|
1815
|
-
.sign { font-weight: ${pa("bold")}; }
|
|
1816
|
-
`]}wipe(e){let i=this.renderRoot.querySelector("impakt-before-after");if(!i)return;if(cancelAnimationFrame(this.raf),Ur()){i.position=e;return}let a=i.position??tr,r=performance.now(),n=h=>h<.5?4*h*h*h:1-Math.pow(-2*h+2,3)/2,s=h=>{let y=Math.min(1,(h-r)/450);i.position=a+(e-a)*n(y),y<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?R`<a href=${this.href}>${this.heading}</a>`:this.heading,a={added:"+",removed:"\u2212",same:" "},r={added:Ne("Added"),removed:Ne("Removed"),same:Ne("Kept")};return R`<article part="card">
|
|
1817
|
-
${e?R`<div class="media" @pointerenter=${n=>n.pointerType==="mouse"&&this.wipe(0)} @pointerleave=${n=>n.pointerType==="mouse"&&this.wipe(tr)}><impakt-before-after .position=${tr} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${Ne("Before")} .afterLabel=${Ne("Shipped")} .label=${Ne("Compare {name} before and after",{name:this.heading})}></impakt-before-after></div>`:this.afterSrc||this.beforeSrc?R`<div class="media"><img src=${this.afterSrc||this.beforeSrc} alt=${this.afterSrc?this.afterAlt:this.beforeAlt} loading="lazy" /></div>`:Ae}
|
|
1818
|
-
${this.label?R`<p class="meta mono">${this.label}</p>`:Ae}
|
|
1819
|
-
${this.heading?qn(this.headingLevel,i):Ae}
|
|
1820
|
-
${this.text?R`<p class="body">${this.text}</p>`:Ae}
|
|
1821
|
-
${(this.items??[]).length?R`<ul class="mono" part="diff">${this.items.map(n=>R`<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>`:Ae}
|
|
1822
|
-
</article>`}},oa=class extends Je{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=[...Je.styles,Zt,zt`
|
|
1823
|
-
:host { display: block; container-type: inline-size; }
|
|
1824
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${G(12)} ${G(10)}; }
|
|
1825
|
-
:host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }
|
|
1826
|
-
:host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1827
|
-
@container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
1828
|
-
`]}render(){let t=typeof location>"u"?"":location.pathname.replace(/\/$/,""),e=(this.items??[]).filter(i=>!i.href||i.href.replace(/\/$/,"")!==t);return R`<ul part="list">${e.map(i=>{let a=i.heading??i.title??"";return R`<li><impakt-release-card
|
|
1829
|
-
.label=${i.label??""} .heading=${a} .text=${i.text??""} .href=${i.href??""}
|
|
1830
|
-
.beforeSrc=${i.beforeSrc??""} .beforeAlt=${i.beforeAlt||Ne("{name} as a wireframe",{name:a})}
|
|
1831
|
-
.afterSrc=${i.afterSrc??""} .afterAlt=${i.afterAlt||Ne("{name} as it shipped",{name:a})}
|
|
1832
|
-
.items=${i.items??[]} .headingLevel=${this.headingLevel}></impakt-release-card></li>`})}</ul>`}},tr=42;function qn(o,t){let e=Math.min(Math.max(o||3,2),6);return e===2?R`<h2 class="h">${t}</h2>`:e===4?R`<h4 class="h">${t}</h4>`:e===5?R`<h5 class="h">${t}</h5>`:e===6?R`<h6 class="h">${t}</h6>`:R`<h3 class="h">${t}</h3>`}var la=class extends Je{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=[...Je.styles,Zt,ha,ma,zt`
|
|
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`
|
|
1833
1004
|
:host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
|
|
1834
1005
|
ul { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
1835
1006
|
ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
|
|
1836
|
-
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)}; }
|
|
1837
1008
|
.graph { position: relative; }
|
|
1838
|
-
.graph svg { position: absolute; inset-block-start: -${
|
|
1839
|
-
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
1840
|
-
.path { margin: 0 0 ${
|
|
1841
|
-
.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; }
|
|
1842
1013
|
.h a { color: inherit; text-decoration: none; }
|
|
1843
1014
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1844
|
-
.h a:focus-visible { outline: none; box-shadow: ${
|
|
1845
|
-
.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)}; }
|
|
1846
1017
|
.tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
|
|
1847
|
-
.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)}; }
|
|
1848
1019
|
.end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }
|
|
1849
1020
|
@container (max-width: 44rem) {
|
|
1850
1021
|
li { grid-template-columns: 56px minmax(0, 1fr); }
|
|
1851
1022
|
.graph svg { inline-size: 56px; }
|
|
1852
1023
|
.row { grid-template-columns: minmax(0, 1fr); }
|
|
1853
|
-
.h { font-size: ${
|
|
1024
|
+
.h { font-size: ${mi("2xl")}; }
|
|
1854
1025
|
}
|
|
1855
1026
|
/*
|
|
1856
1027
|
* The mono look, as the Branches component (12:683) draws it: rows 120px apart, a 1.5px trunk at 10px, and
|
|
@@ -1864,19 +1035,19 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1864
1035
|
:host([look='mono']) li { grid-template-columns: 86px minmax(0, 1fr); padding-block: 24px 5px; }
|
|
1865
1036
|
:host([look='mono']) .graph svg { inset-block-start: -24px; inline-size: 96px; block-size: 110px; }
|
|
1866
1037
|
:host([look='mono']) .graph svg path { stroke-width: 1.5; }
|
|
1867
|
-
: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: ${
|
|
1868
|
-
:host([look='mono']) .ring.current { background: ${
|
|
1869
|
-
: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}; }
|
|
1870
1041
|
:host([look='mono']) .row { display: contents; }
|
|
1871
|
-
:host([look='mono']) .path { grid-area: path; margin: 0 0 4.6px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${
|
|
1872
|
-
: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; }
|
|
1873
1044
|
:host([look='mono']) .detail { grid-area: detail; gap: 8px; padding: 0; }
|
|
1874
|
-
:host([look='mono']) .body { margin: 0; font-size: 1rem; line-height: 1.45; color: ${
|
|
1875
|
-
:host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${
|
|
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}; }
|
|
1876
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). */
|
|
1877
|
-
:host([look='mono']) .end { gap: 0; margin: 0; padding-block: 8px 17px; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${
|
|
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}; }
|
|
1878
1049
|
/* The trunk runs on, unbroken, into its end dot, which sits on the trunk; the words line up with the rows' words. */
|
|
1879
|
-
: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}; }
|
|
1880
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); }
|
|
1881
1052
|
:host([look='mono']) li:last-child .graph svg { block-size: 110px; }
|
|
1882
1053
|
@container (max-width: 44rem) {
|
|
@@ -1905,115 +1076,54 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1905
1076
|
:host([shown]) .graph svg { clip-path: inset(0); }
|
|
1906
1077
|
:host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }
|
|
1907
1078
|
}
|
|
1908
|
-
`]}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">
|
|
1909
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} />
|
|
1910
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} />
|
|
1911
|
-
</svg>`:
|
|
1082
|
+
</svg>`:Qi`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
1912
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" />
|
|
1913
1084
|
<circle cx="60" cy="86" r="8" fill=${a} />
|
|
1914
|
-
</svg>`;return
|
|
1915
|
-
<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>
|
|
1916
1087
|
<div class="text">
|
|
1917
|
-
${a.path?
|
|
1088
|
+
${a.path?K`<p class="path mono">${a.path}</p>`:Ue}
|
|
1918
1089
|
<div class="row">
|
|
1919
|
-
${
|
|
1090
|
+
${Ha(this.headingLevel,a.href?K`<a href=${a.href}>${r}</a>`:r,"h")}
|
|
1920
1091
|
<div class="detail">
|
|
1921
|
-
${a.text?
|
|
1922
|
-
${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}
|
|
1923
1094
|
</div>
|
|
1924
1095
|
</div>
|
|
1925
1096
|
</div>
|
|
1926
1097
|
</li>`})}</ul>
|
|
1927
|
-
${this.trunk?
|
|
1928
|
-
:host { display: block; container-type: inline-size; }
|
|
1929
|
-
.summary { display: inline-flex; align-items: center; gap: ${G(2)}; margin: 0 0 ${G(6)}; padding: ${G(1)} ${G(3)}; border-radius: ${H.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
|
|
1930
|
-
.summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${H.success}; }
|
|
1931
|
-
/* The rows share one grid, so the figure column fits the widest figure and every row lines up. */
|
|
1932
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${G(6)}; }
|
|
1933
|
-
li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${G(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
|
|
1934
|
-
/* Checks run: each tick pops in, 150 ms after the one above. */
|
|
1935
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
1936
|
-
.tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }
|
|
1937
|
-
:host([shown]) .tick { transform: scale(1); }
|
|
1938
|
-
}
|
|
1939
|
-
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1940
|
-
/* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */
|
|
1941
|
-
.tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${H.success}; color: var(--impakt-color-status-success-on, #fff); }
|
|
1942
|
-
.figure { margin: 0; font-family: ${H.fontHeading}; font-weight: ${pa("bold")}; font-size: ${qt("5xl")}; line-height: 1; letter-spacing: ${H.trackingTight}; white-space: nowrap; }
|
|
1943
|
-
.label { margin: 0; ${Rn("xl")} }
|
|
1944
|
-
.status { margin: 0; opacity: 0.72; }
|
|
1945
|
-
@container (max-width: 40rem) {
|
|
1946
|
-
ul { grid-template-columns: 28px minmax(0, 1fr); }
|
|
1947
|
-
li { row-gap: ${G(1)}; }
|
|
1948
|
-
.label, .status { grid-column: 2; }
|
|
1949
|
-
.figure { font-size: ${qt("4xl")}; }
|
|
1950
|
-
}
|
|
1951
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=ar(this,()=>this.run())}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}run(){if(Ur())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 R`${i}`;let s=1-Math.pow(1-r,3);return R`<span aria-hidden="true">${Math.round(Number(n[1])*s)}${n[2]}</span><span class="sr-only">${i}</span>`};return R`${this.summary?R`<p class="summary mono" part="summary">${this.summary}</p>`:Ae}
|
|
1952
|
-
<ul part="list">${(this.items??[]).map((i,a)=>R`<li part="item" style=${`--i:${a}`}>
|
|
1953
|
-
<span class="tick" aria-hidden="true">${Hn("check","16px")}</span>
|
|
1954
|
-
<p class="figure">${e(i.figure,a)}</p>
|
|
1955
|
-
<p class="label">${i.label}</p>
|
|
1956
|
-
${i.status?R`<p class="status mono">${i.status}</p>`:R`<span></span>`}
|
|
1957
|
-
</li>`)}</ul>`}},da=class extends Je{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=[...Je.styles,En,Zt,ha,ma,zt`
|
|
1958
|
-
:host { display: block; }
|
|
1959
|
-
/* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */
|
|
1960
|
-
figure { margin: 0; overflow-x: auto; border-radius: ${H.radiusSm}; }
|
|
1961
|
-
svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }
|
|
1962
|
-
text { font-family: ${H.fontMono}; font-size: 12px; fill: currentColor; }
|
|
1963
|
-
.faint { opacity: 0.5; }
|
|
1964
|
-
/* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */
|
|
1965
|
-
.halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }
|
|
1966
|
-
/* Graph draw: the graph opens left to right, so each demo appears as the line reaches it. */
|
|
1967
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
1968
|
-
svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }
|
|
1969
|
-
:host([shown]) svg { clip-path: inset(0 -40px 0 0); }
|
|
1970
|
-
}
|
|
1971
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=ar(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let r=this.span>0?this.span:20,n=m=>24+Math.min(Math.max(m,0),r)/r*1116,s=this.lanes??[],h=52,y=40+(s.length+1)*h+40,f=40,X=m=>f+(m+1)*h,ie=[];for(let m=0;m<=r;m+=Math.max(1,this.every||2))ie.push(m);let Oe=m=>s.findIndex(z=>m>=z.from&&m<=z.to),jt=m=>(this.marks??[]).some(z=>Oe(z.at)===m),qe=this.unit||Ne("wk"),Pt=this.label||Ne("Project timeline"),$=s.map(m=>`${m.label}: ${Ne("{unit} {from} to {to}",{unit:qe,from:m.from,to:m.to})}`).join("; ");return R`<figure part="figure" tabindex="0">
|
|
1972
|
-
<svg viewBox="0 0 ${1200} ${y}" role="img" aria-label=${`${Pt}. ${$}${this.release?`. ${Ne("{name} at {unit} {at}",{name:this.release,unit:qe,at:this.releaseAt})}`:""}`}>
|
|
1973
|
-
<line x1=${24} y1=${f} x2=${1180} y2=${f} stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
1974
|
-
<path d="M${1168} ${f-7} L${1180} ${f} L${1168} ${f+7}" fill="none" stroke="currentColor" stroke-width="3" />
|
|
1975
|
-
${s.map((m,z)=>{let J=ir(m.tone,z),ae=X(z),Ee=n(m.from),Fe=n(m.to),Ct=Math.min(36,(Fe-Ee)/3);return Nt`<g>
|
|
1976
|
-
<path d="M${Ee} ${f} C${Ee} ${(f+ae)/2} ${Ee+Ct} ${ae} ${Ee+Ct*1.6} ${ae} L${Fe-Ct*1.6} ${ae} C${Fe-Ct} ${ae} ${Fe} ${(f+ae)/2} ${Fe} ${f}" fill="none" stroke=${J} stroke-width="3" />
|
|
1977
|
-
<circle cx=${Ee} cy=${f} r="7" fill=${J} />
|
|
1978
|
-
<text x=${Ee+Ct*1.6} y=${jt(z)?ae-10:ae+20} class="halo" style=${`fill:${J}`}>${m.label}</text>
|
|
1979
|
-
</g>`})}
|
|
1980
|
-
${(this.marks??[]).map(m=>{let z=Oe(m.at),J=z>=0?X(z):f,ae=z>=0?ir(s[z].tone,z):"currentColor";return Nt`<g><circle cx=${n(m.at)} cy=${J} r="6" fill="var(--impakt-color-surface-card, #fff)" stroke=${ae} stroke-width="3" /><text x=${n(m.at)} y=${J+22} text-anchor="middle" class="faint">${m.label}</text></g>`})}
|
|
1981
|
-
${this.release?Nt`<g>
|
|
1982
|
-
<circle cx=${n(this.releaseAt)} cy=${f} r="10" fill=${Gr.success} />
|
|
1983
|
-
<rect x=${n(this.releaseAt)-8} y=${f-36} rx="4" width=${this.release.length*7.6+16} height="22" fill=${Gr.success} />
|
|
1984
|
-
<text x=${n(this.releaseAt)} y=${f-21} style="fill:var(--impakt-color-surface-card, #fff)">${this.release}</text>
|
|
1985
|
-
</g>`:Ae}
|
|
1986
|
-
${ie.map(m=>Nt`<text x=${n(m)} y=${y-10} text-anchor="middle" class="faint">${qe} ${m}</text>`)}
|
|
1987
|
-
</svg>
|
|
1988
|
-
</figure>`}};customElements.define("impakt-release-card",sa);customElements.define("impakt-release-list",oa);customElements.define("impakt-branch-list",la);customElements.define("impakt-check-list",ca);customElements.define("impakt-branch-timeline",da);import{css as ot,html as C,nothing as ne}from"./atomic-ui.js";import{ImpaktElement as pe,R as te,focusRing as jn,fontWeight as Qe,revealAt as ua,revealStyles as nr,say as Vr,space as P,spaceAround as Pn,t as A,token as On}from"./atomic-ui.js";var rr={note:["01","Discover","Note"],wireframe:["02","Design low-fi","Wireframe"],component:["03","Design hi-fi","Component"],code:["04","Build","Code"],live:["05","Launch","Live"]},ga=class extends pe{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=[...pe.styles,ot`
|
|
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`
|
|
1989
1099
|
:host { display: inline-block; vertical-align: middle; }
|
|
1990
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. */
|
|
1991
|
-
.tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; background: ${
|
|
1992
|
-
.index { color: ${
|
|
1993
|
-
.phase { color: ${
|
|
1994
|
-
.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}; }
|
|
1995
1105
|
@media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }
|
|
1996
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. */
|
|
1997
|
-
:host([data-motion]) .tag { animation: ik-reveal-type ${
|
|
1998
|
-
`,
|
|
1999
|
-
>${e?
|
|
2000
|
-
>`}},
|
|
2001
|
-
:host { display: block; container-type: inline-size; color: ${
|
|
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}; }
|
|
2002
1112
|
/* The label row is the label's own 20px (12:712, 10:642), or the stage tag's 29px beside it (9:296). */
|
|
2003
|
-
.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)}; }
|
|
2004
1114
|
.top.tagged { min-block-size: 29px; }
|
|
2005
1115
|
/* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */
|
|
2006
|
-
.label { margin: 0; font-family: ${
|
|
2007
|
-
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${
|
|
2008
|
-
.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; }
|
|
2009
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; }
|
|
2010
1120
|
/* Display L sets a section title 680px wide at 64px, with a side lead or without (21:1080, 20:1160, 34:644). */
|
|
2011
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; }
|
|
2012
1122
|
/* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */
|
|
2013
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); }
|
|
2014
1124
|
/* The lead in G2 Body M, 16px at 1.45, 24px under the heading and at most 480px wide (9:385). */
|
|
2015
|
-
.lead { margin: ${
|
|
2016
|
-
.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; }
|
|
2017
1127
|
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
2018
1128
|
:host([aside]) .body, .body.aside { align-items: center; }
|
|
2019
1129
|
.side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }
|
|
@@ -2021,105 +1131,104 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
2021
1131
|
::slotted([slot='aside']) { display: block; max-inline-size: 100%; }
|
|
2022
1132
|
@container (max-width: 47.99rem) {
|
|
2023
1133
|
/* On a phone the heading is 20px under the label row and the lead 16px under the heading (14:984, 14:804). */
|
|
2024
|
-
.body { grid-template-columns: minmax(0, 1fr); row-gap: 0; margin-block-start: ${
|
|
1134
|
+
.body { grid-template-columns: minmax(0, 1fr); row-gap: 0; margin-block-start: ${k(5)}; }
|
|
2025
1135
|
/* A row with a stage tag in it keeps 24px under it, as the 53px label row of 15:1058 does. */
|
|
2026
|
-
.top.tagged + .body { margin-block-start: ${
|
|
2027
|
-
|
|
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)}; }
|
|
2028
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). */
|
|
2029
1141
|
.side { justify-items: stretch; gap: 0; }
|
|
2030
|
-
.side .lead { inline-size: auto; max-inline-size: none; margin-block-start: ${
|
|
2031
|
-
::slotted([slot='aside']) { margin-block-start: ${
|
|
1142
|
+
.side .lead { inline-size: auto; max-inline-size: none; margin-block-start: ${k(4)}; }
|
|
1143
|
+
::slotted([slot='aside']) { margin-block-start: ${k(6)}; }
|
|
2032
1144
|
}
|
|
2033
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. */
|
|
2034
|
-
:host([data-motion]) .label { animation: ik-reveal-type ${
|
|
2035
|
-
`,
|
|
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">
|
|
2036
1148
|
<div class=${this.stage||this.hasSlot("tag")?"top tagged":"top"}>
|
|
2037
|
-
${this.label?
|
|
2038
|
-
<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>
|
|
2039
1151
|
</div>
|
|
2040
1152
|
<div class=${this.hasSlot("aside")?"body aside":"body"}>
|
|
2041
|
-
<div class="main">${a}${e&&!
|
|
2042
|
-
<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>
|
|
2043
1155
|
</div>
|
|
2044
|
-
</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`
|
|
2045
1157
|
:host { display: block; block-size: 100%; }
|
|
2046
|
-
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: ${
|
|
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}; }
|
|
2047
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). */
|
|
2048
|
-
article::before { content: ''; position: absolute; inset: 0; z-index: -1; background: ${
|
|
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; }
|
|
2049
1161
|
article:has(a):hover::before, article:focus-within::before { opacity: 1; transform: none; }
|
|
2050
|
-
.go { display: inline-block; transition: translate ${
|
|
2051
|
-
article:has(a):hover .go, article:focus-within .go { translate: ${
|
|
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; }
|
|
2052
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. */
|
|
2053
|
-
:host([data-motion]) article { animation: ik-reveal-drop ${
|
|
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; }
|
|
2054
1166
|
.top { display: flex; align-items: center; justify-content: space-between; }
|
|
2055
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. */
|
|
2056
|
-
.number { font-family: ${
|
|
1168
|
+
.number { font-family: ${f.fontMono}; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0; }
|
|
2057
1169
|
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }
|
|
2058
|
-
.foot { display: grid; gap: ${
|
|
1170
|
+
.foot { display: grid; gap: ${k(2.5)}; }
|
|
2059
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. */
|
|
2060
|
-
.heading { margin: 0; font-family: ${
|
|
1172
|
+
.heading { margin: 0; font-family: ${f.fontHeading}; font-size: 1.5rem; font-weight: ${me("semibold")}; line-height: 1.75rem; letter-spacing: -0.025em; }
|
|
2061
1173
|
.heading a { color: inherit; text-decoration: none; }
|
|
2062
1174
|
.heading a::after { content: ''; position: absolute; inset: 0; }
|
|
2063
1175
|
.heading a:focus-visible { outline: none; }
|
|
2064
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
2065
|
-
.text { margin: 0; font-size: 0.875rem; line-height: 1.25rem; color: ${
|
|
2066
|
-
.tags { margin: 0; ${
|
|
2067
|
-
.more { ${
|
|
2068
|
-
article:has(a):hover, article:focus-within { color: ${
|
|
2069
|
-
:host([featured]) article { background: ${
|
|
2070
|
-
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${
|
|
2071
|
-
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${
|
|
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}; }
|
|
2072
1184
|
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
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)}; } }
|
|
2073
1193
|
@media (prefers-reduced-motion: reduce) { article, article::before, .go { transition: none; } }
|
|
2074
1194
|
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } article::before { display: none; } }
|
|
2075
|
-
`,
|
|
1195
|
+
`,fi]}render(){let i=Ce(this.headingLevel);return b`<article part="card">
|
|
2076
1196
|
<div class="top" aria-hidden="true">
|
|
2077
1197
|
<span class="number" part="number">${this.number}</span>
|
|
2078
|
-
|
|
1198
|
+
${this.look==="tile"?D:b`<span class="dot" part="dot"></span>`}
|
|
2079
1199
|
</div>
|
|
2080
1200
|
<div class="foot">
|
|
2081
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
2082
|
-
${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}
|
|
2083
1203
|
</div>
|
|
2084
|
-
${this.text?
|
|
2085
|
-
${this.tags?
|
|
2086
|
-
${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}
|
|
2087
1207
|
</div>
|
|
2088
|
-
</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`
|
|
2089
1209
|
:host { display: inline-block; position: relative; pointer-events: none; }
|
|
2090
1210
|
.cursor { display: inline-flex; align-items: flex-start; }
|
|
2091
1211
|
svg { display: block; flex: none; }
|
|
2092
|
-
.arrow { fill: ${
|
|
2093
|
-
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${
|
|
2094
|
-
:host([variant='outline']) .name { background: ${
|
|
2095
|
-
: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}; }
|
|
2096
1216
|
:host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }
|
|
2097
1217
|
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }
|
|
2098
1218
|
@media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }
|
|
2099
1219
|
@media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }
|
|
2100
|
-
`]}render(){return
|
|
1220
|
+
`]}render(){return b`<span class="cursor" part="cursor" aria-hidden="true">
|
|
2101
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>
|
|
2102
|
-
${this.name?
|
|
2103
|
-
</span>`}},
|
|
2104
|
-
:host { display:
|
|
2105
|
-
.note { display: inline-flex; align-items: center; gap: ${P(2)}; }
|
|
2106
|
-
:host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }
|
|
2107
|
-
:host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }
|
|
2108
|
-
p { margin: 0; font-family: var(--impakt-font-family-hand, ${A.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${A.textMuted}; }
|
|
2109
|
-
svg { flex: none; color: ${A.textMuted}; }
|
|
2110
|
-
:host([arrow='left']) svg { transform: scaleX(-1); }
|
|
2111
|
-
:host([arrow='down']) svg { transform: rotate(90deg); }
|
|
2112
|
-
:host([arrow='up']) svg { transform: rotate(-90deg); }
|
|
2113
|
-
@media (forced-colors: active) { p, svg { color: CanvasText; } }
|
|
2114
|
-
`]}render(){let t=this.arrow&&this.arrow!=="none"?C`<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>`:ne;return C`<div class="note" part="note" aria-hidden=${this.decorative?"true":ne}><p part="text"><slot>${this.text}</slot></p>${t}</div>`}},ya=class extends pe{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=[...pe.styles,jn,ot`
|
|
2115
|
-
:host { display: block; color: ${A.text}; }
|
|
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}; }
|
|
2116
1225
|
/* Stacked, as the contact page's direct line (20:1163): 28px apart, each value 8px under its label. */
|
|
2117
1226
|
dl { margin: 0; display: grid; gap: 28px; }
|
|
2118
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. */
|
|
2119
|
-
:host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${
|
|
2120
|
-
:host([layout='columns']) .fact { border-block-start: 1px solid ${
|
|
2121
|
-
dt { ${
|
|
2122
|
-
dd { margin: ${
|
|
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; }
|
|
2123
1232
|
.sm { font-size: 1rem; line-height: 1.45; }
|
|
2124
1233
|
.md { font-size: 1.125rem; }
|
|
2125
1234
|
.lg { font-size: 1.5rem; letter-spacing: -0.01em; }
|
|
@@ -2130,87 +1239,87 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
2130
1239
|
:host([layout='stacked']) a { text-decoration: none; }
|
|
2131
1240
|
:host([layout='stacked']) a:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-thickness: 2px; }
|
|
2132
1241
|
@media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }
|
|
2133
|
-
`]}render(){return this.items.length?
|
|
2134
|
-
${this.items.map(
|
|
2135
|
-
<dt part="label">${
|
|
2136
|
-
<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>
|
|
2137
1246
|
</div>`)}
|
|
2138
|
-
</dl>`:
|
|
2139
|
-
:host { display: block; container-type: inline-size; color: ${
|
|
2140
|
-
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${
|
|
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}; }
|
|
2141
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. */
|
|
2142
|
-
li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${
|
|
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}; }
|
|
2143
1252
|
:host([split='text']) li { grid-template-columns: 60px minmax(0, 460fr) minmax(0, 480fr); }
|
|
2144
|
-
.n { font-family: ${
|
|
2145
|
-
.heading { margin: 0; font-family: ${
|
|
2146
|
-
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${
|
|
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}; }
|
|
2147
1256
|
@container (max-width: 47.99rem) {
|
|
2148
|
-
li { grid-template-columns: minmax(0, 1fr); row-gap: ${
|
|
1257
|
+
li { grid-template-columns: minmax(0, 1fr); row-gap: ${k(2)}; }
|
|
2149
1258
|
}
|
|
2150
1259
|
@media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }
|
|
2151
|
-
`]}render(){if(!this.items.length)return
|
|
2152
|
-
${this.items.map((
|
|
2153
|
-
<span class="n" aria-hidden="true">${
|
|
2154
|
-
<div class="heading" role="heading" aria-level=${
|
|
2155
|
-
${
|
|
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>`}
|
|
2156
1265
|
</li>`)}
|
|
2157
|
-
</ol>`}},
|
|
2158
|
-
:host { display: block; color: ${
|
|
2159
|
-
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${
|
|
2160
|
-
section { border-block-start: 1px solid ${
|
|
2161
|
-
.heading { margin: 0; ${
|
|
2162
|
-
ul { margin: ${
|
|
2163
|
-
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; }
|
|
2164
1273
|
@media (forced-colors: active) { section { border-color: CanvasText; } }
|
|
2165
|
-
`]}render(){if(!this.columns.length)return
|
|
2166
|
-
${this.columns.map(e=>
|
|
2167
|
-
<div class="heading" role="heading" aria-level=${
|
|
2168
|
-
<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>
|
|
2169
1278
|
</section>`)}
|
|
2170
|
-
</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`
|
|
2171
1280
|
:host { display: block; block-size: 100%; container-type: inline-size; }
|
|
2172
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). */
|
|
2173
|
-
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: 12px; padding: ${
|
|
2174
|
-
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${
|
|
2175
|
-
.hours { margin: 0; ${
|
|
2176
|
-
.tag { margin: 0; padding: 3px 6px; ${
|
|
2177
|
-
.name { margin: 0; font-family: ${
|
|
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; }
|
|
2178
1287
|
.region { margin: 0; font-size: 1rem; line-height: 1.2; }
|
|
2179
|
-
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${
|
|
2180
|
-
@container (max-width: 22rem) { article { padding: ${
|
|
1288
|
+
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${f.textMuted}; }
|
|
1289
|
+
@container (max-width: 22rem) { article { padding: ${k(5)}; } }
|
|
2181
1290
|
@media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }
|
|
2182
|
-
`]}render(){let
|
|
2183
|
-
${this.hours||this.tag?
|
|
2184
|
-
<div class="name" role="heading" aria-level=${
|
|
2185
|
-
${this.region?
|
|
2186
|
-
${this.text?
|
|
2187
|
-
</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`
|
|
2188
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. */
|
|
2189
|
-
: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}; }
|
|
2190
1299
|
.visual { display: none; position: relative; margin-block-start: var(--impakt-band-panel-inset, 32px); }
|
|
2191
1300
|
.visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
|
|
2192
|
-
.visual path { fill: none; stroke: ${
|
|
2193
|
-
.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%); }
|
|
2194
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. */
|
|
2195
|
-
.ring.flagged, .ring.current { background: ${
|
|
1304
|
+
.ring.flagged, .ring.current { background: ${V}; }
|
|
2196
1305
|
.ring.current { inline-size: 12px; block-size: 12px; }
|
|
2197
1306
|
/* Each label keeps to the space between its point and the next, wrapping rather than running into its neighbour. */
|
|
2198
|
-
.vlabel { position: absolute; transform: translateX(-50%); ${
|
|
2199
|
-
.lineLabel { position: absolute; inset-inline-start: 0; ${
|
|
2200
|
-
.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; }
|
|
2201
1310
|
.visual .flag { position: absolute; transform: translate(-50%, -100%); }
|
|
2202
1311
|
|
|
2203
|
-
ol { margin: 0; padding: ${
|
|
2204
|
-
li { position: relative; padding: 0 0 ${
|
|
2205
|
-
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 ${
|
|
2206
|
-
li[aria-current]::before { background: ${
|
|
2207
|
-
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: ${
|
|
2208
|
-
.rlabel { ${
|
|
2209
|
-
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)}; }
|
|
2210
1319
|
|
|
2211
1320
|
@container (min-width: 60rem) {
|
|
2212
1321
|
.visual { display: block; }
|
|
2213
|
-
ol { ${
|
|
1322
|
+
ol { ${Fa} }
|
|
2214
1323
|
}
|
|
2215
1324
|
@media (forced-colors: active) {
|
|
2216
1325
|
.visual path { stroke: CanvasText; }
|
|
@@ -2220,131 +1329,131 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
2220
1329
|
.flag { border: 1px solid CanvasText; }
|
|
2221
1330
|
}
|
|
2222
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. */
|
|
2223
|
-
:host([data-motion]) .visual svg { animation: ik-line-draw ${
|
|
2224
|
-
:host([data-motion]) .lineLabel { animation: ik-reveal-type ${
|
|
2225
|
-
:host([data-motion]) .ring { animation: ik-reveal-mark ${
|
|
2226
|
-
:host([data-motion]) :is(.vlabel, .visual .flag) { animation: ik-reveal-fade ${
|
|
2227
|
-
:host([data-motion]) .ring.flagged { animation: ik-reveal-mark ${
|
|
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; }
|
|
2228
1337
|
@keyframes ik-line-draw { from { clip-path: inset(-12px 100% -12px -12px); } to { clip-path: inset(-12px -12px -12px -12px); } }
|
|
2229
|
-
@keyframes ik-line-fill { from { background: ${
|
|
2230
|
-
`,
|
|
2231
|
-
<svg viewBox="0 0 1000 ${
|
|
2232
|
-
${this.lineLabel?
|
|
2233
|
-
${
|
|
2234
|
-
${
|
|
2235
|
-
${
|
|
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}`})}
|
|
2236
1345
|
</div>
|
|
2237
|
-
<ol part="list" role="list" aria-label=${this.label||
|
|
2238
|
-
${
|
|
2239
|
-
<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}
|
|
2240
1349
|
</li>`)}
|
|
2241
|
-
</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`
|
|
2242
1351
|
:host { display: block; }
|
|
2243
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; }
|
|
2244
|
-
li { box-sizing: border-box; min-block-size: 150px; padding: ${
|
|
2245
|
-
li.highlight { background: ${
|
|
2246
|
-
.day { margin: 0; ${
|
|
2247
|
-
.heading { margin: ${
|
|
2248
|
-
.text { margin: ${
|
|
2249
|
-
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}; }
|
|
2250
1359
|
@media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }
|
|
2251
|
-
`]}render(){if(!this.days?.length)return
|
|
2252
|
-
${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":""}>
|
|
2253
1362
|
<p class="day">${e.day}</p>
|
|
2254
|
-
<div class="heading" role="heading" aria-level=${
|
|
2255
|
-
${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}
|
|
2256
1365
|
</li>`)}
|
|
2257
|
-
</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`
|
|
2258
1367
|
:host { display: block; }
|
|
2259
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. */
|
|
2260
|
-
.panel { padding: calc(${
|
|
2261
|
-
.label { margin: 0 0 12px; ${
|
|
2262
|
-
.text { margin: 0; max-inline-size: 28.125em; font-family: ${
|
|
2263
|
-
@media (prefers-color-scheme: dark) { .panel { border-color: ${
|
|
2264
|
-
@media (max-width: 30rem) { .panel { padding: ${
|
|
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)}; } }
|
|
2265
1374
|
@media (forced-colors: active) { .panel { border-color: CanvasText; } }
|
|
2266
|
-
`]}render(){return
|
|
2267
|
-
${this.label?
|
|
1375
|
+
`]}render(){return I`<div class="panel" part="panel">
|
|
1376
|
+
${this.label?I`<p class="label" part="label">${this.label}</p>`:ee}
|
|
2268
1377
|
<p class="text" part="text"><slot>${this.text}</slot></p>
|
|
2269
|
-
</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`
|
|
2270
1379
|
:host { display: block; block-size: 100%; }
|
|
2271
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. */
|
|
2272
|
-
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: 14px; padding: ${
|
|
2273
|
-
.top { display: flex; justify-content: space-between; align-items: center; gap: ${
|
|
2274
|
-
.number { font-family: ${
|
|
2275
|
-
.impact { margin: 0; padding: 3px 7px; ${
|
|
2276
|
-
:host([impact='high']) .impact { background: ${
|
|
2277
|
-
.statement { margin: 0; font-family: ${
|
|
2278
|
-
.metric { margin: 0; ${
|
|
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}; }
|
|
2279
1388
|
@media (forced-colors: active) { article, .impact { border-color: CanvasText; } }
|
|
2280
|
-
`]}render(){let
|
|
2281
|
-
${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">
|
|
2282
1391
|
<span class="number" part="number">${this.number}</span>
|
|
2283
|
-
${e?
|
|
2284
|
-
</div>`:
|
|
2285
|
-
${this.statement?
|
|
2286
|
-
${this.metric?
|
|
2287
|
-
</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`
|
|
2288
1397
|
:host { display: block; }
|
|
2289
|
-
.frame { border: 1px solid ${
|
|
2290
|
-
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${
|
|
2291
|
-
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${
|
|
2292
|
-
.dot:first-child { background: ${
|
|
2293
|
-
.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; }
|
|
2294
1403
|
.canvas { position: relative; }
|
|
2295
|
-
.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; }
|
|
2296
1405
|
::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }
|
|
2297
1406
|
@media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
2298
|
-
`]}render(){return
|
|
1407
|
+
`]}render(){return I`<div class="frame" part="frame">
|
|
2299
1408
|
<div class="bar" part="bar" aria-hidden="true">
|
|
2300
1409
|
<span class="dot"></span><span class="dot"></span><span class="dot"></span>
|
|
2301
|
-
${this.caption?
|
|
1410
|
+
${this.caption?I`<span class="caption" part="caption">${this.caption}</span>`:ee}
|
|
2302
1411
|
</div>
|
|
2303
1412
|
<div class="canvas ${this.filled?"":"empty"}" part="canvas" style=${this.filled?"":`aspect-ratio: ${this.ratio||"16 / 9"}`}>
|
|
2304
1413
|
<slot @slotchange=${this.onSlot}></slot>
|
|
2305
1414
|
</div>
|
|
2306
|
-
</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`
|
|
2307
1416
|
:host { display: block; container-type: inline-size; }
|
|
2308
1417
|
ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }
|
|
2309
1418
|
li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }
|
|
2310
1419
|
li:not(:first-child) { flex-basis: 56px; }
|
|
2311
|
-
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${
|
|
2312
|
-
: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}; }
|
|
2313
1422
|
.arrow svg { display: block; }
|
|
2314
|
-
.via { font-size: 0.75rem; line-height: 1.2; color: ${
|
|
2315
|
-
:host([on-ink]) .via { color: ${
|
|
2316
|
-
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${
|
|
2317
|
-
:host([size='lg']) .box { padding: ${
|
|
2318
|
-
.box.soft { background: ${
|
|
2319
|
-
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${
|
|
2320
|
-
.box.ink { background: ${
|
|
2321
|
-
.box.accent { background: ${
|
|
2322
|
-
.label { margin: 0 0 ${
|
|
2323
|
-
.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}; }
|
|
2324
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. */
|
|
2325
|
-
.soft :is(.label, .text) { color: color-mix(in srgb, ${
|
|
2326
|
-
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${
|
|
2327
|
-
.ink :is(.label, .text) { color: ${
|
|
2328
|
-
.accent :is(.label, .text) { color: ${
|
|
2329
|
-
.heading { margin: 0; font-family: ${
|
|
2330
|
-
: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; }
|
|
2331
1440
|
@container (max-width: 47.99rem) {
|
|
2332
1441
|
ol, li { flex-direction: column; }
|
|
2333
1442
|
.arrow { inline-size: auto; block-size: 48px; flex-direction: row; }
|
|
2334
1443
|
.arrow svg { transform: rotate(90deg); }
|
|
2335
1444
|
}
|
|
2336
1445
|
@media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }
|
|
2337
|
-
`]}render(){if(!this.steps?.length)return
|
|
2338
|
-
${this.steps.map((e,
|
|
2339
|
-
${
|
|
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">
|
|
2340
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>
|
|
2341
|
-
${e.connector?
|
|
2342
|
-
</span>`:
|
|
1450
|
+
${e.connector?Fe`<span class="via">${e.connector}</span>`:at}
|
|
1451
|
+
</span>`:at}
|
|
2343
1452
|
<div class="box ${e.tone??"card"}" part="box">
|
|
2344
|
-
${e.label?
|
|
2345
|
-
<div class="heading" role="heading" aria-level=${
|
|
2346
|
-
${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}
|
|
2347
1456
|
</div>
|
|
2348
1457
|
</li>`)}
|
|
2349
|
-
</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};
|
|
2350
1459
|
//# sourceMappingURL=atomic-ui-blocks.js.map
|