@atomic-ui/blocks 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +261 -18
- package/dist/{chunk-JIITZUGI.js → chunk-53V2GY6L.js} +30 -19
- package/dist/chunk-53V2GY6L.js.map +1 -0
- package/dist/{chunk-MX7FU5JE.js → chunk-B6I3GVJ5.js} +32 -19
- package/dist/chunk-B6I3GVJ5.js.map +1 -0
- package/dist/{chunk-KOYQRJKY.js → chunk-FNGN2F6Y.js} +145 -14
- package/dist/chunk-FNGN2F6Y.js.map +1 -0
- package/dist/{chunk-W3MK3EEO.js → chunk-H262HKSL.js} +37 -19
- package/dist/chunk-H262HKSL.js.map +1 -0
- package/dist/{chunk-VXQS5TAN.js → chunk-IT2NA25D.js} +44 -23
- package/dist/chunk-IT2NA25D.js.map +1 -0
- package/dist/{chunk-EYP5LWUR.js → chunk-MMADM6OW.js} +13 -3
- package/dist/chunk-MMADM6OW.js.map +1 -0
- package/dist/{chunk-CCFBROX3.js → chunk-WIVKJL64.js} +67 -34
- package/dist/chunk-WIVKJL64.js.map +1 -0
- package/dist/{chunk-X3U2SOVV.js → chunk-WTVF3JRL.js} +43 -27
- package/dist/chunk-WTVF3JRL.js.map +1 -0
- package/dist/components/changelog.js +1 -1
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +21 -6
- package/dist/components/g2-case.js +1 -1
- package/dist/components/g2-site.d.ts +17 -4
- package/dist/components/g2-site.js +1 -1
- package/dist/components/journey.d.ts +13 -2
- package/dist/components/journey.js +1 -1
- package/dist/components/organisms.js +1 -1
- package/dist/components/site.d.ts +72 -1
- package/dist/components/site.js +2 -1
- package/dist/components/studio.d.ts +4 -0
- package/dist/components/studio.js +1 -1
- package/dist/index.js +8 -8
- package/dist/standalone/atomic-ui-blocks.js +1207 -1046
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-CCFBROX3.js.map +0 -1
- package/dist/chunk-EYP5LWUR.js.map +0 -1
- package/dist/chunk-JIITZUGI.js.map +0 -1
- package/dist/chunk-KOYQRJKY.js.map +0 -1
- package/dist/chunk-MX7FU5JE.js.map +0 -1
- package/dist/chunk-VXQS5TAN.js.map +0 -1
- package/dist/chunk-W3MK3EEO.js.map +0 -1
- package/dist/chunk-X3U2SOVV.js.map +0 -1
|
@@ -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, token } from '@atomic-ui/ui';\nimport { accent, accentOn, accentOnInk, 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. The tag is drawn on the\n * raised ink with a hairline round it, on paper and on an ink band alike, as\n * the Stage tag component (`8:320`) is; `on-ink` is kept for pages that set it\n * and draws the same tag.\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 /** Kept for pages that set it: the tag is raised off the ink with a line round it on every band. */\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 /* The Stage tag component (8:320): G2 Mono S, 11px medium capitals at 0.06em, 10px apart, 6 by 10 inside, on the raised ink with a hairline. Its corner is a brand shape, 3px for Impakt. */\n .tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; background: ${inkRaised}; border: 1px solid ${inkLine}; border-radius: ${token('stage-tag.radius', '0px')}; ${monoLabel}; font-weight: ${fontWeight('medium')}; white-space: nowrap; }\n .index { color: ${accentOnInk}; }\n .phase { color: ${paper}; }\n .label { color: ${inkMuted}; }\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, with the heading and lead level with\n * its middle. A page drawn on the server sets `aside` when it fills the slot,\n * since the head cannot see its children there; in a browser the head sets it\n * itself.\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 aside: { type: Boolean, reflect: true },\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 /** The `aside` slot is filled. Set it on a page drawn on the server; in a browser the head sets it when the slot changes. */\n declare aside: boolean;\n\n constructor() {\n super();\n this.aside = false;\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 /* The label row is the label's own 20px (12:712, 10:642), or the stage tag's 29px beside it (9:296). */\n .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: ${space(2)} ${space(4)}; }\n .top.tagged { min-block-size: 29px; }\n /* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */\n .label { margin: 0; font-family: ${t.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); 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 /* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */\n :host([size='xl']) .heading { font-size: clamp(3.25rem, 1.2128rem + 9.315cqi, 7.5rem); line-height: var(--impakt-type-display-xl-line-height, 1); letter-spacing: var(--impakt-type-display-xl-tracking, -0.05em); }\n /* The lead in G2 Body M, 16px at 1.45, 24px under the heading and at most 480px wide (9:385). */\n .lead { margin: ${space(6)} 0 0; max-inline-size: 30rem; font-size: 1rem; line-height: 1.45; 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 :host([aside]) .body, .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 /* On a phone the heading is 20px under the label row and the lead 16px under the heading (14:984, 14:804). */\n .body { grid-template-columns: minmax(0, 1fr); margin-block-start: ${space(5)}; }\n .main .lead { margin-block-start: ${space(4)}; }\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=${this.stage || this.hasSlot('tag') ? 'top tagged' : '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\" @slotchange=${() => this.requestUpdate()}>${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\" @slotchange=${this.asideChanged}></slot></div>\n </div>\n </header>`;\n }\n\n /** The aside slot filled or emptied: keep `aside` in step, so the heading sits level with it. */\n private asideChanged(event: Event): void {\n this.aside = (event.target as HTMLSlotElement).assignedElements().length > 0;\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 /* The Service card component (8:358): the number in G2 Mono M, 13px with no tracking; the name, line, tags and link 10px apart. */\n .number { font-family: ${t.fontMono}; font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }\n .foot { display: grid; gap: ${space(2.5)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; }\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.875rem; line-height: 1.4; color: ${t.textMuted}; }\n .tags { margin: 0; ${monoLabel}; font-weight: ${fontWeight('medium')}; color: ${t.textMuted}; }\n .more { ${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: ${accentOnInk}; }\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,GAAG,aAAa;AAOjF,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;AAoBO,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,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,SAAS;AAAA,MAC3D,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC5B;AAAA;AAAA,EAcA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,WAAW;A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,QAC1E,KAAK,SAAS,uCAAuC,KAAK,MAAM,SAAS,OAAO;AAAA,QAChF,KAAK,OAAO,mCAAmC,KAAK,IAAI,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":[]}
|
|
@@ -177,29 +177,41 @@ var ImpaktEstimator = class extends ImpaktElement {
|
|
|
177
177
|
.choices { grid-template-columns: minmax(0, 1fr); }
|
|
178
178
|
.range { font-size: ${fontSize("4xl")}; }
|
|
179
179
|
}
|
|
180
|
-
/*
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
.all
|
|
186
|
-
.all .
|
|
187
|
-
|
|
188
|
-
.all .
|
|
189
|
-
.all .
|
|
190
|
-
|
|
191
|
-
.all .
|
|
192
|
-
.all .
|
|
193
|
-
.all .
|
|
180
|
+
/*
|
|
181
|
+
* layout="all": every question at once, and the result as an ink panel beside them, as the Estimator component
|
|
182
|
+
* (10:544) draws them: the options 642px wide and the budget 430px, 10px apart. The options are 32px inside with
|
|
183
|
+
* their parts 16px apart; the budget is 32px inside with its parts 14px apart, its lines 12px under their rules.
|
|
184
|
+
*/
|
|
185
|
+
.all { --accent: ${token("color.accent.default", "#ffd43b")}; --on-accent: ${token("color.accent.on", "#111111")}; --gap: 14px; display: grid; grid-template-columns: minmax(0, 642fr) minmax(0, 430fr); grid-template-areas: 'questions panel' 'note panel'; grid-template-rows: auto 1fr; column-gap: ${space(2.5)}; align-items: stretch; }
|
|
186
|
+
.all .questions { grid-area: questions; display: grid; align-content: start; gap: ${space(4)}; padding: ${space(8)} ${space(8)} 0; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-end: 0; }
|
|
187
|
+
.all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${space(2)}; }
|
|
188
|
+
.all .questions impakt-chip-group::part(label) { margin-block-end: ${space(4)}; line-height: 1.4; }
|
|
189
|
+
.all .foot { grid-area: note; padding: ${space(4)} ${space(8)} ${space(8)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-start: 0; }
|
|
190
|
+
/* The note in G2 Body S, 14px at 1.4. */
|
|
191
|
+
.all .note { font-size: 0.875rem; line-height: 1.4; }
|
|
192
|
+
.all .ink { grid-area: panel; display: flex; flex-direction: column; gap: var(--gap); padding: ${space(8)}; background: ${t.text}; color: ${t.surfaceCard}; --muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); --line: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }
|
|
193
|
+
.all .ink .mono { color: var(--muted); font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: 0.06em; }
|
|
194
|
+
/* The accent on ink only where the theme says the pair reads; in dark the panel turns to paper and the range keeps its words. Display M: 52px at 1.04 on the 1080px estimator, 40px tall on a phone. */
|
|
195
|
+
.all .ink .range { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); font-size: clamp(2.25rem, 11cqi, 3.25rem); font-weight: ${fontWeight("semibold")}; line-height: 1.04; letter-spacing: -0.04em; }
|
|
196
|
+
.all .ink .weeks { font-size: 1rem; line-height: 1.45; }
|
|
197
|
+
.all .rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
|
|
198
|
+
.all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${space(4)}; padding-block-start: ${space(3)}; border-block-start: ${t.borderThin} solid var(--line); font-size: 0.875rem; line-height: 1.4; }
|
|
199
|
+
.all .rows .length { font-family: ${t.fontMono}; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); white-space: nowrap; }
|
|
200
|
+
.all .cta { ${targetSize} display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; box-sizing: border-box; min-block-size: 47px; padding: 14px ${space(5)}; font-size: 1rem; line-height: 1.2; font-weight: ${fontWeight("medium")}; color: var(--on-accent); background: var(--accent); text-decoration: none; }
|
|
194
201
|
.all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }
|
|
195
202
|
.all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${t.text}, 0 0 0 4px ${t.surfaceCard}; }
|
|
196
|
-
.all .way { margin: 0;
|
|
203
|
+
.all .way { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
|
|
204
|
+
/* On a phone (15:943, 15:974): the options 20px inside with their parts 14px apart, the budget 24 by 20 inside with its parts 12px apart, its lines 11px under their rules, and the note under the budget's action. */
|
|
197
205
|
@container (max-width: 48rem) {
|
|
198
|
-
.all { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'
|
|
199
|
-
.all .questions { padding: ${space(
|
|
200
|
-
.all .
|
|
206
|
+
.all { --gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'; grid-template-rows: auto; column-gap: 0; }
|
|
207
|
+
.all .questions { gap: 14px; padding: ${space(5)}; border-block-end: ${t.borderThin} solid ${t.text}; }
|
|
208
|
+
.all .questions impakt-chip-group::part(label) { margin-block-start: 0; margin-block-end: 14px; }
|
|
209
|
+
.all .foot { display: none; }
|
|
201
210
|
.all .ink { padding: ${space(6)} ${space(5)}; }
|
|
211
|
+
.all .rows li { padding-block-start: 11px; }
|
|
202
212
|
}
|
|
213
|
+
.all .ink .note { display: none; color: var(--muted); }
|
|
214
|
+
@container (max-width: 48rem) { .all .ink .note { display: block; } }
|
|
203
215
|
@media (forced-colors: active) {
|
|
204
216
|
.all .ink { border: 1px solid CanvasText; }
|
|
205
217
|
.all .cta { border: 1px solid ButtonText; }
|
|
@@ -439,6 +451,7 @@ var ImpaktEstimator = class extends ImpaktElement {
|
|
|
439
451
|
${(this.phases ?? []).length ? html`<ul class="rows" role="list">${(this.phases ?? []).map((phase, i) => html`<li><span>${phase.label}</span><span class="length">${this.weeksWord(weeks[i])}</span></li>`)}</ul>` : nothing}
|
|
440
452
|
${this.contactHref ? html`<a class="cta" href=${this.contactHref} part="send" @click=${(e) => this.send(e)}><span>${this.sendLabel}</span>${arrow}</a>` : nothing}
|
|
441
453
|
${r.way ? html`<p class="way">${this.wayLabel || say("Way of working")}: ${r.way}</p>` : nothing}
|
|
454
|
+
${this.note ? html`<p class="note">${this.note}</p>` : nothing}
|
|
442
455
|
</aside>
|
|
443
456
|
${this.note ? html`<div class="foot"><p class="note">${this.note}</p></div>` : nothing}
|
|
444
457
|
</div>`;
|
|
@@ -490,4 +503,4 @@ export {
|
|
|
490
503
|
phaseWeeks,
|
|
491
504
|
ImpaktEstimator
|
|
492
505
|
};
|
|
493
|
-
//# sourceMappingURL=chunk-
|
|
506
|
+
//# sourceMappingURL=chunk-B6I3GVJ5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/estimator.ts"],"sourcesContent":["/**\n * A cost estimator: a few questions, one at a time, with a budget beside them\n * that moves as the answers change, and then a result with a timeline, a team\n * and a way of working.\n *\n * Every number is content. Each choice says what it adds to the cost and the\n * weeks, or what it multiplies them by, and the bands say how big a team a\n * cost needs. The arithmetic lives here, in code, because a binding never\n * computes (ADR 0003): a studio changes its rates in the CMS, not the rules.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n pageLocale,\n say,\n focusRing,\n targetSize,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n token,\n type,\n toneOf,\n} from '@atomic-ui/ui';\n\n/** One answer to a question, and what it does to the estimate. */\nexport interface EstimatorChoice {\n id: string;\n label: string;\n /** A line under the label, such as \"iPhone and Android\". */\n hint?: string;\n /** Added to the cost, counted in units (see `unit`). */\n cost?: number;\n /** Added to the weeks. */\n weeks?: number;\n /** Multiplies the cost, such as 1.35 for a more polished first version. */\n costFactor?: number;\n /** Multiplies the weeks. */\n weeksFactor?: number;\n /** Engineers added to the team, such as one more to go faster. */\n engineers?: number;\n /** Shown beside the budget when it is picked. */\n tip?: string;\n /** How the summary names it, such as \"a SaaS platform\" or \"payments\". The label when left out. */\n phrase?: string;\n}\n\n/** One question. */\nexport interface EstimatorQuestion {\n id: string;\n heading: string;\n hint?: string;\n /** `one` picks one card, `many` picks any number, and `scale` is a slider across the choices in order. */\n kind: 'one' | 'many' | 'scale';\n choices: EstimatorChoice[];\n /** The choices picked at the start. A `one` or `scale` question takes the first id; with none, its first choice. */\n start?: string[];\n /** A short name for the question in the summary that is sent on, such as \"Polish\". Left out of it when there is none. */\n short?: string;\n /** For a `many` question, whether the summary lists what was picked, as in \"with payments and AI features\". Yes when left out. */\n inSummary?: boolean;\n}\n\n/** A band of cost: the first band whose `below` the cost is under applies, or the last one. */\nexport interface EstimatorBand {\n below?: number;\n /** For a team band, how many engineers. */\n engineers?: number;\n /** For a way-of-working band, what it is called. */\n text?: string;\n}\n\n/** One part of the timeline. The part with no share takes the weeks the others leave. */\nexport interface EstimatorPhase {\n label: string;\n /** Its share of the weeks, such as 0.1. At least one week either way. */\n share?: number;\n}\n\n/** What an estimate came to, as the `impakt-estimate` event carries it. */\nexport interface EstimateResult {\n low: number;\n high: number;\n weeks: number;\n engineers: number;\n way: string;\n summary: string;\n /** The ids picked for each question. */\n answers: Record<string, string[]>;\n}\n\nconst sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0);\nconst bandFor = (bands: EstimatorBand[], cost: number): EstimatorBand | undefined =>\n bands.find((b) => typeof b.below === 'number' && cost < b.below) ?? bands.at(-1);\n\n/** The arithmetic, apart from the element so it can be checked on its own. */\nexport function estimate(\n questions: EstimatorQuestion[],\n answers: Record<string, string[]>,\n rules: { low: number; high: number; minWeeks: number; teams: EstimatorBand[]; ways: EstimatorBand[] },\n): { cost: number; low: number; high: number; weeks: number; engineers: number; way: string } {\n const chosen = questions.flatMap((q) => (answers[q.id] ?? []).flatMap((id) => q.choices.filter((c) => c.id === id)));\n let cost = sum(chosen.map((c) => c.cost ?? 0));\n let weeks = sum(chosen.map((c) => c.weeks ?? 0));\n for (const c of chosen) {\n cost *= c.costFactor ?? 1;\n weeks *= c.weeksFactor ?? 1;\n }\n const engineers = (bandFor(rules.teams, cost)?.engineers ?? 1) + sum(chosen.map((c) => c.engineers ?? 0));\n return {\n cost,\n low: Math.round(cost * rules.low),\n high: Math.round(cost * rules.high),\n weeks: Math.max(rules.minWeeks, Math.round(weeks)),\n engineers,\n way: bandFor(rules.ways, cost)?.text ?? '',\n };\n}\n\n/** The weeks each part of the timeline takes, adding up to the whole. */\nexport function phaseWeeks(phases: EstimatorPhase[], weeks: number): number[] {\n const fixed = phases.map((p) => (typeof p.share === 'number' ? Math.max(1, Math.round(weeks * p.share)) : 0));\n const rest = Math.max(1, weeks - sum(fixed));\n return phases.map((p, i) => (typeof p.share === 'number' ? fixed[i]! : rest));\n}\n\n/**\n * Asks a few questions one at a time and keeps a budget beside them that moves\n * with every answer, then shows the estimate: the range, the weeks, how long\n * each part takes, the team and the way of working. The visitor can send the\n * estimate on to a contact page, where a message box can start with it.\n *\n * **`layout=\"all\"` asks every question at once.** Each is a numbered row of\n * square chips (`impakt-chip-group`, radios for one answer and checkboxes for\n * several) under a monospace label such as \"01 · What are you building?\", and\n * the result sits beside them as an ink panel: the budget in the accent, the\n * weeks to a first release, each part of the timeline as a row, a full-width\n * button to send it and the suggested way of working. The note goes under the\n * chips on a wide screen and under the panel on a phone, where the chips and\n * the panel stack with no gap. The wizard stays the default.\n *\n * @category form\n * @icon calculator\n * @fires {CustomEvent<EstimateResult>} impakt-estimate - When the estimate is sent on. The result is in detail.\n */\nexport class ImpaktEstimator extends ImpaktElement {\n static properties = {\n questions: { type: Array },\n teams: { type: Array },\n ways: { type: Array },\n phases: { type: Array },\n low: { type: Number },\n high: { type: Number },\n minWeeks: { type: Number, attribute: 'min-weeks' },\n currency: { type: String },\n unit: { type: Number },\n intro: { type: String },\n budgetLabel: { type: String, attribute: 'budget-label' },\n resultHeading: { type: String, attribute: 'result-heading' },\n teamText: { type: String, attribute: 'team-text' },\n teamTextOne: { type: String, attribute: 'team-text-one' },\n note: { type: String },\n contactHref: { type: String, attribute: 'contact-href' },\n sendLabel: { type: String, attribute: 'send-label' },\n layout: { type: String, reflect: true },\n wayLabel: { type: String, attribute: 'way-label' },\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\n /** The questions, in the order they are asked. */\n declare questions: EstimatorQuestion[];\n /** How many engineers each band of cost needs. */\n declare teams: EstimatorBand[];\n /** The way of working for each band of cost. */\n declare ways: EstimatorBand[];\n /** The parts of the timeline, in order. */\n declare phases: EstimatorPhase[];\n /** The low end of the range, as a share of the cost. */\n declare low: number;\n /** The high end of the range, as a share of the cost. */\n declare high: number;\n /** The fewest weeks an estimate says. */\n declare minWeeks: number;\n /** The currency the cost is in, such as GBP. */\n declare currency: string;\n /** What one unit of cost is worth, such as 1000 when the costs are in thousands. */\n declare unit: number;\n /** Beside the budget before anything is picked, such as \"Start by telling us what you are building.\" */\n declare intro: string;\n declare budgetLabel: string;\n declare resultHeading: string;\n /** The team, with {n} for the number of engineers. */\n declare teamText: string;\n /** The team when it has one engineer. */\n declare teamTextOne: string;\n /** A line under the result, such as how accurate it is. */\n declare note: string;\n /** Where the estimate is sent on to. With none, there is no button to send it. */\n declare contactHref: string;\n declare sendLabel: string;\n /** `wizard` asks one question at a time. `all` asks every question at once, with the result beside them as an ink panel. */\n declare layout: 'wizard' | 'all';\n /** With `all`: the words before the way of working under the panel, such as \"Suggested way to work\". */\n declare wayLabel: string;\n /** The level of each question's heading. */\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private at = 0;\n private answers: Record<string, string[]> = {};\n private tip = '';\n private copied = '';\n private started = false;\n\n constructor() {\n super();\n this.questions = [];\n this.teams = [];\n this.ways = [];\n this.phases = [];\n this.low = 0.85;\n this.high = 1.25;\n this.minWeeks = 1;\n this.currency = 'GBP';\n this.unit = 1;\n this.intro = '';\n this.budgetLabel = 'Indicative budget';\n this.resultHeading = 'Your estimate';\n this.teamText = '{n} engineers';\n this.teamTextOne = '1 engineer';\n this.note = '';\n this.contactHref = '';\n this.sendLabel = 'Send this to us';\n this.layout = 'wizard';\n this.wayLabel = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n [hidden] { display: none !important; }\n .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${space(10)}; align-items: start; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; text-transform: uppercase; color: ${t.textMuted}; margin: 0; }\n .sr-only { ${visuallyHidden} }\n\n .progress { display: grid; gap: ${space(2)}; margin-block-end: ${space(6)}; }\n .bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }\n .bar i { display: block; block-size: 100%; background: ${t.brand}; transition: inline-size 300ms ease; }\n\n fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }\n legend { padding: 0; margin-block-end: ${space(2)}; }\n .q { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; ${type('3xl')} letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; outline: none; }\n .hint { margin: 0 0 ${space(6)}; color: ${t.textMuted}; }\n\n .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(3)}; }\n .choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .choice { position: relative; display: grid; gap: ${space(1)}; align-content: start; padding: ${space(4)}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }\n .choice:hover { border-color: ${t.borderStrong}; }\n .choice input { ${visuallyHidden} }\n .choice:has(input:checked) { border-color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.brand}; background: ${t.brandSubtle}; }\n .choice:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }\n .many .choice { padding: ${space(3)}; }\n .label { font-weight: ${fontWeight('semibold')}; }\n .small { ${type('sm')} color: ${t.textMuted}; }\n /* A tick for a picked feature, drawn in the corner. */\n .many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${space(2)}; inset-inline-end: ${space(3)}; color: ${t.brand}; font-weight: ${fontWeight('bold')}; }\n\n .scale { display: grid; gap: ${space(3)}; }\n .scale input { inline-size: 100%; accent-color: ${t.brand}; ${targetSize} }\n .ticks { display: flex; justify-content: space-between; ${type('sm')} color: ${t.textMuted}; }\n .ticks span[aria-current] { color: ${t.text}; font-weight: ${fontWeight('semibold')}; }\n .now { margin: 0; }\n\n .nav { display: flex; gap: ${space(3)}; margin-block-start: ${space(8)}; }\n button, .send { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2.5)} ${space(5)}; border-radius: ${t.radiusLg}; font: inherit; font-weight: ${fontWeight('semibold')}; cursor: pointer; text-decoration: none; border: ${t.borderThin} solid transparent; }\n .primary, .send { background: ${t.brand}; color: ${t.onBrand}; }\n .primary:hover, .send:hover { background: ${t.brandHover}; }\n .secondary { background: transparent; color: ${t.text}; border-color: ${t.borderStrong}; }\n .secondary:hover { background: ${t.surfaceSubtle}; }\n\n .panel { position: sticky; inset-block-start: ${space(6)}; overflow: hidden; isolation: isolate; padding: ${space(8)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowMd}; display: grid; gap: ${space(2)}; }\n /* The glow behind the budget grows as the product does. */\n .glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${unsafeCSS(toneOf(1, 0))} 45%, transparent), color-mix(in srgb, ${unsafeCSS(toneOf(2, 1))} 25%, transparent) 45%, transparent 70%); transform: scale(var(--s, 0.7)); transform-origin: 70% 30%; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); pointer-events: none; }\n .range { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; }\n .weeks { margin: 0; ${type('lg')} }\n .tip { margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${t.textMuted}; }\n\n .result { display: grid; gap: ${space(6)}; }\n .summary { margin: 0; ${type('xl')} text-wrap: pretty; }\n .phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }\n .phases i { display: block; }\n .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${space(2)} ${space(5)}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }\n dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n dt { margin: 0 0 ${space(1)}; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n .status { margin: 0; ${type('sm')} }\n\n @container (max-width: 48rem) {\n .wrap { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n /* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it\n and it never widens the page (1.4.10). */\n .panel { position: relative; inset-block-start: auto; }\n .choices.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n }\n @container (max-width: 30rem) {\n .choices { grid-template-columns: minmax(0, 1fr); }\n .range { font-size: ${fontSize('4xl')}; }\n }\n /*\n * layout=\"all\": every question at once, and the result as an ink panel beside them, as the Estimator component\n * (10:544) draws them: the options 642px wide and the budget 430px, 10px apart. The options are 32px inside with\n * their parts 16px apart; the budget is 32px inside with its parts 14px apart, its lines 12px under their rules.\n */\n .all { --accent: ${token('color.accent.default', '#ffd43b')}; --on-accent: ${token('color.accent.on', '#111111')}; --gap: 14px; display: grid; grid-template-columns: minmax(0, 642fr) minmax(0, 430fr); grid-template-areas: 'questions panel' 'note panel'; grid-template-rows: auto 1fr; column-gap: ${space(2.5)}; align-items: stretch; }\n .all .questions { grid-area: questions; display: grid; align-content: start; gap: ${space(4)}; padding: ${space(8)} ${space(8)} 0; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-end: 0; }\n .all .questions impakt-chip-group { margin: 0; --impakt-chip-group-gap: ${space(2)}; }\n .all .questions impakt-chip-group::part(label) { margin-block-end: ${space(4)}; line-height: 1.4; }\n .all .foot { grid-area: note; padding: ${space(4)} ${space(8)} ${space(8)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-start: 0; }\n /* The note in G2 Body S, 14px at 1.4. */\n .all .note { font-size: 0.875rem; line-height: 1.4; }\n .all .ink { grid-area: panel; display: flex; flex-direction: column; gap: var(--gap); padding: ${space(8)}; background: ${t.text}; color: ${t.surfaceCard}; --muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); --line: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n .all .ink .mono { color: var(--muted); font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: 0.06em; }\n /* The accent on ink only where the theme says the pair reads; in dark the panel turns to paper and the range keeps its words. Display M: 52px at 1.04 on the 1080px estimator, 40px tall on a phone. */\n .all .ink .range { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); font-size: clamp(2.25rem, 11cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1.04; letter-spacing: -0.04em; }\n .all .ink .weeks { font-size: 1rem; line-height: 1.45; }\n .all .rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }\n .all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${space(4)}; padding-block-start: ${space(3)}; border-block-start: ${t.borderThin} solid var(--line); font-size: 0.875rem; line-height: 1.4; }\n .all .rows .length { font-family: ${t.fontMono}; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); white-space: nowrap; }\n .all .cta { ${targetSize} display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; box-sizing: border-box; min-block-size: 47px; padding: 14px ${space(5)}; font-size: 1rem; line-height: 1.2; font-weight: ${fontWeight('medium')}; color: var(--on-accent); background: var(--accent); text-decoration: none; }\n .all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }\n .all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${t.text}, 0 0 0 4px ${t.surfaceCard}; }\n .all .way { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }\n /* On a phone (15:943, 15:974): the options 20px inside with their parts 14px apart, the budget 24 by 20 inside with its parts 12px apart, its lines 11px under their rules, and the note under the budget's action. */\n @container (max-width: 48rem) {\n .all { --gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel'; grid-template-rows: auto; column-gap: 0; }\n .all .questions { gap: 14px; padding: ${space(5)}; border-block-end: ${t.borderThin} solid ${t.text}; }\n .all .questions impakt-chip-group::part(label) { margin-block-start: 0; margin-block-end: 14px; }\n .all .foot { display: none; }\n .all .ink { padding: ${space(6)} ${space(5)}; }\n .all .rows li { padding-block-start: 11px; }\n }\n .all .ink .note { display: none; color: var(--muted); }\n @container (max-width: 48rem) { .all .ink .note { display: block; } }\n @media (forced-colors: active) {\n .all .ink { border: 1px solid CanvasText; }\n .all .cta { border: 1px solid ButtonText; }\n .choice:has(input:checked) { outline: 3px solid Highlight; }\n .bar i, .phases i, .legend li::before { background: CanvasText !important; }\n .glow { display: none; }\n }\n `,\n ];\n\n /** The answers each question starts with. */\n private reset(): void {\n this.answers = Object.fromEntries(\n (this.questions ?? []).map((q) => {\n const ids = (q.start ?? []).filter((id) => q.choices.some((c) => c.id === id));\n if (q.kind === 'many') return [q.id, ids];\n return [q.id, [ids[0] ?? q.choices[0]?.id].filter((x): x is string => Boolean(x))];\n }),\n );\n this.at = 0;\n this.tip = '';\n this.copied = '';\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('questions') || !this.started) {\n this.reset();\n this.started = true;\n }\n }\n\n private get rules() {\n return { low: this.low, high: this.high, minWeeks: this.minWeeks, teams: this.teams ?? [], ways: this.ways ?? [] };\n }\n\n private money(n: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), {\n style: 'currency',\n currency: this.currency || 'GBP',\n notation: 'compact',\n maximumFractionDigits: 0,\n }).format(n * (this.unit || 1));\n } catch {\n return String(n * (this.unit || 1));\n }\n }\n\n private listOf(words: string[]): string {\n try {\n return new Intl.ListFormat(pageLocale(this), { type: 'conjunction' }).format(words);\n } catch {\n return words.join(', ');\n }\n }\n\n private weeksWord(n: number): string {\n return n === 1 ? say('{n} week', { n }) : say('{n} weeks', { n });\n }\n\n /** The largest the budget can be, so the glow is full size at it. */\n private get most(): number {\n const qs = this.questions ?? [];\n const answers = Object.fromEntries(\n qs.map((q) => {\n if (q.kind === 'many') return [q.id, q.choices.map((c) => c.id)];\n const best = [...q.choices].sort((a, b) => (b.cost ?? 0) * (b.costFactor ?? 1) - (a.cost ?? 0) * (a.costFactor ?? 1))[0];\n return [q.id, best ? [best.id] : []];\n }),\n );\n return estimate(qs, answers, this.rules).high || 1;\n }\n\n private summaryOf(r: ReturnType<typeof estimate>): string {\n const qs = this.questions ?? [];\n const one = qs.find((q) => q.kind === 'one');\n const thing = one ? one.choices.find((c) => c.id === this.answers[one.id]?.[0]) : undefined;\n const many = qs\n .filter((q) => q.kind === 'many' && q.inSummary !== false)\n .flatMap((q) =>\n (this.answers[q.id] ?? []).map((id) => {\n const c = q.choices.find((x) => x.id === id);\n return c ? c.phrase || c.label : id;\n }),\n );\n const name = thing ? thing.phrase || thing.label : '';\n const first = !name\n ? ''\n : many.length\n ? say('You are building {thing} with {list}.', { thing: name, list: this.listOf(many) })\n : say('You are building {thing}.', { thing: name });\n const rest = say('Expect {range} and about {weeks} to a first release.', { range: this.rangeOf(r), weeks: this.weeksWord(r.weeks) });\n return first ? `${first} ${rest}` : rest;\n }\n\n private rangeOf(r: { low: number; high: number }): string {\n return say('{low} to {high}', { low: this.money(r.low), high: this.money(r.high) });\n }\n private teamOf(n: number): string {\n return n === 1 ? this.teamTextOne : this.teamText.replace('{n}', String(n));\n }\n\n private pick(q: EstimatorQuestion, choice: EstimatorChoice, on: boolean): void {\n const now = this.answers[q.id] ?? [];\n this.answers = {\n ...this.answers,\n [q.id]: q.kind === 'many' ? (on ? [...now.filter((id) => id !== choice.id), choice.id] : now.filter((id) => id !== choice.id)) : [choice.id],\n };\n if (on && choice.tip) this.tip = choice.tip;\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const last = (this.questions ?? []).length;\n this.at = Math.max(0, Math.min(last, to));\n this.copied = '';\n this.requestUpdate();\n void this.updateComplete.then(() => (this.renderRoot.querySelector('.current .q') as HTMLElement | null)?.focus({ preventScroll: true }));\n }\n\n private result(): EstimateResult {\n const r = estimate(this.questions ?? [], this.answers, this.rules);\n return {\n low: r.low * (this.unit || 1),\n high: r.high * (this.unit || 1),\n weeks: r.weeks,\n engineers: r.engineers,\n way: r.way,\n summary: this.textOf(r),\n answers: this.answers,\n };\n }\n\n /** The estimate as words to send or copy. */\n private textOf(r: ReturnType<typeof estimate>): string {\n const parts = [this.summaryOf(r), `${this.teamOf(r.engineers)}.`];\n if (r.way) parts.push(`${r.way}.`);\n const picked = (this.questions ?? [])\n .filter((q) => q.short && q.kind !== 'many')\n .map((q) => {\n const c = q.choices.find((x) => x.id === this.answers[q.id]?.[0]);\n return c ? `${q.short}: ${c.label}.` : '';\n })\n .filter(Boolean);\n const many = (this.questions ?? [])\n .filter((q) => q.short && q.kind === 'many' && q.inSummary === false)\n .map((q) => {\n const labels = (this.answers[q.id] ?? []).map((id) => q.choices.find((x) => x.id === id)?.label ?? id);\n return labels.length ? `${q.short}: ${this.listOf(labels)}.` : '';\n })\n .filter(Boolean);\n return [...parts, ...many, ...picked].join(' ');\n }\n\n private send(e: Event): void {\n const result = this.result();\n try {\n sessionStorage.setItem('impakt.estimate', result.summary);\n } catch {\n /* storage can be blocked; the link still goes */\n }\n const go = this.dispatchEvent(new CustomEvent('impakt-estimate', { detail: result, bubbles: true, composed: true, cancelable: true }));\n if (!go) e.preventDefault();\n }\n\n private async copy(): Promise<void> {\n const text = this.result().summary;\n try {\n await navigator.clipboard.writeText(text);\n this.copied = say('Summary copied.');\n } catch {\n this.copied = say('Copying is blocked here. Select the summary above instead.');\n }\n this.requestUpdate();\n }\n\n private heading(text: string): TemplateResult {\n const l = Math.min(Math.max(this.headingLevel || 2, 2), 6);\n return html`<div class=\"q\" role=\"heading\" aria-level=${l} tabindex=\"-1\">${text}</div>`;\n }\n\n private renderQuestion(q: EstimatorQuestion, i: number): TemplateResult {\n const picked = this.answers[q.id] ?? [];\n const current = i === this.at;\n if (q.kind === 'scale') {\n const index = Math.max(\n 0,\n q.choices.findIndex((c) => c.id === picked[0]),\n );\n const chosen = q.choices[index];\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"scale\">\n <input type=\"range\" min=\"0\" max=${Math.max(0, q.choices.length - 1)} step=\"1\" .value=${String(index)} aria-label=${q.heading} aria-valuetext=${chosen?.label ?? ''}\n @input=${(e: Event) => {\n const c = q.choices[Number((e.target as HTMLInputElement).value)];\n if (c) this.pick(q, c, true);\n }}>\n <div class=\"ticks\" aria-hidden=\"true\">${q.choices.map((c, k) => html`<span aria-current=${k === index ? 'true' : nothing}>${c.label}</span>`)}</div>\n ${chosen?.hint ? html`<p class=\"now\">${chosen.hint}</p>` : nothing}\n </div>\n </fieldset>`;\n }\n const many = q.kind === 'many';\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"choices ${many ? 'many' : ''}\">\n ${q.choices.map(\n (c) => html`<label class=\"choice\">\n <input type=${many ? 'checkbox' : 'radio'} name=${`${this.uid}-${q.id}`} value=${c.id} .checked=${picked.includes(c.id)}\n @change=${(e: Event) => this.pick(q, c, (e.target as HTMLInputElement).checked)}>\n <span class=\"label\">${c.label}</span>\n ${c.hint ? html`<span class=\"small\">${c.hint}</span>` : nothing}\n </label>`,\n )}\n </div>\n </fieldset>`;\n }\n\n private renderResult(r: ReturnType<typeof estimate>): TemplateResult {\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const current = this.at === (this.questions ?? []).length;\n return html`<div class=\"result ${current ? 'current' : ''}\" ?hidden=${!current}>\n ${this.heading(this.resultHeading)}\n <p class=\"summary\">${this.summaryOf(r)}</p>\n ${\n (this.phases ?? []).length\n ? html`\n <div class=\"phases\" aria-hidden=\"true\">${(this.phases ?? []).map((_, i) => html`<i style=${`flex-grow:${weeks[i]};background:${toneOf(undefined, i)}`}></i>`)}</div>\n <ul class=\"legend\">${(this.phases ?? []).map((p, i) => html`<li style=${`--c:${toneOf(undefined, i)}`}>${p.label} <b>${this.weeksWord(weeks[i]!)}</b></li>`)}</ul>`\n : nothing\n }\n <dl>\n <div><dt class=\"mono\">${say('Your team')}</dt><dd>${this.teamOf(r.engineers)}</dd></div>\n ${r.way ? html`<div><dt class=\"mono\">${say('Way of working')}</dt><dd>${r.way}</dd></div>` : nothing}\n </dl>\n <div class=\"actions\">\n ${this.contactHref ? html`<a class=\"send\" href=${this.contactHref} @click=${(e: Event) => this.send(e)}>${this.sendLabel} <span aria-hidden=\"true\">→</span></a>` : nothing}\n <button type=\"button\" class=\"secondary\" @click=${() => this.copy()}>${say('Copy summary')}</button>\n <button type=\"button\" class=\"secondary\" @click=${() => {\n this.reset();\n this.go(0);\n }}>${say('Start again')}</button>\n </div>\n <p class=\"status\" role=\"status\">${this.copied}</p>\n ${this.note ? html`<p class=\"note\">${this.note}</p>` : nothing}\n </div>`;\n }\n\n /** Every question at once, as rows of chips, with the result beside them in ink. */\n private renderAll(r: ReturnType<typeof estimate>): TemplateResult {\n const qs = this.questions ?? [];\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const 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 return html`<div class=\"all\">\n <div class=\"questions\" part=\"questions\">\n ${qs.map((q, i) => {\n const picked = this.answers[q.id] ?? [];\n const many = q.kind === 'many';\n const options = q.choices.map((c) => ({ value: c.id, label: c.label }));\n return html`<impakt-chip-group look=\"site\" part=\"question\" .label=${`${String(i + 1).padStart(2, '0')} · ${q.heading}`} .description=${q.hint ?? ''}\n .options=${options} ?multiple=${many} .values=${many ? picked : []} .value=${many ? '' : (picked[0] ?? '')}\n @impakt-change=${(e: CustomEvent<{ value: string }>) => this.chipsChanged(q, e)}></impakt-chip-group>`;\n })}\n </div>\n <aside class=\"ink\" part=\"panel\">\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n ${\n (this.phases ?? []).length\n ? html`<ul class=\"rows\" role=\"list\">${(this.phases ?? []).map((phase, i) => html`<li><span>${phase.label}</span><span class=\"length\">${this.weeksWord(weeks[i]!)}</span></li>`)}</ul>`\n : nothing\n }\n ${this.contactHref ? html`<a class=\"cta\" href=${this.contactHref} part=\"send\" @click=${(e: Event) => this.send(e)}><span>${this.sendLabel}</span>${arrow}</a>` : nothing}\n ${r.way ? html`<p class=\"way\">${this.wayLabel || say('Way of working')}: ${r.way}</p>` : nothing}\n ${this.note ? html`<p class=\"note\">${this.note}</p>` : nothing}\n </aside>\n ${this.note ? html`<div class=\"foot\"><p class=\"note\">${this.note}</p></div>` : nothing}\n </div>`;\n }\n\n /** A row of chips changed: one answer, or the set of them. */\n private chipsChanged(q: EstimatorQuestion, e: CustomEvent<{ value: string }>): void {\n const group = e.target as HTMLElement & { values?: string[] };\n const ids = q.kind === 'many' ? [...(group.values ?? [])] : [e.detail?.value].filter((x): x is string => Boolean(x));\n this.answers = { ...this.answers, [q.id]: ids };\n const last = ids.at(-1);\n const tip = q.choices.find((c) => c.id === last)?.tip;\n if (tip) this.tip = tip;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const qs = this.questions ?? [];\n if (this.layout === 'all') return this.renderAll(estimate(qs, this.answers, this.rules));\n const total = qs.length;\n const r = estimate(qs, this.answers, this.rules);\n const done = this.at >= total;\n const scale = (0.6 + Math.min(1, r.high / this.most) * 1.1).toFixed(2);\n return html`<div class=\"wrap\">\n <div>\n <div class=\"progress\">\n <p class=\"mono\">${done ? this.resultHeading : say('Step {step} of {steps}', { step: this.at + 1, steps: total })}</p>\n <div class=\"bar\" aria-hidden=\"true\"><i style=${`inline-size:${total ? (done ? 100 : ((this.at + 1) / (total + 1)) * 100) : 0}%`}></i></div>\n </div>\n ${qs.map((q, i) => this.renderQuestion(q, i))}\n ${this.renderResult(r)}\n ${\n done\n ? nothing\n : html`<div class=\"nav\">\n ${this.at > 0 ? html`<button type=\"button\" class=\"secondary\" @click=${() => this.go(this.at - 1)}>${say('Back')}</button>` : nothing}\n <button type=\"button\" class=\"primary\" @click=${() => this.go(this.at + 1)}>${this.at === total - 1 ? say('See my estimate') : say('Next')} <span aria-hidden=\"true\">→</span></button>\n </div>`\n }\n </div>\n <aside class=\"panel\" part=\"panel\" style=${`--s:${scale}`}>\n <div class=\"glow\" aria-hidden=\"true\"></div>\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n <p class=\"tip\" aria-live=\"polite\">${this.tip || this.intro}</p>\n </aside>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-estimator', ImpaktEstimator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-estimator': ImpaktEstimator;\n }\n}\n"],"mappings":";AAUA,SAAS,KAAK,MAAM,SAAS,iBAAsC;AACnE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAoEP,IAAM,MAAM,CAAC,OAAiB,GAAG,OAAO,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC;AAC1D,IAAM,UAAU,CAAC,OAAwB,SACvC,MAAM,KAAK,CAAC,MAAM,OAAO,EAAE,UAAU,YAAY,OAAO,EAAE,KAAK,KAAK,MAAM,GAAG,EAAE;AAG1E,SAAS,SACd,WACA,SACA,OAC4F;AAC5F,QAAM,SAAS,UAAU,QAAQ,CAAC,OAAO,QAAQ,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,QAAQ,OAAO,CAAC,MAAM,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ine,
|
|
7
|
+
inkMuted
|
|
8
|
+
} from "./chunk-EGNQHWY6.js";
|
|
9
|
+
|
|
1
10
|
// packages/blocks/src/components/site.ts
|
|
2
11
|
import { css, html, nothing } from "lit";
|
|
3
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
ImpaktElement,
|
|
14
|
+
focusRing,
|
|
15
|
+
hideOn,
|
|
16
|
+
fontSize,
|
|
17
|
+
fontWeight,
|
|
18
|
+
linkCurrent,
|
|
19
|
+
say,
|
|
20
|
+
space,
|
|
21
|
+
t,
|
|
22
|
+
token,
|
|
23
|
+
type,
|
|
24
|
+
toneOf
|
|
25
|
+
} from "@atomic-ui/ui";
|
|
26
|
+
var onInk = token("color.ink-on", "#FFFFFF");
|
|
4
27
|
var STRIPE = [0, 1, 2, 3, 4];
|
|
5
28
|
var MONO = t.fontMono;
|
|
6
29
|
var ImpaktSiteHeader = class extends ImpaktElement {
|
|
@@ -26,7 +49,14 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
26
49
|
statusAt: { type: String, reflect: true, attribute: "status-at" },
|
|
27
50
|
navLook: { type: String, attribute: "nav-look" },
|
|
28
51
|
current: { type: String },
|
|
29
|
-
presence: { type: Array }
|
|
52
|
+
presence: { type: Array },
|
|
53
|
+
look: { type: String, reflect: true },
|
|
54
|
+
menuActionText: { type: String, attribute: "menu-action-text" },
|
|
55
|
+
menuActionHref: { type: String, attribute: "menu-action-href" },
|
|
56
|
+
menuNote: { type: String, attribute: "menu-note" },
|
|
57
|
+
menuEmail: { type: String, attribute: "menu-email" },
|
|
58
|
+
currentText: { type: String, attribute: "current-text" },
|
|
59
|
+
closeText: { type: String, attribute: "close-text" }
|
|
30
60
|
};
|
|
31
61
|
}
|
|
32
62
|
constructor() {
|
|
@@ -52,6 +82,13 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
52
82
|
this.navLook = "";
|
|
53
83
|
this.current = "";
|
|
54
84
|
this.presence = [];
|
|
85
|
+
this.look = "default";
|
|
86
|
+
this.menuActionText = "";
|
|
87
|
+
this.menuActionHref = "";
|
|
88
|
+
this.menuNote = "";
|
|
89
|
+
this.menuEmail = "";
|
|
90
|
+
this.currentText = "Current";
|
|
91
|
+
this.closeText = "";
|
|
55
92
|
}
|
|
56
93
|
static {
|
|
57
94
|
this.styles = [
|
|
@@ -89,15 +126,15 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
89
126
|
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
90
127
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
91
128
|
.status .hash { opacity: 0.72; }
|
|
92
|
-
@container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(2)}; } :host(:not([fold='narrow'])) .end { flex: 1 1 100%; } }
|
|
129
|
+
@container (max-width: 22rem) { :host(:not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${space(2)}; } :host(:not([fold='narrow']):not([look='canvas'])) .end { flex: 1 1 100%; } }
|
|
93
130
|
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${space(3)}; } }
|
|
94
131
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
95
132
|
line of their own under the name and the action, and wrap there. */
|
|
96
133
|
@container (max-width: 40rem) {
|
|
97
|
-
:host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }
|
|
98
|
-
:host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }
|
|
134
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }
|
|
135
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .start { flex: 1 1 auto; }
|
|
99
136
|
/* Its row may be narrower than the links, which then wrap: the max-content floor below is for the measured header only. */
|
|
100
|
-
:host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
137
|
+
:host(:not(:defined):not([fold='narrow']):not([look='canvas'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }
|
|
101
138
|
/* fold="narrow": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */
|
|
102
139
|
:host([fold='narrow']) .middle { justify-content: flex-end; }
|
|
103
140
|
/*
|
|
@@ -111,31 +148,125 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
111
148
|
:host(:not([fold='narrow'])) .middle ::slotted(impakt-nav[folded]) { flex: none; min-inline-size: max-content; }
|
|
112
149
|
:host([fold='narrow']) .end > slot > impakt-button { display: none; }
|
|
113
150
|
}
|
|
151
|
+
/*
|
|
152
|
+
* look="canvas": the G2 top bar (9:264, 14:715). The mark and the name in Label S, 14px medium; the "/" in the subtle
|
|
153
|
+
* text and the file name in the muted; the Live chip with a soft edge, a 3px corner and an ink dot, in G2 Mono S.
|
|
154
|
+
*/
|
|
155
|
+
.menu-button, .sheet { display: none; }
|
|
156
|
+
:host([look='canvas']) .bar { min-block-size: 56px; }
|
|
157
|
+
:host([look='canvas']) .start { gap: 10px; }
|
|
158
|
+
:host([look='canvas']) .brand.marked { gap: 10px; font-family: ${t.fontBody}; font-size: 0.875rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
159
|
+
:host([look='canvas']) .mark { font-family: ${t.fontBody}; font-size: 0.875rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; }
|
|
160
|
+
:host([look='canvas']) .context { font-family: ${t.fontBody}; font-size: 0.875rem; line-height: 1.4; color: ${t.textMuted}; }
|
|
161
|
+
:host([look='canvas']) .context .slash { margin-inline-end: 10px; opacity: 1; color: ${token("color.text.subtle", "currentColor")}; }
|
|
162
|
+
:host([look='canvas']) .start .status { display: inline-flex; gap: 6px; padding: 3px 7px; background: ${t.surfaceCard}; border: 1px solid ${token("color.line.soft", "#CFCCC5")}; border-radius: 3px; color: ${t.textMuted}; font-family: ${MONO}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
163
|
+
:host([look='canvas']) .start .status .dot { inline-size: 6px; block-size: 6px; background: ${t.text}; }
|
|
164
|
+
/* The filled Menu button of 14:715: "Menu" and a two-line glyph after it. */
|
|
165
|
+
:host([look='canvas']) .menu-button { align-items: center; gap: 10px; padding: 9px 14px; border: 0; border-radius: 0; background: ${t.text}; color: ${t.surfaceCard}; font-family: ${t.fontBody}; font-size: 0.875rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; cursor: pointer; }
|
|
166
|
+
.glyph { display: inline-block; inline-size: 14px; block-size: 6px; box-sizing: border-box; border-block: 1.5px solid currentColor; }
|
|
167
|
+
/*
|
|
168
|
+
* The tabs, the file name, the people and the action need about 70rem in one row. Narrower, the file name and the
|
|
169
|
+
* people leave first, as decoration; at 60rem and under the tabs and the action give their place to the Menu button.
|
|
170
|
+
*/
|
|
171
|
+
@container (max-width: 70rem) { :host([look='canvas']) :is(.context, .presence) { display: none; } }
|
|
172
|
+
@container (max-width: 60rem) {
|
|
173
|
+
:host([look='canvas']) .middle, :host([look='canvas']) .end > slot > impakt-button.act { display: none; }
|
|
174
|
+
:host([look='canvas']) .bar { justify-content: space-between; }
|
|
175
|
+
:host([look='canvas']) .menu-button { display: inline-flex; }
|
|
176
|
+
}
|
|
177
|
+
/* The open menu (21:1688): ink in both themes, the whole screen, opened by the browser as a popover. */
|
|
178
|
+
.sheet:popover-open { display: flex; flex-direction: column; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: 0; border: 0; overflow: auto; overscroll-behavior: contain; background: ${ink}; color: ${onInk}; }
|
|
179
|
+
.menu-bar { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; box-sizing: border-box; min-block-size: 56px; padding: 0 ${space(4)}; border-block-end: 1px solid ${inkLine}; }
|
|
180
|
+
.menu-bar .brand.marked { gap: 10px; font-family: ${t.fontBody}; font-size: 0.875rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; letter-spacing: 0; }
|
|
181
|
+
.menu-bar .mark { background: ${onInk}; color: ${ink}; font-family: ${t.fontBody}; font-size: 0.875rem; font-weight: ${fontWeight("medium")}; }
|
|
182
|
+
.close { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 0; background: ${onInk}; color: ${ink}; font-family: ${t.fontBody}; font-size: 0.875rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; cursor: pointer; }
|
|
183
|
+
.menu-nav { flex: 1; padding: ${space(8)} 20px 0; }
|
|
184
|
+
.menu-nav ol { list-style: none; margin: 0; padding: 0; }
|
|
185
|
+
.menu-nav li { border-block-end: 1px solid ${inkLine}; }
|
|
186
|
+
.menu-nav a { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-block: 18px; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 13.4vw, 3.25rem); font-weight: ${fontWeight("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
187
|
+
.menu-nav a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
188
|
+
.menu-nav .number { flex: none; font-family: ${MONO}; font-size: 0.8125rem; font-weight: ${fontWeight("regular")}; line-height: 1.5; letter-spacing: 0; color: ${inkMuted}; }
|
|
189
|
+
/* The page you are on is in the accent, and its number says "Current", so it is not told by colour alone. */
|
|
190
|
+
.menu-nav a[aria-current], .menu-nav a[aria-current] .number { color: ${accentOnInk}; }
|
|
191
|
+
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: ${space(4)}; padding: ${space(8)} 20px calc(${space(8)} + env(safe-area-inset-bottom)); }
|
|
192
|
+
.menu-foot:empty { display: none; }
|
|
193
|
+
.call { display: flex; align-items: center; justify-content: space-between; gap: ${space(3)}; align-self: stretch; box-sizing: border-box; min-block-size: 47px; padding: 0 20px; background: ${accent}; color: ${accentOn}; text-decoration: none; font-family: ${t.fontBody}; font-size: 1rem; font-weight: ${fontWeight("medium")}; line-height: 1.2; }
|
|
194
|
+
.call:hover .words { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
195
|
+
.note { margin: 0; font-family: ${MONO}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${inkMuted}; }
|
|
196
|
+
.mail { display: inline-flex; align-items: center; min-block-size: 24px; color: inherit; font-family: ${t.fontBody}; font-size: 1rem; line-height: 1.45; text-decoration: none; }
|
|
197
|
+
.mail:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
198
|
+
/* What is slotted at the foot is read on ink too. */
|
|
199
|
+
.menu-foot ::slotted(*) { --impakt-color-text-default: ${onInk}; --impakt-color-text-heading: ${onInk}; --impakt-color-text-muted: ${inkMuted}; --impakt-color-text-link: ${onInk}; --impakt-color-text-link-hover: ${onInk}; color: ${onInk}; }
|
|
200
|
+
@media (forced-colors: active) {
|
|
201
|
+
:host([look='canvas']) .menu-button, .close, .call { border: 1px solid ButtonText; }
|
|
202
|
+
.sheet:popover-open { border: 1px solid CanvasText; }
|
|
203
|
+
:host([look='canvas']) .start .status .dot { background: CanvasText; }
|
|
204
|
+
}
|
|
114
205
|
`
|
|
115
206
|
];
|
|
116
207
|
}
|
|
117
208
|
act() {
|
|
118
209
|
this.dispatchEvent(new CustomEvent("impakt-action", { bubbles: true, composed: true }));
|
|
119
210
|
}
|
|
120
|
-
|
|
211
|
+
/** The brand link: the mark and the name, or the logo. */
|
|
212
|
+
renderBrand() {
|
|
213
|
+
if (!this.brand && !this.logoSrc) return nothing;
|
|
121
214
|
const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;
|
|
215
|
+
return html`<a class=${this.mark ? "brand marked" : "brand"} href=${this.home || "/"} part="brand">${this.mark ? html`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>` : nothing}${wordmark}</a>`;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* look="canvas": the filled Menu button and the whole-screen menu (14:715, 21:1688). They are tied by
|
|
219
|
+
* `popovertarget`, so the browser opens and closes the menu, moves on to it with Tab, closes it on Escape and
|
|
220
|
+
* tells a screen reader whether it is open, with no script.
|
|
221
|
+
*/
|
|
222
|
+
renderMenu() {
|
|
223
|
+
const panel = this.id_("menu");
|
|
224
|
+
const callText = this.menuActionText || this.actionText;
|
|
225
|
+
const callHref = this.menuActionHref || this.actionHref;
|
|
226
|
+
return html`<button class="menu-button" type="button" part="menu-button" popovertarget=${panel}>${this.menuText}<span class="glyph" aria-hidden="true"></span></button>
|
|
227
|
+
<div id=${panel} class="sheet" popover="auto" part="menu" role="dialog" aria-label=${this.menuText}>
|
|
228
|
+
<div class="menu-bar">
|
|
229
|
+
${this.renderBrand()}
|
|
230
|
+
<button class="close" type="button" popovertarget=${panel} popovertargetaction="hide">${this.closeText || say("Close")}<svg viewBox="0 0 10 10" width="10" height="10" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true" focusable="false"><path d="M1 1l8 8M9 1 1 9" /></svg></button>
|
|
231
|
+
</div>
|
|
232
|
+
<nav class="menu-nav" aria-label=${this.label || nothing}>
|
|
233
|
+
<ol role="list">
|
|
234
|
+
${(this.links ?? []).map((link, index) => {
|
|
235
|
+
const here = linkCurrent(link.href, this.current);
|
|
236
|
+
const number = String(index + 1).padStart(2, "0");
|
|
237
|
+
return html`<li>
|
|
238
|
+
<a href=${link.href} part="menu-link" aria-current=${here === "page" ? "page" : here === "section" ? "true" : nothing}
|
|
239
|
+
><span class="words">${link.menuLabel || link.label}</span><span class="number" aria-hidden="true">${here && this.currentText ? `${this.currentText} \xB7 ${number}` : number}</span></a
|
|
240
|
+
>
|
|
241
|
+
</li>`;
|
|
242
|
+
})}
|
|
243
|
+
</ol>
|
|
244
|
+
</nav>
|
|
245
|
+
<div class="menu-foot" part="menu-foot"><slot name="menu-foot">${callText ? html`<a class="call" href=${callHref || nothing}><span class="words">${callText}</span><span aria-hidden="true">→</span></a>` : nothing}${this.menuNote ? html`<p class="note">${this.menuNote}</p>` : nothing}${this.menuEmail ? html`<a class="mail" href=${`mailto:${this.menuEmail}`}>${this.menuEmail}</a>` : nothing}</slot></div>
|
|
246
|
+
</div>`;
|
|
247
|
+
}
|
|
248
|
+
render() {
|
|
249
|
+
const canvas = this.look === "canvas";
|
|
250
|
+
const statusAt = canvas ? "start" : this.statusAt;
|
|
122
251
|
const status = this.status ? html`<span class="status" part="status" style=${`--tone:${toneOf(this.statusTone, 0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta ? html` <span class="hash">${this.statusMeta}</span>` : nothing}</span>` : nothing;
|
|
123
252
|
const presence = this.presence ?? [];
|
|
253
|
+
const fold = canvas ? "narrow" : this.fold;
|
|
254
|
+
const navLook = this.navLook || (canvas ? "tabs" : "");
|
|
124
255
|
return html`<div class="bar" part="bar">
|
|
125
256
|
<div class="start"><slot name="start">
|
|
126
|
-
${this.
|
|
257
|
+
${this.renderBrand()}
|
|
127
258
|
${this.context ? html`<span class="context" part="context"><span class="slash" aria-hidden="true">/</span>${this.context}</span>` : nothing}
|
|
128
|
-
${
|
|
259
|
+
${statusAt === "start" ? status : nothing}
|
|
129
260
|
${this.badge ? html`<span class="chip" part="badge"><svg viewBox="0 0 14 14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="3.5" cy="3" r="1.5"/><circle cx="3.5" cy="11" r="1.5"/><circle cx="10.5" cy="4.5" r="1.5"/><path d="M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4"/></svg>${this.badge}</span>` : nothing}
|
|
130
261
|
${this.meta ? html`<span class="meta" part="meta">${this.meta}</span>` : nothing}
|
|
131
262
|
</slot></div>
|
|
132
|
-
<div class="middle"><slot name="middle">${(this.links ?? []).length ? html`<impakt-nav align="center" size="sm" fold=${
|
|
263
|
+
<div class="middle"><slot name="middle">${(this.links ?? []).length ? html`<impakt-nav align="center" size="sm" fold=${fold} look=${navLook || nothing} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${fold === "narrow" && !canvas ? this.actionText : ""} .actionHref=${this.actionHref}></impakt-nav>` : nothing}</slot></div>
|
|
133
264
|
<div class="end"><slot name="presence">${presence.length ? html`<span class="presence" part="presence">${presence.map(
|
|
134
265
|
(person) => html`<span class=${person.accent ? "avatar accent" : "avatar"} role="img" aria-label=${person.name}>${person.initials ?? person.name.slice(0, 1).toUpperCase()}</span>`
|
|
135
266
|
)}</span>` : nothing}</slot><slot name="end">
|
|
136
|
-
${
|
|
137
|
-
${this.actionText ? html`<impakt-button variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}
|
|
138
|
-
</slot
|
|
267
|
+
${statusAt === "start" ? nothing : status}
|
|
268
|
+
${this.actionText ? html`<impakt-button class="act" variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}
|
|
269
|
+
</slot>${canvas ? this.renderMenu() : nothing}</div>
|
|
139
270
|
</div>`;
|
|
140
271
|
}
|
|
141
272
|
};
|
|
@@ -290,4 +421,4 @@ export {
|
|
|
290
421
|
ImpaktWordmark,
|
|
291
422
|
ImpaktSiteFooter
|
|
292
423
|
};
|
|
293
|
-
//# sourceMappingURL=chunk-
|
|
424
|
+
//# sourceMappingURL=chunk-FNGN2F6Y.js.map
|