@atomic-ui/blocks 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +338 -31
- package/dist/{chunk-MX7FU5JE.js → chunk-3G3NP4UC.js} +40 -22
- package/dist/chunk-3G3NP4UC.js.map +1 -0
- package/dist/{chunk-W3MK3EEO.js → chunk-7OFH762N.js} +74 -26
- package/dist/chunk-7OFH762N.js.map +1 -0
- package/dist/{chunk-CCFBROX3.js → chunk-BW5ZMKES.js} +119 -50
- package/dist/chunk-BW5ZMKES.js.map +1 -0
- package/dist/{chunk-X3U2SOVV.js → chunk-GDATDR2Q.js} +64 -31
- package/dist/chunk-GDATDR2Q.js.map +1 -0
- package/dist/{chunk-VXQS5TAN.js → chunk-GZTBAT6P.js} +47 -23
- package/dist/chunk-GZTBAT6P.js.map +1 -0
- package/dist/{chunk-KOYQRJKY.js → chunk-NZQZRBKV.js} +159 -15
- package/dist/chunk-NZQZRBKV.js.map +1 -0
- package/dist/{chunk-JIITZUGI.js → chunk-Q366ZM2X.js} +84 -42
- package/dist/chunk-Q366ZM2X.js.map +1 -0
- package/dist/{chunk-EYP5LWUR.js → chunk-ZM2HLQOG.js} +14 -3
- package/dist/chunk-ZM2HLQOG.js.map +1 -0
- package/dist/components/changelog.js +1 -1
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +28 -6
- package/dist/components/g2-case.js +1 -1
- package/dist/components/g2-site.d.ts +39 -5
- package/dist/components/g2-site.js +1 -1
- package/dist/components/journey.d.ts +26 -4
- package/dist/components/journey.js +1 -1
- package/dist/components/organisms.js +1 -1
- package/dist/components/site.d.ts +74 -2
- package/dist/components/site.js +2 -1
- package/dist/components/studio.d.ts +35 -2
- package/dist/components/studio.js +1 -1
- package/dist/index.js +8 -8
- package/dist/standalone/atomic-ui-blocks.js +1378 -1116
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-CCFBROX3.js.map +0 -1
- package/dist/chunk-EYP5LWUR.js.map +0 -1
- package/dist/chunk-JIITZUGI.js.map +0 -1
- package/dist/chunk-KOYQRJKY.js.map +0 -1
- package/dist/chunk-MX7FU5JE.js.map +0 -1
- package/dist/chunk-VXQS5TAN.js.map +0 -1
- package/dist/chunk-W3MK3EEO.js.map +0 -1
- package/dist/chunk-X3U2SOVV.js.map +0 -1
|
@@ -1,201 +1,210 @@
|
|
|
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.14.0, standalone. Load atomic-ui.js from @atomic-ui/ui first, from the same folder. */
|
|
2
|
+
import"./atomic-ui.js";import{css as bt,html as O,nothing as he}from"./atomic-ui.js";import{ImpaktElement as Be,fontSize as ct,fontWeight as De,lineHeight as ni,space as v,spaceAround as mi,t as T,token as Kr,type as lt,iconSvg as si}from"./atomic-ui.js";var La=(o,t,e)=>O`<div class=${e} role="heading" aria-level=${o}>${t}</div>`,or=bt`
|
|
3
|
+
.h { margin: 0; color: ${T.textHeading}; font-family: ${T.fontHeading}; font-weight: ${De("bold")}; line-height: ${ni("tight")}; }
|
|
4
|
+
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${T.brand})); ${lt("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${T.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${De("semibold")}); letter-spacing: ${T.trackingWide}; text-transform: uppercase; }
|
|
5
|
+
.body { margin: 0; line-height: ${ni("normal")}; max-inline-size: 65ch; }
|
|
6
|
+
`,oi=class extends Be{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},treatment:{type:String,reflect:!0},ratingText:{type:String,attribute:"rating-text"},eyebrowIcon:{type:String,attribute:"eyebrow-icon"},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.level=1,this.imageSrc="",this.imageAlt="",this.treatment="split",this.ratingText="",this.eyebrowIcon="none",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Be.styles,mi,or,bt`
|
|
7
7
|
:host { display: block; container-type: inline-size; }
|
|
8
|
-
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${
|
|
8
|
+
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${v(8)}; align-items: center; }
|
|
9
9
|
.hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
|
|
10
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
10
|
+
.words { display: flex; flex-direction: column; gap: ${v(4)}; }
|
|
11
11
|
:host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }
|
|
12
|
-
.h { ${
|
|
13
|
-
.body { ${
|
|
14
|
-
@container (max-width: 40rem) { .h { ${
|
|
15
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
12
|
+
.h { ${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
16
|
:host([align='center']) .actions { justify-content: center; }
|
|
17
|
-
img { display: block; inline-size: 100%; block-size: auto; border-radius: ${
|
|
17
|
+
img { display: block; inline-size: 100%; block-size: auto; border-radius: ${T.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${T.shadowLg}; }
|
|
18
18
|
@container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }
|
|
19
19
|
/* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */
|
|
20
|
-
.cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${
|
|
20
|
+
.cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${v(32)} max(${v(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${v(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }
|
|
21
21
|
.cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
|
|
22
22
|
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }
|
|
23
23
|
.cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
|
|
24
|
-
.cover .eyebrow { display: inline-flex; align-items: center; gap: ${
|
|
24
|
+
.cover .eyebrow { display: inline-flex; align-items: center; gap: ${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
25
|
.chip-line { position: relative; z-index: 1; block-size: 0; }
|
|
26
|
-
.chip { position: absolute; inset-block-start: ${
|
|
27
|
-
.finder { position: relative; z-index: 1; margin-block-start: ${
|
|
26
|
+
.chip { position: absolute; inset-block-start: ${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
28
|
.cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }
|
|
29
29
|
.cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }
|
|
30
30
|
@container (max-width: 64rem) { .chip { display: none; } }
|
|
31
31
|
@container (max-width: 30rem) { .finder { display: none; } }
|
|
32
|
-
@container (max-width: 48rem) { .finder { margin-block-start: ${
|
|
33
|
-
`]}render(){if(this.treatment==="cover"&&this.imageSrc)return
|
|
34
|
-
${this.ratingText?
|
|
32
|
+
@container (max-width: 48rem) { .finder { margin-block-start: ${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
35
|
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
36
36
|
<div class="words">
|
|
37
|
-
${this.eyebrow?
|
|
38
|
-
${
|
|
39
|
-
${this.lead?
|
|
37
|
+
${this.eyebrow?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
40
|
<div class="actions"><slot name="actions"></slot></div>
|
|
41
41
|
</div>
|
|
42
42
|
<div class="finder"><slot name="search"></slot></div>
|
|
43
|
-
</div>`;let
|
|
43
|
+
</div>`;let t=!!this.imageSrc&&this.align!=="center";return O`<div class="hero ${t?"pictured":""}" part="hero">
|
|
44
44
|
<div class="words">
|
|
45
|
-
${this.eyebrow?
|
|
46
|
-
${
|
|
47
|
-
${this.lead?
|
|
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
48
|
<div class="actions"><slot name="actions"></slot></div>
|
|
49
49
|
</div>
|
|
50
|
-
${
|
|
51
|
-
</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
52
|
:host { display: block; container-type: inline-size; }
|
|
53
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
53
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${v(8)} ${v(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
54
54
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
55
55
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
56
|
-
li { display: flex; flex-direction: column; gap: ${
|
|
57
|
-
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${
|
|
58
|
-
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${
|
|
59
|
-
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${
|
|
56
|
+
li { display: flex; flex-direction: column; gap: ${v(2)}; }
|
|
57
|
+
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${v(4)}; align-items: start; }
|
|
58
|
+
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${v(1)}; }
|
|
59
|
+
.icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${T.radiusLg}; background: ${T.brandSubtle}; color: ${T.brand}; margin-block-end: ${v(2)}; }
|
|
60
60
|
:host([layout='inline']) .icon { margin: 0; }
|
|
61
|
-
.h { font-size: ${
|
|
62
|
-
.body { color: ${
|
|
61
|
+
.h { font-size: ${ct("lg")}; }
|
|
62
|
+
.body { color: ${T.text}; }
|
|
63
63
|
/* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */
|
|
64
|
-
:host([look='ruled']) li { gap: ${
|
|
64
|
+
:host([look='ruled']) li { gap: ${v(3)}; padding-block-start: ${v(5)}; border-block-start: ${T.borderThin} solid ${T.text}; }
|
|
65
65
|
:host(:is([look='ruled'], [look='numbered'])) .icon { display: none; }
|
|
66
|
-
:host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${
|
|
67
|
-
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${
|
|
68
|
-
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${
|
|
66
|
+
:host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${De("semibold")}; letter-spacing: -0.02em; line-height: 1.2; }
|
|
67
|
+
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${T.textMuted}; }
|
|
68
|
+
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${v(3)}; }
|
|
69
69
|
/* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */
|
|
70
|
-
: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: ${
|
|
70
|
+
:host([look='numbered']) ul { gap: ${v(3)}; }
|
|
71
|
+
:host([look='numbered']) li { gap: ${v(4)}; padding: ${v(6)}; background: ${T.surfaceCard}; border: ${T.borderThin} solid ${T.text}; border-radius: ${T.radiusSm}; }
|
|
72
|
+
.top { display: flex; align-items: center; justify-content: space-between; font-family: ${T.fontMono}; font-size: ${ct("sm")}; color: ${T.text}; }
|
|
73
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${T.text}; }
|
|
74
|
+
.dot.attention { background: ${Kr("color.accent.default","#ffd43b")}; box-shadow: inset 0 0 0 1px ${T.text}; }
|
|
75
75
|
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
76
76
|
@media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }
|
|
77
77
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
78
78
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
79
|
-
`]}render(){let
|
|
80
|
-
${
|
|
81
|
-
${e.icon&&this.look!=="ruled"&&!
|
|
82
|
-
<div class="words">${
|
|
83
|
-
</li>`)}</ul>`}},
|
|
79
|
+
`]}render(){let t=this.look==="numbered";return O`<ul part="list">${(this.items??[]).map((e,i)=>O`<li part="item">
|
|
80
|
+
${t?O`<div class="top" aria-hidden="true"><span>${String(i+1).padStart(2,"0")}</span><span class=${e.attention?"dot attention":"dot"}></span></div>`:he}
|
|
81
|
+
${e.icon&&this.look!=="ruled"&&!t?O`<span class="icon">${si(e.icon,"24px")}</span>`:he}
|
|
82
|
+
<div class="words">${La(this.headingLevel,O`${e.heading}${t&&e.attention?O`<span class="sr"> (${e.attention})</span>`:he}`,"h")}${e.text?O`<p class="body">${e.text}</p>`:he}</div>
|
|
83
|
+
</li>`)}</ul>`}},ci=class extends Be{static{this.properties={quote:{type:String},person:{type:String},about:{type:String},imageSrc:{type:String,attribute:"image-src"},size:{type:String,reflect:!0},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.quote="",this.person="",this.about="",this.imageSrc="",this.size="md",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Be.styles,mi,bt`
|
|
84
84
|
:host { display: block; }
|
|
85
|
-
figure { margin: 0; display: flex; flex-direction: column; gap: ${
|
|
85
|
+
figure { margin: 0; display: flex; flex-direction: column; gap: ${v(4)}; max-inline-size: 48rem; }
|
|
86
86
|
:host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }
|
|
87
|
-
blockquote { margin: 0; font-family: ${
|
|
88
|
-
:host([size='lg']) blockquote { font-size: ${
|
|
87
|
+
blockquote { margin: 0; font-family: ${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
89
|
blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
|
|
90
|
-
figcaption { display: flex; align-items: center; gap: ${
|
|
90
|
+
figcaption { display: flex; align-items: center; gap: ${v(3)}; }
|
|
91
91
|
img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
|
|
92
|
-
.name { font-weight: ${
|
|
93
|
-
.detail { color: ${
|
|
94
|
-
`]}render(){return
|
|
92
|
+
.name { font-weight: ${De("semibold")}; }
|
|
93
|
+
.detail { color: ${T.textMuted}; font-size: ${ct("sm")}; }
|
|
94
|
+
`]}render(){return O`<figure part="figure">
|
|
95
95
|
<blockquote part="quote">${this.quote}</blockquote>
|
|
96
|
-
${this.person?
|
|
97
|
-
</figure>`}},
|
|
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
98
|
:host { display: block; }
|
|
99
|
-
.stat { display: flex; flex-direction: column; gap: ${
|
|
99
|
+
.stat { display: flex; flex-direction: column; gap: ${v(1)}; }
|
|
100
100
|
:host([align='center']) .stat { align-items: center; text-align: center; }
|
|
101
|
-
.value { font-family: ${
|
|
102
|
-
:host([size='lg']) .value { font-size: ${
|
|
101
|
+
.value { font-family: ${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
103
|
:host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
|
|
104
|
-
.label { font-weight: ${
|
|
105
|
-
.detail { color: ${
|
|
106
|
-
`]}render(){return
|
|
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
107
|
:host { display: block; }
|
|
108
|
-
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${
|
|
108
|
+
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${v(2)} ${v(3)}; padding: ${v(2.5)} ${v(5)}; ${lt("sm")} text-align: center; color: ${T.onBrand}; background: ${T.brand}; }
|
|
109
109
|
:host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }
|
|
110
|
-
a { display: inline-flex; align-items: center; gap: ${
|
|
111
|
-
`]}render(){return
|
|
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
112
|
:host { display: block; container-type: inline-size; }
|
|
113
|
-
form { display: flex; align-items: center; padding: ${
|
|
114
|
-
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${
|
|
115
|
-
label { ${
|
|
116
|
-
select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${
|
|
117
|
-
select:focus-visible, button:focus-visible { outline: 2px solid ${
|
|
118
|
-
button { flex: none; min-block-size: 48px; padding: ${
|
|
119
|
-
button:hover { background: ${
|
|
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
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: ${
|
|
122
|
-
`]}submit(
|
|
123
|
-
${(this.items??[]).map((
|
|
124
|
-
<option value="">${
|
|
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
125
|
</select></div>`})}
|
|
126
126
|
<button type="submit">${this.buttonText}</button>
|
|
127
|
-
</form>`}};customElements.define("impakt-search-bar",
|
|
127
|
+
</form>`}};customElements.define("impakt-search-bar",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
128
|
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
129
129
|
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
130
130
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
131
131
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
132
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
132
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${Ot(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
133
133
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
134
134
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
135
135
|
/* A card is drawn as impakt-card is: a 1px border in the text colour and no shadow. */
|
|
136
|
-
li { position: relative; display: flex; flex-direction: column; background: ${
|
|
137
|
-
img { border-block-end: ${
|
|
136
|
+
li { position: relative; display: flex; flex-direction: column; background: ${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
138
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
139
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
140
|
-
.h { margin: 0; color: ${
|
|
141
|
-
.h a { color: inherit; text-decoration: none; border-radius: ${
|
|
139
|
+
.words { display: flex; flex-direction: column; gap: ${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
142
|
.h a::after { content: ''; position: absolute; inset: 0; }
|
|
143
143
|
li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
144
|
-
.body { margin: 0; line-height: ${
|
|
144
|
+
.body { margin: 0; line-height: ${cr("normal")}; }
|
|
145
145
|
/* A marketing badge: monospace capitals at 11px in a 1px outline. */
|
|
146
|
-
.badge { align-self: flex-start; padding: 2px ${
|
|
146
|
+
.badge { align-self: flex-start; padding: 2px ${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
147
|
@media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }
|
|
148
|
-
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${
|
|
148
|
+
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${Ot(1)}; color: ${ge.link}; font-weight: ${Ea("semibold")}; }
|
|
149
149
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
150
150
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
151
|
-
`]}render(){return
|
|
152
|
-
${
|
|
151
|
+
`]}render(){return 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
153
|
<div class="words">
|
|
154
|
-
${
|
|
155
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${
|
|
156
|
-
${
|
|
157
|
-
${
|
|
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
158
|
</div>
|
|
159
|
-
</li>`)}</ul>`}};customElements.define("impakt-card-grid",
|
|
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">
|
|
160
160
|
<path d="M0 6h18M13 1l5 5-5 5" />
|
|
161
|
-
</svg>`,
|
|
161
|
+
</svg>`,ln=Te`<svg class="pointer" viewBox="0 0 16 20" width="16" height="20" aria-hidden="true" focusable="false">
|
|
162
162
|
<path d="M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z" stroke-width="1.2" stroke-linejoin="round" />
|
|
163
|
-
</svg
|
|
163
|
+
</svg>`,$i=(o,t,e)=>N(`--jt: var(--impakt-motion-journey-${o}-duration, ${t}ms); --je: var(--impakt-motion-journey-${o}-easing, ${e});`),Ha=[{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]}],se="--impakt-journey-p",Na=8,yi=o=>`--impakt-journey-g${o}`,xi;function mr(){if(xi!==void 0)return xi;let o=typeof CSS<"u"?CSS:void 0;if(!o?.registerProperty)return xi=!1;for(let t of[se,...Array.from({length:Na},(e,i)=>yi(i))])try{o.registerProperty({name:t,syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}return xi=!0}function cn([o,t,e,i]){let a=(r,n,s)=>3*r*(1-s)**2*s+3*n*(1-s)*s**2+s**3;return r=>{if(r<=0)return 0;if(r>=1)return 1;let n=0,s=1,h=r;for(let y=0;y<30;y+=1){let f=a(o,e,h);if(Math.abs(f-r)<1e-5)break;f<r?n=h:s=h,h=(n+s)/2}return a(t,i,h)}}var ur=(o,t)=>Ha[Math.max(0,Math.min(3,Math.max(o,t)-1))],me=o=>`clamp(0, min(calc(1 + var(${se}) - ${o}), calc(1 - var(${se}) + ${o})), 1)`,Ra=`clamp(0, calc(1 - var(${se})), 1)`,gr=`max(0, calc(var(${se}) - 3))`,br=`max(0, calc(var(${se}) - 4))`,vi=class extends pr{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=[...pr.styles,sn,nn`
|
|
164
164
|
:host {
|
|
165
165
|
display: block; inline-size: min(100%, 35rem); container-type: inline-size;
|
|
166
|
-
--impakt-journey-accent: ${
|
|
167
|
-
--hand: var(--impakt-font-family-hand, ${
|
|
166
|
+
--impakt-journey-accent: ${Ba("color.accent.default","#ffd43b")}; --impakt-journey-on-accent: ${Ba("color.accent.on","#1a1a1a")};
|
|
167
|
+
--hand: var(--impakt-font-family-hand, ${q.fontBody});
|
|
168
168
|
/* The stage as a number. Set by hand, it moves on the timing of the move into the new stage, and back out of a
|
|
169
169
|
stage the same move runs in reverse. A tracked button sets it on the frame instead, from the scroll. */
|
|
170
|
-
${
|
|
171
|
-
transition: ${
|
|
172
|
-
${
|
|
170
|
+
${N(se)}: 4;
|
|
171
|
+
transition: ${N(se)} var(--jt) var(--je);
|
|
172
|
+
${$i("flatten",640,"cubic-bezier(0.65, 0, 0.35, 1)")}
|
|
173
173
|
}
|
|
174
|
-
:host([stage='note']) { ${
|
|
175
|
-
:host([stage='wireframe']) { ${
|
|
176
|
-
:host([stage='component']) { ${
|
|
177
|
-
:host([stage='code']) { ${
|
|
178
|
-
:host([stage='live']) { ${
|
|
174
|
+
:host([stage='note']) { ${N(se)}: 0; }
|
|
175
|
+
:host([stage='wireframe']) { ${N(se)}: 1; }
|
|
176
|
+
:host([stage='component']) { ${N(se)}: 2; ${$i("ink-in",560,"cubic-bezier(0.22, 1, 0.36, 1)")} }
|
|
177
|
+
:host([stage='code']) { ${N(se)}: 3; ${$i("compile",720,"cubic-bezier(0.83, 0, 0.17, 1)")} }
|
|
178
|
+
:host([stage='live']) { ${N(se)}: 4; ${$i("ship",600,"cubic-bezier(0.34, 1.56, 0.64, 1)")} }
|
|
179
179
|
/* Travelling: it stays in view while its sections scroll past, in a column as tall as they are. */
|
|
180
180
|
:host([travel]) { position: sticky; inset-block-start: var(--impakt-journey-travel-top, 20vh); }
|
|
181
181
|
|
|
182
|
-
/* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi)
|
|
182
|
+
/* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi), as the Journey object
|
|
183
|
+
component (8:477) places it on its 560 by 360 frame: the shell 320 by 72 at 120, 144. */
|
|
183
184
|
.frame { position: relative; aspect-ratio: 14 / 9; }
|
|
184
185
|
/* Each plate is one stage's shape with that stage's words in it. Every one is drawn from the stage number, so
|
|
185
186
|
its opacity and its shape follow the stage wherever it is between two. Nothing here changes the layout. */
|
|
186
187
|
.plate { position: absolute; box-sizing: border-box; pointer-events: none; }
|
|
187
|
-
.bar { inset-inline-start:
|
|
188
|
-
|
|
189
|
-
.
|
|
190
|
-
.wire
|
|
188
|
+
.bar { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; }
|
|
189
|
+
/* The sticky note: 290 square, turned 4° (8:362). */
|
|
190
|
+
.note { inset-inline-start: 20.98cqi; inset-block-start: 7.11cqi; inline-size: 51.79cqi; block-size: 51.79cqi; background: var(--impakt-journey-accent); box-shadow: 0 3.2cqi 6.4cqi rgb(0 0 0 / 0.18); }
|
|
191
|
+
.wire { background: ${q.surfaceCard}; border: ${q.borderThin} dashed ${q.textMuted}; }
|
|
192
|
+
.wire > svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${q.rule}; }
|
|
191
193
|
.solid { background: var(--impakt-journey-accent); }
|
|
192
194
|
.shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }
|
|
193
195
|
/* The code window is the raised ink and its muted words, a pair the theme measures, so it stays a dark window on paper and on an ink band alike. */
|
|
194
|
-
|
|
196
|
+
/* The code window: 520 by 300 at 20, 40, with 6px corners (8:431). */
|
|
197
|
+
/*
|
|
198
|
+
* The code of 8:435: IBM Plex Mono 13px on 1.5, 44px from the window's top and 28px in, with the words on the sixth
|
|
199
|
+
* line, in the code, indented six places and followed by their arrow. Five lines go before them and the rest after;
|
|
200
|
+
* a shorter run sits up against the words, a longer one loses the lines furthest from them.
|
|
201
|
+
*/
|
|
202
|
+
.window { inset-inline: 3.57cqi; inset-block: 7.14cqi 3.57cqi; padding: 7.86cqi 5cqi 0; background: var(--impakt-color-surface-ink-raised, ${q.text}); border: ${q.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: 6px; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); line-height: 1.5; color: var(--impakt-color-text-inverse-muted, color-mix(in srgb, ${q.surfaceCard} 78%, ${q.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: 7.5em 1.5em minmax(0, 1fr); }
|
|
195
203
|
/* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */
|
|
196
204
|
.window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }
|
|
197
205
|
.window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }
|
|
198
|
-
|
|
206
|
+
/* 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, ${q.surfaceCard}); }
|
|
199
208
|
.window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }
|
|
200
209
|
|
|
201
210
|
/*
|
|
@@ -205,67 +214,79 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
205
214
|
* from a strip; and the live button's shadow and fill grow to full size, past it for a moment where ship's
|
|
206
215
|
* easing overshoots.
|
|
207
216
|
*/
|
|
208
|
-
.note { opacity: ${
|
|
209
|
-
.wire { opacity: ${
|
|
210
|
-
.solid { opacity: max(${
|
|
211
|
-
.window { opacity: ${
|
|
212
|
-
.shadow { opacity: ${
|
|
217
|
+
.note { opacity: ${N(me(0))}; transform: rotate(calc(4deg * ${N(me(0))})) scale(1, calc(0.45 + 0.55 * ${N(me(0))})); }
|
|
218
|
+
.wire { opacity: ${N(me(1))}; transform: rotate(calc(4deg * ${N(Ra)})) scale(calc(1 - 0.1 * ${N(Ra)}), calc(1 + 3 * ${N(Ra)})); }
|
|
219
|
+
.solid { opacity: max(${N(me(2))}, ${N(me(4))}); transform: scale(calc(0.92 + 0.08 * max(${N(me(2))}, min(1, ${N(gr)})) + 0.4 * ${N(br)})); }
|
|
220
|
+
.window { opacity: ${N(me(3))}; transform: scale(calc(0.94 + 0.06 * ${N(me(3))}), calc(0.5 + 0.5 * ${N(me(3))})); }
|
|
221
|
+
.shadow { opacity: ${N(me(4))}; transform: scale(calc(0.9 + 0.1 * min(1, ${N(gr)}) + 0.4 * ${N(br)})); }
|
|
213
222
|
|
|
214
223
|
/* The words as each stage draws them, inside that stage's plate, so they morph and fade with it. All decoration: the link below carries the name. */
|
|
215
|
-
.said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
224
|
+
.said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${hr(4)}; padding-inline: 5cqi; font-family: ${q.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${et("medium")}; line-height: 1.2; color: var(--impakt-journey-on-accent); }
|
|
216
225
|
.arrow { flex: none; }
|
|
217
226
|
/* At the note stage the words are handwritten, bold, with a line drawn under them. */
|
|
218
|
-
.note .said { flex-direction: column; align-items: flex-start; padding:
|
|
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: ${et("bold")}; line-height: 1.1; letter-spacing: -0.01em; }
|
|
219
228
|
.note .said .text::after { content: ''; display: block; block-size: 0.28em; margin-block-start: 0.12em; inline-size: 92%; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
|
|
220
229
|
.note .said .arrow { align-self: flex-end; }
|
|
221
|
-
.wire .said { justify-content: center; font-family: ${
|
|
222
|
-
.window .said { position: static; padding-inline:
|
|
230
|
+
.wire .said { justify-content: center; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${et("regular")}; color: ${q.textMuted}; }
|
|
231
|
+
.window .said { position: static; gap: 0; padding-inline: 6ch 0; justify-content: flex-start; font-family: ${q.fontMono}; font-size: inherit; font-weight: ${et("regular")}; line-height: inherit; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${q.surfaceCard})); }
|
|
223
232
|
.window .said .arrow { display: none; }
|
|
233
|
+
.window .said::after { content: ' →'; white-space: pre; }
|
|
224
234
|
|
|
225
235
|
/*
|
|
226
236
|
* The link. One element at every stage, sized to the shape the stage draws, so the keyboard, a pointer and a
|
|
227
237
|
* screen reader meet an ordinary link with the button's words. Its own words are not painted: the plates paint
|
|
228
238
|
* them, so they can morph. In forced colours the plates step aside and the link draws its words itself.
|
|
229
239
|
*/
|
|
230
|
-
.words { position: absolute; inset-inline-start:
|
|
231
|
-
:host([stage='note']) .words { inset-inline-start:
|
|
232
|
-
:host([stage='wireframe']) .words { justify-content: center; font-family: ${
|
|
233
|
-
:host([stage='code']) .words { min-block-size: 44px; inset-block-start: calc(
|
|
234
|
-
a.words:focus-visible { outline: none; box-shadow: ${
|
|
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: ${hr(4)}; padding-inline: 5cqi; font-family: ${q.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${et("medium")}; line-height: 1.2; color: transparent; text-decoration: none; }
|
|
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: ${et("bold")}; line-height: 1.1; transform: rotate(4deg); }
|
|
242
|
+
:host([stage='wireframe']) .words { justify-content: center; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${et("regular")}; }
|
|
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: ${q.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${et("regular")}; }
|
|
244
|
+
a.words:focus-visible { outline: none; box-shadow: ${q.focusShadow}; }
|
|
235
245
|
|
|
236
246
|
/* Live, it answers a pointer: the button lifts when pointed at and sits when pressed, and its fill deepens a little. */
|
|
237
|
-
|
|
238
|
-
|
|
247
|
+
/* 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)) ${bi.lead}; }
|
|
249
|
+
.solid .arrow { transition: translate ${bi.arrowDuration} ${bi.arrowEasing}; }
|
|
250
|
+
:host([stage='live']) .frame:has(a.words:is(:hover, :focus-visible)) .solid .arrow { translate: ${bi.arrowDistance} 0; }
|
|
251
|
+
:host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${q.text}); translate: 0 -2px; }
|
|
239
252
|
:host([stage='live']) .frame:has(a.words:active) .solid { translate: 0 1px; transition: background-color 140ms, translate var(--impakt-motion-journey-press-duration, 140ms) var(--impakt-motion-journey-press-easing, cubic-bezier(0.4, 0, 0.2, 1)); }
|
|
240
253
|
|
|
241
254
|
/* The design notes. Each shows at its own stages, follows the stage number with the shapes, and none is read. */
|
|
242
|
-
.ann { position: absolute; pointer-events: none; color: ${
|
|
243
|
-
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${
|
|
255
|
+
.ann { position: absolute; pointer-events: none; color: ${q.text}; }
|
|
256
|
+
.caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); letter-spacing: ${q.trackingWide}; text-transform: uppercase; color: ${q.textMuted}; white-space: nowrap; }
|
|
244
257
|
.caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; }
|
|
245
|
-
${
|
|
258
|
+
${N(Ft.map((e,i)=>`.caption span:nth-child(${i+1}) { opacity: ${me(i)}; }`).join(`
|
|
246
259
|
`))}
|
|
247
|
-
|
|
248
|
-
.
|
|
260
|
+
/* The handwritten margin note, which a brand may leave out: Impakt's design has dropped it (impkt-design-system#83). */
|
|
261
|
+
.margin { display: ${Ba("journey.margin-note","block")}; }
|
|
262
|
+
:host([margin-note-shown='yes']) .margin { display: block; }
|
|
263
|
+
: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: ${N(me(0))}; }
|
|
265
|
+
/* The measures, as the redlines (8:401) draw them: the width 26px over the shell, the height 10px beside it. */
|
|
266
|
+
.width { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 21.07cqi; block-size: 2.14cqi; border-inline: 1px solid currentColor; }
|
|
249
267
|
.width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }
|
|
250
|
-
.width b, .height b { position: absolute; font-family: ${
|
|
268
|
+
.width b, .height b { position: absolute; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); font-weight: ${et("regular")}; line-height: 1; background: var(--impakt-journey-mark-ground, ${q.surfaceCard}); padding-inline: 0.4em; }
|
|
251
269
|
.width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }
|
|
252
|
-
.height { inset-inline-start:
|
|
270
|
+
.height { inset-inline-start: 80.36cqi; inline-size: 2.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; border-block: 1px solid currentColor; }
|
|
253
271
|
.height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }
|
|
254
272
|
.height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }
|
|
255
|
-
.width, .height { opacity: max(${
|
|
256
|
-
|
|
257
|
-
.specs
|
|
258
|
-
.
|
|
259
|
-
|
|
273
|
+
.width, .height { opacity: max(${N(me(1))}, ${N(me(2))}); }
|
|
274
|
+
/* 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: ${N(me(2))}; }
|
|
276
|
+
.specs span { padding: 0.36em 0.73em; font-family: ${q.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); line-height: 1.4; letter-spacing: ${q.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${q.surfaceCard}; }
|
|
277
|
+
/* 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: ${N(me(4))}; }
|
|
279
|
+
.pointer { display: block; fill: ${q.text}; stroke: ${q.surfaceCard}; }
|
|
260
280
|
|
|
261
281
|
/* The gaps a scroll timeline drives, one keyframe set each. */
|
|
262
|
-
${
|
|
282
|
+
${N(Array.from({length:Na},(e,i)=>`@keyframes impakt-journey-g${i} { from { ${yi(i)}: 0; } to { ${yi(i)}: 1; } }`).join(`
|
|
263
283
|
`))}
|
|
264
284
|
|
|
265
285
|
/* Reduced motion: each stage cuts to its final state, and the live button changes colour only. */
|
|
266
286
|
@media (prefers-reduced-motion: reduce) {
|
|
267
287
|
:host { transition: none; }
|
|
268
288
|
.solid { transition: background-color 180ms; }
|
|
289
|
+
.solid .arrow { transition: none; }
|
|
269
290
|
:host([stage='live']) .frame:has(a.words:is(:hover, :active)) .solid { translate: none; }
|
|
270
291
|
}
|
|
271
292
|
@media (forced-colors: active) {
|
|
@@ -278,137 +299,165 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
278
299
|
:host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; forced-color-adjust: none; }
|
|
279
300
|
.ann { color: CanvasText; }
|
|
280
301
|
}
|
|
281
|
-
`]}connectedCallback(){super.connectedCallback(),
|
|
282
|
-
<span class="ann margin" part="margin-note">${this.marginNote||
|
|
302
|
+
`]}connectedCallback(){super.connectedCallback(),mr(),this.hasUpdated&&this.watch()}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}willUpdate(e){e.has("stage")&&!fi(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(se,String(this.progress)),this.style.setProperty("transition","none")):(this.style.removeProperty(se),this.style.removeProperty("transition")))}get frameEl(){return this.renderRoot.querySelector(".frame")}reduced(){return!!this.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches}unwatch(){this.observer?.disconnect(),this.observer=void 0,this.resizeObserver?.disconnect(),this.resizeObserver=void 0;let e=this.ownerDocument?.defaultView;e?.removeEventListener("scroll",this.onScroll),e?.removeEventListener("resize",this.onResize),this.frameRequest&&cancelAnimationFrame(this.frameRequest),this.frameRequest=0,this.removeAttribute("scrub");let i=this.frameEl;if(i)for(let a of[se,"animation-name","animation-duration","animation-timing-function","animation-fill-mode","animation-timeline","animation-range"])i.style.removeProperty(a)}watch(){if(this.unwatch(),this.sections=[],!this.track||!this.isConnected||typeof IntersectionObserver!="function")return;let e;try{e=Array.from(this.ownerDocument.querySelectorAll(this.track)).filter(i=>fi(i.getAttribute("data-journey-stage")))}catch{return}if(e.length){this.sections=e,this.reduced()?this.observer=new IntersectionObserver(()=>this.entered(),{threshold:0}):this.observer=new IntersectionObserver(i=>this.crossed(i),{rootMargin:"-50% 0px -50% 0px",threshold:0});for(let i of e)this.observer.observe(i);this.reduced()||this.startScrub()}}crossed(e){let a=e.find(r=>r.isIntersecting)?.target.getAttribute("data-journey-stage");fi(a)&&this.become(a)}entered(){let e=this.ownerDocument.defaultView;if(!e)return;let i=null;for(let a of this.sections)a.getBoundingClientRect().top<e.innerHeight&&(i=a.getAttribute("data-journey-stage"));fi(i)&&this.become(i)}become(e){e!==this.stage&&(this.stage=e,this.dispatchEvent(new CustomEvent("impakt-journey-stage",{detail:{stage:e},bubbles:!0,composed:!0})))}startScrub(){let e=this.ownerDocument.defaultView;if(!e)return;let a=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: scroll()")&&CSS.supports("animation-range: 0px 1px")&&mr()&&this.sections.length-1<=Na&&this.rootScrolls();if(e.addEventListener("resize",this.onResize,{passive:!0}),typeof ResizeObserver=="function"){this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.ownerDocument.documentElement);for(let r of this.sections)this.resizeObserver.observe(r)}this.easings=Ha.map(r=>cn(this.easingOf(r.name,r.easing))),a?(this.setAttribute("scrub","timeline"),this.timeline()):typeof e.requestAnimationFrame=="function"&&(this.setAttribute("scrub","frame"),e.addEventListener("scroll",this.onScroll,{passive:!0}),this.scrub())}rootScrolls(){let e=this.ownerDocument.defaultView;for(let i=this.sections[0]?.parentElement;i&&i!==this.ownerDocument.body&&i!==this.ownerDocument.documentElement;i=i.parentElement){let{overflowY:a}=e.getComputedStyle(i);if((a==="auto"||a==="scroll")&&i.scrollHeight>i.clientHeight)return!1}return!0}easingOf(e,i){let a=this.ownerDocument.defaultView?.getComputedStyle(this).getPropertyValue(`--impakt-motion-journey-${e}-easing`)??"",r=/cubic-bezier\(([^)]+)\)/.exec(a)?.[1]?.split(",").map(Number);return r?.length===4&&r.every(Number.isFinite)?r:i}gaps(){let e=this.ownerDocument.defaultView,i=e.innerHeight/2,a=this.sections.map(n=>n.getBoundingClientRect().top+e.scrollY),r=this.sections.map(n=>Ia(n.getAttribute("data-journey-stage")));return a.slice(1).map((n,s)=>({from:r[s],to:r[s+1],start:a[s]-i,end:n-i}))}timeline(){let e=this.frameEl;if(!e||!this.sections.length)return;let i=this.gaps().filter(s=>s.end>s.start),a=Ia(this.sections[0].getAttribute("data-journey-stage")),r=i.map((s,h)=>s.to===s.from?"":` + ${s.to-s.from} * var(${yi(h)})`).join("");e.style.setProperty(se,`calc(${a}${r})`);let n=s=>i.map(s).join(", ")||"none";e.style.setProperty("animation-name",i.length?n((s,h)=>`impakt-journey-g${h}`):"none"),e.style.setProperty("animation-duration",n(()=>"1ms")),e.style.setProperty("animation-timing-function",n(s=>{let h=ur(s.from,s.to);return`var(--impakt-motion-journey-${h.name}-easing, cubic-bezier(${h.easing.join(", ")}))`})),e.style.setProperty("animation-fill-mode",n(()=>"both")),e.style.setProperty("animation-timeline",n(()=>"scroll(root block)")),e.style.setProperty("animation-range",n(s=>`${Math.round(s.start)}px ${Math.round(s.end)}px`))}scrub(){let e=this.ownerDocument.defaultView,i=this.frameEl;if(!e||!i||!this.sections.length)return;let a=e.innerHeight/2,r=this.sections.map(qe=>qe.getBoundingClientRect().top),n=0;r.forEach((qe,Pt)=>{qe<=a&&(n=Pt)});let s=qe=>Ia(this.sections[qe].getAttribute("data-journey-stage")),h=n+1<this.sections.length?n+1:n,y=r[h]-r[n],f=h===n||y<=0?0:Math.min(1,Math.max(0,(a-r[n])/y)),[X,ie]=[s(n),s(h)],Oe=X===ie?0:this.easings[Ha.indexOf(ur(X,ie))](f),jt=X+Oe*(ie-X);i.style.setProperty(se,jt.toFixed(4))}lines(e,i){return e?.length?e.map(a=>Te`<span class=${a.trim().startsWith("//")?"comment":""}>${a}</span>`):Array.from({length:i},(a,r)=>Te`<span class="rule" style=${`inline-size:${[58,72,44][r%3]}%`}></span>`)}notes(){let e=this.captions?.length?this.captions:[tt("Note \u2014 Discover"),tt("Wireframe \u2014 Design low-fi"),tt("Component \u2014 Design hi-fi"),tt("Code \u2014 Build"),tt("Live \u2014 Launch")],i=this.specs?.length?this.specs:[tt("Fill \xB7 Accent/Signal"),tt("Radius \xB7 0"),tt("Type \xB7 Archivo 17")];return Te`<span class="ann caption" part="caption">${Ft.map((a,r)=>Te`<span>${String(r+1).padStart(2,"0")} · ${e[r]??""}</span>`)}</span>
|
|
303
|
+
<span class="ann margin" part="margin-note">${this.marginNote||tt("make it the biggest thing on the page")}</span>
|
|
283
304
|
<span class="ann width"><b>${this.markWidth}</b></span>
|
|
284
305
|
<span class="ann height"><b>${this.markHeight}</b></span>
|
|
285
|
-
<span class="ann specs" part="specs">${
|
|
286
|
-
<span class="ann cursor">${
|
|
306
|
+
<span class="ann specs" part="specs">${i.map(a=>Te`<span>${a}</span>`)}</span>
|
|
307
|
+
<span class="ann cursor">${ln}</span>`}render(){let e=Te`<span class="said"><span class="text">${this.label}</span>${on}</span>`,i=Te`<span class="text">${this.label}</span>`;return Te`<div class="frame" part="frame" aria-hidden=${this.decorative?"true":dr}>
|
|
287
308
|
<span class="plate note" aria-hidden="true">${e}</span>
|
|
288
309
|
<span class="plate bar wire" aria-hidden="true"><svg viewBox="0 0 100 100" preserveAspectRatio="none" fill="none" stroke="currentColor" focusable="false"><path d="M0 0 100 100M0 100 100 0" vector-effect="non-scaling-stroke" /></svg>${e}</span>
|
|
289
310
|
<span class="plate bar shadow" aria-hidden="true"></span>
|
|
290
311
|
<span class="plate bar solid" aria-hidden="true">${e}</span>
|
|
291
312
|
<span class="plate window" aria-hidden="true"><span class="before">${this.lines(this.code?.before,3)}</span>${e}<span class="after">${this.lines(this.code?.after,2)}</span></span>
|
|
292
|
-
${this.annotations?
|
|
293
|
-
${this.decorative||!this.href?
|
|
294
|
-
</div>`}};customElements.define("impakt-journey-button",
|
|
313
|
+
${this.annotations?Te`<span class="notes" aria-hidden="true">${this.notes()}</span>`:dr}
|
|
314
|
+
${this.decorative||!this.href?Te`<span class="words" part="button">${i}</span>`:Te`<a class="words" part="button" href=${this.href}>${i}</a>`}
|
|
315
|
+
</div>`}};customElements.define("impakt-journey-button",vi);import{css as xt,html as k,nothing as _}from"./atomic-ui.js";import{ImpaktElement as ke,focusRing as ja,fontSize as We,fontWeight as oe,lineHeight as qa,lockScroll as dn,space as M,spaceAround as Ai,t as l,token as At,unlockScroll as fr,R as j,revealAt as $t,revealStyles as Pa}from"./atomic-ui.js";var pn=k`<svg viewBox="0 0 22 22" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false">
|
|
295
316
|
<path d="M5 17 17 5M8 5h9v9" />
|
|
296
|
-
</svg>`,
|
|
297
|
-
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${
|
|
317
|
+
</svg>`,ki=class extends ke{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=[...ke.styles,ja,Ai,xt`
|
|
318
|
+
:host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${At("color.accent.default","#ffd43b")}; --impakt-work-on-accent: ${At("color.accent.on","#111111")}; }
|
|
298
319
|
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${l.borderThin} solid ${l.text}; }
|
|
299
320
|
.columns + ol { border-block-start: 0; }
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
li {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
321
|
+
/* 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: ${M(6)}; padding: 22px ${M(8)}; }
|
|
323
|
+
.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: ${l.borderThin} solid ${l.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
325
|
+
/* 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: ${l.text}; opacity: calc(1 - ${j.wipeFrom}); transform: scaleX(${j.wipeFrom}); transform-origin: left center; transition: transform ${j.wipeDuration} ${j.wipeEasing}, opacity ${j.wipeDuration} ${j.wipeEasing}; pointer-events: none; }
|
|
327
|
+
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 ${j.wipeDuration} ${j.wipeEasing}; }
|
|
329
|
+
.arrow svg { transition: translate ${j.arrowDuration} ${j.arrowEasing}; }
|
|
330
|
+
/* 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 * ${j.arrowDistance}) calc(-0.7071 * ${j.arrowDistance}); }
|
|
332
|
+
/* 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 ${j.drop} ${j.arrive} ${$t()} both, ik-reveal-settle ${j.drop} ${j.arrive} ${$t()} both; }
|
|
334
|
+
:host([data-motion]) .columns { animation: ik-reveal-type ${j.type} ${j.arrive} ${$t(0)} both; }
|
|
335
|
+
/* 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 ${M(3)}; border-block-end: ${l.borderThin} solid ${l.text}; font-family: ${l.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
337
|
+
.columns .last { grid-column: -3 / -1; text-align: end; }
|
|
338
|
+
.number { font-family: ${l.fontMono}; font-size: 0.8125rem; line-height: 1.5; font-variant-numeric: tabular-nums; color: ${l.textMuted}; }
|
|
339
|
+
/* Display Row: 72px on a 1080px list and 40px on a 350px phone list (8:329, 14:947). */
|
|
340
|
+
.name { font-family: ${l.fontHeading}; font-size: clamp(2rem, 1.541rem + 4.384cqi, 4.5rem); font-weight: ${oe("semibold")}; line-height: 1; letter-spacing: -0.05em; color: ${l.text}; overflow-wrap: anywhere; }
|
|
307
341
|
.texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }
|
|
308
342
|
.name a { color: inherit; text-decoration: none; }
|
|
309
343
|
/* The link is stretched over the row, so the row is one target. */
|
|
310
344
|
.name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
|
|
311
345
|
.name a:focus-visible { outline: none; }
|
|
312
346
|
.name a:focus-visible::after { box-shadow: ${l.focusShadow}; }
|
|
313
|
-
.text { margin: 0; font-size: ${
|
|
314
|
-
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${
|
|
315
|
-
.meta, .price { font-family: ${l.fontMono}; font-size: ${
|
|
347
|
+
.text { margin: 0; font-size: ${We("md")}; line-height: ${qa("normal")}; color: ${l.textMuted}; }
|
|
348
|
+
.side { display: flex; flex-direction: column; align-items: flex-end; gap: ${M(2)}; text-align: end; }
|
|
349
|
+
.meta, .price { font-family: ${l.fontMono}; font-size: ${We("sm")}; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
350
|
+
/* The meta in G2 Mono S: 11px medium capitals at 0.06em (8:331). */
|
|
351
|
+
.meta { font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
316
352
|
.price { font-size: 0.6875rem; }
|
|
317
353
|
/* Marketing badges are monospace capitals at 11px. A row that goes somewhere has a solid one; one that does not yet has an outline. */
|
|
318
|
-
.badge { display: inline-block; padding: ${
|
|
354
|
+
.badge { display: inline-block; padding: ${M(1)} ${M(2.5)}; font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: ${l.trackingWide}; text-transform: uppercase; white-space: nowrap; color: ${l.surfaceCard}; background: ${l.text}; border: ${l.borderThin} solid ${l.text}; border-radius: ${l.radiusSm}; }
|
|
319
355
|
li:not(:has(a)) .badge { color: ${l.text}; background: transparent; }
|
|
320
356
|
.arrow { display: flex; color: ${l.text}; }
|
|
321
357
|
/* 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. */
|
|
322
|
-
li
|
|
358
|
+
li.featured { background: ${l.text}; }
|
|
323
359
|
li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${l.surfaceCard}; }
|
|
324
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, ${l.surfaceCard} 78%, ${l.text}); }
|
|
325
361
|
li:has(a):hover .badge, li:has(a:focus-visible) .badge { color: ${l.text}; background: ${l.surfaceCard}; border-color: ${l.surfaceCard}; }
|
|
326
362
|
li:has(a):hover .arrow, li:has(a:focus-visible) .arrow, li.featured .arrow { color: var(--impakt-work-accent); }
|
|
327
363
|
li.featured .badge { color: var(--impakt-work-on-accent); background: var(--impakt-work-accent); border-color: var(--impakt-work-accent); }
|
|
328
364
|
/* The preview card follows the pointer. Only its transform changes, so it costs no layout. */
|
|
329
|
-
.preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${
|
|
365
|
+
.preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${M(2)}; background: ${l.surfaceCard}; border: ${l.borderThin} solid ${l.text}; box-shadow: 0 16px 32px rgb(0 0 0 / 0.2); pointer-events: none; transform: translate(var(--x), var(--y)) translate(-50%, -50%) rotate(-3deg); }
|
|
330
366
|
.preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
|
|
331
|
-
.preview span { display: block; padding-block-end: ${
|
|
367
|
+
.preview span { display: block; padding-block-end: ${M(2)}; font-family: ${l.fontMono}; font-size: 0.6875rem; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
368
|
+
/* On a phone (14:944): 18px above and below, 14px at the sides, the number, the name with its meta 8px under it, and an 18px arrow, 12px apart. */
|
|
332
369
|
@container impakt-work-list (max-width: 40rem) {
|
|
333
|
-
li, .texts li { grid-template-columns:
|
|
334
|
-
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${
|
|
335
|
-
.side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${
|
|
370
|
+
li, .texts li { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: ${M(3)}; padding: 18px 14px; }
|
|
371
|
+
.text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${M(2)}; }
|
|
372
|
+
.side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${M(2)}; }
|
|
336
373
|
li:not(:has(.text)) .side { grid-row: 2; }
|
|
337
374
|
.arrow { grid-column: 3; grid-row: 1; }
|
|
375
|
+
li:not(:has(.text)) :is(.number, .arrow) { grid-row: 1 / span 2; }
|
|
376
|
+
.arrow svg { inline-size: 18px; block-size: 18px; }
|
|
338
377
|
.columns { display: none; }
|
|
339
378
|
}
|
|
340
|
-
@media (prefers-reduced-motion: reduce) { li { transition: none; } .preview { display: none; } }
|
|
379
|
+
@media (prefers-reduced-motion: reduce) { li, li::before, li *, .arrow svg { transition: none; } .preview { display: none; } }
|
|
341
380
|
@media (forced-colors: active) {
|
|
381
|
+
li::before { display: none; }
|
|
342
382
|
li:has(a):hover, li:has(a:focus-visible), li.featured { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }
|
|
343
383
|
li:has(a):hover :is(.name, .number, .meta, .arrow, .text, .price), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow, .text, .price), li.featured :is(.name, .number, .meta, .arrow, .text, .price) { color: CanvasText; }
|
|
344
384
|
.badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }
|
|
345
385
|
}
|
|
346
|
-
|
|
347
|
-
<span>${
|
|
348
|
-
</div>`}render(){let
|
|
349
|
-
${
|
|
350
|
-
<span class="number" aria-hidden="true">${
|
|
386
|
+
`,Pa]}point(t,e){if(!e.preview||t.pointerType!=="mouse"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){this.preview&&(this.preview=null);return}let i=this.getBoundingClientRect();this.preview={src:e.preview,label:e.previewLabel??"",x:t.clientX-i.left,y:t.clientY-i.top}}columnRow(t){let e=this.columns??[];if(!e.length)return _;let[i,a,...r]=e;return k`<div class=${t?"columns texts":"columns"} part="columns" aria-hidden="true">
|
|
387
|
+
<span>${i??""}</span><span>${a??""}</span>${r.length?k`<span class="last">${r.join(" \xB7 ")}</span>`:_}
|
|
388
|
+
</div>`}render(){let t=this.items??[],e=t.some(a=>!!a.text),i=this.preview;return k`${this.columnRow(e)}<ol role="list" part="list" class=${e?"texts":""} aria-label=${this.label||_} @pointerleave=${()=>this.preview=null}>
|
|
389
|
+
${t.map((a,r)=>{let n=String(this.start+r).padStart(2,"0"),s=a.badge||a.price||a.meta;return k`<li part="row" class=${a.featured?"featured":""} style=${`--i:${r}`} @pointermove=${h=>this.point(h,a)}>
|
|
390
|
+
<span class="number" aria-hidden="true">${n}</span>
|
|
351
391
|
<div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
|
|
352
|
-
${a.href?
|
|
392
|
+
${a.href?k`<a href=${a.href} part="link">${a.name}</a>`:a.name}
|
|
353
393
|
</div>
|
|
354
|
-
${e?
|
|
355
|
-
${
|
|
356
|
-
${a.badge?
|
|
357
|
-
${a.price?
|
|
358
|
-
${a.meta?
|
|
359
|
-
</span>`:
|
|
360
|
-
${a.href?
|
|
394
|
+
${e?k`<p class="text" part="text">${a.text??""}</p>`:_}
|
|
395
|
+
${s?k`<span class="side">
|
|
396
|
+
${a.badge?k`<span class="badge" part="badge">${a.badge}</span>`:_}
|
|
397
|
+
${a.price?k`<span class="price" part="price">${a.price}</span>`:_}
|
|
398
|
+
${a.meta?k`<span class="meta" part="meta">${a.meta}</span>`:_}
|
|
399
|
+
</span>`:k`<span></span>`}
|
|
400
|
+
${a.href?k`<span class="arrow">${pn}</span>`:k`<span></span>`}
|
|
361
401
|
</li>`})}
|
|
362
|
-
</ol>${
|
|
363
|
-
${
|
|
364
|
-
</div>`:
|
|
402
|
+
</ol>${i?k`<div class="preview" part="preview" aria-hidden="true" style=${`--x:${i.x}px;--y:${i.y}px`}>
|
|
403
|
+
${i.label?k`<span>${i.label}</span>`:_}<img src=${i.src} alt="" />
|
|
404
|
+
</div>`:_}`}},wi=class extends ke{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=[...ke.styles,Ai,xt`
|
|
365
405
|
:host { display: block; container: impakt-stat-row / inline-size; }
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
.
|
|
406
|
+
/* 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: ${M(6)}; }
|
|
408
|
+
li { border-block-start: ${l.borderThin} solid ${l.rule}; padding-block-start: ${M(5)}; }
|
|
409
|
+
p { margin: 0; display: flex; flex-direction: column; gap: ${M(2)}; }
|
|
410
|
+
.value { font-family: ${l.fontHeading}; font-size: clamp(2.5rem, 6cqi, 3.25rem); font-weight: ${oe("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${l.textHeading}; font-variant-numeric: tabular-nums; }
|
|
411
|
+
/* 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: ${We("sm")}; line-height: 1.25rem; color: ${l.textMuted}; }
|
|
413
|
+
/* 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
|
+
@container impakt-stat-row (max-width: 40rem) {
|
|
415
|
+
ul { gap: ${M(4)} ${M(5)}; }
|
|
416
|
+
li { padding-block: 14px ${M(2)}; }
|
|
417
|
+
p { gap: 6px; }
|
|
418
|
+
}
|
|
371
419
|
/* The note is meta: monospace capitals at 11px. */
|
|
372
420
|
.note { font-family: ${l.fontMono}; font-size: 0.6875rem; letter-spacing: ${l.trackingWide}; text-transform: uppercase; color: ${l.textMuted}; }
|
|
373
|
-
|
|
374
|
-
${this.items.map(
|
|
375
|
-
<p><span class="value" part="value">${
|
|
421
|
+
`,Pa]}render(){return k`<ul role="list" part="list" aria-label=${this.label||_}>
|
|
422
|
+
${this.items.map((t,e)=>k`<li part="stat" style=${`--i:${e}`}>
|
|
423
|
+
<p><span class="value" part="value" data-ik-count>${t.figure}</span> <span class="label" part="label">${t.label}</span>${t.note?k` <span class="note">${t.note}</span>`:_}</p>
|
|
376
424
|
</li>`)}
|
|
377
|
-
</ul>`}},
|
|
425
|
+
</ul>`}},Si=class extends ke{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=[...ke.styles,Ai,xt`
|
|
378
426
|
:host { display: block; container: impakt-faq / inline-size; }
|
|
379
|
-
.head { display: flex; flex-direction: column; gap: ${
|
|
380
|
-
.eyebrow { margin: 0; font-family: ${l.fontEyebrow}; font-size: ${
|
|
381
|
-
.heading { font-family: ${l.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${
|
|
382
|
-
.lead { margin: 0; font-size: ${
|
|
427
|
+
.head { display: flex; flex-direction: column; gap: ${M(4)}; margin-block-end: ${M(10)}; max-inline-size: 44rem; }
|
|
428
|
+
.eyebrow { margin: 0; font-family: ${l.fontEyebrow}; font-size: ${We("sm")}; color: var(--impakt-eyebrow, ${l.textMuted}); }
|
|
429
|
+
.heading { font-family: ${l.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${oe("semibold")}; line-height: 1.04; letter-spacing: -0.04em; color: ${l.textHeading}; }
|
|
430
|
+
.lead { margin: 0; font-size: ${We("md")}; line-height: ${qa("normal")}; color: ${l.textMuted}; }
|
|
383
431
|
/* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */
|
|
384
432
|
impakt-accordion { border-block-start: ${l.borderThin} solid ${l.text}; }
|
|
385
433
|
impakt-accordion::part(item) { border-block-end: ${l.borderThin} solid ${l.text}; }
|
|
386
|
-
|
|
387
|
-
impakt-accordion::part(
|
|
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: ${M(5)}; font-family: ${l.fontHeading}; font-size: clamp(1.25rem, 3.2cqi, 1.5rem); font-weight: ${oe("semibold")}; line-height: 1.15; letter-spacing: -0.025em; }
|
|
436
|
+
impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${l.textMuted}; line-height: ${qa("normal")}; }
|
|
388
437
|
@media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }
|
|
389
|
-
`]}render(){let
|
|
390
|
-
${this.eyebrow?
|
|
391
|
-
${this.heading?
|
|
392
|
-
${this.lead?
|
|
393
|
-
</div>`:
|
|
394
|
-
${this.items.map(r=>
|
|
395
|
-
</impakt-accordion>`;return this.heading?
|
|
438
|
+
`]}render(){let t=this.id_("heading"),e=Math.min(Math.max(this.headingLevel,1),5),i=this.eyebrow||this.heading||this.lead?k`<div class="head" part="head">
|
|
439
|
+
${this.eyebrow?k`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:_}
|
|
440
|
+
${this.heading?k`<div id=${t} class="heading" part="heading" role="heading" aria-level=${e}>${this.heading}</div>`:_}
|
|
441
|
+
${this.lead?k`<p class="lead" part="lead">${this.lead}</p>`:_}
|
|
442
|
+
</div>`:_,a=k`<impakt-accordion part="questions" exportparts="item, head, header, panel" marker="plus" .items=${this.items} .headingLevel=${e+1} .open=${this.open} .multiple=${this.multiple}>
|
|
443
|
+
${this.items.map(r=>k`<slot name=${`panel-${r.id}`} slot=${`panel-${r.id}`}>${r.body}</slot>`)}
|
|
444
|
+
</impakt-accordion>`;return this.heading?k`<section aria-labelledby=${t}>${i}${a}</section>`:k`<div>${i}${a}</div>`}},zi=class extends ke{constructor(){super();this.hasFooter=!1;this.open=!1,this.links=[],this.current="",this.brand="",this.mark="",this.home="/",this.label="Menu",this.closeText="Close",this.currentText=""}static{this.properties={open:{type:Boolean,reflect:!0},links:{type:Array},current:{type:String},brand:{type:String},mark:{type:String},home:{type:String},label:{type:String},closeText:{type:String,attribute:"close-text"},currentText:{type:String,attribute:"current-text"}}}static{this.styles=[...ke.styles,ja,xt`
|
|
396
445
|
/* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
|
|
397
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}); }
|
|
398
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); }
|
|
399
448
|
dialog[open] { display: flex; }
|
|
400
449
|
dialog::backdrop { background: var(--impakt-menu); }
|
|
401
|
-
.bar { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
402
|
-
.brand { color: inherit; text-decoration: none; font-family: ${l.fontHeading}; font-size: ${
|
|
403
|
-
.brand.marked { display: inline-flex; align-items: center; gap: ${
|
|
404
|
-
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: var(--impakt-menu-on); color: var(--impakt-menu); font-size: ${
|
|
405
|
-
.close { display: inline-flex; align-items: center; gap: ${
|
|
406
|
-
nav { flex: 1; padding: ${
|
|
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; }
|
|
407
456
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
408
457
|
li { border-block-end: ${l.borderThin} solid var(--impakt-menu-rule); }
|
|
409
|
-
li a { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
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; }
|
|
410
459
|
li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
411
|
-
.number { font-family: ${l.fontMono}; font-size: ${
|
|
460
|
+
.number { font-family: ${l.fontMono}; font-size: ${We("sm")}; font-weight: ${oe("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
|
|
412
461
|
/*
|
|
413
462
|
* The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
|
|
414
463
|
* --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
|
|
@@ -416,14 +465,14 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
416
465
|
a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
417
466
|
a[aria-current] .number { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
418
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; }
|
|
419
|
-
.foot { display: flex; flex-direction: column; gap: ${
|
|
468
|
+
.foot { display: flex; flex-direction: column; gap: ${M(4)}; padding: ${M(8)} ${M(5)} calc(${M(8)} + env(safe-area-inset-bottom)); }
|
|
420
469
|
.foot[hidden] { display: none; }
|
|
421
470
|
/* What is slotted at the foot is read on ink too. */
|
|
422
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); }
|
|
423
472
|
@media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
|
|
424
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let
|
|
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()}>
|
|
425
474
|
<div class="bar" part="bar">
|
|
426
|
-
${this.brand?
|
|
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>`}
|
|
427
476
|
<button class="close" type="button" part="close" @click=${()=>this.close()}>
|
|
428
477
|
<span>${this.closeText}</span>
|
|
429
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>
|
|
@@ -431,117 +480,152 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
431
480
|
</div>
|
|
432
481
|
<nav aria-label=${this.label} part="nav">
|
|
433
482
|
<ol role="list">
|
|
434
|
-
${(this.links??[]).map((e,
|
|
435
|
-
<a href=${e.href} class=${
|
|
436
|
-
<span class="words">${e.label}</span><span class="number" aria-hidden="true">${
|
|
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>
|
|
437
486
|
</a>
|
|
438
487
|
</li>`})}
|
|
439
488
|
</ol>
|
|
440
489
|
</nav>
|
|
441
490
|
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
442
|
-
</dialog>`}},
|
|
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`
|
|
443
492
|
:host { display: block; container: impakt-offer / inline-size; }
|
|
444
|
-
|
|
493
|
+
/* 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: ${M(6)}; align-items: start; }
|
|
445
495
|
.copy { grid-area: copy; }
|
|
446
496
|
.actions { grid-area: actions; }
|
|
447
497
|
ol { grid-area: points; }
|
|
448
|
-
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${
|
|
449
|
-
|
|
450
|
-
.
|
|
451
|
-
.
|
|
498
|
+
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${M(6)}; }
|
|
499
|
+
/* 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: ${l.fontEyebrow}; font-size: 0.8125rem; line-height: 1.5; color: var(--impakt-eyebrow, ${l.textMuted}); }
|
|
501
|
+
.heading { max-inline-size: 8.125em; font-family: ${l.fontHeading}; font-size: clamp(2.25rem, 1.411rem + 3.836cqi, 4rem); font-weight: ${oe("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${l.textHeading}; }
|
|
502
|
+
.lead { margin: 0; max-inline-size: 30rem; font-size: ${We("md")}; line-height: 1.45; color: ${l.text}; }
|
|
452
503
|
ol { list-style: none; margin: 0; padding: 0; }
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
504
|
+
/* 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: ${M(5)}; padding-block: ${M(5)}; border-block-start: ${l.borderThin} solid ${l.text}; font-size: 1.25rem; font-weight: ${oe("medium")}; line-height: 1.2; letter-spacing: -0.01em; color: ${l.text}; }
|
|
506
|
+
.number { flex: none; font-family: ${l.fontMono}; font-size: 0.8125rem; font-weight: ${oe("regular")}; line-height: 1.5; letter-spacing: 0; }
|
|
507
|
+
/* On a phone (15:993): everything 20px apart; the points 14px above and below, the words 16px, 14px after the number. */
|
|
508
|
+
@container impakt-offer (max-width: 44rem) {
|
|
509
|
+
.offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${M(5)}; }
|
|
510
|
+
.copy { gap: ${M(5)}; }
|
|
511
|
+
.heading { line-height: 1.03; }
|
|
512
|
+
li { gap: 14px; padding-block: 14px; font-size: 1rem; }
|
|
513
|
+
}
|
|
514
|
+
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return k`<div class="offer" part="offer">
|
|
457
515
|
<div class="copy">
|
|
458
|
-
${this.eyebrow?
|
|
459
|
-
${this.heading?
|
|
460
|
-
${this.lead?
|
|
516
|
+
${this.eyebrow?k`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:_}
|
|
517
|
+
${this.heading?k`<div class="heading" part="heading" role="heading" aria-level=${t}>${this.heading}</div>`:_}
|
|
518
|
+
${this.lead?k`<p class="lead" part="lead">${this.lead}</p>`:_}
|
|
461
519
|
</div>
|
|
462
520
|
<div class="actions" part="actions"><slot name="actions"></slot></div>
|
|
463
|
-
${(this.points??[]).length?
|
|
464
|
-
${this.points.map((e,
|
|
465
|
-
</ol>`:
|
|
466
|
-
</div>`}},
|
|
521
|
+
${(this.points??[]).length?k`<ol role="list" part="points">
|
|
522
|
+
${this.points.map((e,i)=>k`<li><span class="number" aria-hidden="true">${String(i+1).padStart(2,"0")}</span><span>${e}</span></li>`)}
|
|
523
|
+
</ol>`:_}
|
|
524
|
+
</div>`}},Mi=class extends ke{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=[...ke.styles,ja,xt`
|
|
467
525
|
:host { display: block; block-size: 100%; }
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
526
|
+
/* 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: ${M(6)}; background: ${l.surfaceCard}; border: ${l.borderThin} solid ${l.text}; border-radius: ${l.radius}; transition: background-color 140ms ease-out; }
|
|
528
|
+
/* The meta and the link in G2 Mono S: 11px medium capitals at 0.06em. */
|
|
529
|
+
.meta { margin: 0; font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.textMuted}; }
|
|
530
|
+
.heading { font-family: ${l.fontHeading}; font-size: 1.5rem; font-weight: ${oe("semibold")}; line-height: 1.15; letter-spacing: -0.025em; color: ${l.text}; }
|
|
471
531
|
.heading a { color: inherit; text-decoration: none; }
|
|
472
532
|
.heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
473
533
|
.heading a:focus-visible { outline: none; }
|
|
474
534
|
.heading a:focus-visible::after { box-shadow: ${l.focusShadow}; }
|
|
475
535
|
article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
|
|
476
|
-
.text { margin: 0; font-size:
|
|
477
|
-
.more {
|
|
536
|
+
.text { margin: 0; font-size: 0.875rem; line-height: 1.4; color: ${l.textMuted}; }
|
|
537
|
+
.more { font-family: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.text}; }
|
|
538
|
+
/* The link's arrow slides forward when the card is pointed at or focused (impkt-web#51). */
|
|
539
|
+
.go { display: inline-block; transition: translate ${j.arrowDuration} ${j.arrowEasing}; }
|
|
540
|
+
article:has(a):hover .go, article:focus-within .go { translate: ${j.arrowDistance} 0; }
|
|
541
|
+
@media (prefers-reduced-motion: reduce) { .go { transition: none; } }
|
|
542
|
+
/* On a phone (15:1020): 20px inside and 12px apart. */
|
|
543
|
+
@media (max-width: 47.99rem) { article { gap: ${M(3)}; padding: ${M(5)}; } }
|
|
478
544
|
@media (forced-colors: active) { article { border-color: CanvasText; } }
|
|
479
|
-
`]}render(){let
|
|
480
|
-
${this.meta?
|
|
481
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
482
|
-
${this.text?
|
|
483
|
-
${this.linkText&&this.href?
|
|
484
|
-
</article>`}},
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
.
|
|
491
|
-
|
|
492
|
-
.
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
.
|
|
545
|
+
`]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return k`<article part="card">
|
|
546
|
+
${this.meta?k`<p class="meta" part="meta">${this.meta}</p>`:_}
|
|
547
|
+
<div class="heading" part="heading" role="heading" aria-level=${t}>${this.href?k`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}</div>
|
|
548
|
+
${this.text?k`<p class="text" part="text">${this.text}</p>`:_}
|
|
549
|
+
${this.linkText&&this.href?k`<span class="more" aria-hidden="true">${this.linkText} <span class="go">→</span></span>`:_}
|
|
550
|
+
</article>`}},Ci=class extends ke{static{this.properties={label:{type:String},cursor:{type:String},hideLabelOn:{type:String,reflect:!0,attribute:"hide-label-on"}}}constructor(){super(),this.label="",this.cursor=null,this.hideLabelOn=""}static{this.styles=[...ke.styles,xt`
|
|
551
|
+
/*
|
|
552
|
+
* The Selection (9:306): the accent behind the words with a 1.5px ink line, drawn 0.1em outside them at the sides
|
|
553
|
+
* (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
|
+
* heading. Its four 8px handles sit on its corners with the same line.
|
|
555
|
+
*/
|
|
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: ${At("color.accent.on","#1a1a1a")}; }
|
|
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: ${At("color.accent.default","#ffd43b")}; border: 1.5px solid ${At("color.accent.on","#1a1a1a")}; }
|
|
558
|
+
.handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${l.surfaceCard}; border: 1.5px solid ${At("color.accent.on","#1a1a1a")}; }
|
|
559
|
+
.handle.h1 { inset-block-start: calc(var(--top) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
560
|
+
.handle.h2 { inset-block-start: calc(var(--top) - 4px); inset-inline-end: calc(-1 * var(--x) - var(--trail) - 4px); }
|
|
561
|
+
.handle.h3 { inset-block-end: calc(var(--foot) - 4px); inset-inline-start: calc(-1 * var(--x) - 4px); }
|
|
562
|
+
.handle.h4 { inset-block-end: calc(var(--foot) - 4px); inset-inline-end: calc(-1 * var(--x) - var(--trail) - 4px); }
|
|
563
|
+
/*
|
|
564
|
+
* The label is meta: monospace capitals at 11px, square, 8px under the box and level with its edge (9:311). It is
|
|
565
|
+
* 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
|
+
*/
|
|
567
|
+
.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: ${l.fontMono}; font-size: 0.6875rem; font-weight: ${oe("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.surfaceCard}; background: ${l.text}; border-radius: ${l.radiusSm}; }
|
|
569
|
+
@media (max-width: 40rem) { :host([hide-label-on='phone']) .label-at { display: none; } }
|
|
570
|
+
/* 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
|
+
.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; }
|
|
496
572
|
.cursor svg { display: block; flex: none; color: ${l.text}; stroke: ${l.surfaceCard}; }
|
|
497
|
-
.tag { margin-block-start:
|
|
498
|
-
@media (forced-colors: active) { :host { forced-color-adjust: none;
|
|
499
|
-
|
|
573
|
+
.tag { margin-block-start: 18px; padding: 3px 6px; white-space: nowrap; font-family: ${l.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${l.surfaceCard}; background: ${l.text}; }
|
|
574
|
+
@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
|
+
/* 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: ${j.select}; }
|
|
577
|
+
:host([data-motion]) { animation: ik-highlight-words ${j.select} ${j.shape} ${$t(0)} both; }
|
|
578
|
+
:host([data-motion]) .box { animation: ik-highlight-draw ${j.select} ${j.shape} ${$t(0)} both; }
|
|
579
|
+
:host([data-motion]) :is(.label, .cursor) { animation: ik-reveal-fade ${j.mark} ${j.arrive} ${$t(0)} both; }
|
|
580
|
+
:host([data-motion]) .handle { animation: ik-reveal-mark ${j.mark} ${j.arrive} ${$t(0,"var(--impakt-motion-reveal-select-duration, 260ms)")} both; }
|
|
581
|
+
@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: ${l.text}; } }
|
|
583
|
+
`,Pa]}render(){return k`<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?k`<span class="label-at" aria-hidden="true"><span class="label" part="label" aria-hidden="true" data-ik-count="text">${this.label}</span></span>`:_}${this.cursor!=null?k`<span class="cursor" part="cursor" aria-hidden="true"
|
|
500
584
|
><svg viewBox="0 0 16 20" width="16" height="20" focusable="false"><path d="M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z" fill="currentColor" stroke-width="1.2" stroke-linejoin="round" /></svg
|
|
501
|
-
>${this.cursor?
|
|
502
|
-
>`:
|
|
503
|
-
.round { ${
|
|
585
|
+
>${this.cursor?k`<span class="tag">${this.cursor}</span>`:_}</span
|
|
586
|
+
>`:_}`}};customElements.define("impakt-work-list",ki);customElements.define("impakt-stat-row",wi);customElements.define("impakt-faq",Si);customElements.define("impakt-site-menu",zi);customElements.define("impakt-offer",Ti);customElements.define("impakt-post-card",Mi);customElements.define("impakt-highlight",Ci);import{css as _e,html as E,nothing as Q}from"./atomic-ui.js";import{say as Me,ImpaktElement as be,focusRing as ji,targetSize as Oa,visuallyHidden as hn,fontWeight as Ie,lineHeight as yr,space as u,spaceAround as dt,t as p,token as mn,type as V,iconSvg as yt}from"./atomic-ui.js";var un=mn("color.accent.default","#c8a15a"),$r=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,vr=_e`
|
|
587
|
+
.round { ${Oa} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.rule}; border-radius: 50%; box-shadow: ${p.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }
|
|
504
588
|
.round:hover:not(:disabled) { box-shadow: ${p.shadowMd}; }
|
|
505
589
|
.round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
|
|
506
|
-
`,
|
|
507
|
-
.eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${
|
|
590
|
+
`,Pi=_e`
|
|
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; }
|
|
508
592
|
.h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${Ie("bold")}; letter-spacing: ${p.trackingTight}; text-wrap: balance; }
|
|
509
593
|
.lead { margin: 0; color: ${p.textMuted}; text-wrap: pretty; }
|
|
510
|
-
`,
|
|
511
|
-
:host { display: block; container-type: inline-size; --most: 1; --gap: ${
|
|
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)}; }
|
|
512
596
|
:host([per-view='2']) { --most: 2; }
|
|
513
597
|
:host([per-view='3']) { --most: 3; }
|
|
514
|
-
.track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${
|
|
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}; }
|
|
515
599
|
.track::-webkit-scrollbar { display: none; }
|
|
516
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; }
|
|
517
601
|
/* Whole slides only: a slice of the next one reads as content spilling out of the page. */
|
|
518
602
|
@container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
|
|
519
|
-
@container (max-width: 40rem) { .track { --per: 1; --gap: ${
|
|
520
|
-
.controls { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
521
|
-
.dots { display: flex; flex-wrap: wrap; gap: ${
|
|
522
|
-
.dot { ${
|
|
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}; }
|
|
523
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; }
|
|
524
608
|
.dot[aria-current='true'] span { inline-size: 24px; background: ${p.brand}; }
|
|
525
|
-
.buttons { display: flex; gap: ${
|
|
609
|
+
.buttons { display: flex; gap: ${u(2)}; }
|
|
526
610
|
section { position: relative; }
|
|
527
|
-
@container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${
|
|
528
|
-
.sr-only { ${
|
|
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} }
|
|
529
613
|
@media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
|
|
530
|
-
`]}get track(){return this.renderRoot.querySelector(".track")}get slides(){return Array.from(this.children)}get last(){return Math.max(0,this.count-(this.visible??Number(this.perView||1)))}measure(){let e=this.track,
|
|
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}
|
|
531
615
|
@mouseenter=${()=>this.hold(!0)} @mouseleave=${()=>this.hold(!1)} @focusin=${()=>this.hold(!0)} @focusout=${()=>this.hold(!1)}>
|
|
532
616
|
<div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
|
|
533
617
|
<div class="controls" part="controls">
|
|
534
|
-
<div class="dots">${e.length>1?e.map(
|
|
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>
|
|
535
619
|
<div class="buttons">
|
|
536
|
-
${this.canPlay?
|
|
537
|
-
<button class="round" type="button" aria-label=${
|
|
538
|
-
<button class="round" type="button" aria-label=${
|
|
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>
|
|
539
623
|
</div>
|
|
540
624
|
</div>
|
|
541
|
-
<p class="sr-only" aria-live="polite">${
|
|
542
|
-
</section>`}};function
|
|
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`
|
|
543
627
|
:host { display: block; container-type: inline-size; }
|
|
544
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
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; }
|
|
545
629
|
:host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
|
|
546
630
|
li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
|
|
547
631
|
:host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
|
|
@@ -551,114 +635,125 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
551
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); } }
|
|
552
636
|
dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
|
|
553
637
|
dialog::backdrop { background: rgb(10 14 12 / 0.9); }
|
|
554
|
-
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${
|
|
555
|
-
.bar { display: flex; align-items: center; justify-content: space-between; ${
|
|
556
|
-
.middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${
|
|
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; }
|
|
557
641
|
.middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${p.radiusLg}; }
|
|
558
642
|
figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
|
|
559
|
-
.caption { margin: 0; text-align: center; ${
|
|
560
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}open(e,
|
|
561
|
-
<button class="open" type="button" aria-label=${
|
|
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>
|
|
562
646
|
</li>`})}</ul>
|
|
563
647
|
<dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
|
|
564
|
-
${
|
|
565
|
-
<div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${
|
|
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>
|
|
566
650
|
<div class="middle">
|
|
567
|
-
<button class="round" type="button" aria-label=${
|
|
568
|
-
<figure><img src=${
|
|
569
|
-
<button class="round" type="button" aria-label=${
|
|
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>
|
|
570
654
|
</div>
|
|
571
|
-
<p class="caption">${
|
|
572
|
-
</div>`:
|
|
573
|
-
</dialog>`}},
|
|
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`
|
|
574
658
|
:host { display: block; }
|
|
575
|
-
p { margin: 0 0 ${
|
|
576
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${
|
|
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)}; }
|
|
577
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; }
|
|
578
662
|
li:hover img { filter: none; opacity: 1; }
|
|
579
663
|
a { display: block; border-radius: ${p.radiusSm}; }
|
|
580
|
-
`]}render(){return
|
|
581
|
-
<ul part="list">${(this.items??[]).map(
|
|
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`
|
|
582
666
|
:host { display: block; container-type: inline-size; }
|
|
583
|
-
ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${
|
|
584
|
-
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${
|
|
585
|
-
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${p.brand}; color: ${p.onBrand}; ${
|
|
586
|
-
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${
|
|
587
|
-
.h { ${
|
|
588
|
-
.meta { margin: 0; ${
|
|
589
|
-
.body { margin: 0; color: ${p.textMuted}; line-height: ${
|
|
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: ${u(6)}; }
|
|
668
|
+
li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${u(2)}; }
|
|
669
|
+
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${p.brand}; color: ${p.onBrand}; ${V("sm")} font-weight: ${Ie("bold")}; position: relative; z-index: 1; margin-block-end: ${u(2)}; }
|
|
670
|
+
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${u(6)} + 8px); block-size: 2px; background: ${p.rule}; }
|
|
671
|
+
.h { ${V("lg")} letter-spacing: 0; }
|
|
672
|
+
.meta { margin: 0; ${V("sm")} color: ${p.textMuted}; font-family: ${p.fontMono}; letter-spacing: 0.02em; }
|
|
673
|
+
.body { margin: 0; color: ${p.textMuted}; line-height: ${yr("normal")}; text-wrap: pretty; }
|
|
590
674
|
:host([orientation='vertical']) ol { grid-auto-flow: row; }
|
|
591
675
|
:host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
592
676
|
:host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
593
|
-
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
677
|
+
:host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${u(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
594
678
|
@container (max-width: 40rem) {
|
|
595
679
|
ol { grid-auto-flow: row; }
|
|
596
680
|
li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
597
681
|
li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
598
|
-
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${
|
|
682
|
+
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${u(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
599
683
|
}
|
|
600
684
|
/* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */
|
|
601
|
-
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${
|
|
685
|
+
:host([look='ruled']) li { --rule: currentColor; padding-block-start: ${u(5)}; border-block-start: 1px solid var(--rule); }
|
|
602
686
|
:host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }
|
|
603
|
-
|
|
687
|
+
/* 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: ${u(4)}; }
|
|
689
|
+
:host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; font-weight: ${Ie("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
690
|
+
:host([look='ruled']:not([tones])) .h { font-size: 1.25rem; font-weight: ${Ie("medium")}; line-height: 1.2; letter-spacing: -0.01em; }
|
|
691
|
+
/* 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
|
+
:host([look='ruled']:not([tones])) .body { font-size: 0.875rem; line-height: 1.25rem; }
|
|
604
693
|
:host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' · '; }
|
|
605
|
-
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${
|
|
694
|
+
:host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${u(4)} - 1px); }
|
|
606
695
|
:host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }
|
|
607
696
|
:host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
|
|
608
|
-
:host([look='ruled']) ol { gap: ${
|
|
697
|
+
:host([look='ruled']) ol { gap: ${u(5)}; }
|
|
609
698
|
/* On a phone the ruled steps hang off a rail: a 1.5px line down the left and a hollow 10px ring at each step, the current one filled. */
|
|
610
699
|
@container (max-width: 40rem) {
|
|
611
700
|
:host([look='ruled']) ol { gap: 0; }
|
|
612
|
-
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${
|
|
701
|
+
:host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${u(6)}; min-block-size: 0; border-block-start: 0; }
|
|
613
702
|
:host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 4px; inline-size: 1.5px; block-size: auto; border-radius: 0; margin: 0; background: currentColor; }
|
|
614
|
-
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${
|
|
615
|
-
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${
|
|
616
|
-
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${
|
|
703
|
+
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${u(6)} + 2px); inset-inline-start: 0; inline-size: 10px; block-size: 10px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; background: ${p.surfaceCard}; }
|
|
704
|
+
:host([look='ruled']) li:first-child::before { inset-block-start: calc(${u(6)} + 7px); }
|
|
705
|
+
:host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${u(6)} + 7px); }
|
|
617
706
|
:host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }
|
|
707
|
+
/* 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
|
+
:host([look='ruled']:not([tones])) li, :host([look='ruled']:not([tones])) li[aria-current] { gap: 6px; padding: 0 0 28px 26px; }
|
|
709
|
+
:host([look='ruled']:not([tones])) li::before { inset-block: 14px 0; inset-inline-start: 4.25px; }
|
|
710
|
+
:host([look='ruled']:not([tones])) li::after { inset-block-start: 4px; border-width: 1.5px; }
|
|
711
|
+
:host([look='ruled']:not([tones])) li:first-child::before { inset-block-start: 14px; }
|
|
712
|
+
:host([look='ruled']:not([tones])) li:last-child::before { display: none; }
|
|
618
713
|
/* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */
|
|
619
714
|
:host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${p.text}; }
|
|
620
|
-
:host([look='ruled'][tones]) li::after { inset-block: ${
|
|
715
|
+
:host([look='ruled'][tones]) li::after { inset-block: ${u(3)}; inset-inline-start: 2px; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }
|
|
621
716
|
}
|
|
622
717
|
@media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } :host([look='ruled']) li[aria-current]::after { background: Highlight; } }
|
|
623
|
-
`]}render(){return
|
|
624
|
-
${
|
|
625
|
-
<div class="h" role="heading" aria-level=${this.headingLevel}>${
|
|
626
|
-
${
|
|
627
|
-
</li>`)}</ol>`}},
|
|
718
|
+
`]}render(){return E`<ol part="list">${(this.items??[]).map((t,e)=>E`<li part="step" aria-current=${e===this.current?"step":Q} style=${this.look==="ruled"?`--chart:var(--impakt-color-chart-${e%5+1}, var(--impakt-color-brand-default, #1f4ed8))`:Q}>
|
|
719
|
+
${t.meta?E`<p class="meta">${t.meta}</p>`:Q}
|
|
720
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>${t.heading}</div>
|
|
721
|
+
${t.text?E`<p class="body">${t.text}</p>`:Q}
|
|
722
|
+
</li>`)}</ol>`}},Ri=class extends be{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},points:{type:Array},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},imageSide:{type:String,reflect:!0,attribute:"image-side"},insetSrc:{type:String,attribute:"inset-src"},insetAlt:{type:String,attribute:"inset-alt"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.points=[],this.level=2,this.imageSrc="",this.imageAlt="",this.imageSide="end",this.insetSrc="",this.insetAlt="",this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...be.styles,dt,Pi,_e`
|
|
628
723
|
:host { display: block; container-type: inline-size; --ratio: 4 / 3; }
|
|
629
724
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
630
725
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
631
726
|
:host([ratio='16:9']) { --ratio: 16 / 9; }
|
|
632
|
-
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
727
|
+
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u(16)}; align-items: center; }
|
|
633
728
|
:host([image-side='start']) .picture { order: -1; }
|
|
634
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
635
|
-
.h { ${
|
|
636
|
-
.lead { ${
|
|
637
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${
|
|
638
|
-
li { display: flex; gap: ${
|
|
729
|
+
.words { display: flex; flex-direction: column; gap: ${u(4)}; }
|
|
730
|
+
.h { ${V("4xl")} }
|
|
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")}; }
|
|
639
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}; }
|
|
640
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
735
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${u(3)} ${u(4)}; align-items: center; margin-block-start: ${u(2)}; }
|
|
641
736
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${p.radius2xl}; box-shadow: ${p.shadowXl}; }
|
|
642
737
|
.picture { position: relative; }
|
|
643
738
|
.picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
|
|
644
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; }
|
|
645
740
|
@container (max-width: 48rem) {
|
|
646
|
-
.split { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
741
|
+
.split { grid-template-columns: minmax(0, 1fr); gap: ${u(8)}; }
|
|
647
742
|
:host([image-side='start']) .picture { order: 0; }
|
|
648
|
-
.h { ${
|
|
743
|
+
.h { ${V("3xl")} }
|
|
649
744
|
}
|
|
650
|
-
`]}render(){return
|
|
745
|
+
`]}render(){return E`<div class="split" part="split">
|
|
651
746
|
<div class="words">
|
|
652
|
-
${this.eyebrow?
|
|
747
|
+
${this.eyebrow?E`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:Q}
|
|
653
748
|
<div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
|
|
654
|
-
${this.lead?
|
|
655
|
-
${this.points?.length?
|
|
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}
|
|
656
751
|
<div class="actions"><slot name="actions"></slot></div>
|
|
657
752
|
</div>
|
|
658
|
-
${this.imageSrc?
|
|
659
|
-
</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`
|
|
660
755
|
:host { display: block; container-type: inline-size; }
|
|
661
|
-
.panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
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}; }
|
|
662
757
|
:host([tone='subtle']) .panel { background: ${p.surfaceSubtle}; box-shadow: none; }
|
|
663
758
|
:host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.shadowMd};
|
|
664
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. */
|
|
@@ -672,103 +767,103 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
672
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%); }
|
|
673
768
|
.panel.pictured .words, .panel.pictured .actions { z-index: 1; }
|
|
674
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%); } }
|
|
675
|
-
.words { position: relative; display: flex; flex-direction: column; gap: ${
|
|
676
|
-
.h { ${
|
|
677
|
-
.lead { ${
|
|
678
|
-
.actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${
|
|
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)}; }
|
|
679
774
|
:host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
|
|
680
775
|
:host([align='center']) .panel { flex-direction: column; text-align: center; }
|
|
681
776
|
:host([align='center']) .words { align-items: center; }
|
|
682
|
-
@container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${
|
|
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; } }
|
|
683
778
|
@media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
|
|
684
|
-
`]}render(){return
|
|
685
|
-
${this.imageSrc?
|
|
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}
|
|
686
781
|
<div class="words">
|
|
687
782
|
<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
|
|
688
|
-
${this.lead?
|
|
783
|
+
${this.lead?E`<p class="lead">${this.lead}</p>`:Q}
|
|
689
784
|
</div>
|
|
690
785
|
<div class="actions"><slot name="actions"></slot></div>
|
|
691
|
-
</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`
|
|
692
787
|
:host { display: block; container-type: inline-size; }
|
|
693
|
-
.top { display: flex; align-items: center; gap: ${
|
|
694
|
-
.stars { display: inline-flex; gap: 2px; color: ${
|
|
695
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
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)); }
|
|
696
791
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
697
|
-
li { display: flex; flex-direction: column; gap: ${
|
|
698
|
-
blockquote { margin: 0; flex: 1; ${
|
|
699
|
-
.who { display: flex; align-items: center; gap: ${
|
|
700
|
-
.face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${p.brandSubtle}; color: ${p.brand}; ${
|
|
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")}; }
|
|
701
796
|
.face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
702
|
-
.name { font-weight: ${Ie("semibold")}; ${
|
|
703
|
-
.about { color: ${p.textMuted}; ${
|
|
797
|
+
.name { font-weight: ${Ie("semibold")}; ${V("sm")} }
|
|
798
|
+
.about { color: ${p.textMuted}; ${V("sm")} }
|
|
704
799
|
@container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
705
|
-
`]}render(){return
|
|
706
|
-
<ul part="list">${(this.items??[]).map(
|
|
707
|
-
${
|
|
708
|
-
<blockquote>${
|
|
709
|
-
<div class="who"><span class="face" aria-hidden="true">${
|
|
710
|
-
</li>`)}</ul>`}},
|
|
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`
|
|
711
806
|
:host { display: block; container-type: inline-size; }
|
|
712
|
-
.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
713
|
-
.words { display: flex; flex-direction: column; gap: ${
|
|
714
|
-
.h { ${
|
|
715
|
-
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${
|
|
716
|
-
label { grid-column: 1 / -1; ${
|
|
717
|
-
input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${
|
|
718
|
-
button { ${
|
|
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; }
|
|
719
814
|
button:hover { background: ${p.brandHover}; }
|
|
720
|
-
.note { grid-column: 1 / -1; margin: ${
|
|
721
|
-
.done { margin: 0; ${
|
|
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")}; }
|
|
722
817
|
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
723
|
-
`]}submit(e){e.preventDefault();let
|
|
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">
|
|
724
819
|
<div class="words">
|
|
725
|
-
${this.heading?
|
|
726
|
-
${this.lead?
|
|
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}
|
|
727
822
|
</div>
|
|
728
|
-
<div aria-live="polite">${this.done?
|
|
823
|
+
<div aria-live="polite">${this.done?E`<p class="done">${this.doneText}</p>`:E`<form @submit=${this.submit}>
|
|
729
824
|
<label for=${e}>${this.label}</label>
|
|
730
825
|
<input id=${e} type="email" name="email" autocomplete="email" required />
|
|
731
826
|
<button type="submit">${this.buttonText}</button>
|
|
732
|
-
${this.smallPrint?
|
|
827
|
+
${this.smallPrint?E`<p class="note">${this.smallPrint}</p>`:Q}
|
|
733
828
|
</form>`}</div>
|
|
734
|
-
</div>`}};customElements.define("impakt-carousel",
|
|
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`
|
|
735
830
|
:host { display: block; container-type: inline-size; }
|
|
736
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${
|
|
831
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${x(6)}; align-items: start; }
|
|
737
832
|
.plan { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; background: ${c.surfaceSubtle}; box-shadow: ${c.shadowMd}; line-height: 0; }
|
|
738
833
|
.plan img { inline-size: 100%; block-size: auto; }
|
|
739
|
-
.pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${
|
|
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; }
|
|
740
835
|
.pin:hover { transform: scale(1.12); }
|
|
741
836
|
.pin.reserved { color: ${c.text}; background: ${c.warningSubtle}; border-color: ${c.warning}; border-style: dashed; }
|
|
742
837
|
.pin.sold { color: ${c.textMuted}; background: ${c.surfaceCard}; border-color: ${c.border}; border-radius: ${c.radius}; }
|
|
743
838
|
.pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${c.shadowLg}, 0 0 0 3px ${c.brand}; }
|
|
744
|
-
.panel { display: flex; flex-direction: column; gap: ${
|
|
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); }
|
|
745
840
|
.hint { margin: 0; color: ${c.textMuted}; }
|
|
746
|
-
.name { margin: 0; font-family: ${c.fontHeading}; ${
|
|
841
|
+
.name { margin: 0; font-family: ${c.fontHeading}; ${le("2xl")} font-weight: ${Se("bold")}; color: ${c.textHeading}; }
|
|
747
842
|
.sub { margin: 0; color: ${c.textMuted}; }
|
|
748
|
-
.price { margin: 0; ${
|
|
749
|
-
.status { align-self: flex-start; padding: ${
|
|
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)); }
|
|
750
845
|
.status.reserved { color: ${c.warningText}; background: ${c.warningSubtle}; }
|
|
751
846
|
.status.sold { color: ${c.text}; background: ${c.surfaceSubtle}; }
|
|
752
|
-
.go { ${
|
|
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}; }
|
|
753
848
|
.go:hover { background: ${c.brandHover}; }
|
|
754
|
-
.legend { display: flex; flex-wrap: wrap; gap: ${
|
|
755
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
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)}; }
|
|
756
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); }
|
|
757
852
|
.key.reserved { background: ${c.warningSubtle}; border: 2px dashed ${c.warning}; }
|
|
758
853
|
.key.sold { background: ${c.surfaceCard}; border: 2px solid ${c.border}; border-radius: 3px; }
|
|
759
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}); }
|
|
760
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); }
|
|
761
|
-
@container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${
|
|
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}; } }
|
|
762
857
|
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
|
|
763
|
-
`]}willUpdate(
|
|
764
|
-
<p class="name">${this.plotWord} ${
|
|
765
|
-
${
|
|
766
|
-
${
|
|
767
|
-
${
|
|
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">
|
|
768
863
|
<div>
|
|
769
864
|
<div class="plan" part="plan">
|
|
770
865
|
<img src=${this.imageSrc} alt=${this.imageAlt} />
|
|
771
|
-
${this.plots.map(
|
|
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>`})}
|
|
772
867
|
</div>
|
|
773
868
|
<ul class="legend">
|
|
774
869
|
<li><span class="key"></span>${this.availableText}</li>
|
|
@@ -777,153 +872,153 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
777
872
|
</ul>
|
|
778
873
|
</div>
|
|
779
874
|
<div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
|
|
780
|
-
</div>`}};function
|
|
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`
|
|
781
876
|
:host { display: block; container-type: inline-size; }
|
|
782
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); }
|
|
783
|
-
.inputs { display: flex; flex-direction: column; gap: ${
|
|
784
|
-
.h { margin: 0; font-family: ${c.fontHeading}; ${
|
|
785
|
-
label { display: flex; justify-content: space-between; gap: ${
|
|
786
|
-
.read { font-weight: ${
|
|
787
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
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}; }
|
|
788
883
|
input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${c.brand}; }
|
|
789
|
-
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
790
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${
|
|
791
|
-
.caption { margin: 0; ${
|
|
792
|
-
output { display: block; font-family: ${c.fontHeading}; ${
|
|
793
|
-
dl { display: grid; gap: ${
|
|
794
|
-
dl div { display: flex; justify-content: space-between; gap: ${
|
|
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)}; }
|
|
795
890
|
dt { opacity: 0.85; }
|
|
796
|
-
dd { margin: 0; font-weight: ${
|
|
891
|
+
dd { margin: 0; font-weight: ${Se("semibold")}; }
|
|
797
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). */
|
|
798
|
-
.small { grid-column: 1 / -1; margin: 0; padding: ${
|
|
799
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${
|
|
800
|
-
`]}money(
|
|
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">
|
|
801
896
|
<div class="inputs">
|
|
802
|
-
${this.heading?
|
|
803
|
-
<div><label for=${this.id_("price")}>${
|
|
804
|
-
<div><label for=${this.id_("deposit")}>${
|
|
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>
|
|
805
900
|
<div class="two">
|
|
806
|
-
<div><label for=${this.id_("years")}>${
|
|
807
|
-
<div><label for=${this.id_("rate")}>${
|
|
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>
|
|
808
903
|
</div>
|
|
809
904
|
</div>
|
|
810
905
|
<div class="result">
|
|
811
|
-
<p class="caption">${
|
|
812
|
-
<output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(
|
|
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>
|
|
813
908
|
<dl>
|
|
814
|
-
<div><dt>${
|
|
815
|
-
<div><dt>${
|
|
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>
|
|
816
911
|
</dl>
|
|
817
912
|
</div>
|
|
818
|
-
${this.smallPrint?
|
|
819
|
-
</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`
|
|
820
915
|
.frame { position: relative; overflow: hidden; border-radius: ${c.radius2xl}; box-shadow: ${c.shadowLg}; line-height: 0; --at: 50%; }
|
|
821
916
|
img { display: block; inline-size: 100%; block-size: auto; }
|
|
822
917
|
.after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
|
|
823
|
-
.tag { position: absolute; inset-block-start: ${
|
|
824
|
-
.tag.b { inset-inline-start: ${
|
|
825
|
-
.tag.a { inset-inline-end: ${
|
|
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)}; }
|
|
826
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; }
|
|
827
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}; }
|
|
828
923
|
input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
|
|
829
924
|
.frame:has(input:focus-visible) .grip { box-shadow: ${c.focusShadow}; }
|
|
830
|
-
`]}render(){return
|
|
925
|
+
`]}render(){return Y`<div class="frame" part="frame" style="--at:${this.position}%">
|
|
831
926
|
<img src=${this.beforeSrc} alt=${this.beforeAlt} />
|
|
832
927
|
<img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
|
|
833
928
|
<span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
|
|
834
929
|
<span class="tag a" aria-hidden="true">${this.afterLabel}</span>
|
|
835
|
-
<span class="line"><span class="grip">${
|
|
836
|
-
<input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${
|
|
837
|
-
</div>`}},
|
|
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`
|
|
838
933
|
:host { display: block; }
|
|
839
|
-
.bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
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; }
|
|
840
935
|
.bar.on { transform: none; visibility: visible; }
|
|
841
936
|
.spacer { block-size: 5rem; }
|
|
842
|
-
.h { font-family: ${c.fontHeading}; ${
|
|
843
|
-
.t { ${
|
|
937
|
+
.h { font-family: ${c.fontHeading}; ${le("md")} font-weight: ${Se("bold")}; color: ${c.textHeading}; }
|
|
938
|
+
.t { ${le("xs")} color: ${c.textMuted}; }
|
|
844
939
|
.words { min-inline-size: 0; }
|
|
845
|
-
.actions { display: flex; flex: none; gap: ${
|
|
940
|
+
.actions { display: flex; flex: none; gap: ${x(2)}; }
|
|
846
941
|
@media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
|
|
847
|
-
`]}clearance(e){let a=e&&getComputedStyle(this).display!=="none"?`${this.renderRoot.querySelector(".bar")?.getBoundingClientRect().height??80}px`:"",r=document.documentElement.style;r.scrollPaddingBlockEnd=a,a?r.setProperty("--impakt-bottom-bar",a):r.removeProperty("--impakt-bottom-bar")}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.check,{passive:!0}),this.check()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.check),this.clearance(!1)}render(){return
|
|
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>
|
|
848
943
|
<section class="bar ${this.shown?"on":""}" part="bar" aria-label=${this.label}>
|
|
849
944
|
<div class="words">
|
|
850
|
-
${this.heading?
|
|
851
|
-
${this.lead?
|
|
945
|
+
${this.heading?Y`<div class="h">${this.heading}</div>`:we}
|
|
946
|
+
${this.lead?Y`<div class="t">${this.lead}</div>`:we}
|
|
852
947
|
</div>
|
|
853
948
|
<div class="actions"><slot name="actions"></slot></div>
|
|
854
|
-
</section>`}},
|
|
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`
|
|
855
950
|
:host { display: block; container-type: inline-size; }
|
|
856
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); }
|
|
857
952
|
.wrap.solo { grid-template-columns: minmax(0, 1fr); }
|
|
858
953
|
.map { min-block-size: 16rem; background: ${c.surfaceSubtle}; }
|
|
859
954
|
.map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
860
|
-
.info { display: flex; flex-direction: column; gap: ${
|
|
861
|
-
.h { margin: 0; font-family: ${c.fontHeading}; ${
|
|
862
|
-
.row { display: flex; gap: ${
|
|
863
|
-
.row svg { flex: none; margin-block-start: ${
|
|
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}; }
|
|
864
959
|
.row a { display: inline-flex; align-items: center; min-block-size: ${c.targetMin}; margin-block-start: -2px; }
|
|
865
960
|
a { color: ${c.link}; }
|
|
866
|
-
ul { display: grid; gap: ${
|
|
867
|
-
li { display: flex; justify-content: space-between; gap: ${
|
|
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)}; }
|
|
868
963
|
li span:last-child { color: ${c.textMuted}; text-align: end; }
|
|
869
|
-
.go { ${
|
|
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}; }
|
|
870
965
|
.go:hover { background: ${c.brandHover}; }
|
|
871
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${
|
|
872
|
-
`]}render(){let
|
|
873
|
-
${this.mapSrc?
|
|
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}
|
|
874
969
|
<div class="info">
|
|
875
|
-
${this.heading?
|
|
876
|
-
${this.address?
|
|
877
|
-
${this.hours?
|
|
878
|
-
${this.phone?
|
|
879
|
-
${this.nearby.length?
|
|
880
|
-
${
|
|
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}
|
|
881
976
|
</div>
|
|
882
|
-
</div>`}};customElements.define("impakt-site-plan",
|
|
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`
|
|
883
978
|
.card { background: ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-shadow: ${d.shadowSm}, 0 0 0 1px ${d.hairline}; }
|
|
884
|
-
.h { margin: 0; font-family: ${d.fontHeading}; ${
|
|
885
|
-
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${
|
|
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; }
|
|
886
981
|
.btn:hover { background: ${d.brandHover}; }
|
|
887
982
|
.btn.quiet { color: ${d.link}; background: transparent; box-shadow: inset 0 0 0 ${d.borderThin} ${d.border}; }
|
|
888
|
-
.small { margin: 0; ${
|
|
889
|
-
.visually-hidden { ${
|
|
890
|
-
`,
|
|
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`
|
|
891
986
|
:host { display: block; container-type: inline-size; }
|
|
892
|
-
.h { margin-block-end: ${
|
|
893
|
-
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${
|
|
894
|
-
.plan { --plan-accent: ${
|
|
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; }
|
|
895
990
|
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
896
991
|
.plan.top { background: ${d.text}; color: ${d.surfaceCard}; --plan-muted: color-mix(in srgb, ${d.surfaceCard} 72%, ${d.text}); }
|
|
897
|
-
.badge { align-self: flex-start; padding: 2px ${
|
|
898
|
-
.name { margin: 0; ${
|
|
899
|
-
.price { margin: 0; font-family: ${d.fontHeading}; ${
|
|
992
|
+
.badge { align-self: flex-start; padding: 2px ${g(2)}; font-family: ${d.fontMono}; font-size: 0.6875rem; font-weight: ${fe("medium")}; line-height: 1.4; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
993
|
+
.name { margin: 0; ${ce("lg")} font-weight: ${fe("medium")}; color: inherit; }
|
|
994
|
+
.price { margin: 0; font-family: ${d.fontHeading}; ${ce("4xl")} font-weight: ${fe("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
900
995
|
/* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */
|
|
901
996
|
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
902
|
-
.period { margin-inline-start: ${
|
|
903
|
-
.note { margin: 0; ${
|
|
904
|
-
ul { flex: 1; margin: 0; padding: ${
|
|
905
|
-
li { display: flex; gap: ${
|
|
997
|
+
.period { margin-inline-start: ${g(1)}; font-family: ${d.fontMono}; font-size: 0.8125rem; font-weight: ${fe("regular")}; letter-spacing: 0; color: var(--plan-muted, ${d.textMuted}); }
|
|
998
|
+
.note { margin: 0; ${ce("sm")} color: var(--plan-muted, ${d.textMuted}); }
|
|
999
|
+
ul { flex: 1; margin: 0; padding: ${g(3)} 0 0; list-style: none; display: grid; gap: ${g(2)}; align-content: start; }
|
|
1000
|
+
li { display: flex; gap: ${g(2)}; ${ce("sm")} }
|
|
906
1001
|
li[data-has='false'] { color: var(--plan-muted, ${d.textMuted}); }
|
|
907
1002
|
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
908
1003
|
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
909
|
-
.plan .btn { justify-content: space-between; gap: ${
|
|
1004
|
+
.plan .btn { justify-content: space-between; gap: ${g(4)}; color: ${d.surfaceCard}; background: ${d.text}; border-radius: ${d.radiusSm}; box-shadow: none; }
|
|
910
1005
|
.plan .btn:hover { background: ${d.brandHover}; }
|
|
911
1006
|
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
912
1007
|
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${d.surfaceCard}); }
|
|
913
1008
|
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
914
|
-
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
915
|
-
`]}has(
|
|
916
|
-
${this.heading?
|
|
1009
|
+
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${g(6)}; } }
|
|
1010
|
+
`]}has(t,e){return t.includes.split(",").map(i=>i.trim().toLowerCase()).includes(e.label.trim().toLowerCase())}choose(t,e){this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plan:t},bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}render(){return S`
|
|
1011
|
+
${this.heading?S`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:U}
|
|
917
1012
|
<div class="grid" style=${`--cols: ${Math.max(1,this.plans.length)}`}>
|
|
918
|
-
${this.plans.map(
|
|
919
|
-
${
|
|
920
|
-
<h3 class="name" id=${this.id_(`n-${
|
|
921
|
-
<p class="price">${
|
|
922
|
-
${
|
|
923
|
-
<ul>${this.rows.map(e=>{let
|
|
924
|
-
${
|
|
1013
|
+
${this.plans.map(t=>S`<section class="card plan ${t.badge?"top":""}" aria-labelledby=${this.id_(`n-${t.id}`)}>
|
|
1014
|
+
${t.badge?S`<span class="badge">${t.badge}</span>`:U}
|
|
1015
|
+
<h3 class="name" id=${this.id_(`n-${t.id}`)}>${t.name}</h3>
|
|
1016
|
+
<p class="price">${t.price}${t.period?S` <span class="period">${t.period}</span>`:U}</p>
|
|
1017
|
+
${t.note?S`<p class="note">${t.note}</p>`:U}
|
|
1018
|
+
<ul>${this.rows.map(e=>{let i=this.has(t,e);return S`<li data-has=${String(i)}><span class="mark" aria-hidden="true">${i?"\u221A":"\u2013"}</span><span>${e.label}${i?S`<span class="visually-hidden">: ${F("included")}</span>`:S`<span class="not"> · ${F("not included")}</span>`}</span></li>`})}</ul>
|
|
1019
|
+
${t.href?S`<a class="btn" href=${t.href} @click=${e=>this.choose(t,e)}><span>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></span>${zr}</a>`:S`<button class="btn" type="button" @click=${e=>this.choose(t,e)}><span>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></span>${zr}</button>`}
|
|
925
1020
|
</section>`)}
|
|
926
|
-
</div>`}};function
|
|
1021
|
+
</div>`}};function Ar(o,t){let e=/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(o),i=t&&!/^en\b/i.test(t)?`&hl=${encodeURIComponent(t.split("-")[0])}&cc_lang_pref=${encodeURIComponent(t.split("-")[0])}`:"";if(e)return`https://www.youtube-nocookie.com/embed/${e[1]}?autoplay=1&rel=0${i}`;let a=/vimeo\.com\/(?:video\/)?(\d+)/.exec(o);return a?`https://player.vimeo.com/video/${a[1]}?autoplay=1&dnt=1`:null}var _t=class extends Re{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=[...Re.styles,Ut,Bt,Vt,Et`
|
|
927
1022
|
:host { display: block; }
|
|
928
1023
|
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${d.radiusXl}; background: #111; }
|
|
929
1024
|
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
@@ -933,196 +1028,200 @@ import"./atomic-ui.js";import{css as ot,html as j,nothing as ae}from"./atomic-ui
|
|
|
933
1028
|
.play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }
|
|
934
1029
|
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${d.brand}; box-shadow: ${d.shadowLg}; }
|
|
935
1030
|
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
936
|
-
.label { position: absolute; inset-inline: ${
|
|
937
|
-
.foot { margin: ${
|
|
1031
|
+
.label { position: absolute; inset-inline: ${g(5)}; inset-block-end: ${g(4)}; ${ce("lg")} font-weight: ${fe("semibold")}; text-align: start; }
|
|
1032
|
+
.foot { margin: ${g(2)} 0 0; ${ce("sm")} }
|
|
938
1033
|
.foot a { color: ${d.link}; }
|
|
939
1034
|
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
940
1035
|
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
941
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: ${d.borderThin} solid var(--stage-rule); }
|
|
942
|
-
.bar { display: flex; align-items: center; gap: ${
|
|
1037
|
+
.bar { display: flex; align-items: center; gap: ${g(1.5)}; padding: ${g(3)} ${g(4)}; border-block-end: ${d.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
943
1038
|
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
944
|
-
.bar .dot:first-child { background: ${
|
|
945
|
-
.bar .caption { margin-inline-start: ${
|
|
1039
|
+
.bar .dot:first-child { background: ${Lt("color.accent.default","#ffd43b")}; }
|
|
1040
|
+
.bar .caption { margin-inline-start: ${g(1.5)}; font-family: ${d.fontMono}; font-size: 0.6875rem; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
946
1041
|
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
947
1042
|
:host([look='window']) .play { background: none; color: inherit; }
|
|
948
1043
|
:host([look='window']) .disc { display: none; }
|
|
949
|
-
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${
|
|
950
|
-
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${
|
|
1044
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${g(3)}; max-inline-size: calc(100% - 2 * ${g(5)}); box-sizing: border-box; padding: ${g(3)} ${g(5)}; ${ce("md")} font-weight: ${fe("medium")}; color: ${Lt("color.accent.on","#111111")}; background: ${Lt("color.accent.default","#ffd43b")}; }
|
|
1045
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${Lt("color.accent.default","#ffd43b")} 88%, #ffffff); }
|
|
951
1046
|
:host([look='window']) .play:focus-visible { outline: none; }
|
|
952
1047
|
:host([look='window']) .play:focus-visible .label { box-shadow: ${d.focusShadow}; }
|
|
953
1048
|
.length { font-family: ${d.fontMono}; font-size: 0.6875rem; letter-spacing: ${d.trackingWide}; text-transform: uppercase; }
|
|
954
|
-
.transcript { margin-block-start: ${
|
|
955
|
-
.transcript summary { ${
|
|
1049
|
+
.transcript { margin-block-start: ${g(3)}; border-block: ${d.borderThin} solid ${d.text}; }
|
|
1050
|
+
.transcript summary { ${Cr} display: flex; align-items: center; gap: ${g(2)}; padding-block: ${g(3)}; cursor: pointer; font-weight: ${fe("medium")}; list-style: none; }
|
|
956
1051
|
.transcript summary::-webkit-details-marker { display: none; }
|
|
957
1052
|
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${d.fontMono}; }
|
|
958
1053
|
.transcript[open] summary::before { content: '−'; }
|
|
959
|
-
.transcript .words { padding-block-end: ${
|
|
1054
|
+
.transcript .words { padding-block-end: ${g(4)}; color: ${d.textMuted}; display: grid; gap: ${g(3)}; max-inline-size: 65ch; }
|
|
960
1055
|
.transcript p { margin: 0; }
|
|
961
1056
|
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
962
|
-
`]}render(){let
|
|
1057
|
+
`]}render(){let t=Ar(this.videoSrc,Mr(this)),e;this.videoSrc?t&&this.playing?e=S`<iframe src=${t} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`:t?e=S`${this.posterSrc?S`<img src=${this.posterSrc} alt="" />`:U}
|
|
963
1058
|
<button class="play" type="button" @click=${()=>{this.playing=!0}}>
|
|
964
1059
|
<span class="disc" aria-hidden="true"><svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></span>
|
|
965
|
-
<span class="label">${this.playText}${this.duration?
|
|
966
|
-
</button>`:e=
|
|
1060
|
+
<span class="label">${this.playText}${this.duration?S` <span class="length">${this.duration}</span>`:U}<span class="visually-hidden">: ${this.label}</span></span>
|
|
1061
|
+
</button>`:e=S`<video controls preload="metadata" poster=${this.posterSrc||U} aria-label=${this.label}>
|
|
967
1062
|
<source src=${this.videoSrc} />
|
|
968
|
-
${this.captionsSrc?
|
|
969
|
-
</video>`:e=
|
|
970
|
-
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?
|
|
971
|
-
${
|
|
972
|
-
</div>`:
|
|
973
|
-
${a.length?
|
|
974
|
-
${this.transcriptHref?
|
|
1063
|
+
${this.captionsSrc?S`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />`:U}
|
|
1064
|
+
</video>`:e=S`<div class="empty">${F("Add a video address")}</div>`;let i=S`<div class="frame" part="frame">${e}</div>`,a=(this.transcript??"").split(/\n\s*\n/).map(r=>r.trim()).filter(Boolean);return S`${this.look==="window"?S`<div class="window" part="window">
|
|
1065
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption?S`<span class="caption">${this.caption}</span>`:U}</div>
|
|
1066
|
+
${i}
|
|
1067
|
+
</div>`:i}
|
|
1068
|
+
${a.length?S`<details class="transcript" part="transcript"><summary>${this.transcriptText||F("Read the transcript")}</summary><div class="words">${a.map(r=>S`<p>${r}</p>`)}</div></details>`:U}
|
|
1069
|
+
${this.transcriptHref?S`<p class="foot"><a href=${this.transcriptHref}>${F("Read the transcript")}<span class="visually-hidden">${F(" of {video}",{video:this.label})}</span></a></p>`:U}`}},Tr={mortgage:{heading:"Your home may be repossessed",text:"Your home may be repossessed if you do not keep up repayments on your mortgage."},"secured-loan":{heading:"Think carefully before securing other debts against your home",text:"Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it."},investment:{heading:"Capital at risk",text:"The value of investments can go down as well as up, and you may get back less than you put in."},insurance:{heading:"Important information",text:"Read the policy documents to check the cover suits your needs. Limits and exclusions apply."},custom:{heading:"",text:""}},Yi=class extends Re{static{this.properties={kind:{type:String,reflect:!0},heading:{type:String},text:{type:String},firm:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.kind="mortgage",this.heading="",this.text="",this.firm="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Re.styles,Bt,Et`
|
|
975
1070
|
:host { display: block; }
|
|
976
|
-
.box { padding: ${
|
|
1071
|
+
.box { padding: ${g(5)}; border-inline-start: 6px solid ${d.warning}; border-radius: ${d.radiusLg}; background: ${d.warningSubtle}; }
|
|
977
1072
|
:host([kind='insurance']) .box { border-color: ${d.info}; background: ${d.infoSubtle}; }
|
|
978
|
-
strong { display: block; margin-block-end: ${
|
|
1073
|
+
strong { display: block; margin-block-end: ${g(1)}; ${ce("md")} color: ${d.text}; }
|
|
979
1074
|
p { margin: 0; color: ${d.text}; }
|
|
980
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). */
|
|
981
|
-
.firm { margin-block-start: ${
|
|
982
|
-
`]}render(){let
|
|
983
|
-
${e?
|
|
984
|
-
${
|
|
985
|
-
${this.firm?
|
|
986
|
-
</aside>`}},
|
|
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`
|
|
987
1082
|
:host { display: block; container-type: inline-size; }
|
|
988
1083
|
.wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
|
|
989
|
-
.inputs { display: flex; flex-direction: column; gap: ${
|
|
990
|
-
label, legend { display: block; ${
|
|
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; }
|
|
991
1086
|
fieldset { margin: 0; padding: 0; border: 0; }
|
|
992
|
-
.choices { display: flex; flex-wrap: wrap; gap: ${
|
|
993
|
-
.choices label { display: inline-flex; align-items: center; gap: ${
|
|
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; }
|
|
994
1089
|
.choices input { accent-color: ${d.brand}; }
|
|
995
|
-
input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
996
|
-
.result { display: flex; flex-direction: column; justify-content: center; gap: ${
|
|
997
|
-
.caption { margin: 0; ${
|
|
998
|
-
output { display: block; font-family: ${d.fontHeading}; ${
|
|
999
|
-
.line { margin: 0; ${
|
|
1000
|
-
.foot { grid-column: 1 / -1; padding: ${
|
|
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}; }
|
|
1001
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). */
|
|
1002
1097
|
.foot .small { color: ${d.text}; }
|
|
1003
|
-
@container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${
|
|
1004
|
-
`,
|
|
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">
|
|
1005
1100
|
<div class="inputs">
|
|
1006
|
-
${this.heading?
|
|
1007
|
-
<div><label for=${this.id_("price")}>${
|
|
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>
|
|
1008
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>
|
|
1009
|
-
<fieldset><legend>${
|
|
1010
|
-
${
|
|
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>`)}
|
|
1011
1106
|
</div></fieldset>
|
|
1012
1107
|
</div>
|
|
1013
1108
|
<div class="result" aria-live="polite">
|
|
1014
|
-
<p class="caption">${
|
|
1015
|
-
<output for=${this.id_("price")}>${
|
|
1016
|
-
<p class="line">${
|
|
1017
|
-
${this.buyer==="first-time"&&this.price>
|
|
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}
|
|
1018
1113
|
</div>
|
|
1019
|
-
${this.smallPrint?
|
|
1020
|
-
</div>`}},
|
|
1021
|
-
<input id=${this.id_(
|
|
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">
|
|
1022
1117
|
<div class="inputs">
|
|
1023
|
-
${this.heading?
|
|
1024
|
-
${e("income",
|
|
1025
|
-
${e("secondIncome",
|
|
1026
|
-
${e("deposit",
|
|
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)"))}
|
|
1027
1122
|
</div>
|
|
1028
1123
|
<div class="result" aria-live="polite">
|
|
1029
|
-
<p class="caption">${
|
|
1030
|
-
<output>${
|
|
1031
|
-
<p class="line">${
|
|
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>
|
|
1032
1127
|
</div>
|
|
1033
|
-
${this.smallPrint?
|
|
1034
|
-
</div>`}},
|
|
1035
|
-
Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",this.buttonText="Ask for a call back",this.doneText="Thanks. We\u2019ll call you at the time you chose.",this.headingLevel=2,this.sent=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...
|
|
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`
|
|
1036
1131
|
:host { display: block; container-type: inline-size; }
|
|
1037
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
1038
|
-
.phone { display: inline-block; margin: ${
|
|
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; }
|
|
1039
1134
|
.hours { margin: 0; white-space: pre-line; color: ${d.textMuted}; }
|
|
1040
|
-
.email { display: inline-flex; align-items: center; min-block-size: ${d.targetMin}; margin-block-start: ${
|
|
1041
|
-
form { display: grid; gap: ${
|
|
1042
|
-
.sub { margin: 0; ${
|
|
1043
|
-
label { display: block; ${
|
|
1044
|
-
input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${
|
|
1045
|
-
.done { margin: 0; padding: ${
|
|
1046
|
-
@container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${
|
|
1047
|
-
`]}submit(
|
|
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">
|
|
1048
1143
|
<div>
|
|
1049
|
-
${this.heading?
|
|
1050
|
-
${this.phone?
|
|
1051
|
-
${this.hours?
|
|
1052
|
-
${this.email?
|
|
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}
|
|
1053
1148
|
</div>
|
|
1054
|
-
${this.callbackHeading?this.sent?
|
|
1149
|
+
${this.callbackHeading?this.sent?S`<p class="done" role="status">${this.doneText}</p>`:S`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
|
|
1055
1150
|
<p class="sub" id=${this.id_("cb")}>${this.callbackHeading}</p>
|
|
1056
|
-
<div><label for=${this.id_("name")}>${
|
|
1057
|
-
<div><label for=${this.id_("tel")}>${
|
|
1058
|
-
<div><label for=${this.id_("when")}>${
|
|
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>
|
|
1059
1154
|
<button class="btn" type="submit">${this.buttonText}</button>
|
|
1060
|
-
</form>`:
|
|
1061
|
-
</div>`}};
|
|
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`
|
|
1062
1157
|
:host { display: block; container-type: inline-size; }
|
|
1063
1158
|
[hidden] { display: none !important; }
|
|
1064
|
-
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${
|
|
1065
|
-
.mono { font-family: ${
|
|
1066
|
-
.sr-only { ${
|
|
1159
|
+
.wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${w(10)}; align-items: start; }
|
|
1160
|
+
.mono { font-family: ${b.fontMono}; font-size: ${_a("xs")}; letter-spacing: 0.04em; text-transform: uppercase; color: ${b.textMuted}; margin: 0; }
|
|
1161
|
+
.sr-only { ${Hr} }
|
|
1067
1162
|
|
|
1068
|
-
.progress { display: grid; gap: ${
|
|
1163
|
+
.progress { display: grid; gap: ${w(2)}; margin-block-end: ${w(6)}; }
|
|
1069
1164
|
.bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }
|
|
1070
|
-
.bar i { display: block; block-size: 100%; background: ${
|
|
1165
|
+
.bar i { display: block; block-size: 100%; background: ${b.brand}; transition: inline-size 300ms ease; }
|
|
1071
1166
|
|
|
1072
1167
|
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
|
|
1073
|
-
legend { padding: 0; margin-block-end: ${
|
|
1074
|
-
.q { margin: 0; font-family: ${
|
|
1075
|
-
.hint { margin: 0 0 ${
|
|
1168
|
+
legend { padding: 0; margin-block-end: ${w(2)}; }
|
|
1169
|
+
.q { margin: 0; font-family: ${b.fontHeading}; font-weight: ${Ue("bold")}; ${kt("3xl")} letter-spacing: ${b.trackingTight}; color: ${b.textHeading}; outline: none; }
|
|
1170
|
+
.hint { margin: 0 0 ${w(6)}; color: ${b.textMuted}; }
|
|
1076
1171
|
|
|
1077
|
-
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1172
|
+
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${w(3)}; }
|
|
1078
1173
|
.choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1079
|
-
.choice { position: relative; display: grid; gap: ${
|
|
1080
|
-
.choice:hover { border-color: ${
|
|
1081
|
-
.choice input { ${
|
|
1082
|
-
.choice:has(input:checked) { border-color: ${
|
|
1083
|
-
.choice:has(input:focus-visible) { box-shadow: ${
|
|
1084
|
-
.many .choice { padding: ${
|
|
1085
|
-
.label { font-weight: ${
|
|
1086
|
-
.small { ${
|
|
1174
|
+
.choice { position: relative; display: grid; gap: ${w(1)}; align-content: start; padding: ${w(4)}; border: ${b.borderThin} solid ${b.border}; border-radius: ${b.radiusLg}; background: ${b.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
|
|
1175
|
+
.choice:hover { border-color: ${b.borderStrong}; }
|
|
1176
|
+
.choice input { ${Hr} }
|
|
1177
|
+
.choice:has(input:checked) { border-color: ${b.brand}; box-shadow: inset 0 0 0 1px ${b.brand}; background: ${b.brandSubtle}; }
|
|
1178
|
+
.choice:has(input:focus-visible) { box-shadow: ${b.focusShadow}; }
|
|
1179
|
+
.many .choice { padding: ${w(3)}; }
|
|
1180
|
+
.label { font-weight: ${Ue("semibold")}; }
|
|
1181
|
+
.small { ${kt("sm")} color: ${b.textMuted}; }
|
|
1087
1182
|
/* A tick for a picked feature, drawn in the corner. */
|
|
1088
|
-
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${
|
|
1183
|
+
.many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${w(2)}; inset-inline-end: ${w(3)}; color: ${b.brand}; font-weight: ${Ue("bold")}; }
|
|
1089
1184
|
|
|
1090
|
-
.scale { display: grid; gap: ${
|
|
1091
|
-
.scale input { inline-size: 100%; accent-color: ${
|
|
1092
|
-
.ticks { display: flex; justify-content: space-between; ${
|
|
1093
|
-
.ticks span[aria-current] { color: ${
|
|
1185
|
+
.scale { display: grid; gap: ${w(3)}; }
|
|
1186
|
+
.scale input { inline-size: 100%; accent-color: ${b.brand}; ${Wa} }
|
|
1187
|
+
.ticks { display: flex; justify-content: space-between; ${kt("sm")} color: ${b.textMuted}; }
|
|
1188
|
+
.ticks span[aria-current] { color: ${b.text}; font-weight: ${Ue("semibold")}; }
|
|
1094
1189
|
.now { margin: 0; }
|
|
1095
1190
|
|
|
1096
|
-
.nav { display: flex; gap: ${
|
|
1097
|
-
button, .send { ${
|
|
1098
|
-
.primary, .send { background: ${
|
|
1099
|
-
.primary:hover, .send:hover { background: ${
|
|
1100
|
-
|
|
1101
|
-
.
|
|
1191
|
+
.nav { display: flex; gap: ${w(3)}; margin-block-start: ${w(8)}; }
|
|
1192
|
+
button, .send { ${Wa} display: inline-flex; align-items: center; justify-content: center; gap: ${w(2)}; padding: ${w(2.5)} ${w(5)}; border-radius: ${b.radiusLg}; font: inherit; font-weight: ${Ue("semibold")}; cursor: pointer; text-decoration: none; border: ${b.borderThin} solid transparent; }
|
|
1193
|
+
.primary, .send { background: ${b.brand}; color: ${b.onBrand}; }
|
|
1194
|
+
.primary:hover, .send:hover { background: ${b.brandHover}; }
|
|
1195
|
+
/* 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 ${Da.arrowDuration} ${Da.arrowEasing}; }
|
|
1197
|
+
:is(a, button):is(:hover, :focus-visible) .go { translate: ${Da.arrowDistance} 0; }
|
|
1198
|
+
@media (prefers-reduced-motion: reduce) { .go { transition: none; } }
|
|
1199
|
+
.secondary { background: transparent; color: ${b.text}; border-color: ${b.borderStrong}; }
|
|
1200
|
+
.secondary:hover { background: ${b.surfaceSubtle}; }
|
|
1102
1201
|
|
|
1103
|
-
.panel { position: sticky; inset-block-start: ${
|
|
1202
|
+
.panel { position: sticky; inset-block-start: ${w(6)}; overflow: hidden; isolation: isolate; padding: ${w(8)}; border-radius: ${b.radiusXl}; background: ${b.surfaceCard}; box-shadow: ${b.shadowMd}; display: grid; gap: ${w(2)}; }
|
|
1104
1203
|
/* The glow behind the budget grows as the product does. */
|
|
1105
|
-
.glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${
|
|
1106
|
-
.range { margin: 0; font-family: ${
|
|
1107
|
-
.weeks { margin: 0; ${
|
|
1108
|
-
.tip { margin: ${
|
|
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, ${Br(Qi(1,0))} 45%, transparent), color-mix(in srgb, ${Br(Qi(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; }
|
|
1205
|
+
.range { margin: 0; font-family: ${b.fontHeading}; font-weight: ${Ue("bold")}; font-size: ${_a("5xl")}; line-height: 1; letter-spacing: ${b.trackingTight}; color: ${b.textHeading}; }
|
|
1206
|
+
.weeks { margin: 0; ${kt("lg")} }
|
|
1207
|
+
.tip { margin: ${w(4)} 0 0; padding-block-start: ${w(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${b.textMuted}; }
|
|
1109
1208
|
|
|
1110
|
-
.result { display: grid; gap: ${
|
|
1111
|
-
.summary { margin: 0; ${
|
|
1209
|
+
.result { display: grid; gap: ${w(6)}; }
|
|
1210
|
+
.summary { margin: 0; ${kt("xl")} text-wrap: pretty; }
|
|
1112
1211
|
.phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }
|
|
1113
1212
|
.phases i { display: block; }
|
|
1114
|
-
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${
|
|
1115
|
-
.legend li { display: inline-flex; align-items: center; gap: ${
|
|
1213
|
+
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${w(2)} ${w(5)}; }
|
|
1214
|
+
.legend li { display: inline-flex; align-items: center; gap: ${w(2)}; }
|
|
1116
1215
|
.legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }
|
|
1117
|
-
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1118
|
-
dt { margin: 0 0 ${
|
|
1119
|
-
dd { margin: 0; font-weight: ${
|
|
1120
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${
|
|
1121
|
-
.note { margin: 0; ${
|
|
1122
|
-
.status { margin: 0; ${
|
|
1216
|
+
dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${w(4)}; }
|
|
1217
|
+
dt { margin: 0 0 ${w(1)}; }
|
|
1218
|
+
dd { margin: 0; font-weight: ${Ue("semibold")}; }
|
|
1219
|
+
.actions { display: flex; flex-wrap: wrap; gap: ${w(3)}; }
|
|
1220
|
+
.note { margin: 0; ${kt("sm")} color: ${b.textMuted}; }
|
|
1221
|
+
.status { margin: 0; ${kt("sm")} }
|
|
1123
1222
|
|
|
1124
1223
|
@container (max-width: 48rem) {
|
|
1125
|
-
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${
|
|
1224
|
+
.wrap { grid-template-columns: minmax(0, 1fr); gap: ${w(8)}; }
|
|
1126
1225
|
/* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it
|
|
1127
1226
|
and it never widens the page (1.4.10). */
|
|
1128
1227
|
.panel { position: relative; inset-block-start: auto; }
|
|
@@ -1130,31 +1229,43 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1130
1229
|
}
|
|
1131
1230
|
@container (max-width: 30rem) {
|
|
1132
1231
|
.choices { grid-template-columns: minmax(0, 1fr); }
|
|
1133
|
-
.range { font-size: ${
|
|
1232
|
+
.range { font-size: ${_a("4xl")}; }
|
|
1134
1233
|
}
|
|
1135
|
-
/*
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
.all
|
|
1141
|
-
.all .
|
|
1142
|
-
|
|
1143
|
-
.all .
|
|
1144
|
-
.all .
|
|
1145
|
-
|
|
1146
|
-
.all .
|
|
1147
|
-
.all .
|
|
1148
|
-
.all .
|
|
1234
|
+
/*
|
|
1235
|
+
* layout="all": every question at once, and the result as an ink panel beside them, as the Estimator component
|
|
1236
|
+
* (10:544) draws them: the options 642px wide and the budget 430px, 10px apart. The options are 32px inside with
|
|
1237
|
+
* their parts 16px apart; the budget is 32px inside with its parts 14px apart, its lines 12px under their rules.
|
|
1238
|
+
*/
|
|
1239
|
+
.all { --accent: ${Nr("color.accent.default","#ffd43b")}; --on-accent: ${Nr("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: ${w(2.5)}; align-items: stretch; }
|
|
1240
|
+
.all .questions { grid-area: questions; display: grid; align-content: start; gap: ${w(4)}; padding: ${w(8)} ${w(8)} 0; background: ${b.surfaceCard}; border: ${b.borderThin} solid ${b.text}; border-block-end: 0; }
|
|
1241
|
+
.all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${w(2)}; }
|
|
1242
|
+
.all .questions impakt-chip-group::part(label) { margin-block-end: ${w(4)}; line-height: 1.4; }
|
|
1243
|
+
.all .foot { grid-area: note; padding: ${w(4)} ${w(8)} ${w(8)}; background: ${b.surfaceCard}; border: ${b.borderThin} solid ${b.text}; border-block-start: 0; }
|
|
1244
|
+
/* The note in G2 Body S, 14px at 1.4. */
|
|
1245
|
+
.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: ${w(8)}; background: ${b.text}; color: ${b.surfaceCard}; --muted: color-mix(in srgb, ${b.surfaceCard} 72%, ${b.text}); --line: color-mix(in srgb, ${b.surfaceCard} 18%, ${b.text}); }
|
|
1247
|
+
.all .ink .mono { color: var(--muted); font-size: 0.6875rem; font-weight: ${Ue("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
1248
|
+
/* 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: ${Ue("semibold")}; line-height: 1.04; letter-spacing: -0.04em; }
|
|
1250
|
+
.all .ink .weeks { font-size: 1rem; line-height: 1.45; }
|
|
1251
|
+
.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: ${w(4)}; padding-block-start: ${w(3)}; border-block-start: ${b.borderThin} solid var(--line); font-size: 0.875rem; line-height: 1.4; }
|
|
1253
|
+
.all .rows .length { font-family: ${b.fontMono}; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); white-space: nowrap; }
|
|
1254
|
+
.all .cta { ${Wa} display: flex; align-items: center; justify-content: space-between; gap: ${w(4)}; box-sizing: border-box; min-block-size: 47px; padding: 14px ${w(5)}; font-size: 1rem; line-height: 1.2; font-weight: ${Ue("medium")}; color: var(--on-accent); background: var(--accent); text-decoration: none; }
|
|
1149
1255
|
.all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }
|
|
1150
|
-
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${
|
|
1151
|
-
.all .way { margin: 0;
|
|
1256
|
+
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${b.text}, 0 0 0 4px ${b.surfaceCard}; }
|
|
1257
|
+
.all .way { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
|
|
1258
|
+
/* On a phone (15:943, 15:974): the options 20px inside with their parts 14px apart, the budget 24 by 20 inside with its parts 12px apart, its lines 11px under their rules, and the note under the budget's action. */
|
|
1152
1259
|
@container (max-width: 48rem) {
|
|
1153
|
-
.all { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'
|
|
1154
|
-
.all .questions { padding: ${
|
|
1155
|
-
.all .
|
|
1156
|
-
.all .
|
|
1260
|
+
.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: ${w(5)}; border-block-end: ${b.borderThin} solid ${b.text}; }
|
|
1262
|
+
.all .questions impakt-chip-group::part(label) { margin-block-start: 0; margin-block-end: 14px; }
|
|
1263
|
+
.all .foot { display: none; }
|
|
1264
|
+
.all .ink { padding: ${w(6)} ${w(5)}; }
|
|
1265
|
+
.all .rows li { padding-block-start: 11px; }
|
|
1157
1266
|
}
|
|
1267
|
+
.all .ink .note { display: none; color: var(--muted); }
|
|
1268
|
+
@container (max-width: 48rem) { .all .ink .note { display: block; } }
|
|
1158
1269
|
@media (forced-colors: active) {
|
|
1159
1270
|
.all .ink { border: 1px solid CanvasText; }
|
|
1160
1271
|
.all .cta { border: 1px solid ButtonText; }
|
|
@@ -1162,119 +1273,129 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1162
1273
|
.bar i, .phases i, .legend li::before { background: CanvasText !important; }
|
|
1163
1274
|
.glow { display: none; }
|
|
1164
1275
|
}
|
|
1165
|
-
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let
|
|
1276
|
+
`]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let i=(e.start??[]).filter(a=>e.choices.some(r=>r.id===a));return e.kind==="many"?[e.id,i]:[e.id,[i[0]??e.choices[0]?.id].filter(a=>!!a)]})),this.at=0,this.tip="",this.copied=""}willUpdate(e){(e.has("questions")||!this.started)&&(this.reset(),this.started=!0)}get rules(){return{low:this.low,high:this.high,minWeeks:this.minWeeks,teams:this.teams??[],ways:this.ways??[]}}money(e){try{return new Intl.NumberFormat(Rr(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(Rr(this),{type:"conjunction"}).format(e)}catch{return e.join(", ")}}weeksWord(e){return e===1?re("{n} week",{n:e}):re("{n} weeks",{n:e})}get most(){let e=this.questions??[],i=Object.fromEntries(e.map(a=>{if(a.kind==="many")return[a.id,a.choices.map(n=>n.id)];let r=[...a.choices].sort((n,s)=>(s.cost??0)*(s.costFactor??1)-(n.cost??0)*(n.costFactor??1))[0];return[a.id,r?[r.id]:[]]}));return Yt(e,i,this.rules).high||1}summaryOf(e){let i=this.questions??[],a=i.find(f=>f.kind==="one"),r=a?a.choices.find(f=>f.id===this.answers[a.id]?.[0]):void 0,n=i.filter(f=>f.kind==="many"&&f.inSummary!==!1).flatMap(f=>(this.answers[f.id]??[]).map(X=>{let ie=f.choices.find(Oe=>Oe.id===X);return ie?ie.phrase||ie.label:X})),s=r?r.phrase||r.label:"",h=s?n.length?re("You are building {thing} with {list}.",{thing:s,list:this.listOf(n)}):re("You are building {thing}.",{thing:s}):"",y=re("Expect {range} and about {weeks} to a first release.",{range:this.rangeOf(e),weeks:this.weeksWord(e.weeks)});return h?`${h} ${y}`:y}rangeOf(e){return re("{low} to {high}",{low:this.money(e.low),high:this.money(e.high)})}teamOf(e){return e===1?this.teamTextOne:this.teamText.replace("{n}",String(e))}pick(e,i,a){let r=this.answers[e.id]??[];this.answers={...this.answers,[e.id]:e.kind==="many"?a?[...r.filter(n=>n!==i.id),i.id]:r.filter(n=>n!==i.id):[i.id]},a&&i.tip&&(this.tip=i.tip),this.requestUpdate()}go(e){let i=(this.questions??[]).length;this.at=Math.max(0,Math.min(i,e)),this.copied="",this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot.querySelector(".current .q")?.focus({preventScroll:!0}))}result(){let e=Yt(this.questions??[],this.answers,this.rules);return{low:e.low*(this.unit||1),high:e.high*(this.unit||1),weeks:e.weeks,engineers:e.engineers,way:e.way,summary:this.textOf(e),answers:this.answers}}textOf(e){let i=[this.summaryOf(e),`${this.teamOf(e.engineers)}.`];e.way&&i.push(`${e.way}.`);let a=(this.questions??[]).filter(n=>n.short&&n.kind!=="many").map(n=>{let s=n.choices.find(h=>h.id===this.answers[n.id]?.[0]);return s?`${n.short}: ${s.label}.`:""}).filter(Boolean),r=(this.questions??[]).filter(n=>n.short&&n.kind==="many"&&n.inSummary===!1).map(n=>{let s=(this.answers[n.id]??[]).map(h=>n.choices.find(y=>y.id===h)?.label??h);return s.length?`${n.short}: ${this.listOf(s)}.`:""}).filter(Boolean);return[...i,...r,...a].join(" ")}send(e){let i=this.result();try{sessionStorage.setItem("impakt.estimate",i.summary)}catch{}this.dispatchEvent(new CustomEvent("impakt-estimate",{detail:i,bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}async copy(){let e=this.result().summary;try{await navigator.clipboard.writeText(e),this.copied=re("Summary copied.")}catch{this.copied=re("Copying is blocked here. Select the summary above instead.")}this.requestUpdate()}heading(e){let i=Math.min(Math.max(this.headingLevel||2,2),6);return D`<div class="q" role="heading" aria-level=${i} tabindex="-1">${e}</div>`}renderQuestion(e,i){let a=this.answers[e.id]??[],r=i===this.at;if(e.kind==="scale"){let s=Math.max(0,e.choices.findIndex(y=>y.id===a[0])),h=e.choices[s];return D`<fieldset class=${r?"current":""} ?hidden=${!r}>
|
|
1166
1277
|
<legend>${this.heading(e.heading)}</legend>
|
|
1167
|
-
${e.hint?
|
|
1278
|
+
${e.hint?D`<p class="hint">${e.hint}</p>`:$e}
|
|
1168
1279
|
<div class="scale">
|
|
1169
|
-
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(
|
|
1170
|
-
@input=${
|
|
1171
|
-
<div class="ticks" aria-hidden="true">${e.choices.map((
|
|
1172
|
-
${h?.hint?
|
|
1280
|
+
<input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(s)} aria-label=${e.heading} aria-valuetext=${h?.label??""}
|
|
1281
|
+
@input=${y=>{let f=e.choices[Number(y.target.value)];f&&this.pick(e,f,!0)}}>
|
|
1282
|
+
<div class="ticks" aria-hidden="true">${e.choices.map((y,f)=>D`<span aria-current=${f===s?"true":$e}>${y.label}</span>`)}</div>
|
|
1283
|
+
${h?.hint?D`<p class="now">${h.hint}</p>`:$e}
|
|
1173
1284
|
</div>
|
|
1174
|
-
</fieldset>`}let
|
|
1285
|
+
</fieldset>`}let n=e.kind==="many";return D`<fieldset class=${r?"current":""} ?hidden=${!r}>
|
|
1175
1286
|
<legend>${this.heading(e.heading)}</legend>
|
|
1176
|
-
${e.hint?
|
|
1177
|
-
<div class="choices ${
|
|
1178
|
-
${e.choices.map(
|
|
1179
|
-
<input type=${
|
|
1180
|
-
@change=${h=>this.pick(e,
|
|
1181
|
-
<span class="label">${
|
|
1182
|
-
${
|
|
1287
|
+
${e.hint?D`<p class="hint">${e.hint}</p>`:$e}
|
|
1288
|
+
<div class="choices ${n?"many":""}">
|
|
1289
|
+
${e.choices.map(s=>D`<label class="choice">
|
|
1290
|
+
<input type=${n?"checkbox":"radio"} name=${`${this.uid}-${e.id}`} value=${s.id} .checked=${a.includes(s.id)}
|
|
1291
|
+
@change=${h=>this.pick(e,s,h.target.checked)}>
|
|
1292
|
+
<span class="label">${s.label}</span>
|
|
1293
|
+
${s.hint?D`<span class="small">${s.hint}</span>`:$e}
|
|
1183
1294
|
</label>`)}
|
|
1184
1295
|
</div>
|
|
1185
|
-
</fieldset>`}renderResult(e){let
|
|
1296
|
+
</fieldset>`}renderResult(e){let i=Ga(this.phases??[],e.weeks),a=this.at===(this.questions??[]).length;return D`<div class="result ${a?"current":""}" ?hidden=${!a}>
|
|
1186
1297
|
${this.heading(this.resultHeading)}
|
|
1187
1298
|
<p class="summary">${this.summaryOf(e)}</p>
|
|
1188
|
-
${(this.phases??[]).length?
|
|
1189
|
-
<div class="phases" aria-hidden="true">${(this.phases??[]).map((r,
|
|
1190
|
-
<ul class="legend">${(this.phases??[]).map((r,
|
|
1299
|
+
${(this.phases??[]).length?D`
|
|
1300
|
+
<div class="phases" aria-hidden="true">${(this.phases??[]).map((r,n)=>D`<i style=${`flex-grow:${i[n]};background:${Qi(void 0,n)}`}></i>`)}</div>
|
|
1301
|
+
<ul class="legend">${(this.phases??[]).map((r,n)=>D`<li style=${`--c:${Qi(void 0,n)}`}>${r.label} <b>${this.weeksWord(i[n])}</b></li>`)}</ul>`:$e}
|
|
1191
1302
|
<dl>
|
|
1192
|
-
<div><dt class="mono">${
|
|
1193
|
-
${e.way?
|
|
1303
|
+
<div><dt class="mono">${re("Your team")}</dt><dd>${this.teamOf(e.engineers)}</dd></div>
|
|
1304
|
+
${e.way?D`<div><dt class="mono">${re("Way of working")}</dt><dd>${e.way}</dd></div>`:$e}
|
|
1194
1305
|
</dl>
|
|
1195
1306
|
<div class="actions">
|
|
1196
|
-
${this.contactHref?
|
|
1197
|
-
<button type="button" class="secondary" @click=${()=>this.copy()}>${
|
|
1198
|
-
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${
|
|
1307
|
+
${this.contactHref?D`<a class="send" href=${this.contactHref} @click=${r=>this.send(r)}>${this.sendLabel} <span class="go" aria-hidden="true">→</span></a>`:$e}
|
|
1308
|
+
<button type="button" class="secondary" @click=${()=>this.copy()}>${re("Copy summary")}</button>
|
|
1309
|
+
<button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${re("Start again")}</button>
|
|
1199
1310
|
</div>
|
|
1200
1311
|
<p class="status" role="status">${this.copied}</p>
|
|
1201
|
-
${this.note?
|
|
1202
|
-
</div>`}renderAll(e){let
|
|
1312
|
+
${this.note?D`<p class="note">${this.note}</p>`:$e}
|
|
1313
|
+
</div>`}renderAll(e){let i=this.questions??[],a=Ga(this.phases??[],e.weeks),r=D`<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 D`<div class="all">
|
|
1203
1314
|
<div class="questions" part="questions">
|
|
1204
|
-
${
|
|
1205
|
-
.options=${
|
|
1206
|
-
@impakt-change=${
|
|
1315
|
+
${i.map((n,s)=>{let h=this.answers[n.id]??[],y=n.kind==="many",f=n.choices.map(X=>({value:X.id,label:X.label}));return D`<impakt-chip-group look="site" part="question" .label=${`${String(s+1).padStart(2,"0")} \xB7 ${n.heading}`} .description=${n.hint??""}
|
|
1316
|
+
.options=${f} ?multiple=${y} .values=${y?h:[]} .value=${y?"":h[0]??""}
|
|
1317
|
+
@impakt-change=${X=>this.chipsChanged(n,X)}></impakt-chip-group>`})}
|
|
1207
1318
|
</div>
|
|
1208
1319
|
<aside class="ink" part="panel">
|
|
1209
1320
|
<p class="mono">${this.budgetLabel}</p>
|
|
1210
1321
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(e)}</p>
|
|
1211
|
-
<p class="weeks">${
|
|
1212
|
-
${(this.phases??[]).length?
|
|
1213
|
-
${this.contactHref?
|
|
1214
|
-
${e.way?
|
|
1322
|
+
<p class="weeks">${re("About {weeks} to a first release",{weeks:this.weeksWord(e.weeks)})}</p>
|
|
1323
|
+
${(this.phases??[]).length?D`<ul class="rows" role="list">${(this.phases??[]).map((n,s)=>D`<li><span>${n.label}</span><span class="length">${this.weeksWord(a[s])}</span></li>`)}</ul>`:$e}
|
|
1324
|
+
${this.contactHref?D`<a class="cta" href=${this.contactHref} part="send" @click=${n=>this.send(n)}><span>${this.sendLabel}</span>${r}</a>`:$e}
|
|
1325
|
+
${e.way?D`<p class="way">${this.wayLabel||re("Way of working")}: ${e.way}</p>`:$e}
|
|
1326
|
+
${this.note?D`<p class="note">${this.note}</p>`:$e}
|
|
1215
1327
|
</aside>
|
|
1216
|
-
${this.note?
|
|
1217
|
-
</div>`}chipsChanged(e,
|
|
1328
|
+
${this.note?D`<div class="foot"><p class="note">${this.note}</p></div>`:$e}
|
|
1329
|
+
</div>`}chipsChanged(e,i){let a=i.target,r=e.kind==="many"?[...a.values??[]]:[i.detail?.value].filter(h=>!!h);this.answers={...this.answers,[e.id]:r};let n=r.at(-1),s=e.choices.find(h=>h.id===n)?.tip;s&&(this.tip=s),this.requestUpdate()}render(){let e=this.questions??[];if(this.layout==="all")return this.renderAll(Yt(e,this.answers,this.rules));let i=e.length,a=Yt(e,this.answers,this.rules),r=this.at>=i,n=(.6+Math.min(1,a.high/this.most)*1.1).toFixed(2);return D`<div class="wrap">
|
|
1218
1330
|
<div>
|
|
1219
1331
|
<div class="progress">
|
|
1220
|
-
<p class="mono">${r?this.resultHeading:
|
|
1221
|
-
<div class="bar" aria-hidden="true"><i style=${`inline-size:${
|
|
1332
|
+
<p class="mono">${r?this.resultHeading:re("Step {step} of {steps}",{step:this.at+1,steps:i})}</p>
|
|
1333
|
+
<div class="bar" aria-hidden="true"><i style=${`inline-size:${i?r?100:(this.at+1)/(i+1)*100:0}%`}></i></div>
|
|
1222
1334
|
</div>
|
|
1223
|
-
${e.map((
|
|
1335
|
+
${e.map((s,h)=>this.renderQuestion(s,h))}
|
|
1224
1336
|
${this.renderResult(a)}
|
|
1225
|
-
${r
|
|
1226
|
-
${this.at>0?
|
|
1227
|
-
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===
|
|
1337
|
+
${r?$e:D`<div class="nav">
|
|
1338
|
+
${this.at>0?D`<button type="button" class="secondary" @click=${()=>this.go(this.at-1)}>${re("Back")}</button>`:$e}
|
|
1339
|
+
<button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===i-1?re("See my estimate"):re("Next")} <span class="go" aria-hidden="true">→</span></button>
|
|
1228
1340
|
</div>`}
|
|
1229
1341
|
</div>
|
|
1230
|
-
<aside class="panel" part="panel" style=${`--s:${
|
|
1342
|
+
<aside class="panel" part="panel" style=${`--s:${n}`}>
|
|
1231
1343
|
<div class="glow" aria-hidden="true"></div>
|
|
1232
1344
|
<p class="mono">${this.budgetLabel}</p>
|
|
1233
1345
|
<p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(a)}</p>
|
|
1234
|
-
<p class="weeks">${
|
|
1346
|
+
<p class="weeks">${re("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
|
|
1235
1347
|
<p class="tip" aria-live="polite">${this.tip||this.intro}</p>
|
|
1236
1348
|
</aside>
|
|
1237
|
-
</div>`}};customElements.define("impakt-estimator",
|
|
1349
|
+
</div>`}};customElements.define("impakt-estimator",Zi);import{css as Ya,html as I,nothing as W}from"./atomic-ui.js";import{ImpaktElement as Rt,R as Ua,focusRing as Xa,hideOn as kn,fontSize as Ye,fontWeight as de,linkCurrent as wn,say as Sn,space as B,t as L,token as Qt,type as Kt,toneOf as Va}from"./atomic-ui.js";import{css as vn,unsafeCSS as Xt}from"./atomic-ui.js";import{token as mt}from"./atomic-ui.js";var ue=mt("color.ink","#111111"),Ve=mt("color.paper","#EFEFED"),jr=mt("color.ink-raised","#1C1C1C"),it=mt("color.ink-line","#2E2E2E"),at=mt("color.ink-muted","#A8A8A6"),xe=mt("color.accent.default","#FFD43B"),ye=mt("color.accent.on","#111111"),wt=mt("color.accent.on-ink","#FFD43B"),It=Xt("var(--impakt-band, var(--impakt-color-ink, #111111))"),He=Xt("var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))"),rt=Xt("var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))"),Jt=Xt("var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),nt=Xt("var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))"),Z=vn`
|
|
1350
|
+
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1351
|
+
font-size: 0.6875rem;
|
|
1352
|
+
font-weight: 400;
|
|
1353
|
+
line-height: 1.4;
|
|
1354
|
+
letter-spacing: 0.06em;
|
|
1355
|
+
text-transform: uppercase;
|
|
1356
|
+
`,st=(o,t=3)=>Math.min(Math.max(Number(o)||t,1),6),Pr=o=>String(o).padStart(2,"0");var ut=Qt("color.ink-on","#FFFFFF"),zn=[0,1,2,3,4],je=L.fontMono,ea=class extends Rt{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=[...Rt.styles,Xa,Ya`
|
|
1238
1357
|
:host { display: block; container-type: inline-size; }
|
|
1239
1358
|
/* With a mark, the name is set small beside it, as in the canvas header. */
|
|
1240
|
-
.brand.marked { gap: ${
|
|
1241
|
-
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${
|
|
1242
|
-
.context { font-size: ${
|
|
1243
|
-
.context .slash { margin-inline-end: ${
|
|
1359
|
+
.brand.marked { gap: ${B(3)}; font-size: ${Ye("md")}; letter-spacing: -0.01em; }
|
|
1360
|
+
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${L.text}; color: ${L.surfaceCard}; font-size: ${Ye("sm")}; font-weight: ${de("medium")}; }
|
|
1361
|
+
.context { font-size: ${Ye("sm")}; white-space: nowrap; }
|
|
1362
|
+
.context .slash { margin-inline-end: ${B(2)}; opacity: 0.72; }
|
|
1244
1363
|
.presence { display: flex; }
|
|
1245
|
-
.presence .avatar { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; box-sizing: border-box; margin-inline-start: -6px; border-radius: 50%; border: ${
|
|
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: ${L.borderThin} solid ${L.text}; background: ${L.surfaceCard}; color: ${L.text}; font-family: ${je}; font-size: 0.625rem; line-height: 1; }
|
|
1246
1365
|
.presence .avatar:first-child { margin-inline-start: 0; }
|
|
1247
|
-
.presence .avatar.accent { background: ${
|
|
1248
|
-
.
|
|
1249
|
-
|
|
1366
|
+
.presence .avatar.accent { background: ${Qt("color.accent.default","#ffd43b")}; color: ${Qt("color.accent.on","#111111")}; }
|
|
1367
|
+
.presence .avatar.ink { background: ${L.text}; color: ${L.surfaceCard}; }
|
|
1368
|
+
@media (forced-colors: active) { .presence .avatar.ink { forced-color-adjust: none; background: CanvasText; color: Canvas; } }
|
|
1369
|
+
.bar { display: flex; align-items: center; gap: ${B(6)}; }
|
|
1370
|
+
.start { display: flex; align-items: center; gap: ${B(3)}; flex: none; }
|
|
1250
1371
|
.middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
|
|
1251
1372
|
.middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }
|
|
1252
1373
|
slot { display: contents; }
|
|
1253
|
-
.brand { display: inline-flex; align-items: center; min-block-size: ${
|
|
1374
|
+
.brand { display: inline-flex; align-items: center; min-block-size: ${L.targetMin}; color: inherit; text-decoration: none; font-family: ${L.fontHeading}; font-weight: ${de("semibold")}; ${Kt("2xl")} letter-spacing: -0.02em; line-height: 1; border-radius: ${L.radiusSm}; }
|
|
1254
1375
|
.brand img { display: block; block-size: 32px; inline-size: auto; }
|
|
1255
|
-
.chip { display: inline-flex; align-items: center; gap: ${
|
|
1376
|
+
.chip { display: inline-flex; align-items: center; gap: ${B(1)}; padding: 2px ${B(2)}; border-radius: ${L.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${je}; font-size: ${Ye("xs")}; }
|
|
1256
1377
|
.chip svg { inline-size: 12px; block-size: 12px; }
|
|
1257
|
-
.meta { font-family: ${
|
|
1378
|
+
.meta { font-family: ${je}; font-size: ${Ye("xs")}; opacity: 0.72; }
|
|
1258
1379
|
.middle impakt-nav { flex: 1 1 8rem; }
|
|
1259
1380
|
/* File tabs sit in one box as wide as the tabs, centred between the name and the action. */
|
|
1260
1381
|
:host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }
|
|
1261
|
-
.end { display: flex; align-items: center; gap: ${
|
|
1382
|
+
.end { display: flex; align-items: center; gap: ${B(3)}; flex: none; }
|
|
1262
1383
|
.end:empty, .start:empty { display: none; }
|
|
1263
|
-
.status { display: inline-flex; align-items: center; gap: ${
|
|
1384
|
+
.status { display: inline-flex; align-items: center; gap: ${B(2)}; padding: ${B(1)} ${B(3)}; border: ${L.borderThin} solid ${L.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${L.surfaceCard}; font-family: ${je}; font-size: ${Ye("xs")}; white-space: nowrap; }
|
|
1264
1385
|
/* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */
|
|
1265
|
-
.start .status { padding: 2px ${
|
|
1386
|
+
.start .status { padding: 2px ${B(2)}; border-color: ${L.text}; border-radius: ${L.radius}; font-size: 0.6875rem; letter-spacing: ${L.trackingWide}; text-transform: uppercase; }
|
|
1266
1387
|
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
1267
1388
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
1268
1389
|
.status .hash { opacity: 0.72; }
|
|
1269
|
-
@container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
1270
|
-
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${
|
|
1390
|
+
@container (max-width: 22rem) { :host(:not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${B(2)}; } :host(:not([fold='narrow']):not([look='canvas'])) .end { flex: 1 1 100%; } }
|
|
1391
|
+
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${B(3)}; } }
|
|
1271
1392
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
1272
1393
|
line of their own under the name and the action, and wrap there. */
|
|
1273
1394
|
@container (max-width: 40rem) {
|
|
1274
|
-
:host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${
|
|
1275
|
-
:host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }
|
|
1395
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${B(1)}; }
|
|
1396
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .start { flex: 1 1 auto; }
|
|
1276
1397
|
/* Its row may be narrower than the links, which then wrap: the max-content floor below is for the measured header only. */
|
|
1277
|
-
:host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
1398
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
1278
1399
|
/* fold="narrow": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */
|
|
1279
1400
|
:host([fold='narrow']) .middle { justify-content: flex-end; }
|
|
1280
1401
|
/*
|
|
@@ -1288,30 +1409,110 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1288
1409
|
:host(:not([fold='narrow'])) .middle ::slotted(impakt-nav[folded]) { flex: none; min-inline-size: max-content; }
|
|
1289
1410
|
:host([fold='narrow']) .end > slot > impakt-button { display: none; }
|
|
1290
1411
|
}
|
|
1291
|
-
|
|
1412
|
+
/*
|
|
1413
|
+
* look="canvas": the G2 top bar (9:264, 14:715). The mark and the name in Label S, 14px medium; the "/" in the subtle
|
|
1414
|
+
* text and the file name in the muted; the Live chip with a soft edge, a 3px corner and an ink dot, in G2 Mono S.
|
|
1415
|
+
*/
|
|
1416
|
+
.menu-button, .sheet { display: none; }
|
|
1417
|
+
/* The bar keeps the frame's 16px gutters of its own, and the tab track hugs its tabs, centred between the name and the end. */
|
|
1418
|
+
:host([look='canvas']) .bar { min-block-size: 56px; padding-inline: 16px; }
|
|
1419
|
+
:host([look='canvas']) .middle impakt-nav { flex: 0 1 auto; }
|
|
1420
|
+
:host([look='canvas']) .end { gap: 16px; }
|
|
1421
|
+
/* The people of 9:285: 22px avatars 4px over each other, their letters in G2 Mono S. */
|
|
1422
|
+
:host([look='canvas']) .presence .avatar { margin-inline-start: -4px; font-size: 0.6875rem; letter-spacing: 0.06em; text-indent: 0.06em; }
|
|
1423
|
+
:host([look='canvas']) .presence .avatar:first-child { margin-inline-start: 0; }
|
|
1424
|
+
:host([look='canvas']) .start { gap: 10px; }
|
|
1425
|
+
:host([look='canvas']) .brand.marked { gap: 10px; font-family: ${L.fontBody}; font-size: 0.875rem; font-weight: ${de("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
1426
|
+
:host([look='canvas']) .mark { font-family: ${L.fontBody}; font-size: 0.875rem; font-weight: ${de("medium")}; line-height: 1.2; }
|
|
1427
|
+
:host([look='canvas']) .context { font-family: ${L.fontBody}; font-size: 0.875rem; line-height: 1.4; color: ${L.textMuted}; }
|
|
1428
|
+
:host([look='canvas']) .context .slash { margin-inline-end: 10px; opacity: 1; color: ${Qt("color.text.subtle","currentColor")}; }
|
|
1429
|
+
:host([look='canvas']) .start .status { display: inline-flex; gap: 6px; padding: 3px 7px; background: ${L.surfaceCard}; border: 1px solid ${Qt("color.line.soft","#CFCCC5")}; border-radius: 3px; color: ${L.textMuted}; font-family: ${je}; font-size: 0.6875rem; font-weight: ${de("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
1430
|
+
:host([look='canvas']) .start .status .dot { inline-size: 6px; block-size: 6px; background: ${L.text}; }
|
|
1431
|
+
/* 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: ${L.text}; color: ${L.surfaceCard}; font-family: ${L.fontBody}; font-size: 0.875rem; font-weight: ${de("medium")}; line-height: 1.2; cursor: pointer; }
|
|
1433
|
+
.glyph { display: inline-block; inline-size: 14px; block-size: 6px; box-sizing: border-box; border-block: 1.5px solid currentColor; }
|
|
1434
|
+
/*
|
|
1435
|
+
* The tabs, the file name, the people and the action need about 70rem in one row. Narrower, the file name and the
|
|
1436
|
+
* people leave first, as decoration; at 60rem and under the tabs and the action give their place to the Menu button.
|
|
1437
|
+
*/
|
|
1438
|
+
@container (max-width: 70rem) { :host([look='canvas']) :is(.context, .presence) { display: none; } }
|
|
1439
|
+
@container (max-width: 60rem) {
|
|
1440
|
+
:host([look='canvas']) .middle, :host([look='canvas']) .end > slot > impakt-button.act { display: none; }
|
|
1441
|
+
:host([look='canvas']) .bar { justify-content: space-between; }
|
|
1442
|
+
:host([look='canvas']) .menu-button { display: inline-flex; }
|
|
1443
|
+
}
|
|
1444
|
+
/* 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: ${ue}; color: ${ut}; }
|
|
1446
|
+
.menu-bar { display: flex; align-items: center; justify-content: space-between; gap: ${B(4)}; box-sizing: border-box; min-block-size: 56px; padding: 0 ${B(4)}; border-block-end: 1px solid ${it}; }
|
|
1447
|
+
.menu-bar .brand.marked { gap: 10px; font-family: ${L.fontBody}; font-size: 0.875rem; font-weight: ${de("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
1448
|
+
.menu-bar .mark { background: ${ut}; color: ${ue}; font-family: ${L.fontBody}; font-size: 0.875rem; font-weight: ${de("medium")}; }
|
|
1449
|
+
.close { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 0; background: ${ut}; color: ${ue}; font-family: ${L.fontBody}; font-size: 0.875rem; font-weight: ${de("medium")}; line-height: 1.2; cursor: pointer; }
|
|
1450
|
+
.menu-nav { flex: 1; padding: ${B(8)} 20px 0; }
|
|
1451
|
+
.menu-nav ol { list-style: none; margin: 0; padding: 0; }
|
|
1452
|
+
.menu-nav li { border-block-end: 1px solid ${it}; }
|
|
1453
|
+
.menu-nav a { display: flex; align-items: center; justify-content: space-between; gap: ${B(4)}; padding-block: 18px; color: inherit; text-decoration: none; font-family: ${L.fontHeading}; font-size: clamp(2.25rem, 13.4vw, 3.25rem); font-weight: ${de("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
1454
|
+
.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: ${je}; font-size: 0.8125rem; font-weight: ${de("regular")}; line-height: 1.5; letter-spacing: 0; color: ${at}; }
|
|
1456
|
+
/* 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: ${wt}; }
|
|
1458
|
+
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: ${B(4)}; padding: ${B(8)} 20px calc(${B(8)} + env(safe-area-inset-bottom)); }
|
|
1459
|
+
.menu-foot:empty { display: none; }
|
|
1460
|
+
.call { display: flex; align-items: center; justify-content: space-between; gap: ${B(3)}; align-self: stretch; box-sizing: border-box; min-block-size: 47px; padding: 0 20px; background: ${xe}; color: ${ye}; text-decoration: none; font-family: ${L.fontBody}; font-size: 1rem; font-weight: ${de("medium")}; line-height: 1.2; }
|
|
1461
|
+
.call:hover .words { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1462
|
+
/* The call's arrow slides forward when it is pointed at or focused (impkt-web#51). */
|
|
1463
|
+
.call .go { display: inline-block; transition: translate ${Ua.arrowDuration} ${Ua.arrowEasing}; }
|
|
1464
|
+
.call:is(:hover, :focus-visible) .go { translate: ${Ua.arrowDistance} 0; }
|
|
1465
|
+
@media (prefers-reduced-motion: reduce) { .call .go { transition: none; } }
|
|
1466
|
+
.note { margin: 0; font-family: ${je}; font-size: 0.6875rem; font-weight: ${de("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${at}; }
|
|
1467
|
+
.mail { display: inline-flex; align-items: center; min-block-size: 24px; color: inherit; font-family: ${L.fontBody}; font-size: 1rem; line-height: 1.45; text-decoration: none; }
|
|
1468
|
+
.mail:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
1469
|
+
/* What is slotted at the foot is read on ink too. */
|
|
1470
|
+
.menu-foot ::slotted(*) { --impakt-color-text-default: ${ut}; --impakt-color-text-heading: ${ut}; --impakt-color-text-muted: ${at}; --impakt-color-text-link: ${ut}; --impakt-color-text-link-hover: ${ut}; color: ${ut}; }
|
|
1471
|
+
@media (forced-colors: active) {
|
|
1472
|
+
:host([look='canvas']) .menu-button, .close, .call { border: 1px solid ButtonText; }
|
|
1473
|
+
.sheet:popover-open { border: 1px solid CanvasText; }
|
|
1474
|
+
:host([look='canvas']) .start .status .dot { background: CanvasText; }
|
|
1475
|
+
}
|
|
1476
|
+
`]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}renderBrand(){if(!this.brand&&!this.logoSrc)return W;let t=this.logoSrc?I`<img src=${this.logoSrc} alt=${this.logoAlt||this.brand} />`:I`${this.brand}`;return I`<a class=${this.mark?"brand marked":"brand"} href=${this.home||"/"} part="brand">${this.mark?I`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>`:W}${t}</a>`}renderMenu(){let t=this.id_("menu"),e=this.menuActionText||this.actionText,i=this.menuActionHref||this.actionHref;return I`<button class="menu-button" type="button" part="menu-button" popovertarget=${t}>${this.menuText}<span class="glyph" aria-hidden="true"></span></button>
|
|
1477
|
+
<div id=${t} class="sheet" popover="auto" part="menu" role="dialog" aria-label=${this.menuText}>
|
|
1478
|
+
<div class="menu-bar">
|
|
1479
|
+
${this.renderBrand()}
|
|
1480
|
+
<button class="close" type="button" popovertarget=${t} popovertargetaction="hide">${this.closeText||Sn("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
|
+
</div>
|
|
1482
|
+
<nav class="menu-nav" aria-label=${this.label||W}>
|
|
1483
|
+
<ol role="list">
|
|
1484
|
+
${(this.links??[]).map((a,r)=>{let n=wn(a.href,this.current),s=String(r+1).padStart(2,"0");return I`<li>
|
|
1485
|
+
<a href=${a.href} part="menu-link" aria-current=${n==="page"?"page":n==="section"?"true":W}
|
|
1486
|
+
><span class="words">${a.menuLabel||a.label}</span><span class="number" aria-hidden="true">${n&&this.currentText?`${this.currentText} \xB7 ${s}`:s}</span></a
|
|
1487
|
+
>
|
|
1488
|
+
</li>`})}
|
|
1489
|
+
</ol>
|
|
1490
|
+
</nav>
|
|
1491
|
+
<div class="menu-foot" part="menu-foot"><slot name="menu-foot">${e?I`<a class="call" href=${i||W}><span class="words">${e}</span><span class="go" aria-hidden="true">→</span></a>`:W}${this.menuNote?I`<p class="note">${this.menuNote}</p>`:W}${this.menuEmail?I`<a class="mail" href=${`mailto:${this.menuEmail}`}>${this.menuEmail}</a>`:W}</slot></div>
|
|
1492
|
+
</div>`}render(){let t=this.look==="canvas",e=t?"start":this.statusAt,i=this.status?I`<span class="status" part="status" style=${`--tone:${Va(this.statusTone,0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta?I` <span class="hash">${this.statusMeta}</span>`:W}</span>`:W,a=this.presence??[],r=t?"narrow":this.fold,n=this.navLook||(t?"tabs":"");return I`<div class="bar" part="bar">
|
|
1292
1493
|
<div class="start"><slot name="start">
|
|
1293
|
-
${this.
|
|
1294
|
-
${this.context?
|
|
1295
|
-
${
|
|
1296
|
-
${this.badge?
|
|
1297
|
-
${this.meta?
|
|
1298
|
-
</slot></div>
|
|
1299
|
-
<div class="middle"><slot name="middle">${(this.links??[]).length?A`<impakt-nav align="center" size="sm" fold=${this.fold} look=${this.navLook||V} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold==="narrow"?this.actionText:""} .actionHref=${this.actionHref}></impakt-nav>`:V}</slot></div>
|
|
1300
|
-
<div class="end"><slot name="presence">${t.length?A`<span class="presence" part="presence">${t.map(a=>A`<span class=${a.accent?"avatar accent":"avatar"} role="img" aria-label=${a.name}>${a.initials??a.name.slice(0,1).toUpperCase()}</span>`)}</span>`:V}</slot><slot name="end">
|
|
1301
|
-
${this.statusAt==="start"?V:e}
|
|
1302
|
-
${this.actionText?A`<impakt-button variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref||V} @click=${this.act}>${this.actionText}</impakt-button>`:V}
|
|
1494
|
+
${this.renderBrand()}
|
|
1495
|
+
${this.context?I`<span class="context" part="context"><span class="slash" aria-hidden="true">/</span>${this.context}</span>`:W}
|
|
1496
|
+
${e==="start"?i:W}
|
|
1497
|
+
${this.badge?I`<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>`:W}
|
|
1498
|
+
${this.meta?I`<span class="meta" part="meta">${this.meta}</span>`:W}
|
|
1303
1499
|
</slot></div>
|
|
1304
|
-
|
|
1500
|
+
<div class="middle"><slot name="middle">${(this.links??[]).length?I`<impakt-nav align="center" size="sm" fold=${r} look=${n||W} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${r==="narrow"&&!t?this.actionText:""} .actionHref=${this.actionHref}></impakt-nav>`:W}</slot></div>
|
|
1501
|
+
<div class="end"><slot name="presence">${a.length?I`<span class="presence" part="presence">${a.map(s=>I`<span class=${s.ink?"avatar ink":s.accent?"avatar accent":"avatar"} role="img" aria-label=${s.name}>${s.initials??s.name.slice(0,1).toUpperCase()}</span>`)}</span>`:W}</slot><slot name="end">
|
|
1502
|
+
${e==="start"?W:i}
|
|
1503
|
+
${this.actionText?I`<impakt-button class="act" variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref||W} @click=${this.act}>${this.actionText}</impakt-button>`:W}
|
|
1504
|
+
</slot>${t?this.renderMenu():W}</div>
|
|
1505
|
+
</div>`}},ta=class extends Rt{static{this.properties={text:{type:String},src:{type:String},alt:{type:String},href:{type:String},size:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.text="",this.src="",this.alt="",this.href="/",this.size="md",this.hideOn="never"}static{this.styles=[...Rt.styles,Xa,kn,Ya`
|
|
1305
1506
|
:host { display: inline-flex; align-items: center; flex: none; }
|
|
1306
|
-
a { color: inherit; text-decoration: none; font-family: ${
|
|
1307
|
-
:host([size='sm']) a { ${
|
|
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")} }
|
|
1308
1509
|
img { display: block; block-size: 32px; inline-size: auto; }
|
|
1309
|
-
@media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${
|
|
1310
|
-
`]}render(){return
|
|
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`
|
|
1311
1512
|
/* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */
|
|
1312
|
-
:host { display: block; container-type: inline-size; position: relative; padding-block: ${
|
|
1313
|
-
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${
|
|
1314
|
-
.brand { margin: 0; font-family: ${
|
|
1513
|
+
:host { display: block; container-type: inline-size; position: relative; padding-block: ${B(8)} ${B(4)}; margin-block-end: calc(-1 * ${B(8)}); }
|
|
1514
|
+
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${B(10)}; }
|
|
1515
|
+
.brand { margin: 0; font-family: ${L.fontHeading}; font-weight: ${de("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
|
|
1315
1516
|
/* The name as a wordmark across the whole footer, under the columns. */
|
|
1316
1517
|
:host([brand-size='display']) .top { grid-template-columns: 1fr; }
|
|
1317
1518
|
:host([brand-size='display']) .top > div:first-child { order: 2; }
|
|
@@ -1321,28 +1522,28 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1321
1522
|
* on one row under it in the 13px code face (#52).
|
|
1322
1523
|
*/
|
|
1323
1524
|
:host([brand-size='display']) .top { gap: 0; }
|
|
1324
|
-
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${
|
|
1325
|
-
:host([brand-size='display']) .brand { font-weight: ${
|
|
1525
|
+
:host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${L.borderThin} solid currentColor; }
|
|
1526
|
+
:host([brand-size='display']) .brand { font-weight: ${de("semibold")}; font-size: clamp(3rem, 32.3cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }
|
|
1326
1527
|
:host([brand-size='display']) :is(.legal, .tagline) { font-size: 0.8125rem; line-height: 1.5; }
|
|
1327
|
-
:host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${
|
|
1528
|
+
:host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${B(6)}; }
|
|
1328
1529
|
:host([brand-size='display']) .foot .legal { margin: 0; }
|
|
1329
1530
|
@container (min-width: 48rem) { :host([brand-size='display']) .foot { flex-wrap: nowrap; } :host([brand-size='display']) .foot .legal { flex: 0 1 auto; min-inline-size: 0; } :host([brand-size='display']) .tagline { flex: none; } }
|
|
1330
1531
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
1331
|
-
.log { margin-block-start: ${
|
|
1332
|
-
.log li { display: flex; align-items: center; gap: ${
|
|
1532
|
+
.log { margin-block-start: ${B(8)}; display: grid; gap: ${B(3)}; font-family: ${je}; font-size: ${Ye("sm")}; }
|
|
1533
|
+
.log li { display: flex; align-items: center; gap: ${B(3)}; opacity: 0.72; }
|
|
1333
1534
|
.log li:first-child { opacity: 1; }
|
|
1334
1535
|
.log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }
|
|
1335
|
-
.log .code { margin-inline-end: ${
|
|
1336
|
-
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${
|
|
1337
|
-
.h { margin: 0 0 ${
|
|
1338
|
-
.columns ul { display: grid; gap: ${
|
|
1339
|
-
a { color: inherit; text-decoration: none; font-weight: ${
|
|
1536
|
+
.log .code { margin-inline-end: ${B(3)}; }
|
|
1537
|
+
.columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${B(8)}; }
|
|
1538
|
+
.h { margin: 0 0 ${B(4)}; font-family: ${je}; font-size: ${Ye("xs")}; font-weight: ${de("medium")}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
|
|
1539
|
+
.columns ul { display: grid; gap: ${B(3)}; }
|
|
1540
|
+
a { color: inherit; text-decoration: none; font-weight: ${de("medium")}; border-radius: ${L.radiusSm}; }
|
|
1340
1541
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
1341
|
-
.legal { margin: ${
|
|
1342
|
-
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${
|
|
1542
|
+
.legal { margin: ${B(16)} 0 0; font-family: ${je}; font-size: ${Ye("xs")}; opacity: 0.72; }
|
|
1543
|
+
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${B(2)} ${B(6)}; margin-block-start: ${B(16)}; }
|
|
1343
1544
|
.foot .legal { margin: 0; }
|
|
1344
|
-
.tagline { margin: 0; font-family: ${
|
|
1345
|
-
.row { display: flex; align-items: flex-start; gap: ${
|
|
1545
|
+
.tagline { margin: 0; font-family: ${je}; font-size: ${Ye("xs")}; opacity: 0.72; text-align: end; }
|
|
1546
|
+
.row { display: flex; align-items: flex-start; gap: ${B(8)}; }
|
|
1346
1547
|
.row .columns { flex: 1; }
|
|
1347
1548
|
.row impakt-button { flex: none; }
|
|
1348
1549
|
.stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
|
|
@@ -1350,22 +1551,22 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1350
1551
|
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }
|
|
1351
1552
|
@container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
|
|
1352
1553
|
@media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
|
|
1353
|
-
`]}heading(
|
|
1554
|
+
`]}heading(t){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?I`<h3 class="h">${t}</h3>`:e===4?I`<h4 class="h">${t}</h4>`:I`<h2 class="h">${t}</h2>`}render(){let t=this.log??[];return I`<div part="footer">
|
|
1354
1555
|
<div class="top">
|
|
1355
1556
|
<div>
|
|
1356
|
-
${this.brand?
|
|
1357
|
-
${
|
|
1557
|
+
${this.brand?I`<p class="brand" part="brand">${this.brand}</p>`:W}
|
|
1558
|
+
${t.length?I`<ul class="log" part="log">${t.map((e,i)=>I`<li style=${`--tone:${Va(e.tone??(i===0?"success":"accent"),i)}`}><span class="dot" aria-hidden="true"></span><span>${e.meta?I`<span class="code">${e.meta}</span>`:W}${e.text}</span></li>`)}</ul>`:W}
|
|
1358
1559
|
</div>
|
|
1359
1560
|
<div class="row">
|
|
1360
1561
|
<div class="columns" part="columns" style=${`--count:${Math.max(1,(this.columns??[]).length)}`}>
|
|
1361
|
-
${(this.columns??[]).map(e=>
|
|
1562
|
+
${(this.columns??[]).map(e=>I`<div>${this.heading(e.heading)}<ul>${(e.links??[]).map(i=>I`<li><a href=${i.href}>${i.label}</a></li>`)}</ul></div>`)}
|
|
1362
1563
|
</div>
|
|
1363
|
-
${this.actionText?
|
|
1564
|
+
${this.actionText?I`<impakt-button variant="outline" icon-after="arrow-right" href=${this.actionHref||W} part="action">${this.actionText}</impakt-button>`:W}
|
|
1364
1565
|
</div>
|
|
1365
1566
|
</div>
|
|
1366
|
-
${this.tagline?
|
|
1367
|
-
${this.stripe?
|
|
1368
|
-
</div>`}};customElements.define("impakt-site-header",
|
|
1567
|
+
${this.tagline?I`<div class="foot">${this.legal?I`<p class="legal" part="legal">${this.legal}</p>`:I`<span></span>`}<p class="tagline" part="tagline">${this.tagline}</p></div>`:this.legal?I`<p class="legal" part="legal">${this.legal}</p>`:W}
|
|
1568
|
+
${this.stripe?I`<div class="stripe" aria-hidden="true">${zn.map(e=>I`<span style=${`background:${Va(void 0,e)}`}></span>`)}</div>`:W}
|
|
1569
|
+
</div>`}};customElements.define("impakt-site-header",ea);customElements.define("impakt-wordmark",ta);customElements.define("impakt-site-footer",ia);import{html as Ht,css as Tn,nothing as Ja}from"./atomic-ui.js";import{say as Or,ImpaktElement as Fr,fontSize as Mn,fontWeight as Cn,space as gt,t as Qa,token as Ka}from"./atomic-ui.js";var aa=o=>Math.min(1,Math.max(0,o)),ra=class extends Fr{constructor(){super();this.paused=!1;this.frame=0;this.started=0;this.reduced=!1;this.seekFrom=0;this.seekTo=0;this.seekStart=0;this.seekMs=0;this.onScroll=()=>{(this.drive==="view"||this.drive==="page")&&this.schedule()};this.tick=e=>{if(this.frame=0,this.seekMs){this.seekStart||(this.seekStart=e);let i=Math.min(1,(e-this.seekStart)/this.seekMs),a=i<.5?4*i*i*i:1-Math.pow(-2*i+2,3)/2;this.progress=this.seekFrom+(this.seekTo-this.seekFrom)*a,i<1?this.schedule():this.seekMs=0;return}if(this.drive==="view"){let i=this.getBoundingClientRect(),a=window.innerHeight||1;this.progress=aa(-i.top/Math.max(1,i.height-a))}else if(this.drive==="page"){let i=document.documentElement;this.progress=aa(window.scrollY/Math.max(1,i.scrollHeight-(window.innerHeight||0)))}else this.drive==="loop"&&!this.paused&&!this.reduced&&(this.started||(this.started=e-this.progress*this.duration*1e3),this.progress=(e-this.started)/(this.duration*1e3)%1,this.schedule())};this.togglePause=()=>this.setPaused(!this.paused);this.drive="view",this.layout="stage",this.length=3,this.duration=8,this.label="Animation",this.progress=0,this.controls="below",this.bleed=!1,this.hideOn="never"}static{this.properties={drive:{type:String,reflect:!0},layout:{type:String,reflect:!0},length:{type:Number},duration:{type:Number},label:{type:String},progress:{type:Number},controls:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}static{this.styles=[...Fr.styles,Tn`
|
|
1369
1570
|
:host {
|
|
1370
1571
|
display: block;
|
|
1371
1572
|
position: relative;
|
|
@@ -1379,7 +1580,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1379
1580
|
}
|
|
1380
1581
|
:host([layout='split']) .frame {
|
|
1381
1582
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
1382
|
-
gap: ${
|
|
1583
|
+
gap: ${gt(8)};
|
|
1383
1584
|
}
|
|
1384
1585
|
.stage {
|
|
1385
1586
|
position: sticky;
|
|
@@ -1404,34 +1605,34 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1404
1605
|
}
|
|
1405
1606
|
.controls {
|
|
1406
1607
|
display: flex;
|
|
1407
|
-
gap: ${
|
|
1608
|
+
gap: ${gt(3)};
|
|
1408
1609
|
align-items: center;
|
|
1409
1610
|
justify-content: center;
|
|
1410
|
-
padding-block: ${
|
|
1611
|
+
padding-block: ${gt(3)};
|
|
1411
1612
|
}
|
|
1412
1613
|
:host([bleed]) { margin-inline: calc(50% - 50vw); }
|
|
1413
1614
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1414
1615
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1415
1616
|
/* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
|
|
1416
|
-
.stage > .controls { position: absolute; inset-inline: ${
|
|
1617
|
+
.stage > .controls { position: absolute; inset-inline: ${gt(6)}; inset-block-end: ${gt(6)}; z-index: 2; padding: 0; }
|
|
1417
1618
|
.stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }
|
|
1418
1619
|
/* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
|
|
1419
1620
|
.controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
|
|
1420
1621
|
.pause {
|
|
1421
|
-
min-width: ${
|
|
1422
|
-
min-height: ${
|
|
1423
|
-
padding: ${
|
|
1622
|
+
min-width: ${Ka("target.min","24px")};
|
|
1623
|
+
min-height: ${Ka("target.min","24px")};
|
|
1624
|
+
padding: ${gt(2)} ${gt(4)};
|
|
1424
1625
|
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1425
|
-
border: 1px solid ${
|
|
1426
|
-
background: ${
|
|
1427
|
-
color: ${
|
|
1428
|
-
font-size: ${
|
|
1429
|
-
font-weight: ${
|
|
1626
|
+
border: 1px solid ${Qa.border};
|
|
1627
|
+
background: ${Qa.surfaceCard};
|
|
1628
|
+
color: ${Qa.text};
|
|
1629
|
+
font-size: ${Mn("sm")};
|
|
1630
|
+
font-weight: ${Cn("medium")};
|
|
1430
1631
|
cursor: pointer;
|
|
1431
1632
|
}
|
|
1432
1633
|
.pause:focus-visible {
|
|
1433
1634
|
outline: none;
|
|
1434
|
-
box-shadow: ${
|
|
1635
|
+
box-shadow: ${Ka("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1435
1636
|
}
|
|
1436
1637
|
@media (max-width: 48rem) {
|
|
1437
1638
|
:host([layout='split']) .frame {
|
|
@@ -1449,7 +1650,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1449
1650
|
.stage {
|
|
1450
1651
|
position: relative;
|
|
1451
1652
|
height: auto;
|
|
1452
|
-
gap: ${
|
|
1653
|
+
gap: ${gt(6)};
|
|
1453
1654
|
}
|
|
1454
1655
|
/* With less motion the layers are shown one after another, so every
|
|
1455
1656
|
state the scene would have moved through can still be seen. */
|
|
@@ -1457,17 +1658,17 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1457
1658
|
grid-area: auto;
|
|
1458
1659
|
}
|
|
1459
1660
|
}
|
|
1460
|
-
`]}connectedCallback(){super.connectedCallback();try{this.reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{this.reduced=!1}window.addEventListener("scroll",this.onScroll,{passive:!0,capture:!0}),window.addEventListener("resize",this.onScroll),this.schedule()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.onScroll,{capture:!0}),window.removeEventListener("resize",this.onScroll),this.frame&&cancelAnimationFrame(this.frame),this.frame=0}updated(e){e.has("length")&&this.style.setProperty("--impakt-scene-length",String(this.length)),e.has("progress")&&this.publish(),e.has("drive")&&(this.started=0,this.schedule())}seek(e,
|
|
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">
|
|
1461
1662
|
<slot name="controls"></slot>
|
|
1462
|
-
${e&&!this.reduced?
|
|
1463
|
-
${this.paused?
|
|
1464
|
-
</button>`:
|
|
1465
|
-
</div>`,r=
|
|
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`
|
|
1466
1667
|
<div class="frame" part="frame" role="region" aria-label=${this.label}>
|
|
1467
|
-
${this.layout==="split"?
|
|
1668
|
+
${this.layout==="split"?Ht`<div class="content" part="content"><slot></slot></div>${r}`:Ht`${r}<div class="content" part="content"><slot></slot></div>`}
|
|
1468
1669
|
</div>
|
|
1469
|
-
${
|
|
1470
|
-
`}};customElements.define("impakt-scene",
|
|
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`
|
|
1471
1672
|
:host {
|
|
1472
1673
|
display: block;
|
|
1473
1674
|
width: 100%;
|
|
@@ -1476,71 +1677,71 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1476
1677
|
}
|
|
1477
1678
|
.wrap {
|
|
1478
1679
|
display: grid;
|
|
1479
|
-
gap: ${
|
|
1480
|
-
padding: ${
|
|
1481
|
-
border-radius: ${
|
|
1482
|
-
background: ${
|
|
1483
|
-
box-shadow: ${
|
|
1484
|
-
border: 1px solid ${
|
|
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};
|
|
1485
1686
|
}
|
|
1486
1687
|
input {
|
|
1487
1688
|
width: 100%;
|
|
1488
|
-
min-height: ${
|
|
1489
|
-
accent-color: ${
|
|
1689
|
+
min-height: ${St("target.min","24px")};
|
|
1690
|
+
accent-color: ${ee.brand};
|
|
1490
1691
|
margin: 0;
|
|
1491
1692
|
}
|
|
1492
1693
|
.stops {
|
|
1493
1694
|
position: relative;
|
|
1494
1695
|
display: flex;
|
|
1495
1696
|
flex-wrap: wrap;
|
|
1496
|
-
gap: ${
|
|
1697
|
+
gap: ${Ce(2)};
|
|
1497
1698
|
list-style: none;
|
|
1498
1699
|
margin: 0;
|
|
1499
1700
|
padding: 0;
|
|
1500
1701
|
}
|
|
1501
1702
|
button {
|
|
1502
|
-
min-height: ${
|
|
1503
|
-
padding: ${
|
|
1703
|
+
min-height: ${St("target.min","24px")};
|
|
1704
|
+
padding: ${Ce(1)} ${Ce(3)};
|
|
1504
1705
|
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
1505
|
-
border: 1px solid ${
|
|
1706
|
+
border: 1px solid ${ee.border};
|
|
1506
1707
|
background: transparent;
|
|
1507
|
-
color: ${
|
|
1508
|
-
font-size: ${
|
|
1509
|
-
font-weight: ${
|
|
1708
|
+
color: ${ee.textMuted};
|
|
1709
|
+
font-size: ${Za("xs")};
|
|
1710
|
+
font-weight: ${_r("medium")};
|
|
1510
1711
|
cursor: pointer;
|
|
1511
1712
|
}
|
|
1512
1713
|
button[aria-current='true'] {
|
|
1513
|
-
color: ${
|
|
1514
|
-
border-color: ${
|
|
1714
|
+
color: ${ee.text};
|
|
1715
|
+
border-color: ${ee.text};
|
|
1515
1716
|
}
|
|
1516
1717
|
.sr-only {
|
|
1517
|
-
${
|
|
1718
|
+
${Ln}
|
|
1518
1719
|
}
|
|
1519
1720
|
/* The graph look: the code of where you are, the line of stops, where you are. */
|
|
1520
1721
|
:host([look='graph']) { max-width: none; }
|
|
1521
|
-
.graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${
|
|
1522
|
-
.mono { font-family: ${
|
|
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; }
|
|
1523
1724
|
.head { display: grid; gap: 2px; }
|
|
1524
|
-
.head .k { color: ${
|
|
1525
|
-
.head .code { font-size: ${
|
|
1526
|
-
.head .note { color: ${
|
|
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}; }
|
|
1527
1728
|
.line { position: relative; block-size: 48px; }
|
|
1528
|
-
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${
|
|
1729
|
+
.track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${ee.border}; opacity: 0.5; }
|
|
1529
1730
|
.fill { opacity: 1; background: none; display: flex; overflow: hidden; }
|
|
1530
1731
|
.fill span { block-size: 100%; }
|
|
1531
|
-
.dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${
|
|
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; }
|
|
1532
1733
|
.dot[data-passed] { background: var(--c); }
|
|
1533
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); }
|
|
1534
|
-
.dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${
|
|
1535
|
-
.dot-label[data-current] { color: ${
|
|
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")}; }
|
|
1536
1737
|
.line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
|
|
1537
1738
|
.line input:focus-visible { opacity: 1; }
|
|
1538
|
-
.where { display: grid; gap: ${
|
|
1539
|
-
.chip { display: inline-flex; align-items: center; gap: ${
|
|
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; }
|
|
1540
1741
|
.chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
|
|
1541
|
-
.hint { color: ${
|
|
1742
|
+
.hint { color: ${ee.textMuted}; text-transform: uppercase; }
|
|
1542
1743
|
/* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
|
|
1543
|
-
.chip .meta { color: ${
|
|
1744
|
+
.chip .meta { color: ${ee.textMuted}; }
|
|
1544
1745
|
@media (max-width: 48rem) {
|
|
1545
1746
|
.graph { grid-template-columns: minmax(0, 1fr); }
|
|
1546
1747
|
.where { justify-items: start; }
|
|
@@ -1549,29 +1750,29 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1549
1750
|
button:focus-visible,
|
|
1550
1751
|
input:focus-visible {
|
|
1551
1752
|
outline: none;
|
|
1552
|
-
box-shadow: ${
|
|
1753
|
+
box-shadow: ${St("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
1553
1754
|
}
|
|
1554
|
-
`]}connectedCallback(){super.connectedCallback(),this.scene=this.closest("impakt-scene"),this.scene?.addEventListener("impakt-scene-progress",this.onProgress),this.scene&&(this.value=this.scene.progress)}disconnectedCallback(){super.disconnectedCallback(),this.scene?.removeEventListener("impakt-scene-progress",this.onProgress),this.scene=null}goTo(e){this.scene?.seek(e.at,600)}nearest(){let e=-1,
|
|
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">
|
|
1555
1756
|
<div class="head mono" aria-hidden="true">
|
|
1556
1757
|
<span class="k">HEAD</span>
|
|
1557
|
-
<span class="code">${
|
|
1558
|
-
${
|
|
1758
|
+
<span class="code">${s?.meta??s?.label??""}</span>
|
|
1759
|
+
${s?.note?Xe`<span class="note">${s.note}</span>`:null}
|
|
1559
1760
|
</div>
|
|
1560
1761
|
<div class="line">
|
|
1561
1762
|
<div class="track"></div>
|
|
1562
|
-
<div class="fill" aria-hidden="true">${h.map(
|
|
1563
|
-
${r.map((
|
|
1564
|
-
<button type="button" class="dot" style=${`left:${
|
|
1565
|
-
<span class="sr-only">${
|
|
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>
|
|
1566
1767
|
</button>
|
|
1567
|
-
<span class="dot-label mono" style=${`left:${
|
|
1568
|
-
<input type="range" min="0" max="1000" step="1" .value=${String(Math.round(this.value*1e3))} aria-label=${this.label} aria-valuetext=${
|
|
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} />
|
|
1569
1770
|
</div>
|
|
1570
1771
|
<div class="where" aria-hidden="true">
|
|
1571
|
-
${
|
|
1572
|
-
${this.hint?
|
|
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}
|
|
1573
1774
|
</div>
|
|
1574
|
-
</div>`}render(){let e=this.nearest(),
|
|
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`
|
|
1575
1776
|
<div class="wrap" part="wrap">
|
|
1576
1777
|
<input
|
|
1577
1778
|
type="range"
|
|
@@ -1580,101 +1781,122 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1580
1781
|
step="1"
|
|
1581
1782
|
.value=${String(Math.round(this.value*1e3))}
|
|
1582
1783
|
aria-label=${this.label}
|
|
1583
|
-
aria-valuetext=${
|
|
1784
|
+
aria-valuetext=${i}
|
|
1584
1785
|
@input=${this.onInput}
|
|
1585
1786
|
/>
|
|
1586
|
-
${this.stops.length?
|
|
1587
|
-
${this.stops.map((a,r)=>
|
|
1787
|
+
${this.stops.length?Xe`<ul class="stops" part="stops">
|
|
1788
|
+
${this.stops.map((a,r)=>Xe`<li>
|
|
1588
1789
|
<button type="button" aria-current=${r===e?"true":"false"} @click=${()=>this.goTo(a)}>
|
|
1589
|
-
<span aria-hidden="true">${a.label}</span><span class="sr-only">${
|
|
1790
|
+
<span aria-hidden="true">${a.label}</span><span class="sr-only">${Dr("Go to {name}",{name:a.label})}</span>
|
|
1590
1791
|
</button>
|
|
1591
1792
|
</li>`)}
|
|
1592
1793
|
</ul>`:null}
|
|
1593
1794
|
</div>
|
|
1594
|
-
`}};customElements.define("impakt-scrubber",
|
|
1595
|
-
.h { margin: 0; color: var(--impakt-heading, ${
|
|
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; }
|
|
1596
1797
|
.body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
|
|
1597
1798
|
.meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
|
|
1598
|
-
.sr-only { ${
|
|
1599
|
-
`,
|
|
1799
|
+
.sr-only { ${Bn} }
|
|
1800
|
+
`,sa=class extends Je{constructor(){super();this.raf=0;this.label="",this.heading="",this.text="",this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.items=[],this.href="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},heading:{type:String},text:{type:String},beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},items:{type:Array},href:{type:String},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Je.styles,Zt,ha,ma,zt`
|
|
1600
1801
|
:host { display: block; }
|
|
1601
|
-
article { display: flex; flex-direction: column; gap: ${
|
|
1602
|
-
.media { border-radius: ${
|
|
1802
|
+
article { display: flex; flex-direction: column; gap: ${G(3)}; }
|
|
1803
|
+
.media { border-radius: ${H.radiusXl}; overflow: clip; background: ${H.surfaceInset}; }
|
|
1603
1804
|
.media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
|
|
1604
1805
|
impakt-before-after { display: block; }
|
|
1605
|
-
.h { font-size: ${
|
|
1806
|
+
.h { font-size: ${qt("3xl")}; }
|
|
1606
1807
|
.h a { color: inherit; text-decoration: none; }
|
|
1607
1808
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1608
|
-
.h a:focus-visible { outline: none; box-shadow: ${
|
|
1609
|
-
ul { list-style: none; margin: ${
|
|
1610
|
-
li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${
|
|
1611
|
-
li[data-change='added'] { background: ${
|
|
1612
|
-
li[data-change='removed'] { background: ${
|
|
1613
|
-
li[data-change='same'] { color: ${
|
|
1614
|
-
.sign { font-weight: ${
|
|
1615
|
-
`]}wipe(e){let
|
|
1616
|
-
${e?
|
|
1617
|
-
${this.label?
|
|
1618
|
-
${this.heading?
|
|
1619
|
-
${this.text?
|
|
1620
|
-
${(this.items??[]).length?
|
|
1621
|
-
</article>`}},
|
|
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`
|
|
1622
1823
|
:host { display: block; container-type: inline-size; }
|
|
1623
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
1824
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${G(12)} ${G(10)}; }
|
|
1624
1825
|
:host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }
|
|
1625
1826
|
:host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
1626
1827
|
@container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
1627
|
-
`]}render(){let
|
|
1628
|
-
.label=${
|
|
1629
|
-
.beforeSrc=${
|
|
1630
|
-
.afterSrc=${
|
|
1631
|
-
.items=${
|
|
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`
|
|
1632
1833
|
:host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
|
|
1633
1834
|
ul { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
1634
1835
|
ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
|
|
1635
|
-
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${
|
|
1836
|
+
li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${G(6)}; }
|
|
1636
1837
|
.graph { position: relative; }
|
|
1637
|
-
.graph svg { position: absolute; inset-block-start: -${
|
|
1638
|
-
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${
|
|
1639
|
-
.path { margin: 0 0 ${
|
|
1640
|
-
.h { font-size: ${
|
|
1838
|
+
.graph svg { position: absolute; inset-block-start: -${G(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${G(12)}); overflow: visible; }
|
|
1839
|
+
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${G(4)} ${G(10)}; align-items: start; }
|
|
1840
|
+
.path { margin: 0 0 ${G(2)}; opacity: 0.72; }
|
|
1841
|
+
.h { font-size: ${qt("3xl")}; line-height: 1.05; }
|
|
1641
1842
|
.h a { color: inherit; text-decoration: none; }
|
|
1642
1843
|
.h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
|
1643
|
-
.h a:focus-visible { outline: none; box-shadow: ${
|
|
1644
|
-
.detail { display: flex; flex-direction: column; gap: ${
|
|
1844
|
+
.h a:focus-visible { outline: none; box-shadow: ${H.focusShadow}; border-radius: ${H.radiusSm}; }
|
|
1845
|
+
.detail { display: flex; flex-direction: column; gap: ${G(3)}; padding-block-start: ${G(1)}; }
|
|
1645
1846
|
.tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
|
|
1646
|
-
.end { position: relative; display: flex; align-items: center; gap: ${
|
|
1847
|
+
.end { position: relative; display: flex; align-items: center; gap: ${G(3)}; padding-block-start: ${G(4)}; }
|
|
1647
1848
|
.end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }
|
|
1648
1849
|
@container (max-width: 44rem) {
|
|
1649
1850
|
li { grid-template-columns: 56px minmax(0, 1fr); }
|
|
1650
1851
|
.graph svg { inline-size: 56px; }
|
|
1651
1852
|
.row { grid-template-columns: minmax(0, 1fr); }
|
|
1652
|
-
.h { font-size: ${
|
|
1853
|
+
.h { font-size: ${qt("2xl")}; }
|
|
1653
1854
|
}
|
|
1654
|
-
/*
|
|
1655
|
-
|
|
1656
|
-
|
|
1855
|
+
/*
|
|
1856
|
+
* The mono look, as the Branches component (12:683) draws it: rows 120px apart, a 1.5px trunk at 10px, and
|
|
1857
|
+
* each branch a fixed S-curve out to 60px by 28px down, straight to 78 and back by 110, so its shape does not
|
|
1858
|
+
* change with the row's height. The path and heading sit on the left and the line and tags in a 490px column
|
|
1859
|
+
* on the right, level with the path; a hairline closes each row 114px down. On a phone (14:989) the trunk is
|
|
1860
|
+
* at 8px, the branch reaches 40px and the words stack in one column.
|
|
1861
|
+
*/
|
|
1862
|
+
:host([look='mono']) { --trunk: currentColor; }
|
|
1863
|
+
:host([look='mono']) ul::before { inset-inline-start: 10px; inline-size: 1.5px; border-radius: 0; }
|
|
1864
|
+
:host([look='mono']) li { grid-template-columns: 86px minmax(0, 1fr); padding-block: 24px 5px; }
|
|
1865
|
+
:host([look='mono']) .graph svg { inset-block-start: -24px; inline-size: 96px; block-size: 110px; }
|
|
1657
1866
|
:host([look='mono']) .graph svg path { stroke-width: 1.5; }
|
|
1658
|
-
:host([look='mono']) .ring { position: absolute; inset-inline-start:
|
|
1659
|
-
:host([look='mono']) .ring.current { background: ${
|
|
1660
|
-
:host([look='mono']) .text {
|
|
1661
|
-
:host([look='mono'])
|
|
1662
|
-
:host([look='mono']) .path { font-size: 0.6875rem; letter-spacing: ${
|
|
1663
|
-
:host([look='mono']) .h { font-size:
|
|
1664
|
-
:host([look='mono']) .
|
|
1665
|
-
:host([look='mono']) .body { color: ${
|
|
1666
|
-
:host([look='mono']) .
|
|
1667
|
-
/* The
|
|
1668
|
-
:host([look='mono']) .end
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
:host([look='mono'])
|
|
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: ${H.surfaceCard}; }
|
|
1868
|
+
:host([look='mono']) .ring.current { background: ${In("color.accent.default","#ffd43b")}; }
|
|
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: ${G(10)}; align-content: start; padding-block-end: 20px; border-block-end: ${H.borderThin} solid ${H.rule}; }
|
|
1870
|
+
: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: ${H.trackingWide}; text-transform: uppercase; opacity: 1; color: ${H.textMuted}; }
|
|
1872
|
+
:host([look='mono']) .h { grid-area: h; margin: 0; font-size: 2rem; line-height: 1.1; font-weight: ${pa("semibold")}; letter-spacing: -0.03em; }
|
|
1873
|
+
: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: ${H.textMuted}; opacity: 1; }
|
|
1875
|
+
:host([look='mono']) .tags { font-size: 0.6875rem; line-height: 1.4; letter-spacing: ${H.trackingWide}; opacity: 1; color: ${H.textMuted}; }
|
|
1876
|
+
/* 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: ${H.trackingWide}; text-transform: uppercase; color: ${H.textMuted}; }
|
|
1878
|
+
/* 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: ${H.text}; }
|
|
1880
|
+
: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
|
+
:host([look='mono']) li:last-child .graph svg { block-size: 110px; }
|
|
1672
1882
|
@container (max-width: 44rem) {
|
|
1673
1883
|
/* Set on the list, since a container query cannot restyle the container itself. */
|
|
1674
|
-
:host([look='mono']) ul {
|
|
1884
|
+
:host([look='mono']) ul::before { inset-inline-start: 8px; }
|
|
1885
|
+
:host([look='mono']) li { grid-template-columns: 60px minmax(0, 1fr); padding-block: 18px 5px; }
|
|
1886
|
+
:host([look='mono']) .graph svg { inset-block-start: -18px; inline-size: 60px; block-size: 132px; }
|
|
1887
|
+
:host([look='mono']) .ring { inset-inline-start: 35px; inset-block-start: 38px; }
|
|
1888
|
+
/* On a phone the rows are 150px apart whatever their words, as they are 120px apart on a wide screen (14:989). */
|
|
1889
|
+
:host([look='mono']) .text { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'path' 'h' 'detail'; box-sizing: border-box; min-block-size: 127px; padding-block-end: 12px; }
|
|
1890
|
+
:host([look='mono']) .h { font-size: 1.5rem; line-height: 1.15; }
|
|
1891
|
+
:host([look='mono']) .detail { margin-block-start: 6px; }
|
|
1892
|
+
:host([look='mono']) .body { font-size: 0.875rem; line-height: 1.43; }
|
|
1675
1893
|
:host([look='mono']) .tags { display: none; }
|
|
1676
|
-
:host([look='mono']) .end
|
|
1894
|
+
:host([look='mono']) .end { padding-block-end: 13px; }
|
|
1895
|
+
:host([look='mono']) .end::before { margin-inline: 3.75px calc(60px - 13.75px); }
|
|
1896
|
+
:host([look='mono']) .end::after { inset-inline-start: 8px; }
|
|
1677
1897
|
}
|
|
1898
|
+
:host([look='mono']) .graph .narrow { display: none; }
|
|
1899
|
+
@container (max-width: 44rem) { :host([look='mono']) .graph .wide { display: none; } :host([look='mono']) .graph .narrow { display: inline; } }
|
|
1678
1900
|
@media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }
|
|
1679
1901
|
/* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */
|
|
1680
1902
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -1683,29 +1905,32 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1683
1905
|
:host([shown]) .graph svg { clip-path: inset(0); }
|
|
1684
1906
|
:host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }
|
|
1685
1907
|
}
|
|
1686
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1908
|
+
`]}connectedCallback(){super.connectedCallback(),this.unwatch=ar(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let e=this.look==="mono",i=a=>e?Nt`<svg aria-hidden="true" focusable="false">
|
|
1909
|
+
<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
|
+
<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>`:Nt`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
1912
|
+
<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
|
+
<circle cx="60" cy="86" r="8" fill=${a} />
|
|
1914
|
+
</svg>`;return R`<ul part="list">${(this.items??[]).map((a,r)=>{let n=r===this.current,s=R`${a.heading}${n&&this.currentText?R`<span class="sr-only"> (${this.currentText})</span>`:Ae}`;return R`<li part="item" style=${`--i:${r}`}>
|
|
1915
|
+
<div class="graph">${i(e?"currentColor":ir(a.tone,r))}${e?R`<span class=${n?"ring current":"ring"} aria-hidden="true"></span>`:Ae}</div>
|
|
1691
1916
|
<div class="text">
|
|
1692
|
-
${a.path?
|
|
1917
|
+
${a.path?R`<p class="path mono">${a.path}</p>`:Ae}
|
|
1693
1918
|
<div class="row">
|
|
1694
|
-
${
|
|
1919
|
+
${Nn(this.headingLevel,a.href?R`<a href=${a.href}>${s}</a>`:s,"h")}
|
|
1695
1920
|
<div class="detail">
|
|
1696
|
-
${a.text?
|
|
1697
|
-
${a.tags?.length?
|
|
1921
|
+
${a.text?R`<p class="body">${a.text}</p>`:Ae}
|
|
1922
|
+
${a.tags?.length?R`<p class="tags mono">${a.tags.join(" \xB7 ")}</p>`:Ae}
|
|
1698
1923
|
</div>
|
|
1699
1924
|
</div>
|
|
1700
1925
|
</div>
|
|
1701
1926
|
</li>`})}</ul>
|
|
1702
|
-
${this.trunk?
|
|
1927
|
+
${this.trunk?R`<p class="end mono" part="trunk">${this.trunk}</p>`:Ae}`}},ca=class extends Je{constructor(){super();this.unwatch=()=>{};this.counted=null;this.items=[],this.summary="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},summary:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Je.styles,Zt,ha,ma,zt`
|
|
1703
1928
|
:host { display: block; container-type: inline-size; }
|
|
1704
|
-
.summary { display: inline-flex; align-items: center; gap: ${
|
|
1705
|
-
.summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${
|
|
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}; }
|
|
1706
1931
|
/* The rows share one grid, so the figure column fits the widest figure and every row lines up. */
|
|
1707
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${
|
|
1708
|
-
li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${
|
|
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); }
|
|
1709
1934
|
/* Checks run: each tick pops in, 150 ms after the one above. */
|
|
1710
1935
|
@media (prefers-reduced-motion: no-preference) {
|
|
1711
1936
|
.tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }
|
|
@@ -1713,28 +1938,28 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1713
1938
|
}
|
|
1714
1939
|
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1715
1940
|
/* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */
|
|
1716
|
-
.tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${
|
|
1717
|
-
.figure { margin: 0; font-family: ${
|
|
1718
|
-
.label { margin: 0; ${
|
|
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")} }
|
|
1719
1944
|
.status { margin: 0; opacity: 0.72; }
|
|
1720
1945
|
@container (max-width: 40rem) {
|
|
1721
1946
|
ul { grid-template-columns: 28px minmax(0, 1fr); }
|
|
1722
|
-
li { row-gap: ${
|
|
1947
|
+
li { row-gap: ${G(1)}; }
|
|
1723
1948
|
.label, .status { grid-column: 2; }
|
|
1724
|
-
.figure { font-size: ${
|
|
1949
|
+
.figure { font-size: ${qt("4xl")}; }
|
|
1725
1950
|
}
|
|
1726
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1727
|
-
<ul part="list">${(this.items??[]).map((
|
|
1728
|
-
<span class="tick" aria-hidden="true">${
|
|
1729
|
-
<p class="figure">${e(
|
|
1730
|
-
<p class="label">${
|
|
1731
|
-
${
|
|
1732
|
-
</li>`)}</ul>`}},
|
|
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`
|
|
1733
1958
|
:host { display: block; }
|
|
1734
1959
|
/* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */
|
|
1735
|
-
figure { margin: 0; overflow-x: auto; border-radius: ${
|
|
1960
|
+
figure { margin: 0; overflow-x: auto; border-radius: ${H.radiusSm}; }
|
|
1736
1961
|
svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }
|
|
1737
|
-
text { font-family: ${
|
|
1962
|
+
text { font-family: ${H.fontMono}; font-size: 12px; fill: currentColor; }
|
|
1738
1963
|
.faint { opacity: 0.5; }
|
|
1739
1964
|
/* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */
|
|
1740
1965
|
.halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }
|
|
@@ -1743,346 +1968,383 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
|
|
|
1743
1968
|
svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }
|
|
1744
1969
|
:host([shown]) svg { clip-path: inset(0 -40px 0 0); }
|
|
1745
1970
|
}
|
|
1746
|
-
`]}connectedCallback(){super.connectedCallback(),this.unwatch=
|
|
1747
|
-
<svg viewBox="0 0 ${1200} ${
|
|
1748
|
-
<line x1=${24} y1=${
|
|
1749
|
-
<path d="M${1168} ${
|
|
1750
|
-
${
|
|
1751
|
-
<path d="M${
|
|
1752
|
-
<circle cx=${
|
|
1753
|
-
<text x=${
|
|
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>
|
|
1754
1979
|
</g>`})}
|
|
1755
|
-
${(this.marks??[]).map(
|
|
1756
|
-
${this.release?
|
|
1757
|
-
<circle cx=${
|
|
1758
|
-
<rect x=${
|
|
1759
|
-
<text x=${
|
|
1760
|
-
</g>`:
|
|
1761
|
-
${
|
|
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>`)}
|
|
1762
1987
|
</svg>
|
|
1763
|
-
</figure>`}};customElements.define("impakt-release-card",
|
|
1764
|
-
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
1765
|
-
font-size: 0.6875rem;
|
|
1766
|
-
font-weight: 400;
|
|
1767
|
-
line-height: 1.4;
|
|
1768
|
-
letter-spacing: 0.06em;
|
|
1769
|
-
text-transform: uppercase;
|
|
1770
|
-
`,Ye=(n,i=3)=>Math.min(Math.max(Number(n)||i,1),6),Br=n=>String(n).padStart(2,"0");var Da={note:["01","Discover","Note"],wireframe:["02","Design low-fi","Wireframe"],component:["03","Design hi-fi","Component"],code:["04","Build","Code"],live:["05","Launch","Live"]},aa=class extends ie{static{this.properties={stage:{type:String,reflect:!0},index:{type:String},phase:{type:String},label:{type:String},onInk:{type:Boolean,reflect:!0,attribute:"on-ink"},announce:{type:Boolean}}}constructor(){super(),this.stage="",this.index="",this.phase="",this.label="",this.onInk=!1,this.announce=!1}static{this.styles=[...ie.styles,Xe`
|
|
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`
|
|
1771
1989
|
:host { display: inline-block; vertical-align: middle; }
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
.index { color: ${
|
|
1775
|
-
.phase { color: ${
|
|
1776
|
-
.label { color: ${
|
|
1777
|
-
@media (prefers-color-scheme: dark) { .tag { border-color: ${gt}; } }
|
|
1990
|
+
/* 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: ${jr}; border: 1px solid ${it}; border-radius: ${On("stage-tag.radius","0px")}; ${Z}; font-weight: ${Qe("medium")}; white-space: nowrap; }
|
|
1992
|
+
.index { color: ${wt}; }
|
|
1993
|
+
.phase { color: ${Ve}; }
|
|
1994
|
+
.label { color: ${at}; }
|
|
1778
1995
|
@media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1996
|
+
/* 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 ${te.type} ${te.arrive} ${ua(0)} both; }
|
|
1998
|
+
`,nr]}render(){let t=this.stage&&this.stage in rr?rr[this.stage]:void 0,e=this.index||t?.[0]||"",i=this.phase||(t?Vr(t[1]):""),a=this.label||(t?Vr(t[2]):"");return!e&&!i&&!a?C``:C`<span class="tag" part="tag" aria-hidden=${this.announce?ne:"true"}
|
|
1999
|
+
>${e?C`<span class="index" part="index">${e}</span>`:ne}${i?C`<span class="phase" part="phase">${i}</span>`:ne}${a?C`<span class="label" part="label">${a}</span>`:ne}</span
|
|
2000
|
+
>`}},ba=class extends pe{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=[...pe.styles,Pn,ot`
|
|
2001
|
+
:host { display: block; container-type: inline-size; color: ${A.text}; }
|
|
2002
|
+
/* 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: ${P(2)} ${P(4)}; }
|
|
2004
|
+
.top.tagged { min-block-size: 29px; }
|
|
1784
2005
|
/* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */
|
|
1785
|
-
.label { margin: 0; font-family: ${
|
|
1786
|
-
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${
|
|
1787
|
-
.heading { margin: 0; font-family: ${
|
|
2006
|
+
.label { margin: 0; font-family: ${A.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${A.textMuted}; }
|
|
2007
|
+
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${P(10)}; row-gap: ${P(6)}; align-items: end; margin-block-start: ${P(6)}; }
|
|
2008
|
+
.heading { margin: 0; font-family: ${A.fontHeading}; font-weight: ${Qe("semibold")}; color: var(--impakt-color-text-heading, ${A.text}); text-wrap: balance; overflow-wrap: anywhere; }
|
|
1788
2009
|
:host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
1789
|
-
|
|
2010
|
+
/* Display L sets a section title 680px wide at 64px, with a side lead or without (21:1080, 20:1160, 34:644). */
|
|
2011
|
+
: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; }
|
|
1790
2012
|
/* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */
|
|
1791
2013
|
:host([size='xl']) .heading { font-size: clamp(3.25rem, 1.2128rem + 9.315cqi, 7.5rem); line-height: var(--impakt-type-display-xl-line-height, 1); letter-spacing: var(--impakt-type-display-xl-tracking, -0.05em); }
|
|
1792
|
-
|
|
1793
|
-
.
|
|
2014
|
+
/* The lead in G2 Body M, 16px at 1.45, 24px under the heading and at most 480px wide (9:385). */
|
|
2015
|
+
.lead { margin: ${P(6)} 0 0; max-inline-size: 30rem; font-size: 1rem; line-height: 1.45; color: ${A.textMuted}; }
|
|
2016
|
+
.side { display: grid; gap: ${P(6)}; justify-items: end; }
|
|
1794
2017
|
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
1795
|
-
.body.aside { align-items: center; }
|
|
2018
|
+
:host([aside]) .body, .body.aside { align-items: center; }
|
|
1796
2019
|
.side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }
|
|
1797
2020
|
.side:not(:has(.lead)) { align-self: center; }
|
|
1798
2021
|
::slotted([slot='aside']) { display: block; max-inline-size: 100%; }
|
|
1799
2022
|
@container (max-width: 47.99rem) {
|
|
1800
|
-
|
|
1801
|
-
.
|
|
1802
|
-
|
|
2023
|
+
/* 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: ${P(5)}; }
|
|
2025
|
+
/* 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: ${P(6)}; }
|
|
2027
|
+
.main .lead { margin-block-start: ${P(4)}; }
|
|
2028
|
+
/* 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
|
+
.side { justify-items: stretch; gap: 0; }
|
|
2030
|
+
.side .lead { inline-size: auto; max-inline-size: none; margin-block-start: ${P(4)}; }
|
|
2031
|
+
::slotted([slot='aside']) { margin-block-start: ${P(6)}; }
|
|
1803
2032
|
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
2033
|
+
/* 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 ${te.type} ${te.arrive} ${ua(0)} both; }
|
|
2035
|
+
`,nr]}render(){let t=C`<p class="lead" part="lead"><slot name="lead">${this.lead}</slot></p>`,e=!!this.lead||this.hasSlot("lead"),i=C`<slot name="heading">${this.heading}</slot>`,a=Number(this.level)===1?C`<h1 class="heading" part="heading">${i}</h1>`:C`<h2 class="heading" part="heading">${i}</h2>`,r=this.leadPosition==="side";return C`<header part="head">
|
|
2036
|
+
<div class=${this.stage||this.hasSlot("tag")?"top tagged":"top"}>
|
|
2037
|
+
${this.label?C`<p class="label" part="label"><span aria-hidden="true"># </span>${this.label}</p>`:C`<span></span>`}
|
|
2038
|
+
<slot name="tag" @slotchange=${()=>this.requestUpdate()}>${this.stage?C`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>`:ne}</slot>
|
|
1808
2039
|
</div>
|
|
1809
2040
|
<div class=${this.hasSlot("aside")?"body aside":"body"}>
|
|
1810
|
-
<div class="main">${a}${e&&!r?
|
|
1811
|
-
<div class="side">${e&&r?
|
|
2041
|
+
<div class="main">${a}${e&&!r?t:ne}</div>
|
|
2042
|
+
<div class="side">${e&&r?t:ne}<slot name="aside" @slotchange=${this.asideChanged}></slot></div>
|
|
1812
2043
|
</div>
|
|
1813
|
-
</header>`}hasSlot(
|
|
2044
|
+
</header>`}asideChanged(t){this.aside=t.target.assignedElements().length>0}hasSlot(t){let e=this.children;return e?Array.from(e).some(i=>i.getAttribute("slot")===t):!1}},fa=class extends pe{static{this.properties={number:{type:String},heading:{type:String},text:{type:String},tags:{type:String},href:{type:String},linkText:{type:String,attribute:"link-text"},headingLevel:{type:Number,attribute:"heading-level"},featured:{type:Boolean,reflect:!0}}}constructor(){super(),this.featured=!1,this.number="",this.heading="",this.text="",this.tags="",this.href="",this.linkText="Learn more",this.headingLevel=3}static{this.styles=[...pe.styles,ot`
|
|
1814
2045
|
:host { display: block; block-size: 100%; }
|
|
1815
|
-
article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${
|
|
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: ${P(6)}; padding: ${P(6)}; background: ${A.surfaceCard}; color: ${A.text}; border: 1px solid ${A.text}; transition: color ${te.wipeDuration} ${te.wipeEasing}, border-color ${te.wipeDuration} ${te.wipeEasing}; }
|
|
2047
|
+
/* 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: ${ue}; opacity: calc(1 - ${te.wipeFrom}); transform: scaleX(${te.wipeFrom}); transform-origin: left center; transition: transform ${te.wipeDuration} ${te.wipeEasing}, opacity ${te.wipeDuration} ${te.wipeEasing}; pointer-events: none; }
|
|
2049
|
+
article:has(a):hover::before, article:focus-within::before { opacity: 1; transform: none; }
|
|
2050
|
+
.go { display: inline-block; transition: translate ${te.arrowDuration} ${te.arrowEasing}; }
|
|
2051
|
+
article:has(a):hover .go, article:focus-within .go { translate: ${te.arrowDistance} 0; }
|
|
2052
|
+
/* 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 ${te.drop} ${te.arrive} ${ua(0)} both, ik-reveal-settle ${te.drop} ${te.arrive} ${ua(0)} both; }
|
|
1816
2054
|
.top { display: flex; align-items: center; justify-content: space-between; }
|
|
1817
|
-
|
|
2055
|
+
/* 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: ${A.fontMono}; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0; }
|
|
1818
2057
|
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }
|
|
1819
|
-
.foot { display: grid; gap: ${
|
|
1820
|
-
|
|
2058
|
+
.foot { display: grid; gap: ${P(2.5)}; }
|
|
2059
|
+
/* 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: ${A.fontHeading}; font-size: 1.5rem; font-weight: ${Qe("semibold")}; line-height: 1.75rem; letter-spacing: -0.025em; }
|
|
1821
2061
|
.heading a { color: inherit; text-decoration: none; }
|
|
1822
2062
|
.heading a::after { content: ''; position: absolute; inset: 0; }
|
|
1823
2063
|
.heading a:focus-visible { outline: none; }
|
|
1824
|
-
.heading a:focus-visible::after { box-shadow: ${
|
|
1825
|
-
.text { margin: 0; font-size: 0.
|
|
1826
|
-
.tags { margin: ${
|
|
1827
|
-
.more {
|
|
1828
|
-
article:has(a):hover, article:focus-within
|
|
1829
|
-
|
|
1830
|
-
article:has(a):hover :is(.
|
|
2064
|
+
.heading a:focus-visible::after { box-shadow: ${A.focusShadow}; }
|
|
2065
|
+
.text { margin: 0; font-size: 0.875rem; line-height: 1.25rem; color: ${A.textMuted}; }
|
|
2066
|
+
.tags { margin: 0; ${Z}; line-height: 0.9375rem; font-weight: ${Qe("medium")}; color: ${A.textMuted}; }
|
|
2067
|
+
.more { ${Z}; font-weight: ${Qe("medium")}; }
|
|
2068
|
+
article:has(a):hover, article:focus-within { color: ${Ve}; border-color: ${ue}; }
|
|
2069
|
+
:host([featured]) article { background: ${ue}; color: ${Ve}; border-color: ${ue}; }
|
|
2070
|
+
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${at}; }
|
|
2071
|
+
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${wt}; }
|
|
1831
2072
|
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
1832
|
-
@media (
|
|
1833
|
-
|
|
2073
|
+
@media (prefers-reduced-motion: reduce) { article, article::before, .go { transition: none; } }
|
|
2074
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } article::before { display: none; } }
|
|
2075
|
+
`,nr]}render(){let t=st(this.headingLevel);return C`<article part="card">
|
|
1834
2076
|
<div class="top" aria-hidden="true">
|
|
1835
2077
|
<span class="number" part="number">${this.number}</span>
|
|
1836
2078
|
<span class="dot" part="dot"></span>
|
|
1837
2079
|
</div>
|
|
1838
2080
|
<div class="foot">
|
|
1839
|
-
<div class="heading" part="heading" role="heading" aria-level=${
|
|
1840
|
-
${this.href?
|
|
2081
|
+
<div class="heading" part="heading" role="heading" aria-level=${t}>
|
|
2082
|
+
${this.href?C`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}
|
|
1841
2083
|
</div>
|
|
1842
|
-
${this.text?
|
|
1843
|
-
${this.tags?
|
|
1844
|
-
${this.href&&this.linkText?
|
|
2084
|
+
${this.text?C`<p class="text" part="text">${this.text}</p>`:ne}
|
|
2085
|
+
${this.tags?C`<p class="tags" part="tags">${this.tags}</p>`:ne}
|
|
2086
|
+
${this.href&&this.linkText?C`<span class="more" part="more" aria-hidden="true">${this.linkText} <span class="go">→</span></span>`:ne}
|
|
1845
2087
|
</div>
|
|
1846
|
-
</article>`}}
|
|
2088
|
+
</article>`}},$a=class extends pe{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=[...pe.styles,ot`
|
|
1847
2089
|
:host { display: inline-block; position: relative; pointer-events: none; }
|
|
1848
2090
|
.cursor { display: inline-flex; align-items: flex-start; }
|
|
1849
2091
|
svg { display: block; flex: none; }
|
|
1850
|
-
.arrow { fill: ${
|
|
1851
|
-
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${
|
|
1852
|
-
:host([variant='outline']) .name { background: ${
|
|
1853
|
-
:host([variant='accent']) .name { background: ${
|
|
2092
|
+
.arrow { fill: ${ue}; stroke: ${Ve}; }
|
|
2093
|
+
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${Z}; font-weight: ${Qe("medium")}; white-space: nowrap; background: ${ue}; color: ${Ve}; border: 1px solid ${ue}; }
|
|
2094
|
+
:host([variant='outline']) .name { background: ${A.surfaceCard}; color: ${A.text}; border-color: ${A.text}; }
|
|
2095
|
+
:host([variant='accent']) .name { background: ${xe}; color: ${ye}; border-color: ${ye}; }
|
|
1854
2096
|
:host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }
|
|
1855
2097
|
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }
|
|
1856
2098
|
@media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }
|
|
1857
2099
|
@media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }
|
|
1858
|
-
`]}render(){return
|
|
2100
|
+
`]}render(){return C`<span class="cursor" part="cursor" aria-hidden="true">
|
|
1859
2101
|
<svg viewBox="0 0 16 22" width="16" height="22" focusable="false"><path class="arrow" d="M1.5 1.5v16.2l4.3-4.1 3 6.6 2.6-1.2-3-6.5h6z" stroke-width="1.25" stroke-linejoin="round" /></svg>
|
|
1860
|
-
${this.name?
|
|
1861
|
-
</span>`}},
|
|
2102
|
+
${this.name?C`<span class="name" part="name">${this.name}</span>`:ne}
|
|
2103
|
+
</span>`}},xa=class extends pe{static{this.properties={text:{type:String},arrow:{type:String,reflect:!0},decorative:{type:Boolean,reflect:!0}}}constructor(){super(),this.text="",this.arrow="none",this.decorative=!1}static{this.styles=[...pe.styles,ot`
|
|
1862
2104
|
:host { display: inline-block; max-inline-size: 18rem; }
|
|
1863
|
-
.note { display: inline-flex; align-items: center; gap: ${
|
|
2105
|
+
.note { display: inline-flex; align-items: center; gap: ${P(2)}; }
|
|
1864
2106
|
:host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }
|
|
1865
2107
|
:host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }
|
|
1866
|
-
p { margin: 0; font-family: var(--impakt-font-family-hand, ${
|
|
1867
|
-
svg { flex: none; color: ${
|
|
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}; }
|
|
1868
2110
|
:host([arrow='left']) svg { transform: scaleX(-1); }
|
|
1869
2111
|
:host([arrow='down']) svg { transform: rotate(90deg); }
|
|
1870
2112
|
:host([arrow='up']) svg { transform: rotate(-90deg); }
|
|
1871
2113
|
@media (forced-colors: active) { p, svg { color: CanvasText; } }
|
|
1872
|
-
`]}render(){let
|
|
1873
|
-
:host { display: block; color: ${
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
:
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
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}; }
|
|
2116
|
+
/* Stacked, as the contact page's direct line (20:1163): 28px apart, each value 8px under its label. */
|
|
2117
|
+
dl { margin: 0; display: grid; gap: 28px; }
|
|
2118
|
+
/* 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: ${P(5)}; row-gap: ${P(6)}; }
|
|
2120
|
+
:host([layout='columns']) .fact { border-block-start: 1px solid ${A.text}; padding-block-start: 14px; }
|
|
2121
|
+
dt { ${Z}; color: ${A.textMuted}; }
|
|
2122
|
+
dd { margin: ${P(2)} 0 0; font-family: ${A.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }
|
|
2123
|
+
.sm { font-size: 1rem; line-height: 1.45; }
|
|
1881
2124
|
.md { font-size: 1.125rem; }
|
|
1882
2125
|
.lg { font-size: 1.5rem; letter-spacing: -0.01em; }
|
|
1883
2126
|
.xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }
|
|
1884
2127
|
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
|
|
1885
2128
|
a:hover { text-decoration-thickness: 2px; }
|
|
2129
|
+
/* Stacked, a value that is a link stands alone, so it is not underlined until it is pointed at or focused (20:1163). */
|
|
2130
|
+
:host([layout='stacked']) a { text-decoration: none; }
|
|
2131
|
+
:host([layout='stacked']) a:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-thickness: 2px; }
|
|
1886
2132
|
@media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }
|
|
1887
|
-
`]}render(){return this.items.length?
|
|
1888
|
-
${this.items.map(
|
|
1889
|
-
<dt part="label">${
|
|
1890
|
-
<dd part="value" class=${
|
|
2133
|
+
`]}render(){return this.items.length?C`<dl part="list" aria-label=${this.label||ne}>
|
|
2134
|
+
${this.items.map(t=>C`<div class="fact" part="fact">
|
|
2135
|
+
<dt part="label">${t.label}</dt>
|
|
2136
|
+
<dd part="value" class=${t.size??this.size}>${t.href?C`<a href=${t.href}>${t.value}</a>`:t.value}</dd>
|
|
1891
2137
|
</div>`)}
|
|
1892
|
-
</dl>`:
|
|
1893
|
-
:host { display: block; container-type: inline-size; color: ${
|
|
1894
|
-
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
.
|
|
2138
|
+
</dl>`:C``}},va=class extends pe{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=[...pe.styles,ot`
|
|
2139
|
+
:host { display: block; container-type: inline-size; color: ${A.text}; }
|
|
2140
|
+
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${A.text}; }
|
|
2141
|
+
/* 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: ${P(10)}; align-items: center; padding-block: ${P(6)}; border-block-end: 1px solid ${A.rule}; }
|
|
2143
|
+
:host([split='text']) li { grid-template-columns: 60px minmax(0, 460fr) minmax(0, 480fr); }
|
|
2144
|
+
.n { font-family: ${A.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${A.textMuted}; }
|
|
2145
|
+
.heading { margin: 0; font-family: ${A.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${Qe("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2146
|
+
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${A.textMuted}; }
|
|
1899
2147
|
@container (max-width: 47.99rem) {
|
|
1900
|
-
li { grid-template-columns: minmax(0, 1fr); row-gap: ${
|
|
2148
|
+
li { grid-template-columns: minmax(0, 1fr); row-gap: ${P(2)}; }
|
|
1901
2149
|
}
|
|
1902
2150
|
@media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }
|
|
1903
|
-
`]}render(){if(!this.items.length)return
|
|
1904
|
-
${this.items.map((
|
|
1905
|
-
<span class="n" aria-hidden="true">${
|
|
1906
|
-
<div class="heading" role="heading" aria-level=${
|
|
1907
|
-
${
|
|
2151
|
+
`]}render(){if(!this.items.length)return C``;let t=st(this.headingLevel),e=Number.isFinite(Number(this.start))?Number(this.start):1;return C`<ol part="list" role="list" start=${e} aria-label=${this.label||ne}>
|
|
2152
|
+
${this.items.map((i,a)=>C`<li part="item">
|
|
2153
|
+
<span class="n" aria-hidden="true">${Pr(e+a)}</span>
|
|
2154
|
+
<div class="heading" role="heading" aria-level=${t} part="heading">${i.heading}</div>
|
|
2155
|
+
${i.text?C`<p class="text" part="text">${i.text}</p>`:C`<span></span>`}
|
|
1908
2156
|
</li>`)}
|
|
1909
|
-
</ol>`}},
|
|
1910
|
-
:host { display: block; color: ${
|
|
1911
|
-
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${
|
|
1912
|
-
section { border-block-start: 1px solid ${
|
|
1913
|
-
.heading { margin: 0; ${
|
|
1914
|
-
ul { margin: ${
|
|
1915
|
-
li { font-family: ${
|
|
2157
|
+
</ol>`}},ka=class extends pe{static{this.properties={columns:{type:Array},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.columns=[],this.headingLevel=3}static{this.styles=[...pe.styles,ot`
|
|
2158
|
+
:host { display: block; color: ${A.text}; }
|
|
2159
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${P(8)} ${P(5)}; }
|
|
2160
|
+
section { border-block-start: 1px solid ${A.text}; padding-block-start: ${P(4)}; }
|
|
2161
|
+
.heading { margin: 0; ${Z}; color: ${A.textMuted}; }
|
|
2162
|
+
ul { margin: ${P(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${P(2)}; }
|
|
2163
|
+
li { font-family: ${A.fontHeading}; font-size: 1.5rem; font-weight: ${Qe("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
1916
2164
|
@media (forced-colors: active) { section { border-color: CanvasText; } }
|
|
1917
|
-
`]}render(){if(!this.columns.length)return
|
|
1918
|
-
${this.columns.map(e=>
|
|
1919
|
-
<div class="heading" role="heading" aria-level=${
|
|
1920
|
-
<ul role="list" part="list">${(e.items??[]).map(
|
|
2165
|
+
`]}render(){if(!this.columns.length)return C``;let t=st(this.headingLevel);return C`<div class="grid" part="grid">
|
|
2166
|
+
${this.columns.map(e=>C`<section part="column">
|
|
2167
|
+
<div class="heading" role="heading" aria-level=${t} part="heading">${e.heading}</div>
|
|
2168
|
+
<ul role="list" part="list">${(e.items??[]).map(i=>C`<li part="item">${i}</li>`)}</ul>
|
|
1921
2169
|
</section>`)}
|
|
1922
|
-
</div>`}},
|
|
2170
|
+
</div>`}},wa=class extends pe{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=[...pe.styles,ot`
|
|
1923
2171
|
:host { display: block; block-size: 100%; container-type: inline-size; }
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
.
|
|
1927
|
-
.
|
|
1928
|
-
.
|
|
1929
|
-
.
|
|
1930
|
-
.
|
|
1931
|
-
|
|
2172
|
+
/* 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: ${P(8)}; background: ${A.surfaceCard}; color: ${A.text}; border: 1px solid ${A.text}; }
|
|
2174
|
+
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${P(2)}; }
|
|
2175
|
+
.hours { margin: 0; ${Z}; color: ${A.textMuted}; }
|
|
2176
|
+
.tag { margin: 0; padding: 3px 6px; ${Z}; font-weight: ${Qe("medium")}; background: ${xe}; color: ${ye}; }
|
|
2177
|
+
.name { margin: 0; font-family: ${A.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${Qe("semibold")}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
|
|
2178
|
+
.region { margin: 0; font-size: 1rem; line-height: 1.2; }
|
|
2179
|
+
.text { margin: 0; font-size: 1rem; line-height: 1.45; color: ${A.textMuted}; }
|
|
2180
|
+
@container (max-width: 22rem) { article { padding: ${P(5)}; } }
|
|
1932
2181
|
@media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }
|
|
1933
|
-
`]}render(){let
|
|
1934
|
-
${this.hours||this.tag?
|
|
1935
|
-
<div class="name" role="heading" aria-level=${
|
|
1936
|
-
${this.region?
|
|
1937
|
-
${this.text?
|
|
1938
|
-
</article>`}};customElements.define("impakt-stage-tag",
|
|
1939
|
-
|
|
1940
|
-
|
|
2182
|
+
`]}render(){let t=st(this.headingLevel);return C`<article part="card">
|
|
2183
|
+
${this.hours||this.tag?C`<div class="top">${this.hours?C`<p class="hours" part="hours">${this.hours}</p>`:C`<span></span>`}${this.tag?C`<p class="tag" part="tag">${this.tag}</p>`:ne}</div>`:ne}
|
|
2184
|
+
<div class="name" role="heading" aria-level=${t} part="name">${this.name}</div>
|
|
2185
|
+
${this.region?C`<p class="region" part="region">${this.region}</p>`:ne}
|
|
2186
|
+
${this.text?C`<p class="text" part="text">${this.text}</p>`:ne}
|
|
2187
|
+
</article>`}};customElements.define("impakt-stage-tag",ga);customElements.define("impakt-section-head",ba);customElements.define("impakt-service-card",fa);customElements.define("impakt-cursor",$a);customElements.define("impakt-hand-note",xa);customElements.define("impakt-facts",ya);customElements.define("impakt-numbered-list",va);customElements.define("impakt-column-list",ka);customElements.define("impakt-office-card",wa);import{css as ii,html as K,nothing as ve,svg as Fn}from"./atomic-ui.js";import{ImpaktElement as Ze,R as ze,fontWeight as ti,revealAt as ei,revealStyles as Dn,say as Yr,space as Le,t as Ke,visuallyHidden as Wn}from"./atomic-ui.js";var Xr=40,Tt=40,Sa=class extends Ze{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=[...Ze.styles,ii`
|
|
2188
|
+
/* 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, ${It}); color: ${He}; }
|
|
2190
|
+
.visual { display: none; position: relative; margin-block-start: var(--impakt-band-panel-inset, 32px); }
|
|
1941
2191
|
.visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
|
|
1942
|
-
.visual path { fill: none; stroke: ${
|
|
1943
|
-
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${
|
|
1944
|
-
|
|
2192
|
+
.visual path { fill: none; stroke: ${He}; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
|
|
2193
|
+
.ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${He}; background: ${It}; transform: translate(-50%, -50%); }
|
|
2194
|
+
/* 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: ${xe}; }
|
|
2196
|
+
.ring.current { inline-size: 12px; block-size: 12px; }
|
|
1945
2197
|
/* Each label keeps to the space between its point and the next, wrapping rather than running into its neighbour. */
|
|
1946
|
-
.vlabel { position: absolute; transform: translateX(-50%); ${
|
|
1947
|
-
.lineLabel { position: absolute; inset-inline-start: 0; ${
|
|
1948
|
-
.flag { display: inline-block; padding: 4px 8px; ${
|
|
2198
|
+
.vlabel { position: absolute; transform: translateX(-50%); ${Z}; color: ${rt}; inline-size: max-content; max-inline-size: var(--slot); text-align: center; text-wrap: balance; }
|
|
2199
|
+
.lineLabel { position: absolute; inset-inline-start: 0; ${Z}; color: ${rt}; }
|
|
2200
|
+
.flag { display: inline-block; padding: 4px 8px; ${Z}; font-weight: ${ti("medium")}; background: ${xe}; color: ${ye}; white-space: nowrap; }
|
|
1949
2201
|
.visual .flag { position: absolute; transform: translate(-50%, -100%); }
|
|
1950
2202
|
|
|
1951
|
-
ol { margin: 0; padding: ${
|
|
1952
|
-
li { position: relative; padding: 0 0 ${
|
|
1953
|
-
li::before { content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 4px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${
|
|
1954
|
-
li[aria-current]::before { background: ${
|
|
1955
|
-
li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 4.25px; inset-block-start: 14px; inset-block-end: -4px; inline-size: 1.5px; background: ${
|
|
1956
|
-
.rlabel { ${
|
|
1957
|
-
li .flag { margin-inline-start: ${
|
|
2203
|
+
ol { margin: 0; padding: ${Le(6)} ${Le(4)}; list-style: none; }
|
|
2204
|
+
li { position: relative; padding: 0 0 ${Le(5)} 28px; }
|
|
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 ${He}; background: ${It}; }
|
|
2206
|
+
li[aria-current]::before { background: ${xe}; }
|
|
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: ${He}; }
|
|
2208
|
+
.rlabel { ${Z}; font-size: 0.75rem; color: ${He}; }
|
|
2209
|
+
li .flag { margin-inline-start: ${Le(2)}; }
|
|
1958
2210
|
|
|
1959
2211
|
@container (min-width: 60rem) {
|
|
1960
2212
|
.visual { display: block; }
|
|
1961
|
-
ol { ${
|
|
2213
|
+
ol { ${Wn} }
|
|
1962
2214
|
}
|
|
1963
2215
|
@media (forced-colors: active) {
|
|
1964
2216
|
.visual path { stroke: CanvasText; }
|
|
1965
2217
|
.ring, li::before { border-color: CanvasText; background: Canvas; }
|
|
1966
|
-
.ring.current, li[aria-current]::before { background: Highlight; }
|
|
2218
|
+
.ring.current, .ring.flagged, li[aria-current]::before { background: Highlight; }
|
|
1967
2219
|
li::after { background: CanvasText; }
|
|
1968
2220
|
.flag { border: 1px solid CanvasText; }
|
|
1969
2221
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2222
|
+
/* 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 ${ze.line} ${ze.shape} ${ei(0)} both; }
|
|
2224
|
+
:host([data-motion]) .lineLabel { animation: ik-reveal-type ${ze.type} ${ze.arrive} ${ei(0)} both; }
|
|
2225
|
+
:host([data-motion]) .ring { animation: ik-reveal-mark ${ze.mark} ${ze.arrive} ${ei()} both; }
|
|
2226
|
+
:host([data-motion]) :is(.vlabel, .visual .flag) { animation: ik-reveal-fade ${ze.mark} ${ze.arrive} ${ei()} both; }
|
|
2227
|
+
:host([data-motion]) .ring.flagged { animation: ik-reveal-mark ${ze.mark} ${ze.arrive} ${ei()} both, ik-line-fill ${ze.mark} ${ze.arrive} calc(var(--ik-reveal-delay, 0ms) + max(var(--n, 0) * ${ze.stagger}, ${ze.line})) both; }
|
|
2228
|
+
@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: ${It}; } }
|
|
2230
|
+
`,Dn]}render(){let t=this.nodes??[];if(!t.length)return K``;let e=t.length,i=$=>Math.max(0,Math.min(4,Number($.depth)||0)),a=Math.max(...t.map(i)),r=Math.round(Tt+a*Xr+55),n=t.map(($,m)=>{let z=Number($.at);return $.at!=null&&Number.isFinite(z)?Math.max(0,Math.min(1,z)):(m+.5)/e}),s=t.map(($,m)=>({x:n[m]*1e3,y:Tt+i($)*Xr})),h=s.map(($,m)=>{let z=1;for(let J=m-1;J>=0&&s[J].y===$.y;J--)z++;for(let J=m+1;J<e&&s[J].y===$.y;J++)z++;return z}),y=40/1080*1e3,f=$=>Math.round($*100)/100,X=($,m,z,J)=>{let ae=f(($+z)/2);return` L${f($)} ${m} C${ae} ${m} ${ae} ${J} ${f(z)} ${J}`},ie=`M0 ${s[0].y} L${s[0].x} ${s[0].y}`;for(let $=1;$<e;$++){let m=s[$-1],z=s[$],J=z.x-m.x;if(m.y===z.y){ie+=` L${z.x} ${z.y}`;continue}if(m.y>Tt&&z.y>Tt){let sr=Math.min(y,J/2);ie+=X(m.x,m.y,m.x+sr,Tt)+X(z.x-sr,Tt,z.x,z.y);continue}let ae=Math.min(y,J),Ee=z.y>m.y,Fe=Ee?h[$]===1:h[$-1]===1;ie+=(Ee?!Fe:Fe)?X(m.x,m.y,m.x+ae,z.y):X(z.x-ae,m.y,z.x,z.y),ie+=` L${z.x} ${z.y}`}ie+=` L1000 ${s[e-1].y}`;let Oe=$=>`${n[$]*100}%`,jt=t.some($=>$.at!=null),qe=$=>{let m=Math.min($>0?n[$]-n[$-1]:1,$<e-1?n[$+1]-n[$]:1);return jt?`calc(${m*100}cqi + 0.25rem)`:`calc(${100/e}cqi - 0.5rem)`},Pt=t.filter($=>$.label||$.flag);return K`<div class="visual" part="drawing" aria-hidden="true" style="block-size:${r}px;--n:${e}">
|
|
2231
|
+
<svg viewBox="0 0 1000 ${r}" preserveAspectRatio="none" focusable="false">${Fn`<path d=${ie} />`}</svg>
|
|
2232
|
+
${this.lineLabel?K`<span class="lineLabel" style="inset-block-start:${Tt-66}px">${this.lineLabel}</span>`:ve}
|
|
2233
|
+
${t.map(($,m)=>{let z=s[m].y,J=i($)===0,ae=Fe=>`inset-inline-start:${Oe(m)};${Fe};--slot:${qe(m)};--i:${m}`,Ee=$.label?J?$.flag?ve:K`<span class="vlabel" style=${ae(`inset-block-end:${r-z+12}px`)}>${$.label}</span>`:K`<span class="vlabel" style=${ae(`inset-block-start:${z+14}px`)}>${$.label}</span>`:ve;return K`<span class="ring${$.current?" current":""}${$.flag?" flagged":""}" style="inset-inline-start:${Oe(m)};inset-block-start:${z}px;--i:${m}"></span>
|
|
2234
|
+
${Ee}
|
|
2235
|
+
${$.flag?K`<span class="flag" style="inset-inline-start:${Oe(m)};inset-block-start:${z-15}px;--i:${m}">${$.flag}</span>`:ve}`})}
|
|
1976
2236
|
</div>
|
|
1977
|
-
<ol part="list" role="list" aria-label=${this.label||
|
|
1978
|
-
${
|
|
1979
|
-
<span class="rlabel">${
|
|
2237
|
+
<ol part="list" role="list" aria-label=${this.label||ve}>
|
|
2238
|
+
${Pt.map($=>K`<li part="item" aria-current=${$.current?"step":ve}>
|
|
2239
|
+
<span class="rlabel">${$.label}</span>${$.flag?K`<span class="flag">${$.flag}</span>`:ve}
|
|
1980
2240
|
</li>`)}
|
|
1981
|
-
</ol>`}},
|
|
2241
|
+
</ol>`}},za=class extends Ze{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=[...Ze.styles,ii`
|
|
1982
2242
|
:host { display: block; }
|
|
1983
2243
|
ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; }
|
|
1984
|
-
li { box-sizing: border-box; min-block-size: 150px; padding: ${
|
|
1985
|
-
li.highlight { background: ${
|
|
1986
|
-
.day { margin: 0; ${
|
|
1987
|
-
.heading { margin: ${
|
|
1988
|
-
.text { margin: ${
|
|
1989
|
-
li.highlight :is(.day, .text) { color: ${
|
|
2244
|
+
li { box-sizing: border-box; min-block-size: 150px; padding: ${Le(5)}; background: ${Jt}; border: 1px solid ${nt}; color: ${He}; }
|
|
2245
|
+
li.highlight { background: ${xe}; border-color: ${xe}; color: ${ye}; }
|
|
2246
|
+
.day { margin: 0; ${Z}; color: ${rt}; }
|
|
2247
|
+
.heading { margin: ${Le(2)} 0 0; font-family: ${Ke.fontHeading}; font-size: 2rem; font-weight: ${ti("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2248
|
+
.text { margin: ${Le(3)} 0 0; font-size: 0.875rem; line-height: 1.45; color: ${rt}; }
|
|
2249
|
+
li.highlight :is(.day, .text) { color: ${ye}; }
|
|
1990
2250
|
@media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }
|
|
1991
|
-
`]}render(){if(!this.days?.length)return
|
|
1992
|
-
${this.days.map(e=>
|
|
2251
|
+
`]}render(){if(!this.days?.length)return K``;let t=st(this.headingLevel);return K`<ol part="list" role="list" aria-label=${this.label||ve}>
|
|
2252
|
+
${this.days.map(e=>K`<li part="day" class=${e.highlight?"highlight":""}>
|
|
1993
2253
|
<p class="day">${e.day}</p>
|
|
1994
|
-
<div class="heading" role="heading" aria-level=${
|
|
1995
|
-
${e.text?
|
|
2254
|
+
<div class="heading" role="heading" aria-level=${t}>${e.heading}</div>
|
|
2255
|
+
${e.text?K`<p class="text">${e.text}</p>`:ve}
|
|
1996
2256
|
</li>`)}
|
|
1997
|
-
</ol>`}},
|
|
2257
|
+
</ol>`}},Ta=class extends Ze{static{this.properties={label:{type:String},text:{type:String}}}constructor(){super(),this.label="",this.text=""}static{this.styles=[...Ze.styles,ii`
|
|
1998
2258
|
:host { display: block; }
|
|
1999
|
-
|
|
2000
|
-
.
|
|
2001
|
-
.
|
|
2002
|
-
|
|
2003
|
-
@media (
|
|
2259
|
+
/* 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(${Le(8)} - 1px); background: ${ue}; color: ${Ve}; border: 1px solid ${ue}; }
|
|
2261
|
+
.label { margin: 0 0 12px; ${Z}; font-weight: ${ti("medium")}; color: ${wt}; }
|
|
2262
|
+
.text { margin: 0; max-inline-size: 28.125em; font-family: ${Ke.fontHeading}; font-size: clamp(1.5rem, 1rem + 2vw, 2rem); font-weight: ${ti("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2263
|
+
@media (prefers-color-scheme: dark) { .panel { border-color: ${it}; } }
|
|
2264
|
+
@media (max-width: 30rem) { .panel { padding: ${Le(6)}; } }
|
|
2004
2265
|
@media (forced-colors: active) { .panel { border-color: CanvasText; } }
|
|
2005
|
-
`]}render(){return
|
|
2006
|
-
${this.label?
|
|
2266
|
+
`]}render(){return K`<div class="panel" part="panel">
|
|
2267
|
+
${this.label?K`<p class="label" part="label">${this.label}</p>`:ve}
|
|
2007
2268
|
<p class="text" part="text"><slot>${this.text}</slot></p>
|
|
2008
|
-
</div>`}},
|
|
2269
|
+
</div>`}},Ma=class extends Ze{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=[...Ze.styles,ii`
|
|
2009
2270
|
:host { display: block; block-size: 100%; }
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
.
|
|
2013
|
-
.
|
|
2014
|
-
|
|
2015
|
-
.
|
|
2016
|
-
.
|
|
2271
|
+
/* 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: ${Le(6)}; background: ${Ke.surfaceCard}; color: ${Ke.text}; border: 1px solid ${Ke.text}; }
|
|
2273
|
+
.top { display: flex; justify-content: space-between; align-items: center; gap: ${Le(2)}; flex-wrap: wrap; min-block-size: 22px; }
|
|
2274
|
+
.number { font-family: ${Ke.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }
|
|
2275
|
+
.impact { margin: 0; padding: 3px 7px; ${Z}; font-weight: ${ti("medium")}; border: 1px solid ${Ke.text}; color: ${Ke.text}; }
|
|
2276
|
+
:host([impact='high']) .impact { background: ${xe}; color: ${ye}; border-color: ${ye}; }
|
|
2277
|
+
.statement { margin: 0; font-family: ${Ke.fontHeading}; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; }
|
|
2278
|
+
.metric { margin: 0; ${Z}; color: ${Ke.textMuted}; }
|
|
2017
2279
|
@media (forced-colors: active) { article, .impact { border-color: CanvasText; } }
|
|
2018
|
-
`]}render(){let
|
|
2019
|
-
${this.number||e?
|
|
2280
|
+
`]}render(){let t={high:"High impact",medium:"Medium impact",low:"Low impact"},e=this.impactLabel||(this.impact&&t[this.impact]?Yr(t[this.impact]):"");return K`<article part="card">
|
|
2281
|
+
${this.number||e?K`<div class="top">
|
|
2020
2282
|
<span class="number" part="number">${this.number}</span>
|
|
2021
|
-
${e?
|
|
2022
|
-
</div>`:
|
|
2023
|
-
${this.statement?
|
|
2024
|
-
${this.metric?
|
|
2025
|
-
</article>`}},
|
|
2283
|
+
${e?K`<p class="impact" part="impact">${e}</p>`:ve}
|
|
2284
|
+
</div>`:ve}
|
|
2285
|
+
${this.statement?K`<p class="statement" part="statement">${this.statement}</p>`:ve}
|
|
2286
|
+
${this.metric?K`<p class="metric" part="metric">${Yr("Metric")} · ${this.metric}</p>`:ve}
|
|
2287
|
+
</article>`}},Ca=class extends Ze{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=[...Ze.styles,ii`
|
|
2026
2288
|
:host { display: block; }
|
|
2027
|
-
.frame { border: 1px solid ${
|
|
2028
|
-
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${
|
|
2029
|
-
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${
|
|
2030
|
-
.dot:first-child { background: ${
|
|
2031
|
-
.caption { margin-inline-start: ${
|
|
2289
|
+
.frame { border: 1px solid ${nt}; background: ${It}; color: ${He}; }
|
|
2290
|
+
.bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${Le(3)}; background: ${Jt}; border-block-end: 1px solid ${nt}; overflow: hidden; }
|
|
2291
|
+
.dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${nt}; }
|
|
2292
|
+
.dot:first-child { background: ${xe}; }
|
|
2293
|
+
.caption { margin-inline-start: ${Le(1.5)}; ${Z}; color: ${rt}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2032
2294
|
.canvas { position: relative; }
|
|
2033
|
-
.canvas.empty { background-image: linear-gradient(to right, ${
|
|
2295
|
+
.canvas.empty { background-image: linear-gradient(to right, ${nt} 1px, transparent 1px), linear-gradient(to bottom, ${nt} 1px, transparent 1px); background-size: 28px 28px; }
|
|
2034
2296
|
::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }
|
|
2035
2297
|
@media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
2036
|
-
`]}render(){return
|
|
2298
|
+
`]}render(){return K`<div class="frame" part="frame">
|
|
2037
2299
|
<div class="bar" part="bar" aria-hidden="true">
|
|
2038
2300
|
<span class="dot"></span><span class="dot"></span><span class="dot"></span>
|
|
2039
|
-
${this.caption?
|
|
2301
|
+
${this.caption?K`<span class="caption" part="caption">${this.caption}</span>`:ve}
|
|
2040
2302
|
</div>
|
|
2041
2303
|
<div class="canvas ${this.filled?"":"empty"}" part="canvas" style=${this.filled?"":`aspect-ratio: ${this.ratio||"16 / 9"}`}>
|
|
2042
2304
|
<slot @slotchange=${this.onSlot}></slot>
|
|
2043
2305
|
</div>
|
|
2044
|
-
</div>`}onSlot(
|
|
2306
|
+
</div>`}onSlot(t){this.filled=t.target.assignedElements().length>0}};customElements.define("impakt-process-line",Sa);customElements.define("impakt-week-strip",za);customElements.define("impakt-callout",Ta);customElements.define("impakt-hypothesis-card",Ma);customElements.define("impakt-browser-frame",Ca);import{css as _n,html as Mt,nothing as ai}from"./atomic-ui.js";import{ImpaktElement as Jr,fontWeight as Qr,space as ri,t as Pe}from"./atomic-ui.js";var Aa=class extends Jr{static{this.properties={steps:{type:Array},size:{type:String,reflect:!0},onInk:{type:Boolean,reflect:!0,attribute:"on-ink"},headingLevel:{type:Number,attribute:"heading-level"},label:{type:String}}}constructor(){super(),this.steps=[],this.size="md",this.onInk=!1,this.headingLevel=3,this.label=""}static{this.styles=[...Jr.styles,_n`
|
|
2045
2307
|
:host { display: block; container-type: inline-size; }
|
|
2046
2308
|
ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }
|
|
2047
2309
|
li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }
|
|
2048
2310
|
li:not(:first-child) { flex-basis: 56px; }
|
|
2049
|
-
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${
|
|
2050
|
-
:host([on-ink]) .arrow { color: ${
|
|
2311
|
+
.arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${Pe.text}; }
|
|
2312
|
+
:host([on-ink]) .arrow { color: ${He}; }
|
|
2051
2313
|
.arrow svg { display: block; }
|
|
2052
|
-
.via { font-size: 0.75rem; line-height: 1.2; color: ${
|
|
2053
|
-
:host([on-ink]) .via { color: ${
|
|
2054
|
-
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${
|
|
2055
|
-
:host([size='lg']) .box { padding: ${
|
|
2056
|
-
.box.soft { background: ${
|
|
2057
|
-
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${
|
|
2058
|
-
.box.ink { background: ${
|
|
2059
|
-
.box.accent { background: ${
|
|
2060
|
-
.label { margin: 0 0 ${
|
|
2061
|
-
.text { margin: ${
|
|
2314
|
+
.via { font-size: 0.75rem; line-height: 1.2; color: ${Pe.textMuted}; }
|
|
2315
|
+
:host([on-ink]) .via { color: ${rt}; }
|
|
2316
|
+
.box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${ri(4)} ${ri(5)}; border: 1px solid ${Pe.text}; background: ${Pe.surfaceCard}; color: ${Pe.text}; }
|
|
2317
|
+
:host([size='lg']) .box { padding: ${ri(6)}; }
|
|
2318
|
+
.box.soft { background: ${Pe.surfaceSubtle}; }
|
|
2319
|
+
:host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${Jt}; border-color: ${nt}; color: ${He}; }
|
|
2320
|
+
.box.ink { background: ${ue}; border-color: ${it}; color: ${Ve}; }
|
|
2321
|
+
.box.accent { background: ${xe}; border-color: ${xe}; color: ${ye}; }
|
|
2322
|
+
.label { margin: 0 0 ${ri(2)}; ${Z}; color: ${Pe.textMuted}; }
|
|
2323
|
+
.text { margin: ${ri(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${Pe.textMuted}; }
|
|
2062
2324
|
/* On the soft fill the muted words are drawn a step toward the ink, so they read at 4.5:1 for a brand whose soft fill is its own tint. */
|
|
2063
|
-
.soft :is(.label, .text) { color: color-mix(in srgb, ${
|
|
2064
|
-
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${
|
|
2065
|
-
.ink :is(.label, .text) { color: ${
|
|
2066
|
-
.accent :is(.label, .text) { color: ${
|
|
2067
|
-
.heading { margin: 0; font-family: ${
|
|
2068
|
-
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${
|
|
2325
|
+
.soft :is(.label, .text) { color: color-mix(in srgb, ${Pe.textMuted} 80%, ${Pe.text}); }
|
|
2326
|
+
:host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${rt}; }
|
|
2327
|
+
.ink :is(.label, .text) { color: ${at}; }
|
|
2328
|
+
.accent :is(.label, .text) { color: ${ye}; }
|
|
2329
|
+
.heading { margin: 0; font-family: ${Pe.fontHeading}; font-size: 1.125rem; font-weight: ${Qr("medium")}; line-height: 1.25; letter-spacing: -0.01em; }
|
|
2330
|
+
:host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${Qr("semibold")}; line-height: 1.1; letter-spacing: -0.03em; }
|
|
2069
2331
|
@container (max-width: 47.99rem) {
|
|
2070
2332
|
ol, li { flex-direction: column; }
|
|
2071
2333
|
.arrow { inline-size: auto; block-size: 48px; flex-direction: row; }
|
|
2072
2334
|
.arrow svg { transform: rotate(90deg); }
|
|
2073
2335
|
}
|
|
2074
2336
|
@media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }
|
|
2075
|
-
`]}render(){if(!this.steps?.length)return
|
|
2076
|
-
${this.steps.map((e,
|
|
2077
|
-
${
|
|
2337
|
+
`]}render(){if(!this.steps?.length)return Mt``;let t=st(this.headingLevel);return Mt`<ol part="list" role="list" aria-label=${this.label||ai}>
|
|
2338
|
+
${this.steps.map((e,i)=>Mt`<li part="step">
|
|
2339
|
+
${i>0?Mt`<span class="arrow" part="arrow">
|
|
2078
2340
|
<svg viewBox="0 0 36 12" width="36" height="12" fill="none" stroke="currentColor" stroke-width="1.25" aria-hidden="true" focusable="false"><path d="M0 6h34M29 1l5 5-5 5" /></svg>
|
|
2079
|
-
${e.connector?
|
|
2080
|
-
</span>`:
|
|
2341
|
+
${e.connector?Mt`<span class="via">${e.connector}</span>`:ai}
|
|
2342
|
+
</span>`:ai}
|
|
2081
2343
|
<div class="box ${e.tone??"card"}" part="box">
|
|
2082
|
-
${e.label?
|
|
2083
|
-
<div class="heading" role="heading" aria-level=${
|
|
2084
|
-
${e.text?
|
|
2344
|
+
${e.label?Mt`<p class="label">${e.label}</p>`:ai}
|
|
2345
|
+
<div class="heading" role="heading" aria-level=${t}>${e.heading}</div>
|
|
2346
|
+
${e.text?Mt`<p class="text">${e.text}</p>`:ai}
|
|
2085
2347
|
</div>
|
|
2086
2348
|
</li>`)}
|
|
2087
|
-
</ol>`}};customElements.define("impakt-flow",
|
|
2349
|
+
</ol>`}};customElements.define("impakt-flow",Aa);export{Ji as ImpaktAffordabilityCalculator,pi as ImpaktAnnouncement,Di as ImpaktBeforeAfter,la as ImpaktBranchList,da as ImpaktBranchTimeline,Ca as ImpaktBrowserFrame,Ta as ImpaktCallout,gi as ImpaktCardGrid,Li as ImpaktCarousel,ca as ImpaktCheckList,ka as ImpaktColumnList,Gt as ImpaktContactBlock,Hi as ImpaktCtaBanner,$a as ImpaktCursor,Zi as ImpaktEstimator,ya as ImpaktFacts,Si as ImpaktFaq,li as ImpaktFeatureList,Aa as ImpaktFlow,Ei as ImpaktGallery,xa as ImpaktHandNote,oi as ImpaktHero,Ci as ImpaktHighlight,Ma as ImpaktHypothesisCard,vi as ImpaktJourneyButton,_i as ImpaktLocationCard,Bi as ImpaktLogoCloud,Ri as ImpaktMediaSplit,Fi as ImpaktMortgageCalculator,qi as ImpaktNewsletter,va as ImpaktNumberedList,Ti as ImpaktOffer,wa as ImpaktOfficeCard,Vi as ImpaktPlanComparison,Mi as ImpaktPostCard,Sa as ImpaktProcessLine,ci as ImpaktQuote,Yi as ImpaktRegulatoryNotice,sa as ImpaktReleaseCard,oa as ImpaktReleaseList,Ni as ImpaktReviews,ra as ImpaktScene,na as ImpaktScrubber,hi as ImpaktSearchBar,ba as ImpaktSectionHead,fa as ImpaktServiceCard,ia as ImpaktSiteFooter,ea as ImpaktSiteHeader,zi as ImpaktSiteMenu,Oi as ImpaktSitePlan,ga as ImpaktStageTag,Xi as ImpaktStampDutyCalculator,di as ImpaktStat,wi as ImpaktStatRow,Ii as ImpaktSteps,Wi as ImpaktStickyBar,_t as ImpaktVideo,za as ImpaktWeekStrip,ta as ImpaktWordmark,ki as ImpaktWorkList,Ft as JOURNEY_STAGES,ht as SDLT,rr as STAGE_WORDS,Ar as embedOf,Yt as estimate,kr as gallerySpan,Sr as monthlyPayment,Ga as phaseWeeks,Lr as stampDuty};
|
|
2088
2350
|
//# sourceMappingURL=atomic-ui-blocks.js.map
|