@atomic-ui/blocks 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +3157 -97
- package/dist/chunk-2URXTXNQ.js +296 -0
- package/dist/chunk-2URXTXNQ.js.map +1 -0
- package/dist/chunk-7X4WGV6K.js +97 -0
- package/dist/chunk-7X4WGV6K.js.map +1 -0
- package/dist/{chunk-QGVIJNTD.js → chunk-CCFBROX3.js} +127 -41
- package/dist/chunk-CCFBROX3.js.map +1 -0
- package/dist/{chunk-NLHFBIGQ.js → chunk-EYP5LWUR.js} +28 -10
- package/dist/chunk-EYP5LWUR.js.map +1 -0
- package/dist/chunk-GRKPKJZH.js +275 -0
- package/dist/chunk-GRKPKJZH.js.map +1 -0
- package/dist/{chunk-OR4U4UJQ.js → chunk-MX7FU5JE.js} +69 -1
- package/dist/chunk-MX7FU5JE.js.map +1 -0
- package/dist/{chunk-UVHQY3QJ.js → chunk-NHWD2LUR.js} +2 -2
- package/dist/chunk-NHWD2LUR.js.map +1 -0
- package/dist/{chunk-FLOKZ7O3.js → chunk-PIUPEB4I.js} +44 -11
- package/dist/chunk-PIUPEB4I.js.map +1 -0
- package/dist/{chunk-HNCJLMQB.js → chunk-R7SSIE2E.js} +26 -8
- package/dist/chunk-R7SSIE2E.js.map +1 -0
- package/dist/{chunk-LJ6AQO26.js → chunk-SYTQIQT2.js} +73 -18
- package/dist/chunk-SYTQIQT2.js.map +1 -0
- package/dist/chunk-WGDMORWT.js +48 -0
- package/dist/chunk-WGDMORWT.js.map +1 -0
- package/dist/{chunk-PALYJCLC.js → chunk-XB6FD4SF.js} +3 -3
- package/dist/chunk-XB6FD4SF.js.map +1 -0
- package/dist/chunk-XNRFZCNB.js +499 -0
- package/dist/chunk-XNRFZCNB.js.map +1 -0
- package/dist/{chunk-CC2U2L2H.js → chunk-YXMXLVK7.js} +3 -3
- package/dist/chunk-YXMXLVK7.js.map +1 -0
- package/dist/{chunk-YC6KXE6O.js → chunk-ZD75GU6J.js} +7 -4
- package/dist/chunk-ZD75GU6J.js.map +1 -0
- package/dist/{chunk-TT2PTEQO.js → chunk-ZODL5HD4.js} +64 -17
- package/dist/chunk-ZODL5HD4.js.map +1 -0
- package/dist/components/card-grid.js +1 -1
- package/dist/components/changelog.d.ts +24 -0
- package/dist/components/changelog.js +2 -2
- package/dist/components/estimator.d.ts +25 -0
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +225 -0
- package/dist/components/g2-case.js +16 -0
- package/dist/components/g2-case.js.map +1 -0
- package/dist/components/g2-shared.d.ts +28 -0
- package/dist/components/g2-shared.js +35 -0
- package/dist/components/g2-shared.js.map +1 -0
- package/dist/components/g2-site.d.ts +493 -0
- package/dist/components/g2-site.js +26 -0
- package/dist/components/g2-site.js.map +1 -0
- package/dist/components/g2-tools.d.ts +77 -0
- package/dist/components/g2-tools.js +8 -0
- package/dist/components/g2-tools.js.map +1 -0
- package/dist/components/journey.d.ts +79 -9
- package/dist/components/journey.js +1 -1
- package/dist/components/marketing.d.ts +23 -0
- package/dist/components/marketing.js +1 -1
- package/dist/components/organisms.d.ts +23 -2
- package/dist/components/organisms.js +1 -1
- package/dist/components/property.js +1 -1
- package/dist/components/scene.js +1 -1
- package/dist/components/scrubber.js +1 -1
- package/dist/components/selling.d.ts +42 -1
- package/dist/components/selling.js +1 -1
- package/dist/components/site.d.ts +78 -0
- package/dist/components/site.js +1 -1
- package/dist/components/studio.d.ts +87 -6
- package/dist/components/studio.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +81 -42
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +1373 -787
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-CC2U2L2H.js.map +0 -1
- package/dist/chunk-FLOKZ7O3.js.map +0 -1
- package/dist/chunk-HNCJLMQB.js.map +0 -1
- package/dist/chunk-LJ6AQO26.js.map +0 -1
- package/dist/chunk-NLHFBIGQ.js.map +0 -1
- package/dist/chunk-OR4U4UJQ.js.map +0 -1
- package/dist/chunk-PALYJCLC.js.map +0 -1
- package/dist/chunk-QGVIJNTD.js.map +0 -1
- package/dist/chunk-SOFMXF32.js +0 -142
- package/dist/chunk-SOFMXF32.js.map +0 -1
- package/dist/chunk-TT2PTEQO.js.map +0 -1
- package/dist/chunk-UVHQY3QJ.js.map +0 -1
- package/dist/chunk-YC6KXE6O.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/g2-site.ts"],"sourcesContent":["/**\n * The G2 Noire site blocks: the stage tag and section head every section starts\n * with, the service card, the cursors and hand notes on the hero, the facts,\n * numbered and column lists, and the office card.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontWeight, say, space, spaceAround, t } from '@atomic-ui/ui';\nimport { accent, accentOn, ink, inkLine, inkMuted, inkRaised, levelOf, monoLabel, pad, paper } from './g2-shared';\n\n/** The five stages of a project, as the stage tags name them. */\nexport type StageName = 'note' | 'wireframe' | 'component' | 'code' | 'live';\n\n/** Each stage's number, phase and name, in English; `say` puts them in the page's language. */\nexport const STAGE_WORDS: Record<StageName, readonly [string, string, string]> = {\n note: ['01', 'Discover', 'Note'],\n wireframe: ['02', 'Design low-fi', 'Wireframe'],\n component: ['03', 'Design hi-fi', 'Component'],\n code: ['04', 'Build', 'Code'],\n live: ['05', 'Launch', 'Live'],\n};\n\n/**\n * A small square mono tag that says which stage of a project a section shows,\n * such as \"01 Discover Note\": the number in the accent, the phase in paper and\n * the stage's name quieter, on ink.\n *\n * Set `stage` for one of the five stages, or `index`, `phase` and `label` for\n * your own words; each one set wins over the stage's. On an ink band, set\n * `on-ink`: the tag is raised off the band with a line round it.\n *\n * **It is decoration.** The section's heading says what the section is, so the\n * tag is hidden from a screen reader unless `announce` is set (1.3.1). The tag\n * stays ink in both themes, so the yellow on it stays readable (1.4.3).\n *\n * @category content\n * @icon tag\n */\nexport class ImpaktStageTag extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n index: { type: String },\n phase: { type: String },\n label: { type: String },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n announce: { type: Boolean },\n };\n /** One of the five stages, which fills in the words. Leave empty to give them yourself. */\n declare stage: StageName | '';\n /** The number, such as \"01\". */\n declare index: string;\n /** The phase, such as \"Discover\". */\n declare phase: string;\n /** The stage's name, such as \"Note\". */\n declare label: string;\n /** Raise the tag off an ink band, with a line round it. */\n declare onInk: boolean;\n /** Let a screen reader read the tag. Leave off when the heading beside it says the same. */\n declare announce: boolean;\n\n constructor() {\n super();\n this.stage = '';\n this.index = '';\n this.phase = '';\n this.label = '';\n this.onInk = false;\n this.announce = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; vertical-align: middle; }\n .tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${ink}; border: 1px solid ${ink}; ${monoLabel}; font-size: 0.75rem; font-weight: ${fontWeight('medium')}; white-space: nowrap; }\n :host([on-ink]) .tag { background: ${inkRaised}; border-color: ${inkLine}; }\n .index { color: ${accent}; }\n .phase { color: ${paper}; }\n .label { color: ${inkMuted}; }\n @media (prefers-color-scheme: dark) { .tag { border-color: ${inkLine}; } }\n @media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const words = this.stage && this.stage in STAGE_WORDS ? STAGE_WORDS[this.stage] : undefined;\n const index = this.index || words?.[0] || '';\n const phase = this.phase || (words ? say(words[1]) : '');\n const label = this.label || (words ? say(words[2]) : '');\n if (!index && !phase && !label) return html``;\n return html`<span class=\"tag\" part=\"tag\" aria-hidden=${this.announce ? nothing : 'true'}\n >${index ? html`<span class=\"index\" part=\"index\">${index}</span>` : nothing}${phase ? html`<span class=\"phase\" part=\"phase\">${phase}</span>` : nothing}${\n label ? html`<span class=\"label\" part=\"label\">${label}</span>` : nothing\n }</span\n >`;\n }\n}\n\n/**\n * The head of a section: a mono label such as \"# Services\" with an optional\n * stage tag on the right, then a display heading and a lead.\n *\n * `size` sets the heading: `xl` (120px) for a page's hero, `l` (64px), and `m`\n * (52px) for a section. Give the heading as `heading`, or in the `heading` slot\n * when part of it is picked out with `impakt-highlight` or an accent word. The\n * lead goes under the heading, or with `lead-position=\"side\"` at the foot of a\n * 340px column on the right. The `aside` slot holds a picture on the right,\n * such as a journey object at 448 by 288.\n *\n * **One heading, at the level the page needs.** `level` is 1 for a page's hero\n * and 2 for a section (1.3.1, 2.4.6). The \"#\" before the label is decoration.\n *\n * **It stacks in a narrow column**, measured against its own width: the label\n * row, the heading, the lead and the aside, in reading order (1.4.10). It takes\n * its colours from the band it is on, so it reads on paper, ink and accent.\n *\n * @category layout\n * @icon heading\n * @role heading\n * @slot heading - The heading, when it holds more than words, such as an `impakt-highlight`. Replaces `heading`.\n * @slot lead - The lead, when it holds more than words. Replaces `lead`.\n * @slot tag - Something on the right of the label row, in place of the stage tag.\n * @slot aside - A picture on the right of the heading, such as a journey object.\n */\nexport class ImpaktSectionHead extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n size: { type: String, reflect: true },\n level: { type: Number, reflect: true },\n leadPosition: { type: String, reflect: true, attribute: 'lead-position' },\n stage: { type: String },\n stageOnInk: { type: Boolean, attribute: 'stage-on-ink' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The mono label above the heading, such as \"Services\". A \"#\" is drawn before it. */\n declare label: string;\n declare heading: string;\n /** A sentence or two about the section. */\n declare lead: string;\n /** How large the heading is: `xl` 120px, `l` 64px, `m` 52px. */\n declare size: 'xl' | 'l' | 'm';\n /** The heading's level: 1 for a page's hero, 2 for a section. */\n declare level: 1 | 2;\n /** Where the lead goes: under the heading, or at the foot of a column on the right. */\n declare leadPosition: 'below' | 'side';\n /** A stage tag on the right of the label row. Leave empty for none. */\n declare stage: StageName | '';\n /** Draw the stage tag for an ink band. */\n declare stageOnInk: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.lead = '';\n this.size = 'm';\n this.level = 2;\n this.leadPosition = 'below';\n this.stage = '';\n this.stageOnInk = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n .top { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; min-block-size: 29px; }\n .label { margin: 0; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; color: ${t.textMuted}; }\n .body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${space(10)}; row-gap: ${space(6)}; align-items: end; margin-block-start: ${space(6)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; color: var(--impakt-color-text-heading, ${t.text}); text-wrap: balance; overflow-wrap: anywhere; }\n :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; }\n :host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n :host([size='xl']) .heading { font-size: clamp(3rem, 0.8rem + 10cqi, 7.5rem); line-height: 0.95; letter-spacing: -0.05em; }\n .lead { margin: ${space(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${t.textMuted}; }\n .side { display: grid; gap: ${space(6)}; justify-items: end; }\n /* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */\n .body.aside { align-items: center; }\n .side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }\n .side:not(:has(.lead)) { align-self: center; }\n ::slotted([slot='aside']) { display: block; max-inline-size: 100%; }\n @container (max-width: 47.99rem) {\n .body { grid-template-columns: minmax(0, 1fr); }\n .side { justify-items: stretch; }\n .side .lead { inline-size: auto; }\n }\n `,\n ];\n\n render(): TemplateResult {\n const lead = html`<p class=\"lead\" part=\"lead\"><slot name=\"lead\">${this.lead}</slot></p>`;\n const showLead = Boolean(this.lead) || this.hasSlot('lead');\n const inner = html`<slot name=\"heading\">${this.heading}</slot>`;\n const heading = Number(this.level) === 1 ? html`<h1 class=\"heading\" part=\"heading\">${inner}</h1>` : html`<h2 class=\"heading\" part=\"heading\">${inner}</h2>`;\n const side = this.leadPosition === 'side';\n return html`<header part=\"head\">\n <div class=\"top\">\n ${this.label ? html`<p class=\"label\" part=\"label\"><span aria-hidden=\"true\"># </span>${this.label}</p>` : html`<span></span>`}\n <slot name=\"tag\">${this.stage ? html`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>` : nothing}</slot>\n </div>\n <div class=${this.hasSlot('aside') ? 'body aside' : 'body'}>\n <div class=\"main\">${heading}${showLead && !side ? lead : nothing}</div>\n <div class=\"side\">${showLead && side ? lead : nothing}<slot name=\"aside\"></slot></div>\n </div>\n </header>`;\n }\n\n /** Whether a child is in the named slot. On a server, where there are no children, only the attribute counts. */\n private hasSlot(name: string): boolean {\n const children = (this as unknown as { children?: HTMLCollection }).children;\n if (!children) return false;\n return Array.from(children).some((c) => c.getAttribute('slot') === name);\n }\n}\n\n/**\n * A service on the services grid: a number and a dot at the top, then at the\n * foot its name, a line about it, mono tags such as \"React Native · Expo\" and\n * \"Learn more\".\n *\n * **The card is one link.** The link is on the service's name, a heading, and\n * stretched over the card (2.4.4, 2.5.8). The number, dot and \"Learn more\"\n * line are decoration. Pointing at the card and focusing it look the same: it\n * turns to ink with paper words and the dot and \"Learn more\" in the accent,\n * which holds 4.5:1 on ink, and the focus ring is drawn round it (2.4.7).\n *\n * `featured` draws a card inked all the time, as it is when pointed at, for\n * the one service a page picks out or a sheet that shows the state.\n *\n * Put cards in a four-column grid with a 10px gap. On a phone the words sit at\n * the top and the card is as tall as they are.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktServiceCard extends ImpaktElement {\n static properties = {\n number: { type: String },\n heading: { type: String },\n text: { type: String },\n tags: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n featured: { type: Boolean, reflect: true },\n };\n /** The number at the top, such as \"01\". */\n declare number: string;\n /** The service's name. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it uses or includes, such as \"React Native · Expo · Store launch\". Set in mono capitals. */\n declare tags: string;\n /** Where the card goes. Leave empty for a card that goes nowhere. */\n declare href: string;\n /** The line at the foot of a card that goes somewhere. */\n declare linkText: string;\n declare headingLevel: number;\n /** Draw the card inked, as when it is pointed at. */\n declare featured: boolean;\n\n constructor() {\n super();\n this.featured = false;\n this.number = '';\n this.heading = '';\n this.text = '';\n this.tags = '';\n this.href = '';\n this.linkText = 'Learn more';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${space(6)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .top { display: flex; align-items: center; justify-content: space-between; }\n .number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }\n .foot { display: grid; gap: ${space(3)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.02em; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n .tags { margin: ${space(1)} 0 0; ${monoLabel}; color: ${t.textMuted}; }\n .more { margin-block-start: ${space(2)}; ${monoLabel}; font-weight: ${fontWeight('medium')}; }\n article:has(a):hover, article:focus-within, :host([featured]) article { background: ${ink}; color: ${paper}; border-color: ${ink}; }\n article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${inkMuted}; }\n article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${accent}; }\n @media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n <div class=\"top\" aria-hidden=\"true\">\n <span class=\"number\" part=\"number\">${this.number}</span>\n <span class=\"dot\" part=\"dot\"></span>\n </div>\n <div class=\"foot\">\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>\n ${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}\n </div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.tags ? html`<p class=\"tags\" part=\"tags\">${this.tags}</p>` : nothing}\n ${this.href && this.linkText ? html`<span class=\"more\" part=\"more\" aria-hidden=\"true\">${this.linkText} →</span>` : nothing}\n </div>\n </article>`;\n }\n}\n\n/**\n * A pointer with a name beside it, as if someone were working on the page with\n * you: the cursors round a hero's heading.\n *\n * The name is on ink, outlined, or on the accent. With `drift` it moves a few\n * pixels to and fro, slowly; it stays still for anyone who asks for less\n * motion (2.3.3), and it never moves more than 5 seconds without a way to stop\n * it mattering, because it carries nothing (2.2.2).\n *\n * **It is decoration**, hidden from a screen reader (1.3.1).\n *\n * @category media\n * @icon pointer\n */\nexport class ImpaktCursor extends ImpaktElement {\n static properties = {\n name: { type: String },\n variant: { type: String, reflect: true },\n drift: { type: Boolean, reflect: true },\n };\n /** The name beside the pointer, such as \"Client\". */\n declare name: string;\n /** How the name is drawn: on ink, outlined, or on the accent. */\n declare variant: 'ink' | 'outline' | 'accent';\n /** Move slowly to and fro. Still for anyone who asks for less motion. */\n declare drift: boolean;\n\n constructor() {\n super();\n this.name = '';\n this.variant = 'ink';\n this.drift = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; pointer-events: none; }\n .cursor { display: inline-flex; align-items: flex-start; }\n svg { display: block; flex: none; }\n .arrow { fill: ${ink}; stroke: ${paper}; }\n .name { margin: 16px 0 0 -2px; padding: 4px 7px; ${monoLabel}; font-weight: ${fontWeight('medium')}; white-space: nowrap; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }\n :host([variant='outline']) .name { background: ${t.surfaceCard}; color: ${t.text}; border-color: ${t.text}; }\n :host([variant='accent']) .name { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }\n :host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }\n @keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }\n @media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }\n @media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<span class=\"cursor\" part=\"cursor\" aria-hidden=\"true\">\n <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>\n ${this.name ? html`<span class=\"name\" part=\"name\">${this.name}</span>` : nothing}\n </span>`;\n }\n}\n\n/**\n * A short note in handwriting, with an arrow if it points at something, such\n * as \"keep scrolling, this note becomes the real button.\"\n *\n * The face is `--impakt-font-family-hand` (Kalam in the G2 designs), and the\n * body face until a brand sets it. The note is real text and is read, unless\n * `decorative` is set because it repeats something said elsewhere (1.3.1).\n * The arrow is always decoration.\n *\n * @category content\n * @icon pen\n * @slot - The note, when it holds more than words. Replaces `text`.\n */\nexport class ImpaktHandNote extends ImpaktElement {\n static properties = {\n text: { type: String },\n arrow: { type: String, reflect: true },\n decorative: { type: Boolean, reflect: true },\n };\n /** The note. */\n declare text: string;\n /** Where an arrow points from the note. */\n declare arrow: 'none' | 'left' | 'right' | 'down' | 'up';\n /** Hide the note from a screen reader, when it repeats something said elsewhere. */\n declare decorative: boolean;\n\n constructor() {\n super();\n this.text = '';\n this.arrow = 'none';\n this.decorative = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; max-inline-size: 18rem; }\n .note { display: inline-flex; align-items: center; gap: ${space(2)}; }\n :host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }\n :host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }\n p { margin: 0; font-family: var(--impakt-font-family-hand, ${t.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${t.textMuted}; }\n svg { flex: none; color: ${t.textMuted}; }\n :host([arrow='left']) svg { transform: scaleX(-1); }\n :host([arrow='down']) svg { transform: rotate(90deg); }\n :host([arrow='up']) svg { transform: rotate(-90deg); }\n @media (forced-colors: active) { p, svg { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const arrow =\n this.arrow && this.arrow !== 'none'\n ? html`<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>`\n : nothing;\n return html`<div class=\"note\" part=\"note\" aria-hidden=${this.decorative ? 'true' : nothing}><p part=\"text\"><slot>${this.text}</slot></p>${arrow}</div>`;\n }\n}\n\n/** One fact: a label and its value. */\nexport interface FactItem {\n /** What it is, such as \"Client\". Set in mono capitals. */\n label: string;\n /** The fact, such as \"Vehicle importer · UK → Cyprus\". */\n value: string;\n /** Make the value a link, such as `mailto:` for an email address. */\n href?: string;\n /** This value's size, in place of the block's. */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n}\n\n/**\n * A few facts, each a mono label over its value: a case study's client, role,\n * platform and stack in four columns under an ink rule, or contact details\n * stacked with the email set large.\n *\n * A description list, so each value is read with its label (1.3.1). Columns\n * wrap to fit their width, so they stack on a phone (1.4.10).\n *\n * @category content\n * @icon list\n */\nexport class ImpaktFacts extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n size: { type: String, reflect: true },\n label: { type: String },\n };\n /** The facts, in order. */\n declare items: FactItem[];\n /** Side by side under a rule each, or stacked. */\n declare layout: 'columns' | 'stacked';\n /** The values' size: `sm` 16px, `md` 18px, `lg` 24px, `xl` 32px. An item can set its own. */\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'columns';\n this.size = 'md';\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; color: ${t.text}; }\n dl { margin: 0; display: grid; gap: ${space(5)}; }\n :host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${space(5)}; row-gap: ${space(6)}; }\n :host([layout='columns']) .fact { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n dt { ${monoLabel}; color: ${t.textMuted}; }\n dd { margin: ${space(2)} 0 0; font-family: ${t.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }\n :host([layout='columns']) dd { margin-block-start: ${space(3)}; }\n .sm { font-size: 1rem; }\n .md { font-size: 1.125rem; }\n .lg { font-size: 1.5rem; letter-spacing: -0.01em; }\n .xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }\n a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }\n a:hover { text-decoration-thickness: 2px; }\n @media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n return html`<dl part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) => html`<div class=\"fact\" part=\"fact\">\n <dt part=\"label\">${item.label}</dt>\n <dd part=\"value\" class=${item.size ?? this.size}>${item.href ? html`<a href=${item.href}>${item.value}</a>` : item.value}</dd>\n </div>`,\n )}\n </dl>`;\n }\n}\n\n/** One row of a numbered list. */\nexport interface NumberedItem {\n heading: string;\n text?: string;\n}\n\n/**\n * A numbered list under an ink rule, each row split by a hairline: the number,\n * a heading and a line of quieter text in three columns. \"Three rules we don't\n * break\", the steps of a project, a tool's features.\n *\n * An ordered list, so a screen reader says how many rows there are and which\n * one this is, and the drawn numbers are hidden from it (1.3.1). Each heading\n * is at the level the page asks for. It stacks in a narrow column, measured\n * against its own width (1.4.10), and takes its colours from its band.\n *\n * @category content\n * @icon list-ordered\n */\nexport class ImpaktNumberedList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n start: { type: Number },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare items: NumberedItem[];\n /** The number the first row is given. */\n declare start: number;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.start = 1;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.text}; }\n li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${space(10)}; align-items: center; padding-block: ${space(6)}; border-block-end: 1px solid ${t.rule}; }\n .n { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${t.textMuted}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${t.textMuted}; }\n @container (max-width: 47.99rem) {\n li { grid-template-columns: minmax(0, 1fr); row-gap: ${space(2)}; }\n }\n @media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n const level = levelOf(this.headingLevel);\n const start = Number.isFinite(Number(this.start)) ? Number(this.start) : 1;\n return html`<ol part=\"list\" role=\"list\" start=${start} aria-label=${this.label || nothing}>\n ${this.items.map(\n (item, i) => html`<li part=\"item\">\n <span class=\"n\" aria-hidden=\"true\">${pad(start + i)}</span>\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${item.heading}</div>\n ${item.text ? html`<p class=\"text\" part=\"text\">${item.text}</p>` : html`<span></span>`}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/** One column of a column list. */\nexport interface ColumnListColumn {\n /** The column's heading, such as \"Design\". Set in mono capitals. */\n heading: string;\n /** What is in it, each a line set large. */\n items: string[];\n}\n\n/**\n * What a studio does, in four columns: each under an ink rule, with a mono\n * heading such as \"Engineering\" and a stack of what it covers set large. The\n * items are words, not links.\n *\n * Each column's heading is a heading at the level the page asks for, and its\n * items a list (1.3.1). The columns wrap to fit their width (1.4.10).\n *\n * @category content\n * @icon columns\n */\nexport class ImpaktColumnList extends ImpaktElement {\n static properties = {\n columns: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n declare columns: ColumnListColumn[];\n declare headingLevel: number;\n\n constructor() {\n super();\n this.columns = [];\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; color: ${t.text}; }\n .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${space(8)} ${space(5)}; }\n section { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n .heading { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n ul { margin: ${space(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${space(2)}; }\n li { font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n @media (forced-colors: active) { section { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.columns.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<div class=\"grid\" part=\"grid\">\n ${this.columns.map(\n (col) => html`<section part=\"column\">\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${col.heading}</div>\n <ul role=\"list\" part=\"list\">${(col.items ?? []).map((item) => html`<li part=\"item\">${item}</li>`)}</ul>\n </section>`,\n )}\n </div>`;\n }\n}\n\n/**\n * An office: a mono line with its time zone and hours, its name set large, the\n * region under it and a line about it, on a white card with an ink border. An\n * accent tag at the top right can say how its hours meet another office's,\n * such as \"+2h · same working day\".\n *\n * The name is a heading at the level the page asks for (1.3.1). The tag is\n * text and is read; on a narrow card it moves above the name (1.4.10).\n *\n * @category content\n * @icon map-pin\n */\nexport class ImpaktOfficeCard extends ImpaktElement {\n static properties = {\n hours: { type: String },\n name: { type: String },\n region: { type: String },\n text: { type: String },\n tag: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The time zone and hours, such as \"GMT · Mon–Fri 9–18\". */\n declare hours: string;\n /** The office, such as \"UK\". */\n declare name: string;\n /** Where it is, such as \"United Kingdom\". */\n declare region: string;\n /** A line about it. */\n declare text: string;\n /** An accent tag at the top right, such as \"+2h · same working day\". Leave empty for none. */\n declare tag: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.hours = '';\n this.name = '';\n this.region = '';\n this.text = '';\n this.tag = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; container-type: inline-size; }\n article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(2)}; padding: ${space(8)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }\n .top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${space(2)}; }\n .hours { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n .tag { margin: 0; padding: 3px 6px; ${monoLabel}; font-weight: ${fontWeight('medium')}; background: ${accent}; color: ${accentOn}; }\n .name { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }\n .region { margin: ${space(2)} 0 0; font-size: 1rem; line-height: 1.4; }\n .text { margin: ${space(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n @container (max-width: 22rem) { article { padding: ${space(5)}; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n ${\n this.hours || this.tag\n ? html`<div class=\"top\">${this.hours ? html`<p class=\"hours\" part=\"hours\">${this.hours}</p>` : html`<span></span>`}${this.tag ? html`<p class=\"tag\" part=\"tag\">${this.tag}</p>` : nothing}</div>`\n : nothing\n }\n <div class=\"name\" role=\"heading\" aria-level=${level} part=\"name\">${this.name}</div>\n ${this.region ? html`<p class=\"region\" part=\"region\">${this.region}</p>` : nothing}\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n </article>`;\n }\n}\n\ncustomElements.define('impakt-stage-tag', ImpaktStageTag);\ncustomElements.define('impakt-section-head', ImpaktSectionHead);\ncustomElements.define('impakt-service-card', ImpaktServiceCard);\ncustomElements.define('impakt-cursor', ImpaktCursor);\ncustomElements.define('impakt-hand-note', ImpaktHandNote);\ncustomElements.define('impakt-facts', ImpaktFacts);\ncustomElements.define('impakt-numbered-list', ImpaktNumberedList);\ncustomElements.define('impakt-column-list', ImpaktColumnList);\ncustomElements.define('impakt-office-card', ImpaktOfficeCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stage-tag': ImpaktStageTag;\n 'impakt-section-head': ImpaktSectionHead;\n 'impakt-service-card': ImpaktServiceCard;\n 'impakt-cursor': ImpaktCursor;\n 'impakt-hand-note': ImpaktHandNote;\n 'impakt-facts': ImpaktFacts;\n 'impakt-numbered-list': ImpaktNumberedList;\n 'impakt-column-list': ImpaktColumnList;\n 'impakt-office-card': ImpaktOfficeCard;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAKA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,eAAe,WAAW,YAAY,KAAK,OAAO,aAAa,SAAS;AAO1E,IAAM,cAAoE;AAAA,EAC/E,MAAM,CAAC,MAAM,YAAY,MAAM;AAAA,EAC/B,WAAW,CAAC,MAAM,iBAAiB,WAAW;AAAA,EAC9C,WAAW,CAAC,MAAM,gBAAgB,WAAW;AAAA,EAC7C,MAAM,CAAC,MAAM,SAAS,MAAM;AAAA,EAC5B,MAAM,CAAC,MAAM,UAAU,MAAM;AAC/B;AAkBO,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACrC,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAA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AAI,SAAS,OAAO;AAAA;AAAA,EAE9E;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,uBAAuB,iBAAiB;AAC9D,eAAe,OAAO,uBAAuB,iBAAiB;AAC9D,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,wBAAwB,kBAAkB;AAChE,eAAe,OAAO,sBAAsB,gBAAgB;AAC5D,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
|
|
@@ -73,7 +73,7 @@ var ImpaktScrubber = class extends ImpaktElement {
|
|
|
73
73
|
button {
|
|
74
74
|
min-height: ${token("target.min", "24px")};
|
|
75
75
|
padding: ${space(1)} ${space(3)};
|
|
76
|
-
border-radius:
|
|
76
|
+
border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));
|
|
77
77
|
border: 1px solid ${t.border};
|
|
78
78
|
background: transparent;
|
|
79
79
|
color: ${t.textMuted};
|
|
@@ -108,7 +108,7 @@ var ImpaktScrubber = class extends ImpaktElement {
|
|
|
108
108
|
.line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
|
|
109
109
|
.line input:focus-visible { opacity: 1; }
|
|
110
110
|
.where { display: grid; gap: ${space(2)}; justify-items: end; }
|
|
111
|
-
.chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius:
|
|
111
|
+
.chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${t.border}; color: ${t.text}; text-transform: uppercase; }
|
|
112
112
|
.chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
|
|
113
113
|
.hint { color: ${t.textMuted}; text-transform: uppercase; }
|
|
114
114
|
/* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
|
|
@@ -227,4 +227,4 @@ customElements.define("impakt-scrubber", ImpaktScrubber);
|
|
|
227
227
|
export {
|
|
228
228
|
ImpaktScrubber
|
|
229
229
|
};
|
|
230
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-YXMXLVK7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/scrubber.ts"],"sourcesContent":["import { html, css, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, visuallyHidden, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\nimport type { ImpaktScene } from './scene';\n\nexport interface ScrubberStop {\n /** Where the stop sits on the scene's progress, from 0 to 1. */\n at: number;\n label: string;\n /** A short code beside it in the graph look, such as a commit hash. */\n meta?: string;\n /** A line under the code in the graph look, such as a commit message. */\n note?: string;\n /**\n * The colour of the line up to this stop, in the graph look: a named tone,\n * or 1 to 5 for the brand's chart colours, as a project's phases are drawn.\n */\n tone?: 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 1 | 2 | 3 | 4 | 5;\n}\n\nconst TONES = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n} as const;\n\n/**\n * Drives the scene it sits in, by hand.\n *\n * Place it in an `impakt-scene`'s `controls` slot and set that scene's `drive`\n * to `scrubber`. Dragging moves through the scene; a named stop seeks to it\n * with an eased move rather than a cut, which is what makes the Commit-style\n * \"time travel\" read as travel.\n *\n * **It is a native range input.** A slider built from divs has to recreate\n * arrow keys, Page Up and Down, Home and End, the value announcement and touch\n * handling, and every one of those is a place to get it wrong. The input\n * already does all of it. The stops are buttons beside it, so a keyboard or\n * switch user reaches each named moment in one action instead of nudging a\n * thumb to find it (2.5.7, dragging movements).\n *\n * @category action\n * @icon adjustments-horizontal\n */\nexport class ImpaktScrubber extends ImpaktElement {\n static properties = {\n label: { type: String },\n stops: { type: Array },\n look: { type: String, reflect: true },\n hint: { type: String },\n value: { type: Number, state: true },\n };\n\n /** The slider's accessible name. */\n declare label: string;\n declare stops: ScrubberStop[];\n /**\n * `buttons` lists the stops as buttons under the slider. `graph` draws them\n * as commits on a line that fills in each stop's colour as it is dragged,\n * with the current one's code and note beside it.\n */\n declare look: 'buttons' | 'graph';\n /** A word of help in the graph look, such as \"drag to time-travel\". */\n declare hint: string;\n declare value: number;\n\n private scene: ImpaktScene | null = null;\n\n constructor() {\n super();\n this.label = 'Scene progress';\n this.stops = [];\n this.look = 'buttons';\n this.hint = '';\n this.value = 0;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n width: 100%;\n max-width: 48rem;\n margin-inline: auto;\n }\n .wrap {\n display: grid;\n gap: ${space(2)};\n padding: ${space(3)} ${space(4)};\n border-radius: ${token('radius.xl', '16px')};\n background: ${t.surfaceCard};\n box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')};\n border: 1px solid ${t.border};\n }\n input {\n width: 100%;\n min-height: ${token('target.min', '24px')};\n accent-color: ${t.brand};\n margin: 0;\n }\n .stops {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: ${space(2)};\n list-style: none;\n margin: 0;\n padding: 0;\n }\n button {\n min-height: ${token('target.min', '24px')};\n padding: ${space(1)} ${space(3)};\n border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));\n border: 1px solid ${t.border};\n background: transparent;\n color: ${t.textMuted};\n font-size: ${fontSize('xs')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n button[aria-current='true'] {\n color: ${t.text};\n border-color: ${t.text};\n }\n .sr-only {\n ${visuallyHidden}\n }\n /* The graph look: the code of where you are, the line of stops, where you are. */\n :host([look='graph']) { max-width: none; }\n .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${space(6)}; align-items: center; padding: ${space(4)} ${space(6)}; border-radius: ${token('radius.xl', '16px')}; background: ${t.surfaceCard}; box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')}; border: 1px solid ${t.border}; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }\n .head { display: grid; gap: 2px; }\n .head .k { color: ${t.textMuted}; text-transform: uppercase; }\n .head .code { font-size: ${fontSize('md')}; color: ${t.text}; }\n .head .note { color: ${t.textMuted}; }\n .line { position: relative; block-size: 48px; }\n .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${t.border}; opacity: 0.5; }\n .fill { opacity: 1; background: none; display: flex; overflow: hidden; }\n .fill span { block-size: 100%; }\n .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: ${t.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }\n .dot[data-passed] { background: var(--c); }\n .dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }\n .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${t.textMuted}; text-transform: uppercase; pointer-events: none; }\n .dot-label[data-current] { color: ${t.text}; font-weight: ${fontWeight('bold')}; }\n .line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }\n .line input:focus-visible { opacity: 1; }\n .where { display: grid; gap: ${space(2)}; justify-items: end; }\n .chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${t.border}; color: ${t.text}; text-transform: uppercase; }\n .chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }\n .hint { color: ${t.textMuted}; text-transform: uppercase; }\n /* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */\n .chip .meta { color: ${t.textMuted}; }\n @media (max-width: 48rem) {\n .graph { grid-template-columns: minmax(0, 1fr); }\n .where { justify-items: start; }\n .dot-label:not([data-current]) { display: none; }\n }\n button:focus-visible,\n input:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n this.scene = this.closest('impakt-scene');\n this.scene?.addEventListener('impakt-scene-progress', this.onProgress);\n if (this.scene) this.value = this.scene.progress;\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.scene?.removeEventListener('impakt-scene-progress', this.onProgress);\n this.scene = null;\n }\n\n private onProgress = (e: Event) => {\n this.value = (e as CustomEvent<{ progress: number }>).detail.progress;\n };\n\n private onInput = (e: Event) => {\n const v = Number((e.target as HTMLInputElement).value) / 1000;\n this.value = v;\n this.scene?.seek(v);\n };\n\n private goTo(stop: ScrubberStop) {\n this.scene?.seek(stop.at, 600);\n }\n\n /** The stop nearest the current position, which the stop list marks as current. */\n private nearest(): number {\n let best = -1;\n let gap = Infinity;\n this.stops.forEach((s, i) => {\n const d = Math.abs(s.at - this.value);\n if (d < gap) {\n gap = d;\n best = i;\n }\n });\n return best;\n }\n\n private renderGraph(nearestIndex: number, valueText: string): TemplateResult {\n let current = nearestIndex;\n const stops = [...(this.stops ?? [])].sort((a, b) => a.at - b.at);\n // Where you are, among the stops in the order they are drawn.\n current = stops.indexOf(this.stops[current]!);\n const colour = (s: ScrubberStop | undefined) => {\n const tone = s?.tone ?? 'brand';\n return typeof tone === 'number' ? `var(--impakt-color-chart-${tone}, ${TONES.brand})` : (TONES[tone] ?? TONES.brand);\n };\n const now = stops[current] ?? stops[0];\n // The line fills in each stop's colour, from the stop before it to it, as far as the playhead.\n const segments = stops.map((s, i) => {\n const from = i === 0 ? 0 : stops[i - 1]!.at;\n const to = Math.min(s.at, this.value);\n return { width: Math.round(Math.max(0, to - from) * 10000) / 100, c: colour(s) };\n });\n return html`<div class=\"graph\" part=\"wrap\">\n <div class=\"head mono\" aria-hidden=\"true\">\n <span class=\"k\">HEAD</span>\n <span class=\"code\">${now?.meta ?? now?.label ?? ''}</span>\n ${now?.note ? html`<span class=\"note\">${now.note}</span>` : null}\n </div>\n <div class=\"line\">\n <div class=\"track\"></div>\n <div class=\"fill\" aria-hidden=\"true\">${segments.map((g) => html`<span style=${`width:${g.width}%;background:${g.c}`}></span>`)}</div>\n ${stops.map(\n (s, i) => html`\n <button type=\"button\" class=\"dot\" style=${`left:${s.at * 100}%;--c:${colour(s)}`} ?data-passed=${s.at <= this.value + 0.0001} aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n <span class=\"dot-label mono\" style=${`left:${s.at * 100}%`} ?data-current=${i === current} aria-hidden=\"true\">${s.label}</span>`,\n )}\n <input type=\"range\" min=\"0\" max=\"1000\" step=\"1\" .value=${String(Math.round(this.value * 1000))} aria-label=${this.label} aria-valuetext=${valueText} @input=${this.onInput} />\n </div>\n <div class=\"where\" aria-hidden=\"true\">\n ${now ? html`<span class=\"chip mono\" style=${`--c:${colour(now)}`}>${now.label}${now.meta ? html` <span class=\"meta\">${now.meta}</span>` : null}</span>` : null}\n ${this.hint ? html`<span class=\"hint mono\">${this.hint}</span>` : null}\n </div>\n </div>`;\n }\n\n render(): TemplateResult {\n const current = this.nearest();\n const valueText = current >= 0 ? this.stops[current].label : `${Math.round(this.value * 100)}%`;\n if (this.look === 'graph') return this.renderGraph(current, valueText);\n return html`\n <div class=\"wrap\" part=\"wrap\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"1000\"\n step=\"1\"\n .value=${String(Math.round(this.value * 1000))}\n aria-label=${this.label}\n aria-valuetext=${valueText}\n @input=${this.onInput}\n />\n ${\n this.stops.length\n ? html`<ul class=\"stops\" part=\"stops\">\n ${this.stops.map(\n (s, i) => html`<li>\n <button type=\"button\" aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span aria-hidden=\"true\">${s.label}</span><span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n </li>`,\n )}\n </ul>`\n : null\n }\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-scrubber', ImpaktScrubber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scrubber': ImpaktScrubber;\n }\n}\n"],"mappings":";AAAA,SAAS,MAAM,WAAgC;AAC/C,SAAS,KAAK,eAAe,gBAAgB,UAAU,YAAY,OAAO,GAAG,aAAa;AAkB1F,IAAM,QAAQ;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAoBO,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAwBhD,cAAc;AACZ,UAAM;AAHR,SAAQ,QAA4B;AAmHpC,SAAQ,aAAa,CAAC,MAAa;AACjC,WAAK,QAAS,EAAwC,OAAO;AAAA,IAC/D;AAEA,SAAQ,UAAU,CAAC,MAAa;AAC9B,YAAM,IAAI,OAAQ,EAAE,OAA4B,KAAK,IAAI;AACzD,WAAK,QAAQ;AACb,WAAK,OAAO,KAAK,CAAC;AAAA,IACpB;AAvHE,SAAK,QAAQ;AACb,SAAK,QAAQ,CAAC;AACd,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,QAAQ;AAAA,EACf;AAAA,EA9BA;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,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AmB,cAAc;","names":[]}
|
|
@@ -34,8 +34,9 @@ var ImpaktCardGrid = class extends ImpaktElement {
|
|
|
34
34
|
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
35
35
|
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
36
36
|
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
37
|
-
|
|
38
|
-
li.
|
|
37
|
+
/* A card is drawn as impakt-card is: a 1px border in the text colour and no shadow. */
|
|
38
|
+
li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusXl}; box-shadow: none; overflow: hidden; }
|
|
39
|
+
img { border-block-end: ${t.borderThin} solid ${t.text}; }
|
|
39
40
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
40
41
|
.words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }
|
|
41
42
|
.h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize("lg")}; font-weight: ${fontWeight("bold")}; line-height: ${lineHeight("tight")}; }
|
|
@@ -43,7 +44,9 @@ var ImpaktCardGrid = class extends ImpaktElement {
|
|
|
43
44
|
.h a::after { content: ''; position: absolute; inset: 0; }
|
|
44
45
|
li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
45
46
|
.body { margin: 0; line-height: ${lineHeight("normal")}; }
|
|
46
|
-
|
|
47
|
+
/* A marketing badge: monospace capitals at 11px in a 1px outline. */
|
|
48
|
+
.badge { align-self: flex-start; padding: 2px ${space(2)}; border-radius: ${t.radiusSm}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; background: transparent; border: ${t.borderThin} solid ${t.text}; }
|
|
49
|
+
@media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }
|
|
47
50
|
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight("semibold")}; }
|
|
48
51
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
49
52
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
@@ -69,4 +72,4 @@ customElements.define("impakt-card-grid", ImpaktCardGrid);
|
|
|
69
72
|
export {
|
|
70
73
|
ImpaktCardGrid
|
|
71
74
|
};
|
|
72
|
-
//# sourceMappingURL=chunk-
|
|
75
|
+
//# sourceMappingURL=chunk-ZD75GU6J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/card-grid.ts"],"sourcesContent":["/**\n * A row of linked cards.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, lineHeight, space, spaceAround, t, iconSvg } from '@atomic-ui/ui';\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpaktCardGrid extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n /* A card is drawn as impakt-card is: a 1px border in the text colour and no shadow. */\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusXl}; box-shadow: none; overflow: hidden; }\n img { border-block-end: ${t.borderThin} solid ${t.text}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n /* A marketing badge: monospace capitals at 11px in a 1px outline. */\n .badge { align-self: flex-start; padding: 2px ${space(2)}; border-radius: ${t.radiusSm}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; background: transparent; border: ${t.borderThin} solid ${t.text}; }\n @media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`,\n )}</ul>`;\n }\n}\n\ncustomElements.define('impakt-card-grid', ImpaktCardGrid);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-card-grid': ImpaktCardGrid;\n }\n}\n"],"mappings":";AAGA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,eAAe,WAAW,UAAU,YAAY,YAAY,OAAO,aAAa,GAAG,eAAe;AAy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E,IAAI,sCAAsC,EAAE,UAAU,UAAU,EAAE,IAAI;AAAA;AAAA,wFAE9P,MAAM,CAAC,CAAC,YAAY,EAAE,IAAI,kBAAkB,WAAW,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA,IAIxJ;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO,wBAAwB,KAAK,SAAS,CAAC,GAAG;AAAA,MAC/C,CAAC,SAAS,iBAAiB,KAAK,OAAO,WAAW,EAAE;AAAA,QAClD,KAAK,WAAW,gBAAgB,KAAK,QAAQ,QAAQ,KAAK,YAAY,EAAE,uBAAuB,OAAO;AAAA;AAAA,UAEpG,KAAK,QAAQ,2BAA2B,KAAK,KAAK,YAAY,OAAO;AAAA,mDAC5B,KAAK,YAAY,IAAI,KAAK,OAAO,eAAe,KAAK,IAAI,IAAI,KAAK,OAAO,SAAS,KAAK,OAAO;AAAA,UACvI,KAAK,OAAO,uBAAuB,KAAK,IAAI,SAAS,OAAO;AAAA,UAC5D,KAAK,OAAO,6CAA6C,QAAQ,eAAe,KAAK,CAAC,YAAY,OAAO;AAAA;AAAA;AAAA,IAG/G,CAAC;AAAA,EACH;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/blocks/src/components/selling.ts
|
|
2
2
|
import { css, html, nothing } from "lit";
|
|
3
|
-
import { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, type } from "@atomic-ui/ui";
|
|
3
|
+
import { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from "@atomic-ui/ui";
|
|
4
4
|
var card = css`
|
|
5
5
|
.card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }
|
|
6
6
|
.h { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
|
|
@@ -17,6 +17,7 @@ var money = (amount, currency = "GBP", digits = 0) => {
|
|
|
17
17
|
return String(Math.round(amount));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
var arrow = html`<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>`;
|
|
20
21
|
var ImpaktPlanComparison = class extends ImpaktElement {
|
|
21
22
|
static {
|
|
22
23
|
this.properties = {
|
|
@@ -50,18 +51,26 @@ var ImpaktPlanComparison = class extends ImpaktElement {
|
|
|
50
51
|
:host { display: block; container-type: inline-size; }
|
|
51
52
|
.h { margin-block-end: ${space(5)}; }
|
|
52
53
|
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }
|
|
53
|
-
.plan { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; }
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
.plan { --plan-accent: ${token("color.accent.default", "#ffd43b")}; --plan-on-accent: ${token("color.accent.on", "#111111")}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }
|
|
55
|
+
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
56
|
+
.plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }
|
|
57
|
+
.badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
58
|
+
.name { margin: 0; ${type("lg")} font-weight: ${fontWeight("medium")}; color: inherit; }
|
|
59
|
+
.price { margin: 0; font-family: ${t.fontHeading}; ${type("4xl")} font-weight: ${fontWeight("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
60
|
+
/* 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. */
|
|
61
|
+
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
62
|
+
.period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight("regular")}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }
|
|
63
|
+
.note { margin: 0; ${type("sm")} color: var(--plan-muted, ${t.textMuted}); }
|
|
64
|
+
ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }
|
|
61
65
|
li { display: flex; gap: ${space(2)}; ${type("sm")} }
|
|
62
|
-
li[data-has='false'] { color: ${t.textMuted}; }
|
|
63
|
-
.mark { flex-shrink: 0; inline-size:
|
|
64
|
-
li[data-has='true'] .mark { color:
|
|
66
|
+
li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }
|
|
67
|
+
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
68
|
+
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
69
|
+
.plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }
|
|
70
|
+
.plan .btn:hover { background: ${t.brandHover}; }
|
|
71
|
+
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
72
|
+
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }
|
|
73
|
+
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
65
74
|
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }
|
|
66
75
|
`
|
|
67
76
|
];
|
|
@@ -85,9 +94,9 @@ var ImpaktPlanComparison = class extends ImpaktElement {
|
|
|
85
94
|
${p.note ? html`<p class="note">${p.note}</p>` : nothing}
|
|
86
95
|
<ul>${this.rows.map((r) => {
|
|
87
96
|
const has = this.has(p, r);
|
|
88
|
-
return html`<li data-has=${String(has)}><span class="mark" aria-hidden="true">${has ? "\
|
|
97
|
+
return html`<li data-has=${String(has)}><span class="mark" aria-hidden="true">${has ? "\u221A" : "\u2013"}</span><span>${r.label}${has ? html`<span class="visually-hidden">: ${say("included")}</span>` : html`<span class="not"> · ${say("not included")}</span>`}</span></li>`;
|
|
89
98
|
})}</ul>
|
|
90
|
-
${p.href ? html`<a class="btn
|
|
99
|
+
${p.href ? html`<a class="btn" href=${p.href} @click=${(e) => this.choose(p, e)}><span>${this.buttonText}<span class="visually-hidden"> ${p.name}</span></span>${arrow}</a>` : html`<button class="btn" type="button" @click=${(e) => this.choose(p, e)}><span>${this.buttonText}<span class="visually-hidden"> ${p.name}</span></span>${arrow}</button>`}
|
|
91
100
|
</section>`
|
|
92
101
|
)}
|
|
93
102
|
</div>`;
|
|
@@ -111,6 +120,11 @@ var ImpaktVideo = class extends ImpaktElement {
|
|
|
111
120
|
transcriptHref: { type: String, attribute: "transcript-href" },
|
|
112
121
|
playText: { type: String, attribute: "play-text" },
|
|
113
122
|
ratio: { type: String, reflect: true },
|
|
123
|
+
look: { type: String, reflect: true },
|
|
124
|
+
caption: { type: String },
|
|
125
|
+
duration: { type: String },
|
|
126
|
+
transcript: { type: String },
|
|
127
|
+
transcriptText: { type: String, attribute: "transcript-text" },
|
|
114
128
|
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
115
129
|
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
116
130
|
};
|
|
@@ -124,6 +138,11 @@ var ImpaktVideo = class extends ImpaktElement {
|
|
|
124
138
|
this.transcriptHref = "";
|
|
125
139
|
this.playText = "Play video";
|
|
126
140
|
this.ratio = "16:9";
|
|
141
|
+
this.look = "plain";
|
|
142
|
+
this.caption = "";
|
|
143
|
+
this.duration = "";
|
|
144
|
+
this.transcript = "";
|
|
145
|
+
this.transcriptText = "";
|
|
127
146
|
this.playing = false;
|
|
128
147
|
this.spaceAbove = "none";
|
|
129
148
|
this.spaceBelow = "none";
|
|
@@ -148,6 +167,28 @@ var ImpaktVideo = class extends ImpaktElement {
|
|
|
148
167
|
.foot { margin: ${space(2)} 0 0; ${type("sm")} }
|
|
149
168
|
.foot a { color: ${t.link}; }
|
|
150
169
|
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
170
|
+
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
171
|
+
.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: ${t.borderThin} solid var(--stage-rule); }
|
|
172
|
+
.bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
173
|
+
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
174
|
+
.bar .dot:first-child { background: ${token("color.accent.default", "#ffd43b")}; }
|
|
175
|
+
.bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
176
|
+
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
177
|
+
:host([look='window']) .play { background: none; color: inherit; }
|
|
178
|
+
:host([look='window']) .disc { display: none; }
|
|
179
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type("md")} font-weight: ${fontWeight("medium")}; color: ${token("color.accent.on", "#111111")}; background: ${token("color.accent.default", "#ffd43b")}; }
|
|
180
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token("color.accent.default", "#ffd43b")} 88%, #ffffff); }
|
|
181
|
+
:host([look='window']) .play:focus-visible { outline: none; }
|
|
182
|
+
:host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }
|
|
183
|
+
.length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
184
|
+
.transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }
|
|
185
|
+
.transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight("medium")}; list-style: none; }
|
|
186
|
+
.transcript summary::-webkit-details-marker { display: none; }
|
|
187
|
+
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }
|
|
188
|
+
.transcript[open] summary::before { content: '−'; }
|
|
189
|
+
.transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }
|
|
190
|
+
.transcript p { margin: 0; }
|
|
191
|
+
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
151
192
|
`
|
|
152
193
|
];
|
|
153
194
|
}
|
|
@@ -163,14 +204,20 @@ var ImpaktVideo = class extends ImpaktElement {
|
|
|
163
204
|
this.playing = true;
|
|
164
205
|
}}>
|
|
165
206
|
<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>
|
|
166
|
-
<span class="label">${this.playText}<span class="visually-hidden">: ${this.label}</span></span>
|
|
207
|
+
<span class="label">${this.playText}${this.duration ? html` <span class="length">${this.duration}</span>` : nothing}<span class="visually-hidden">: ${this.label}</span></span>
|
|
167
208
|
</button>`;
|
|
168
209
|
else
|
|
169
210
|
player = html`<video controls preload="metadata" poster=${this.posterSrc || nothing} aria-label=${this.label}>
|
|
170
211
|
<source src=${this.videoSrc} />
|
|
171
212
|
${this.captionsSrc ? html`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />` : nothing}
|
|
172
213
|
</video>`;
|
|
173
|
-
|
|
214
|
+
const frame = html`<div class="frame" part="frame">${player}</div>`;
|
|
215
|
+
const paragraphs = (this.transcript ?? "").split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
|
|
216
|
+
return html`${this.look === "window" ? html`<div class="window" part="window">
|
|
217
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption ? html`<span class="caption">${this.caption}</span>` : nothing}</div>
|
|
218
|
+
${frame}
|
|
219
|
+
</div>` : frame}
|
|
220
|
+
${paragraphs.length ? html`<details class="transcript" part="transcript"><summary>${this.transcriptText || say("Read the transcript")}</summary><div class="words">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>` : nothing}
|
|
174
221
|
${this.transcriptHref ? html`<p class="foot"><a href=${this.transcriptHref}>${say("Read the transcript")}<span class="visually-hidden">${say(" of {video}", { video: this.label })}</span></a></p>` : nothing}`;
|
|
175
222
|
}
|
|
176
223
|
};
|
|
@@ -485,4 +532,4 @@ export {
|
|
|
485
532
|
ImpaktAffordabilityCalculator,
|
|
486
533
|
ImpaktContactBlock
|
|
487
534
|
};
|
|
488
|
-
//# sourceMappingURL=chunk-
|
|
535
|
+
//# sourceMappingURL=chunk-ZODL5HD4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/selling.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\nconst money = (amount: number, currency = 'GBP', digits = 0) => {\n try {\n return new Intl.NumberFormat(pageLocale(), { style: 'currency', currency, maximumFractionDigits: digits, minimumFractionDigits: digits }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n};\n\n/** The arrow after a button's words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<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>`;\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as £12. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader, and a line a plan does not have also says \"· not included\"\n * in muted words on the screen. On a narrow screen the plans stack, each with\n * its own list.\n *\n * Each plan is a card with a 1px border in the text colour and no shadow. The\n * plan with a `badge` is filled with the text colour, its badge in monospace\n * capitals and its price, ticks and button in the accent, a pair the tokens\n * already hold at 4.5:1 on ink (1.4.3).\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { --plan-accent: ${token('color.accent.default', '#ffd43b')}; --plan-on-accent: ${token('color.accent.on', '#111111')}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n /* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */\n .plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }\n .badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('medium')}; color: inherit; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; letter-spacing: -0.03em; color: inherit; }\n /* 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. */\n .top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }\n .period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }\n .note { margin: 0; ${type('sm')} color: var(--plan-muted, ${t.textMuted}); }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }\n .mark { flex-shrink: 0; inline-size: 1em; text-align: start; }\n .top li[data-has='true'] .mark { color: var(--plan-accent); }\n .plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n .plan .btn:hover { background: ${t.brandHover}; }\n .plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }\n .plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }\n @media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n // A line the plan has is ticked and says so to a screen reader; one it lacks says \"not included\" on the screen too.\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '√' : '–'}</span><span>${r.label}${\n has ? html`<span class=\"visually-hidden\">: ${say('included')}</span>` : html`<span class=\"not\"> · ${say('not included')}</span>`\n }</span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</a>`\n : html`<button class=\"btn\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * `look=\"window\"` draws it in a window on an ink stage, as a product\n * walkthrough is shown: a bar with three dots and a caption in monospace\n * capitals, and an accent Play button with the video's length beside its\n * words. The stage stays ink in both themes. `transcript` puts what the video\n * shows on the page itself, in a section that opens under it, as an\n * alternative to a link to it (1.2.1, 1.2.3).\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n look: { type: String, reflect: true },\n caption: { type: String },\n duration: { type: String },\n transcript: { type: String },\n transcriptText: { type: String, attribute: 'transcript-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n /** `plain` is the video alone. `window` draws it in a window with a bar and a caption, on an ink stage. */\n declare look: 'plain' | 'window';\n /** With `window`: the words in the window's bar, such as \"Walkthrough video\". Decoration: `label` is what is read. */\n declare caption: string;\n /** How long the video is, such as \"2 min\", shown beside the Play button's words and read with them. */\n declare duration: string;\n /** What the video shows, as words, shown in a section that opens under it. Blank lines start a new paragraph. */\n declare transcript: string;\n /** The words on the line that opens the transcript, such as \"Read what the video shows\". */\n declare transcriptText: string;\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.look = 'plain';\n this.caption = '';\n this.duration = '';\n this.transcript = '';\n this.transcriptText = '';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .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; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n /* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */\n .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: ${t.borderThin} solid var(--stage-rule); }\n .bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }\n .bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }\n .bar .dot:first-child { background: ${token('color.accent.default', '#ffd43b')}; }\n .bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n :host([look='window']) .frame { border-radius: 0; background: var(--stage); }\n :host([look='window']) .play { background: none; color: inherit; }\n :host([look='window']) .disc { display: none; }\n :host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: ${token('color.accent.on', '#111111')}; background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token('color.accent.default', '#ffd43b')} 88%, #ffffff); }\n :host([look='window']) .play:focus-visible { outline: none; }\n :host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }\n .length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }\n .transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight('medium')}; list-style: none; }\n .transcript summary::-webkit-details-marker { display: none; }\n .transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }\n .transcript[open] summary::before { content: '−'; }\n .transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }\n .transcript p { margin: 0; }\n @media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <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>\n <span class=\"label\">${this.playText}${this.duration ? html` <span class=\"length\">${this.duration}</span>` : nothing}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n const frame = html`<div class=\"frame\" part=\"frame\">${player}</div>`;\n const paragraphs = (this.transcript ?? '')\n .split(/\\n\\s*\\n/)\n .map((p) => p.trim())\n .filter(Boolean);\n return html`${\n this.look === 'window'\n ? html`<div class=\"window\" part=\"window\">\n <div class=\"bar\" aria-hidden=\"true\"><span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>${this.caption ? html`<span class=\"caption\">${this.caption}</span>` : nothing}</div>\n ${frame}\n </div>`\n : frame\n }\n ${\n paragraphs.length\n ? html`<details class=\"transcript\" part=\"transcript\"><summary>${this.transcriptText || say('Read the transcript')}</summary><div class=\"words\">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>`\n : nothing\n }\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\nconst NOTICE_WORDS: Record<string, { heading: string; text: string }> = {\n mortgage: { heading: 'Your home may be repossessed', text: 'Your home may be repossessed if you do not keep up repayments on your mortgage.' },\n 'secured-loan': {\n heading: 'Think carefully before securing other debts against your home',\n text: 'Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it.',\n },\n 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.' },\n insurance: { heading: 'Important information', text: 'Read the policy documents to check the cover suits your needs. Limits and exclusions apply.' },\n custom: { heading: '', text: '' },\n};\n\n/**\n * The warning and the regulator wording a financial page must carry, as a\n * block of its own so it is never left off.\n *\n * Pick the kind to start from the usual words, or `custom` to write your own.\n * Whatever it says, check it with whoever signs off your financial promotions.\n *\n * @category feedback\n * @icon shield\n */\nexport class ImpaktRegulatoryNotice extends ImpaktElement {\n static properties = {\n kind: { type: String, reflect: true },\n heading: { type: String },\n text: { type: String },\n firm: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare kind: 'mortgage' | 'secured-loan' | 'investment' | 'insurance' | 'custom';\n /** Leave empty to use the usual heading for the kind. */\n declare heading: string;\n /** Leave empty to use the usual warning for the kind. */\n declare text: string;\n /** Who you are and who regulates you, such as \"Acme Ltd is authorised and regulated by the Financial Conduct Authority (FRN 123456).\" */\n declare firm: string;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.kind = 'mortgage';\n this.heading = '';\n this.text = '';\n this.firm = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n .box { padding: ${space(5)}; border-inline-start: 6px solid ${t.warning}; border-radius: ${t.radiusLg}; background: ${t.warningSubtle}; }\n :host([kind='insurance']) .box { border-color: ${t.info}; background: ${t.infoSubtle}; }\n strong { display: block; margin-block-end: ${space(1)}; ${type('md')} color: ${t.text}; }\n p { margin: 0; color: ${t.text}; }\n /* 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). */\n .firm { margin-block-start: ${space(3)}; ${type('sm')} color: ${t.text}; }\n `,\n ];\n\n render(): TemplateResult {\n const preset = NOTICE_WORDS[this.kind] ?? NOTICE_WORDS.custom!;\n const heading = this.heading || (preset.heading ? say(preset.heading) : '');\n const text = this.text || (preset.text ? say(preset.text) : '');\n return html`<aside class=\"box\" part=\"box\" aria-label=${heading || say('Important information')}>\n ${heading ? html`<strong>${heading}</strong>` : nothing}\n ${text ? html`<p>${text}</p>` : nothing}\n ${this.firm ? html`<p class=\"firm\">${this.firm}</p>` : nothing}\n </aside>`;\n }\n}\n\n/** One band of a tax: everything above `from` and up to the next band's `from` is charged at `rate`. */\ninterface Band {\n from: number;\n rate: number;\n}\n\n/**\n * Stamp Duty Land Tax for England and Northern Ireland, from 1 April 2025.\n * Exported so the numbers can be checked, and changed in one place.\n */\nexport const SDLT = {\n standard: [\n { from: 0, rate: 0 },\n { from: 125000, rate: 2 },\n { from: 250000, rate: 5 },\n { from: 925000, rate: 10 },\n { from: 1500000, rate: 12 },\n ] as Band[],\n firstTime: [\n { from: 0, rate: 0 },\n { from: 300000, rate: 5 },\n ] as Band[],\n firstTimeLimit: 500000,\n additionalSurcharge: 5,\n};\n\nfunction taxOn(price: number, bands: Band[], extra = 0): number {\n let tax = 0;\n bands.forEach((band, i) => {\n const top = bands[i + 1]?.from ?? Infinity;\n if (price > band.from) tax += ((Math.min(price, top) - band.from) * (band.rate + extra)) / 100;\n });\n return Math.round(tax);\n}\n\n/** The stamp duty on a home, for a mover, a first-time buyer or a second home. */\nexport function stampDuty(price: number, buyer: 'mover' | 'first-time' | 'additional'): number {\n if (price <= 0) return 0;\n if (buyer === 'first-time' && price <= SDLT.firstTimeLimit) return taxOn(price, SDLT.firstTime);\n if (buyer === 'additional') return price < 40000 ? 0 : taxOn(price, SDLT.standard, SDLT.additionalSurcharge);\n return taxOn(price, SDLT.standard);\n}\n\nconst calcStyles = css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n label, legend { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; padding: 0; }\n fieldset { margin: 0; padding: 0; border: 0; }\n .choices { display: flex; flex-wrap: wrap; gap: ${space(2)}; }\n .choices label { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0; padding: ${space(2)} ${space(3)}; font-weight: ${fontWeight('regular')}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; cursor: pointer; }\n .choices input { accent-color: ${t.brand}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n .line { margin: 0; ${type('sm')} }\n .foot { grid-column: 1 / -1; padding: ${space(4)} ${space(8)}; background: ${t.surfaceSubtle}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .foot .small { color: ${t.text}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .foot { padding: ${space(4)} ${space(5)}; } }\n`;\n\n/**\n * How much stamp duty a home would cost, for a home mover, a first-time buyer\n * or a second home, worked out as the price is typed.\n *\n * The rates are England and Northern Ireland's from 1 April 2025. Scotland and\n * Wales have their own taxes, and rates change, so the small print says which\n * rates these are and points to GOV.UK.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktStampDutyCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n buyer: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare buyer: 'mover' | 'first-time' | 'additional';\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much stamp duty would you pay?';\n this.price = 385000;\n this.buyer = 'first-time';\n this.smallPrint =\n '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.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n render(): TemplateResult {\n const duty = stampDuty(this.price, this.buyer);\n const rate = this.price > 0 ? (duty / this.price) * 100 : 0;\n const buyers: [typeof this.buyer, string][] = [\n ['first-time', say('First home')],\n ['mover', say('Moving home')],\n ['additional', say('Second home')],\n ];\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Price of the home (£)')}</label>\n <input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${(e: Event) => {\n this.price = Number((e.target as HTMLInputElement).value) || 0;\n }} /></div>\n <fieldset><legend>${say('Are you buying')}</legend><div class=\"choices\">\n ${buyers.map(\n ([value, label]) =>\n html`<label><input type=\"radio\" name=${this.id_('buyer')} .checked=${this.buyer === value} @change=${() => {\n this.buyer = value;\n }} />${label}</label>`,\n )}\n </div></fieldset>\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('Stamp duty to pay')}</p>\n <output for=${this.id_('price')}>${money(duty)}</output>\n <p class=\"line\">${duty ? say('About {rate}% of the price', { rate: rate.toFixed(1) }) : say('Nothing to pay at this price')}</p>\n ${this.buyer === 'first-time' && this.price > SDLT.firstTimeLimit ? html`<p class=\"line\">${say('First-time buyer relief stops above {limit}, so the usual rates apply.', { limit: money(SDLT.firstTimeLimit) })}</p>` : nothing}\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Roughly how much someone could borrow, from what they earn, and the price\n * of home that buys with their deposit.\n *\n * Lenders usually lend four to four and a half times income; the multiple is\n * a setting. It is a guide, not an offer, and the small print says so.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktAffordabilityCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n income: { type: Number },\n secondIncome: { type: Number, attribute: 'second-income' },\n deposit: { type: Number },\n timesIncome: { type: Number, attribute: 'times-income' },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare income: number;\n declare secondIncome: number;\n declare deposit: number;\n /** How many times income a lender would lend, such as 4.5. */\n declare timesIncome: number;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much could you borrow?';\n this.income = 45000;\n this.secondIncome = 0;\n this.deposit = 30000;\n this.timesIncome = 4.5;\n this.smallPrint =\n '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.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n private field(key: 'income' | 'secondIncome' | 'deposit'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const borrow = Math.max(0, (this.income + this.secondIncome) * this.timesIncome);\n const input = (key: 'income' | 'secondIncome' | 'deposit', label: string) => html`<div><label for=${this.id_(key)}>${label}</label>\n <input id=${this.id_(key)} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this[key])} @input=${this.field(key)} /></div>`;\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${input('income', say('Your yearly income before tax (£)'))}\n ${input('secondIncome', say('A second person’s income, if buying together (£)'))}\n ${input('deposit', say('Your deposit (£)'))}\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('You could borrow about')}</p>\n <output>${money(borrow)}</output>\n <p class=\"line\">${say('With your deposit, that’s a home of about {amount}.', { amount: money(borrow + this.deposit) })}</p>\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * How to get in touch: a phone number, opening hours, an email address, and a\n * short form to ask for a call back.\n *\n * The form fires `impakt-submit` with the name, phone number and best time; the\n * app sends it on. Then the block thanks them in place.\n *\n * @fires {CustomEvent<{ name: string; phone: string; when: string }>} impakt-submit - When the form is sent.\n * @category content\n * @icon phone\n */\nexport class ImpaktContactBlock extends ImpaktElement {\n static properties = {\n heading: { type: String },\n phone: { type: String },\n hours: { type: String },\n email: { type: String },\n callbackHeading: { type: String, attribute: 'callback-heading' },\n buttonText: { type: String, attribute: 'button-text' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare phone: string;\n /** One line a day or range, such as \"Monday to Friday, 9am to 6pm\". */\n declare hours: string;\n declare email: string;\n /** Leave empty to show no call back form. */\n declare callbackHeading: string;\n declare buttonText: string;\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare sent: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Talk to us';\n this.phone = '0800 000 0000';\n this.hours = 'Monday to Friday, 9am to 6pm\\nSaturday, 10am to 2pm';\n this.email = '';\n this.callbackHeading = 'Or we can call you';\n this.buttonText = 'Ask for a call back';\n this.doneText = 'Thanks. We’ll call you at the time you chose.';\n this.headingLevel = 2;\n this.sent = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(6)}; padding: ${space(8)}; }\n .phone { display: inline-block; margin: ${space(3)} 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.link}; text-decoration: none; }\n .hours { margin: 0; white-space: pre-line; color: ${t.textMuted}; }\n .email { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: ${space(3)}; color: ${t.link}; overflow-wrap: anywhere; }\n form { display: grid; gap: ${space(3)}; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.surfaceInset}; }\n .sub { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n label { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1)}; }\n input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .done { margin: 0; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.successSubtle}; color: ${t.successText}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${space(5)}; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = new FormData(event.target as HTMLFormElement);\n const data = { name: String(form.get('name') ?? ''), phone: String(form.get('phone') ?? ''), when: String(form.get('when') ?? '') };\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: data, bubbles: true, composed: true }));\n this.sent = true;\n }\n\n render(): TemplateResult {\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div>\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.phone ? html`<a class=\"phone\" href=${`tel:${this.phone.replace(/[^\\d+]/g, '')}`}>${this.phone}</a>` : nothing}\n ${this.hours ? html`<p class=\"hours\">${this.hours}</p>` : nothing}\n ${this.email ? html`<a class=\"email\" href=${`mailto:${this.email}`}>${this.email}</a>` : nothing}\n </div>\n ${\n !this.callbackHeading\n ? nothing\n : this.sent\n ? html`<p class=\"done\" role=\"status\">${this.doneText}</p>`\n : html`<form @submit=${this.submit} aria-labelledby=${this.id_('cb')}>\n <p class=\"sub\" id=${this.id_('cb')}>${this.callbackHeading}</p>\n <div><label for=${this.id_('name')}>${say('Your name')}</label><input id=${this.id_('name')} name=\"name\" autocomplete=\"name\" required /></div>\n <div><label for=${this.id_('tel')}>${say('Phone number')}</label><input id=${this.id_('tel')} name=\"phone\" type=\"tel\" autocomplete=\"tel\" required /></div>\n <div><label for=${this.id_('when')}>${say('Best time to call')}</label><select id=${this.id_('when')} name=\"when\"><option value=\"Morning\">${say('Morning')}</option><option value=\"Afternoon\">${say('Afternoon')}</option><option value=\"Evening\">${say('Evening')}</option></select></div>\n <button class=\"btn\" type=\"submit\">${this.buttonText}</button>\n </form>`\n }\n </div>`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\nImpaktContactBlock.createProperty('sent', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\ncustomElements.define('impakt-regulatory-notice', ImpaktRegulatoryNotice);\ncustomElements.define('impakt-stamp-duty-calculator', ImpaktStampDutyCalculator);\ncustomElements.define('impakt-affordability-calculator', ImpaktAffordabilityCalculator);\ncustomElements.define('impakt-contact-block', ImpaktContactBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n 'impakt-regulatory-notice': ImpaktRegulatoryNotice;\n 'impakt-stamp-duty-calculator': ImpaktStampDutyCalculator;\n 'impakt-affordability-calculator': ImpaktAffordabilityCalculator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c,CAAC,qBAAqB,KAAK,IAAI,KAAK,CAAC;AAAA,0BAC1E,KAAK,IAAI,MAAM,CAAC,IAAI,IAAI,mBAAmB,CAAC,sBAAsB,KAAK,IAAI,MAAM,CAAC,wCAAwC,IAAI,SAAS,CAAC,sCAAsC,IAAI,WAAW,CAAC,oCAAoC,IAAI,SAAS,CAAC;AAAA,4CAC9N,KAAK,UAAU;AAAA,cAErD;AAAA;AAAA,EAEJ;AACF;AAGA,YAAY,eAAe,WAAW,EAAE,OAAO,KAAK,CAAC;AACrD,mBAAmB,eAAe,QAAQ,EAAE,OAAO,KAAK,CAAC;AAEzD,eAAe,OAAO,0BAA0B,oBAAoB;AACpE,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,4BAA4B,sBAAsB;AACxE,eAAe,OAAO,gCAAgC,yBAAyB;AAC/E,eAAe,OAAO,mCAAmC,6BAA6B;AACtF,eAAe,OAAO,wBAAwB,kBAAkB;","names":[]}
|
|
@@ -185,6 +185,13 @@ export interface Branch {
|
|
|
185
185
|
* The lines are drawn; the items are a list with headings, so a screen reader
|
|
186
186
|
* reads the work, not the drawing.
|
|
187
187
|
*
|
|
188
|
+
* `look="mono"` draws it in thin ink lines with no chart colours: hollow
|
|
189
|
+
* rings for the branches, one filled with the accent for the `current` item,
|
|
190
|
+
* a hairline under each row, the paths in monospace capitals, and the main
|
|
191
|
+
* line ending in a small ink dot beside the `trunk` words. The tags are left
|
|
192
|
+
* out on a phone in that look. Which item is current is also said in words to
|
|
193
|
+
* a screen reader, so it never rests on the colour alone (1.4.1).
|
|
194
|
+
*
|
|
188
195
|
* @category content
|
|
189
196
|
* @icon git-merge
|
|
190
197
|
*/
|
|
@@ -196,6 +203,17 @@ export declare class ImpaktBranchList extends ImpaktElement {
|
|
|
196
203
|
trunk: {
|
|
197
204
|
type: StringConstructor;
|
|
198
205
|
};
|
|
206
|
+
look: {
|
|
207
|
+
type: StringConstructor;
|
|
208
|
+
reflect: boolean;
|
|
209
|
+
};
|
|
210
|
+
current: {
|
|
211
|
+
type: NumberConstructor;
|
|
212
|
+
};
|
|
213
|
+
currentText: {
|
|
214
|
+
type: StringConstructor;
|
|
215
|
+
attribute: string;
|
|
216
|
+
};
|
|
199
217
|
headingLevel: {
|
|
200
218
|
type: NumberConstructor;
|
|
201
219
|
attribute: string;
|
|
@@ -214,6 +232,12 @@ export declare class ImpaktBranchList extends ImpaktElement {
|
|
|
214
232
|
items: Branch[];
|
|
215
233
|
/** What the main line ends in, such as "main ← one team owns the result". */
|
|
216
234
|
trunk: string;
|
|
235
|
+
/** `tones` draws each branch in a chart colour. `mono` draws thin ink lines with hollow rings, as the Noire site does. */
|
|
236
|
+
look: 'tones' | 'mono';
|
|
237
|
+
/** The index of the item to mark as current, from 0: its ring is filled with the accent. -1 for none. */
|
|
238
|
+
current: number;
|
|
239
|
+
/** What a screen reader hears after the current item's heading, such as "current". Set it with `current`, so the mark is not colour alone. */
|
|
240
|
+
currentText: string;
|
|
217
241
|
headingLevel: 2 | 3 | 4;
|
|
218
242
|
spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
219
243
|
spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|