@atomic-ui/blocks 0.13.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/custom-elements.json +2961 -9573
- package/dist/{chunk-B6I3GVJ5.js → chunk-3G3NP4UC.js} +9 -4
- package/dist/chunk-3G3NP4UC.js.map +1 -0
- package/dist/{chunk-H262HKSL.js → chunk-7OFH762N.js} +53 -23
- package/dist/chunk-7OFH762N.js.map +1 -0
- package/dist/{chunk-WTVF3JRL.js → chunk-GDATDR2Q.js} +24 -7
- package/dist/chunk-GDATDR2Q.js.map +1 -0
- package/dist/chunk-GQ2I44OU.js +226 -0
- package/dist/chunk-GQ2I44OU.js.map +1 -0
- package/dist/chunk-HISF6RYK.js +199 -0
- package/dist/chunk-HISF6RYK.js.map +1 -0
- package/dist/{chunk-53V2GY6L.js → chunk-LJGOTYDJ.js} +76 -69
- package/dist/chunk-LJGOTYDJ.js.map +1 -0
- package/dist/{chunk-WIVKJL64.js → chunk-OBBPBN4S.js} +73 -164
- package/dist/chunk-OBBPBN4S.js.map +1 -0
- package/dist/chunk-OHXEZPBB.js +109 -0
- package/dist/chunk-OHXEZPBB.js.map +1 -0
- package/dist/{chunk-FNGN2F6Y.js → chunk-VOONXP5H.js} +30 -59
- package/dist/chunk-VOONXP5H.js.map +1 -0
- package/dist/chunk-XSKGWT2D.js +84 -0
- package/dist/chunk-XSKGWT2D.js.map +1 -0
- package/dist/components/changelog.d.ts +0 -288
- package/dist/components/changelog.js +3 -12
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +8 -1
- package/dist/components/g2-case.js +1 -1
- package/dist/components/g2-site.d.ts +49 -41
- package/dist/components/g2-site.js +1 -3
- package/dist/components/journey.d.ts +13 -2
- package/dist/components/journey.js +1 -1
- package/dist/components/marketing.d.ts +0 -283
- package/dist/components/marketing.js +3 -13
- package/dist/components/organisms.d.ts +0 -489
- package/dist/components/organisms.js +3 -19
- package/dist/components/selling.d.ts +0 -255
- package/dist/components/selling.js +3 -15
- package/dist/components/site.d.ts +8 -53
- package/dist/components/site.js +3 -5
- package/dist/components/studio.d.ts +42 -98
- package/dist/components/studio.js +1 -3
- package/dist/index.d.ts +9 -13
- package/dist/index.js +25 -103
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +832 -1622
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/dist/standalone/index.html +18 -26
- package/package.json +3 -3
- package/specimen/index.html +18 -26
- package/dist/chunk-53V2GY6L.js.map +0 -1
- package/dist/chunk-B6I3GVJ5.js.map +0 -1
- package/dist/chunk-FNGN2F6Y.js.map +0 -1
- package/dist/chunk-H262HKSL.js.map +0 -1
- package/dist/chunk-IT2NA25D.js +0 -571
- package/dist/chunk-IT2NA25D.js.map +0 -1
- package/dist/chunk-MMADM6OW.js +0 -782
- package/dist/chunk-MMADM6OW.js.map +0 -1
- package/dist/chunk-NHWD2LUR.js +0 -255
- package/dist/chunk-NHWD2LUR.js.map +0 -1
- package/dist/chunk-R7SSIE2E.js +0 -362
- package/dist/chunk-R7SSIE2E.js.map +0 -1
- package/dist/chunk-WIVKJL64.js.map +0 -1
- package/dist/chunk-WTVF3JRL.js.map +0 -1
- package/dist/chunk-XB6FD4SF.js +0 -438
- package/dist/chunk-XB6FD4SF.js.map +0 -1
- package/dist/chunk-YXMXLVK7.js +0 -230
- package/dist/chunk-YXMXLVK7.js.map +0 -1
- package/dist/chunk-ZD75GU6J.js +0 -75
- package/dist/chunk-ZD75GU6J.js.map +0 -1
- package/dist/chunk-ZODL5HD4.js +0 -535
- package/dist/chunk-ZODL5HD4.js.map +0 -1
- package/dist/components/card-grid.d.ts +0 -72
- package/dist/components/card-grid.js +0 -7
- package/dist/components/card-grid.js.map +0 -1
- package/dist/components/property.d.ts +0 -389
- package/dist/components/property.js +0 -17
- package/dist/components/property.js.map +0 -1
- package/dist/components/scene.d.ts +0 -138
- package/dist/components/scene.js +0 -7
- package/dist/components/scene.js.map +0 -1
- package/dist/components/scrubber.d.ts +0 -86
- package/dist/components/scrubber.js +0 -7
- package/dist/components/scrubber.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/journey.ts"],"sourcesContent":["/**\n * The journey button: a site's one call to action, drawn at the stage a\n * section of the page is about.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { ImpaktElement, R, focusRing, fontWeight, say, space, t, token } from '@atomic-ui/ui';\n\n/** The stages a button passes through on its way to being live, in order. */\nexport const JOURNEY_STAGES = ['note', 'wireframe', 'component', 'code', 'live'] as const;\nexport type JourneyStage = (typeof JOURNEY_STAGES)[number];\n\nconst isStage = (value: unknown): value is JourneyStage => (JOURNEY_STAGES as readonly string[]).includes(value as string);\nconst indexOf = (stage: JourneyStage): number => JOURNEY_STAGES.indexOf(stage);\n\n/** The arrow after the words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg class=\"arrow\" viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M0 6h18M13 1l5 5-5 5\" />\n</svg>`;\n\n/** A pointer, drawn at the live button when the annotations are on. */\nconst pointer = html`<svg class=\"pointer\" viewBox=\"0 0 16 20\" width=\"16\" height=\"20\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z\" stroke-width=\"1.2\" stroke-linejoin=\"round\" />\n</svg>`;\n\n/** One move of the motion spec, read from its tokens with the spec's values as the fallback. */\nconst move = (name: string, ms: number, easing: string) =>\n unsafeCSS(`--jt: var(--impakt-motion-journey-${name}-duration, ${ms}ms); --je: var(--impakt-motion-journey-${name}-easing, ${easing});`);\n\n/** The moves between stages, in order: the move into stage k is MOVES[k - 1]. Each easing is the motion spec's (11:830). */\nexport const JOURNEY_MOVES = [\n { name: 'flatten', ms: 640, easing: [0.65, 0, 0.35, 1] },\n { name: 'ink-in', ms: 560, easing: [0.22, 1, 0.36, 1] },\n { name: 'compile', ms: 720, easing: [0.83, 0, 0.17, 1] },\n { name: 'ship', ms: 600, easing: [0.34, 1.56, 0.64, 1] },\n] as const;\n\n/**\n * The stage as a number, 0 (note) to 4 (live), and how far through each gap between two tracked sections the\n * scroll has gone. They are registered as numbers, so the stage can be transitioned when it is set by hand and\n * animated by a scroll timeline when it follows the page.\n */\nconst P = '--impakt-journey-p';\n/** The most gaps between tracked sections a scroll timeline drives. A page with more falls back to the frame loop. */\nconst GAPS = 8;\nconst gapName = (i: number) => `--impakt-journey-g${i}`;\nlet registered: boolean | undefined;\n/** Register the numbers once for the document. A browser without CSS.registerProperty still draws every stage; it cuts between them. */\nfunction register(): boolean {\n if (registered !== undefined) return registered;\n const api = typeof CSS !== 'undefined' ? (CSS as unknown as { registerProperty?: (d: PropertyDefinition) => void }) : undefined;\n if (!api?.registerProperty) return (registered = false);\n for (const name of [P, ...Array.from({ length: GAPS }, (_, i) => gapName(i))]) {\n try {\n api.registerProperty({ name, syntax: '<number>', inherits: true, initialValue: '0' });\n } catch {\n // Already registered, by this or another copy of the library.\n }\n }\n return (registered = true);\n}\n\n/** A CSS cubic-bezier as a function of progress, for the frame loop, which applies the spec's easing itself. */\nexport function cubicBezier([x1, y1, x2, y2]: readonly number[]): (x: number) => number {\n const at = (a: number, b: number, t: number) => 3 * a * (1 - t) ** 2 * t + 3 * b * (1 - t) * t ** 2 + t ** 3;\n return (x: number) => {\n if (x <= 0) return 0;\n if (x >= 1) return 1;\n let lo = 0;\n let hi = 1;\n let t = x;\n for (let i = 0; i < 30; i += 1) {\n const v = at(x1!, x2!, t);\n if (Math.abs(v - x) < 1e-5) break;\n if (v < x) lo = t;\n else hi = t;\n t = (lo + hi) / 2;\n }\n return at(y1!, y2!, t);\n };\n}\n\n/** The move between two stages, which takes the timing of the move into the later one. */\nconst moveBetween = (a: number, b: number) => JOURNEY_MOVES[Math.max(0, Math.min(3, Math.max(a, b) - 1))]!;\n\n/**\n * How much of stage k shows: 1 at its own stage, falling to 0 one stage either side. Every shape, every word and\n * every note is drawn from these, so the whole morph follows the stage number wherever it is between two stages.\n */\nconst w = (k: number) => `clamp(0, min(calc(1 + var(${P}) - ${k}), calc(1 - var(${P}) + ${k})), 1)`;\n/** How far the note has still to flatten, 1 at the note and 0 from the wireframe on. */\nconst toNote = `clamp(0, calc(1 - var(${P})), 1)`;\n/** How far the live button has come, 0 at the code and 1 live; past 4 is ship's overshoot. */\nconst live = `max(0, calc(var(${P}) - 3))`;\nconst over = `max(0, calc(var(${P}) - 4))`;\n\n/**\n * A call to action drawn as the thing it once was: a sticky note from a\n * workshop, a wireframe box, a designed component, the code that renders it,\n * and at last the live button. A page shows it at the stage each section is\n * about, so the same button is seen being made as the page is read.\n *\n * **It is the same link at every stage.** Whatever it is drawn as, it is one\n * `<a>` whose name is its words, so a screen reader and a keyboard meet an\n * ordinary link; the note, the wireframe cross, the measuring marks and the\n * lines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\n * target is at least 44px tall at every stage (2.5.8).\n *\n * **A page that shows it more than once sets `decorative` on the copies.** A\n * decorative one is a picture of the button, not a control: it has no link\n * and is hidden from a screen reader, so the page does not hold five links\n * that say the same thing (2.4.4).\n *\n * **It keeps its shape as it scales.** The drawing is about 14 wide to 9\n * tall at any width, 560 by 360 on a wide page and 347 by 223 on a phone, and\n * everything in it is sized from its own width.\n *\n * **One button can follow the page.** Give `track` a selector for the page's\n * sections, each carrying `data-journey-stage`, and the button takes the stage\n * of whichever section is across the middle of the screen. Between two\n * sections the whole morph is scrubbed by the scroll, as the motion spec\n * (`11:830`) asks: the shapes, the words and the design notes all follow the\n * scroll, and the move is complete as the next section crosses the middle of\n * the screen. Scrolling back halfway leaves it halfway.\n *\n * Where the browser has scroll-driven animations, the scroll drives the stage\n * itself through a scroll timeline, with no script running as the page moves;\n * the button only measures where the sections are, again when the page is\n * resized. Elsewhere a frame loop reads the scroll at most once a frame, and\n * only while the page scrolls. Either way each move between two sections is\n * shaped by that move's easing, so ship overshoots near the end of its range.\n *\n * **One button can travel.** Set `travel` and the button stays in view while\n * its sections scroll past, as the spec's one moving object does. It is sticky,\n * so put it in a column as tall as the tracked sections, beside them, such as\n * the second column of a grid whose first holds the sections. It sits\n * `--impakt-journey-travel-top` from the top of the screen, a fifth of the\n * screen unless the page sets it. On a phone, where the sections stack, leave\n * `travel` off and give each section its own decorative copy.\n *\n * **A page can drive the morph itself.** Set `progress`, a number from 0 (the\n * note) to 4 (live), and the button draws the morph at that point with no\n * transition, for a page that scrubs it over scroll ranges of its own, such as\n * one that rests the button in each section's aside in turn. Set `stage` to the\n * nearest stage as well, so the link takes that stage's shape.\n *\n * **Each move has its own timing**, from the motion spec: flatten 640ms, ink\n * in 560ms, compile 720ms, ship 600ms with an overshoot, lift 180ms on hover\n * and press 140ms. Each is read from `--impakt-motion-journey-<move>-duration`\n * and `-easing`. When `stage` is set by hand the move runs on that timing.\n * **Only transforms, opacity and colour move**, so a change of stage costs no\n * layout.\n *\n * **With reduced motion asked for** each stage cuts straight to its final\n * state: there is no morph, no scale and no change of position. A tracked\n * button swaps to a section's stage as soon as the section enters the screen,\n * and pointing at the live button changes its colour only (2.3.3).\n *\n * **`annotations` draws the design notes around it**, as the site's motion\n * frames show: the stage's caption above, a handwritten note in the margin at\n * the note stage (unless the brand or `margin-note-shown` leaves it out), the\n * width and height marks at the wireframe and component, the spec tags under\n * the component and a pointer at the live button. They\n * are decoration and are hidden from a screen reader. Leave it off when the\n * button is a plain call to action.\n *\n * The words on every fill are a pair the tokens already measured: the accent\n * with its own text colour, and the text colour with the card colour (1.4.3).\n * A brand whose ink is dark may colour the words in the code window by\n * setting `--impakt-journey-code-words`.\n *\n * @category action\n * @icon button\n * @fires {CustomEvent<{ stage: JourneyStage }>} impakt-journey-stage - When a tracked button changes stage as the page scrolls.\n * @cssprop --impakt-journey-travel-top - With `travel`: how far from the top of the screen the button stays.\n */\nexport class ImpaktJourneyButton extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n label: { type: String },\n href: { type: String },\n decorative: { type: Boolean, reflect: true },\n track: { type: String },\n travel: { type: Boolean, reflect: true },\n code: { type: Array },\n annotations: { type: Boolean, reflect: true },\n captions: { type: Array },\n marginNote: { type: String, attribute: 'margin-note' },\n marginNoteShown: { type: String, reflect: true, attribute: 'margin-note-shown' },\n specs: { type: Array },\n markWidth: { type: String, attribute: 'mark-width' },\n markHeight: { type: String, attribute: 'mark-height' },\n progress: { type: Number },\n };\n /** What the button is drawn as. */\n declare stage: JourneyStage;\n /** The button's words, such as \"Book a 30-minute call\". */\n declare label: string;\n /** Where the button goes. */\n declare href: string;\n /** Draw it as a picture only, with no link, for a page that already has the real button. */\n declare decorative: boolean;\n /**\n * A selector for the sections of the page that each carry\n * `data-journey-stage`. The button then takes the stage of the section\n * across the middle of the screen. Leave empty to set `stage` by hand.\n */\n declare track: string;\n /** With `track`: stay in view while the tracked sections scroll past. Place it in a column as tall as they are. */\n declare travel: boolean;\n /**\n * Lines of code drawn around the words at the `code` stage, split where the\n * words go: the lines before, then the lines after. They are decoration and\n * are not read. A line that starts with `//` is drawn dimmer, as a comment.\n * Left empty, plain bars are drawn instead.\n */\n declare code: { before?: string[]; after?: string[] };\n /** Draw the design notes around the button: captions, marks, spec tags, a margin note and a pointer. */\n declare annotations: boolean;\n /** With `annotations`: the caption above each stage, in order, such as \"Note — Discover\". Numbered for you. */\n declare captions: string[];\n /** With `annotations`: the handwritten note beside the sticky note. */\n declare marginNote: string;\n /**\n * With `annotations`: whether the handwritten note is drawn. Left empty, the brand decides through its\n * `journey.margin-note` shape, which Impakt sets to `none`; `yes` draws it and `no` leaves it out.\n */\n declare marginNoteShown: '' | 'yes' | 'no';\n /** With `annotations`: the tags under the component, such as \"Fill · Accent/Signal\". */\n declare specs: string[];\n /** With `annotations`: the width written on the width mark, \"320\" unless set. */\n declare markWidth: string;\n /** With `annotations`: the height written on the height mark, \"72\" unless set. */\n declare markHeight: string;\n /** Draw the morph at this point, from 0 (note) to 4 (live), instead of at `stage`. Leave unset to follow `stage` or `track`. */\n declare progress: number | undefined;\n\n constructor() {\n super();\n this.stage = 'live';\n this.label = '';\n this.href = '';\n this.decorative = false;\n this.track = '';\n this.travel = false;\n this.code = {};\n this.annotations = false;\n this.captions = [];\n this.marginNote = '';\n this.marginNoteShown = '';\n this.specs = [];\n this.markWidth = '320';\n this.markHeight = '72';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block; inline-size: min(100%, 35rem); container-type: inline-size;\n --impakt-journey-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-journey-on-accent: ${token('color.accent.on', '#1a1a1a')};\n --hand: var(--impakt-font-family-hand, ${t.fontBody});\n /* The stage as a number. Set by hand, it moves on the timing of the move into the new stage, and back out of a\n stage the same move runs in reverse. A tracked button sets it on the frame instead, from the scroll. */\n ${unsafeCSS(P)}: 4;\n transition: ${unsafeCSS(P)} var(--jt) var(--je);\n ${move('flatten', 640, 'cubic-bezier(0.65, 0, 0.35, 1)')}\n }\n :host([stage='note']) { ${unsafeCSS(P)}: 0; }\n :host([stage='wireframe']) { ${unsafeCSS(P)}: 1; }\n :host([stage='component']) { ${unsafeCSS(P)}: 2; ${move('ink-in', 560, 'cubic-bezier(0.22, 1, 0.36, 1)')} }\n :host([stage='code']) { ${unsafeCSS(P)}: 3; ${move('compile', 720, 'cubic-bezier(0.83, 0, 0.17, 1)')} }\n :host([stage='live']) { ${unsafeCSS(P)}: 4; ${move('ship', 600, 'cubic-bezier(0.34, 1.56, 0.64, 1)')} }\n /* Travelling: it stays in view while its sections scroll past, in a column as tall as they are. */\n :host([travel]) { position: sticky; inset-block-start: var(--impakt-journey-travel-top, 20vh); }\n\n /* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi), as the Journey object\n component (8:477) places it on its 560 by 360 frame: the shell 320 by 72 at 120, 144. */\n .frame { position: relative; aspect-ratio: 14 / 9; }\n /* Each plate is one stage's shape with that stage's words in it. Every one is drawn from the stage number, so\n its opacity and its shape follow the stage wherever it is between two. Nothing here changes the layout. */\n .plate { position: absolute; box-sizing: border-box; pointer-events: none; }\n .bar { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; }\n /* The sticky note: 290 square, turned 4° (8:362). */\n .note { inset-inline-start: 20.98cqi; inset-block-start: 7.11cqi; inline-size: 51.79cqi; block-size: 51.79cqi; background: var(--impakt-journey-accent); box-shadow: 0 3.2cqi 6.4cqi rgb(0 0 0 / 0.18); }\n .wire { background: ${t.surfaceCard}; border: ${t.borderThin} dashed ${t.textMuted}; }\n .wire > svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${t.rule}; }\n .solid { background: var(--impakt-journey-accent); }\n .shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }\n /* The code window is the raised ink and its muted words, a pair the theme measures, so it stays a dark window on paper and on an ink band alike. */\n /* The code window: 520 by 300 at 20, 40, with 6px corners (8:431). */\n /*\n * The code of 8:435: IBM Plex Mono 13px on 1.5, 44px from the window's top and 28px in, with the words on the sixth\n * line, in the code, indented six places and followed by their arrow. Five lines go before them and the rest after;\n * a shorter run sits up against the words, a longer one loses the lines furthest from them.\n */\n .window { inset-inline: 3.57cqi; inset-block: 7.14cqi 3.57cqi; padding: 7.86cqi 5cqi 0; background: var(--impakt-color-surface-ink-raised, ${t.text}); border: ${t.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: 6px; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); line-height: 1.5; color: var(--impakt-color-text-inverse-muted, color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: 7.5em 1.5em minmax(0, 1fr); }\n /* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */\n .window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }\n .window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }\n /* As in 8:435 the code is in the window's bright words and a comment stays in its muted ones, a pair the theme measures at 4.5:1. */\n .window :is(.before, .after) > span:not(.comment, .rule) { color: var(--ik-ink-inverse, ${t.surfaceCard}); }\n .window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }\n\n /*\n * The morph. Each plate shows at its own stage and fades one stage either side. The note flattens as it goes,\n * without growing wider, so a shape that is not showing never reaches past the block (1.4.10); the wireframe\n * comes out of the flattened note; the component is inked in from a slightly smaller box; the code window opens\n * from a strip; and the live button's shadow and fill grow to full size, past it for a moment where ship's\n * easing overshoots.\n */\n .note { opacity: ${unsafeCSS(w(0))}; transform: rotate(calc(4deg * ${unsafeCSS(w(0))})) scale(1, calc(0.45 + 0.55 * ${unsafeCSS(w(0))})); }\n .wire { opacity: ${unsafeCSS(w(1))}; transform: rotate(calc(4deg * ${unsafeCSS(toNote)})) scale(calc(1 - 0.1 * ${unsafeCSS(toNote)}), calc(1 + 3 * ${unsafeCSS(toNote)})); }\n .solid { opacity: max(${unsafeCSS(w(2))}, ${unsafeCSS(w(4))}); transform: scale(calc(0.92 + 0.08 * max(${unsafeCSS(w(2))}, min(1, ${unsafeCSS(live)})) + 0.4 * ${unsafeCSS(over)})); }\n .window { opacity: ${unsafeCSS(w(3))}; transform: scale(calc(0.94 + 0.06 * ${unsafeCSS(w(3))}), calc(0.5 + 0.5 * ${unsafeCSS(w(3))})); }\n .shadow { opacity: ${unsafeCSS(w(4))}; transform: scale(calc(0.9 + 0.1 * min(1, ${unsafeCSS(live)}) + 0.4 * ${unsafeCSS(over)})); }\n\n /* The words as each stage draws them, inside that stage's plate, so they morph and fade with it. All decoration: the link below carries the name. */\n .said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: 5cqi; font-family: ${t.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${fontWeight('medium')}; line-height: 1.2; color: var(--impakt-journey-on-accent); }\n .arrow { flex: none; }\n /* At the note stage the words are handwritten, bold, with a line drawn under them. */\n .note .said { flex-direction: column; align-items: flex-start; padding: 7.7cqi; font-family: var(--hand); font-size: clamp(1.125rem, 6.07cqi, 2.125rem); font-weight: ${fontWeight('bold')}; line-height: 1.1; letter-spacing: -0.01em; }\n .note .said .text::after { content: ''; display: block; block-size: 0.28em; margin-block-start: 0.12em; inline-size: 92%; background: currentColor; -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\") center / 100% 100% no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\") center / 100% 100% no-repeat; }\n .note .said .arrow { align-self: flex-end; }\n .wire .said { justify-content: center; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n .window .said { position: static; gap: 0; padding-inline: 6ch 0; justify-content: flex-start; font-family: ${t.fontMono}; font-size: inherit; font-weight: ${fontWeight('regular')}; line-height: inherit; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${t.surfaceCard})); }\n .window .said .arrow { display: none; }\n .window .said::after { content: ' →'; white-space: pre; }\n\n /*\n * The link. One element at every stage, sized to the shape the stage draws, so the keyboard, a pointer and a\n * screen reader meet an ordinary link with the button's words. Its own words are not painted: the plates paint\n * them, so they can morph. In forced colours the plates step aside and the link draws its words itself.\n */\n .words { position: absolute; inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: calc(25.71cqi + 6.43cqi - max(22px, 6.43cqi)); box-sizing: border-box; min-block-size: max(44px, 12.86cqi); display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: 5cqi; font-family: ${t.fontBody}; font-size: clamp(0.75rem, 3.04cqi, 1.0625rem); font-weight: ${fontWeight('medium')}; line-height: 1.2; color: transparent; text-decoration: none; }\n :host([stage='note']) .words { inset-inline-start: 20.98cqi; inset-block-start: 7.11cqi; inline-size: 51.79cqi; min-block-size: 51.79cqi; align-items: flex-start; padding: 7.7cqi; font-family: var(--hand); font-size: clamp(1.125rem, 6.07cqi, 2.125rem); font-weight: ${fontWeight('bold')}; line-height: 1.1; transform: rotate(4deg); }\n :host([stage='wireframe']) .words { justify-content: center; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${fontWeight('regular')}; }\n :host([stage='code']) .words { min-block-size: 44px; inset-inline-start: 3.57cqi; inline-size: 92.86cqi; inset-block-start: calc(34.15cqi - 22px); justify-content: flex-start; padding-inline: calc(5cqi + 6ch) 5cqi; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 2.32cqi, 0.8125rem); font-weight: ${fontWeight('regular')}; }\n a.words:focus-visible { outline: none; box-shadow: ${t.focusShadow}; }\n\n /* Live, it answers a pointer: the button lifts when pointed at and sits when pressed, and its fill deepens a little. */\n /* The arrow leads (impkt-web#51): pointed at or focused, the live button's arrow slides 4px on first and the lift follows one stagger behind it, for a brand with the reveal set on. */\n .solid { transition: background-color 180ms, translate var(--impakt-motion-journey-lift-duration, 180ms) var(--impakt-motion-journey-lift-easing, cubic-bezier(0.2, 0, 0, 1)) ${R.lead}; }\n .solid .arrow { transition: translate ${R.arrowDuration} ${R.arrowEasing}; }\n :host([stage='live']) .frame:has(a.words:is(:hover, :focus-visible)) .solid .arrow { translate: ${R.arrowDistance} 0; }\n :host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${t.text}); translate: 0 -2px; }\n :host([stage='live']) .frame:has(a.words:active) .solid { translate: 0 1px; transition: background-color 140ms, translate var(--impakt-motion-journey-press-duration, 140ms) var(--impakt-motion-journey-press-easing, cubic-bezier(0.4, 0, 0.2, 1)); }\n\n /* The design notes. Each shows at its own stages, follows the stage number with the shapes, and none is read. */\n .ann { position: absolute; pointer-events: none; color: ${t.text}; }\n .caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; white-space: nowrap; }\n .caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; }\n ${unsafeCSS(JOURNEY_STAGES.map((_, k) => `.caption span:nth-child(${k + 1}) { opacity: ${w(k)}; }`).join('\\n '))}\n /* The handwritten margin note, which a brand may leave out: Impakt's design has dropped it (impkt-design-system#83). */\n .margin { display: ${token('journey.margin-note', 'block')}; }\n :host([margin-note-shown='yes']) .margin { display: block; }\n :host([margin-note-shown='no']) .margin { display: none; }\n .margin { inset-inline-start: 76.96cqi; inset-block-start: 7.14cqi; inline-size: 21.43cqi; font-family: var(--hand); font-size: clamp(0.625rem, 3.57cqi, 1.25rem); line-height: 1.2; transform: rotate(4deg); opacity: ${unsafeCSS(w(0))}; }\n /* The measures, as the redlines (8:401) draw them: the width 26px over the shell, the height 10px beside it. */\n .width { inset-inline-start: 21.43cqi; inline-size: 57.14cqi; inset-block-start: 21.07cqi; block-size: 2.14cqi; border-inline: 1px solid currentColor; }\n .width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }\n .width b, .height b { position: absolute; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); font-weight: ${fontWeight('regular')}; line-height: 1; background: var(--impakt-journey-mark-ground, ${t.surfaceCard}); padding-inline: 0.4em; }\n .width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }\n .height { inset-inline-start: 80.36cqi; inline-size: 2.14cqi; inset-block-start: 25.71cqi; block-size: 12.86cqi; border-block: 1px solid currentColor; }\n .height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }\n .height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }\n .width, .height { opacity: max(${unsafeCSS(w(1))}, ${unsafeCSS(w(2))}); }\n /* The spec tags (8:417) 30px under the shell. */\n .specs { inset-inline-start: 21.43cqi; inset-block-start: 43.93cqi; display: flex; flex-wrap: wrap; gap: 1.43cqi; inline-size: 75cqi; opacity: ${unsafeCSS(w(2))}; }\n .specs span { padding: 0.36em 0.73em; font-family: ${t.fontMono}; font-size: clamp(0.5rem, 1.96cqi, 0.6875rem); line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${t.surfaceCard}; }\n /* The pointer (8:474) at 404, 196, its tip just inside the shell's corner. */\n .cursor { inset-inline-start: 72.14cqi; inset-block-start: 35cqi; opacity: ${unsafeCSS(w(4))}; }\n .pointer { display: block; fill: ${t.text}; stroke: ${t.surfaceCard}; }\n\n /* The gaps a scroll timeline drives, one keyframe set each. */\n ${unsafeCSS(Array.from({ length: GAPS }, (_, i) => `@keyframes impakt-journey-g${i} { from { ${gapName(i)}: 0; } to { ${gapName(i)}: 1; } }`).join('\\n '))}\n\n /* Reduced motion: each stage cuts to its final state, and the live button changes colour only. */\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n .solid { transition: background-color 180ms; }\n .solid .arrow { transition: none; }\n :host([stage='live']) .frame:has(a.words:is(:hover, :active)) .solid { translate: none; }\n }\n @media (forced-colors: active) {\n .plate { forced-color-adjust: none; }\n .plate .said { display: none; }\n .note, .solid { background: Highlight; }\n .window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }\n .wire { background: Canvas; border-color: CanvasText; }\n .words { color: LinkText; }\n :host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; forced-color-adjust: none; }\n .ann { color: CanvasText; }\n }\n `,\n ];\n\n private observer?: IntersectionObserver;\n private sections: Element[] = [];\n private frameRequest = 0;\n private resizeObserver?: ResizeObserver;\n private easings: Array<(x: number) => number> = [];\n private readonly onScroll = (): void => {\n if (this.frameRequest) return;\n this.frameRequest = requestAnimationFrame(() => {\n this.frameRequest = 0;\n this.scrub();\n });\n };\n private readonly onResize = (): void => {\n if (this.getAttribute('scrub') === 'timeline') this.timeline();\n else this.onScroll();\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n register();\n // The first render starts the watch; this is for a button taken off the page and put back.\n if (this.hasUpdated) this.watch();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n // A stage that is not one of the five would draw nothing at all, so it falls back to the finished button.\n if (changed.has('stage') && !isStage(this.stage)) this.stage = 'live';\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('track')) this.watch();\n if (changed.has('progress')) {\n if (typeof this.progress === 'number' && Number.isFinite(this.progress)) {\n this.style.setProperty(P, String(this.progress));\n this.style.setProperty('transition', 'none');\n } else {\n this.style.removeProperty(P);\n this.style.removeProperty('transition');\n }\n }\n }\n\n private get frameEl(): HTMLElement | null {\n return this.renderRoot.querySelector<HTMLElement>('.frame');\n }\n\n private reduced(): boolean {\n return Boolean(this.ownerDocument.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches);\n }\n\n private unwatch(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n const view = this.ownerDocument?.defaultView;\n view?.removeEventListener('scroll', this.onScroll);\n view?.removeEventListener('resize', this.onResize);\n if (this.frameRequest) cancelAnimationFrame(this.frameRequest);\n this.frameRequest = 0;\n this.removeAttribute('scrub');\n const frame = this.frameEl;\n if (frame)\n for (const prop of [\n P,\n 'animation-name',\n 'animation-duration',\n 'animation-timing-function',\n 'animation-fill-mode',\n 'animation-timeline',\n 'animation-range',\n ])\n frame.style.removeProperty(prop);\n }\n\n /**\n * Follow the sections named by `track`. Without reduced motion the section across the middle of the screen\n * sets the stage and the scroll scrubs the morph between sections; with it, a section sets the stage as soon as\n * it enters the screen and nothing is scrubbed.\n */\n private watch(): void {\n this.unwatch();\n this.sections = [];\n if (!this.track || !this.isConnected || typeof IntersectionObserver !== 'function') return;\n let sections: Element[];\n try {\n sections = Array.from(this.ownerDocument.querySelectorAll(this.track)).filter((el) => isStage(el.getAttribute('data-journey-stage')));\n } catch {\n // Not a selector: nothing to follow.\n return;\n }\n if (!sections.length) return;\n this.sections = sections;\n if (this.reduced()) {\n // The whole screen: a section's stage is taken the moment it enters, and given back when it leaves at the foot.\n this.observer = new IntersectionObserver(() => this.entered(), { threshold: 0 });\n } else {\n // A line across the middle of the screen. A section is \"current\" while it crosses that line.\n this.observer = new IntersectionObserver((entries) => this.crossed(entries), { rootMargin: '-50% 0px -50% 0px', threshold: 0 });\n }\n for (const section of sections) this.observer.observe(section);\n if (!this.reduced()) this.startScrub();\n }\n\n private crossed(entries: IntersectionObserverEntry[]): void {\n const entry = entries.find((e) => e.isIntersecting);\n const stage = entry?.target.getAttribute('data-journey-stage');\n if (isStage(stage)) this.become(stage);\n }\n\n /** With reduced motion: the stage of the last section whose top has come onto the screen. */\n private entered(): void {\n const view = this.ownerDocument.defaultView;\n if (!view) return;\n let stage: string | null = null;\n for (const section of this.sections) if (section.getBoundingClientRect().top < view.innerHeight) stage = section.getAttribute('data-journey-stage');\n if (isStage(stage)) this.become(stage);\n }\n\n private become(stage: JourneyStage): void {\n if (stage === this.stage) return;\n this.stage = stage;\n this.dispatchEvent(new CustomEvent('impakt-journey-stage', { detail: { stage }, bubbles: true, composed: true }));\n }\n\n /** Scrub with a scroll timeline where the browser has one and the page scrolls the document; otherwise with a frame loop. */\n private startScrub(): void {\n const view = this.ownerDocument.defaultView;\n if (!view) return;\n const supports =\n typeof CSS !== 'undefined' &&\n typeof CSS.supports === 'function' &&\n CSS.supports('animation-timeline: scroll()') &&\n CSS.supports('animation-range: 0px 1px');\n const timeline = supports && register() && this.sections.length - 1 <= GAPS && this.rootScrolls();\n view.addEventListener('resize', this.onResize, { passive: true });\n if (typeof ResizeObserver === 'function') {\n this.resizeObserver = new ResizeObserver(this.onResize);\n this.resizeObserver.observe(this.ownerDocument.documentElement);\n for (const section of this.sections) this.resizeObserver.observe(section);\n }\n this.easings = JOURNEY_MOVES.map((m) => cubicBezier(this.easingOf(m.name, m.easing)));\n if (timeline) {\n this.setAttribute('scrub', 'timeline');\n this.timeline();\n } else if (typeof view.requestAnimationFrame === 'function') {\n this.setAttribute('scrub', 'frame');\n view.addEventListener('scroll', this.onScroll, { passive: true });\n this.scrub();\n }\n }\n\n /** Whether the tracked sections scroll with the document, which is the scroller a root scroll timeline follows. */\n private rootScrolls(): boolean {\n const view = this.ownerDocument.defaultView!;\n for (let el = this.sections[0]?.parentElement; el && el !== this.ownerDocument.body && el !== this.ownerDocument.documentElement; el = el.parentElement) {\n const { overflowY } = view.getComputedStyle(el);\n if ((overflowY === 'auto' || overflowY === 'scroll') && el.scrollHeight > el.clientHeight) return false;\n }\n return true;\n }\n\n /** The easing of a move, from its token if the page sets one, as four numbers. */\n private easingOf(name: string, fallback: readonly number[]): readonly number[] {\n const value = this.ownerDocument.defaultView?.getComputedStyle(this).getPropertyValue(`--impakt-motion-journey-${name}-easing`) ?? '';\n const numbers = /cubic-bezier\\(([^)]+)\\)/.exec(value)?.[1]?.split(',').map(Number);\n return numbers?.length === 4 && numbers.every(Number.isFinite) ? numbers : fallback;\n }\n\n /** Each gap between two tracked sections, as the scroll positions it runs between and the stages at its ends. */\n private gaps(): Array<{ from: number; to: number; start: number; end: number }> {\n const view = this.ownerDocument.defaultView!;\n const middle = view.innerHeight / 2;\n const tops = this.sections.map((s) => s.getBoundingClientRect().top + view.scrollY);\n const stages = this.sections.map((s) => indexOf(s.getAttribute('data-journey-stage') as JourneyStage));\n return tops.slice(1).map((top, i) => ({ from: stages[i]!, to: stages[i + 1]!, start: tops[i]! - middle, end: top - middle }));\n }\n\n /**\n * The scroll timeline. Each gap animates its own number from 0 to 1 across the scroll between its two sections,\n * shaped by the move's easing, and the stage is the first section's stage plus each gap's step times its number.\n * The browser runs it as the page scrolls; this only runs again when the page is resized.\n */\n private timeline(): void {\n const frame = this.frameEl;\n if (!frame || !this.sections.length) return;\n const gaps = this.gaps().filter((g) => g.end > g.start);\n const first = indexOf(this.sections[0]!.getAttribute('data-journey-stage') as JourneyStage);\n const terms = gaps.map((g, i) => (g.to === g.from ? '' : ` + ${g.to - g.from} * var(${gapName(i)})`)).join('');\n frame.style.setProperty(P, `calc(${first}${terms})`);\n const list = (f: (g: (typeof gaps)[number], i: number) => string) => gaps.map(f).join(', ') || 'none';\n frame.style.setProperty('animation-name', gaps.length ? list((_, i) => `impakt-journey-g${i}`) : 'none');\n frame.style.setProperty(\n 'animation-duration',\n list(() => '1ms'),\n );\n frame.style.setProperty(\n 'animation-timing-function',\n list((g) => {\n const m = moveBetween(g.from, g.to);\n return `var(--impakt-motion-journey-${m.name}-easing, cubic-bezier(${m.easing.join(', ')}))`;\n }),\n );\n frame.style.setProperty(\n 'animation-fill-mode',\n list(() => 'both'),\n );\n frame.style.setProperty(\n 'animation-timeline',\n list(() => 'scroll(root block)'),\n );\n frame.style.setProperty(\n 'animation-range',\n list((g) => `${Math.round(g.start)}px ${Math.round(g.end)}px`),\n );\n }\n\n /**\n * The frame loop. The section across the middle of the screen gives the whole part of the stage; how far the next\n * section has risen toward the middle, shaped by the move's easing, gives the rest, so the move is complete as\n * the next section crosses it.\n */\n private scrub(): void {\n const view = this.ownerDocument.defaultView;\n const frame = this.frameEl;\n if (!view || !frame || !this.sections.length) return;\n const middle = view.innerHeight / 2;\n const tops = this.sections.map((s) => s.getBoundingClientRect().top);\n let at = 0;\n tops.forEach((top, i) => {\n if (top <= middle) at = i;\n });\n const stageAt = (i: number) => indexOf(this.sections[i]!.getAttribute('data-journey-stage') as JourneyStage);\n const next = at + 1 < this.sections.length ? at + 1 : at;\n const span = tops[next]! - tops[at]!;\n const f = next === at || span <= 0 ? 0 : Math.min(1, Math.max(0, (middle - tops[at]!) / span));\n const [a, b] = [stageAt(at), stageAt(next)];\n const eased = a === b ? 0 : this.easings[JOURNEY_MOVES.indexOf(moveBetween(a, b))]!(f);\n const p = a + eased * (b - a);\n frame.style.setProperty(P, p.toFixed(4));\n }\n\n private lines(lines: string[] | undefined, fallback: number): TemplateResult[] {\n return lines?.length\n ? lines.map((line) => html`<span class=${line.trim().startsWith('//') ? 'comment' : ''}>${line}</span>`)\n : Array.from({ length: fallback }, (_, i) => html`<span class=\"rule\" style=${`inline-size:${[58, 72, 44][i % 3]}%`}></span>`);\n }\n\n /** The design notes around the button. All decoration. */\n private notes(): TemplateResult {\n const captions = this.captions?.length\n ? this.captions\n : [say('Note — Discover'), say('Wireframe — Design low-fi'), say('Component — Design hi-fi'), say('Code — Build'), say('Live — Launch')];\n const specs = this.specs?.length ? this.specs : [say('Fill · Accent/Signal'), say('Radius · 0'), say('Type · Archivo 17')];\n return html`<span class=\"ann caption\" part=\"caption\">${JOURNEY_STAGES.map((_, i) => html`<span>${String(i + 1).padStart(2, '0')} · ${captions[i] ?? ''}</span>`)}</span>\n <span class=\"ann margin\" part=\"margin-note\">${this.marginNote || say('make it the biggest thing on the page')}</span>\n <span class=\"ann width\"><b>${this.markWidth}</b></span>\n <span class=\"ann height\"><b>${this.markHeight}</b></span>\n <span class=\"ann specs\" part=\"specs\">${specs.map((spec) => html`<span>${spec}</span>`)}</span>\n <span class=\"ann cursor\">${pointer}</span>`;\n }\n\n render(): TemplateResult {\n const said = html`<span class=\"said\"><span class=\"text\">${this.label}</span>${arrow}</span>`;\n const words = html`<span class=\"text\">${this.label}</span>`;\n return html`<div class=\"frame\" part=\"frame\" aria-hidden=${this.decorative ? 'true' : nothing}>\n <span class=\"plate note\" aria-hidden=\"true\">${said}</span>\n <span class=\"plate bar wire\" aria-hidden=\"true\"><svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" fill=\"none\" stroke=\"currentColor\" focusable=\"false\"><path d=\"M0 0 100 100M0 100 100 0\" vector-effect=\"non-scaling-stroke\" /></svg>${said}</span>\n <span class=\"plate bar shadow\" aria-hidden=\"true\"></span>\n <span class=\"plate bar solid\" aria-hidden=\"true\">${said}</span>\n <span class=\"plate window\" aria-hidden=\"true\"><span class=\"before\">${this.lines(this.code?.before, 3)}</span>${said}<span class=\"after\">${this.lines(this.code?.after, 2)}</span></span>\n ${this.annotations ? html`<span class=\"notes\" aria-hidden=\"true\">${this.notes()}</span>` : nothing}\n ${this.decorative || !this.href ? html`<span class=\"words\" part=\"button\">${words}</span>` : html`<a class=\"words\" part=\"button\" href=${this.href}>${words}</a>`}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-journey-button', ImpaktJourneyButton);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-journey-button': ImpaktJourneyButton;\n }\n}\n"],"mappings":";AAIA,SAAS,KAAK,MAAM,SAAS,iBAAsC;AACnE,SAAS,eAAe,GAAG,WAAW,YAAY,KAAK,OAAO,GAAG,aAAa;AAGvE,IAAM,iBAAiB,CAAC,QAAQ,aAAa,aAAa,QAAQ,MAAM;AAG/E,IAAM,UAAU,CAAC,UAA2C,eAAqC,SAAS,KAAe;AACzH,IAAM,UAAU,CAAC,UAAgC,eAAe,QAAQ,KAAK;AAG7E,IAAM,QAAQ;AAAA;AAAA;AAKd,IAAM,UAAU;AAAA;AAAA;AAKhB,IAAM,OAAO,CAAC,MAAc,IAAY,WACtC,UAAU,qCAAqC,IAAI,cAAc,EAAE,0CAA0C,IAAI,YAAY,MAAM,IAAI;AAGlI,IAAM,gBAAgB;AAAA,EAC3B,EAAE,MAAM,WAAW,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,KAAK,MAAM,KAAK,MAAM,OAAO,CAAC,CAAC;AAAA,QACvK,KAAK,cAAc,8CAA8C,KAAK,MAAM,CAAC,YAAY,OAAO;AAAA,QAChG,KAAK,cAAc,CAAC,KAAK,OAAO,yCAAyC,KAAK,YAAY,2CAA2C,KAAK,IAAI,IAAI,KAAK,MAAM;AAAA;AAAA,EAEnK;AACF;AAEA,eAAe,OAAO,yBAAyB,mBAAmB;","names":["t"]}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// packages/blocks/src/components/selling.ts
|
|
2
|
+
import { css, html, nothing } from "lit";
|
|
3
|
+
import { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from "@atomic-ui/ui";
|
|
4
|
+
var card = css`
|
|
5
|
+
.card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }
|
|
6
|
+
.h { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
|
|
7
|
+
.btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight("semibold")}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
8
|
+
.btn:hover { background: ${t.brandHover}; }
|
|
9
|
+
.btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }
|
|
10
|
+
.small { margin: 0; ${type("xs")} color: ${t.textMuted}; }
|
|
11
|
+
.visually-hidden { ${visuallyHidden} }
|
|
12
|
+
`;
|
|
13
|
+
var arrow = html`<svg viewBox="0 0 20 12" width="20" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false"><path d="M0 6h18M13 1l5 5-5 5" /></svg>`;
|
|
14
|
+
var ImpaktPlanComparison = class extends ImpaktElement {
|
|
15
|
+
static {
|
|
16
|
+
this.properties = {
|
|
17
|
+
heading: { type: String },
|
|
18
|
+
plans: { type: Array },
|
|
19
|
+
rows: { type: Array },
|
|
20
|
+
buttonText: { type: String, attribute: "button-text" },
|
|
21
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
22
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
23
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
this.heading = "Compare cover";
|
|
29
|
+
this.plans = [];
|
|
30
|
+
this.rows = [];
|
|
31
|
+
this.buttonText = "Choose";
|
|
32
|
+
this.headingLevel = 2;
|
|
33
|
+
this.spaceAbove = "none";
|
|
34
|
+
this.spaceBelow = "none";
|
|
35
|
+
}
|
|
36
|
+
static {
|
|
37
|
+
this.styles = [
|
|
38
|
+
...ImpaktElement.styles,
|
|
39
|
+
focusRing,
|
|
40
|
+
targetSize,
|
|
41
|
+
spaceAround,
|
|
42
|
+
card,
|
|
43
|
+
css`
|
|
44
|
+
:host { display: block; container-type: inline-size; }
|
|
45
|
+
.h { margin-block-end: ${space(5)}; }
|
|
46
|
+
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }
|
|
47
|
+
.plan { --plan-accent: ${token("color.accent.default", "#ffd43b")}; --plan-on-accent: ${token("color.accent.on", "#111111")}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }
|
|
48
|
+
/* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */
|
|
49
|
+
.plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }
|
|
50
|
+
.badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }
|
|
51
|
+
.name { margin: 0; ${type("lg")} font-weight: ${fontWeight("medium")}; color: inherit; }
|
|
52
|
+
.price { margin: 0; font-family: ${t.fontHeading}; ${type("4xl")} font-weight: ${fontWeight("bold")}; letter-spacing: -0.03em; color: inherit; }
|
|
53
|
+
/* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */
|
|
54
|
+
.top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }
|
|
55
|
+
.period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight("regular")}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }
|
|
56
|
+
.note { margin: 0; ${type("sm")} color: var(--plan-muted, ${t.textMuted}); }
|
|
57
|
+
ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }
|
|
58
|
+
li { display: flex; gap: ${space(2)}; ${type("sm")} }
|
|
59
|
+
li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }
|
|
60
|
+
.mark { flex-shrink: 0; inline-size: 1em; text-align: start; }
|
|
61
|
+
.top li[data-has='true'] .mark { color: var(--plan-accent); }
|
|
62
|
+
.plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }
|
|
63
|
+
.plan .btn:hover { background: ${t.brandHover}; }
|
|
64
|
+
.plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }
|
|
65
|
+
.plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }
|
|
66
|
+
@media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }
|
|
67
|
+
@container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }
|
|
68
|
+
`
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
has(plan, row) {
|
|
72
|
+
return plan.includes.split(",").map((s) => s.trim().toLowerCase()).includes(row.label.trim().toLowerCase());
|
|
73
|
+
}
|
|
74
|
+
choose(plan, event) {
|
|
75
|
+
const go = this.dispatchEvent(new CustomEvent("impakt-select", { detail: { plan }, bubbles: true, composed: true, cancelable: true }));
|
|
76
|
+
if (!go) event.preventDefault();
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return html`
|
|
80
|
+
${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
|
|
81
|
+
<div class="grid" style=${`--cols: ${Math.max(1, this.plans.length)}`}>
|
|
82
|
+
${this.plans.map(
|
|
83
|
+
(p) => html`<section class="card plan ${p.badge ? "top" : ""}" aria-labelledby=${this.id_(`n-${p.id}`)}>
|
|
84
|
+
${p.badge ? html`<span class="badge">${p.badge}</span>` : nothing}
|
|
85
|
+
<h3 class="name" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>
|
|
86
|
+
<p class="price">${p.price}${p.period ? html` <span class="period">${p.period}</span>` : nothing}</p>
|
|
87
|
+
${p.note ? html`<p class="note">${p.note}</p>` : nothing}
|
|
88
|
+
<ul>${this.rows.map((r) => {
|
|
89
|
+
const has = this.has(p, r);
|
|
90
|
+
return html`<li data-has=${String(has)}><span class="mark" aria-hidden="true">${has ? "\u221A" : "\u2013"}</span><span>${r.label}${has ? html`<span class="visually-hidden">: ${say("included")}</span>` : html`<span class="not"> · ${say("not included")}</span>`}</span></li>`;
|
|
91
|
+
})}</ul>
|
|
92
|
+
${p.href ? html`<a class="btn" href=${p.href} @click=${(e) => this.choose(p, e)}><span>${this.buttonText}<span class="visually-hidden"> ${p.name}</span></span>${arrow}</a>` : html`<button class="btn" type="button" @click=${(e) => this.choose(p, e)}><span>${this.buttonText}<span class="visually-hidden"> ${p.name}</span></span>${arrow}</button>`}
|
|
93
|
+
</section>`
|
|
94
|
+
)}
|
|
95
|
+
</div>`;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
function embedOf(src, locale) {
|
|
99
|
+
const yt = /(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(src);
|
|
100
|
+
const hl = locale && !/^en\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split("-")[0])}&cc_lang_pref=${encodeURIComponent(locale.split("-")[0])}` : "";
|
|
101
|
+
if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;
|
|
102
|
+
const vimeo = /vimeo\.com\/(?:video\/)?(\d+)/.exec(src);
|
|
103
|
+
if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
var ImpaktVideo = class extends ImpaktElement {
|
|
107
|
+
static {
|
|
108
|
+
this.properties = {
|
|
109
|
+
videoSrc: { type: String, attribute: "video-src" },
|
|
110
|
+
label: { type: String },
|
|
111
|
+
posterSrc: { type: String, attribute: "poster-src" },
|
|
112
|
+
captionsSrc: { type: String, attribute: "captions-src" },
|
|
113
|
+
transcriptHref: { type: String, attribute: "transcript-href" },
|
|
114
|
+
playText: { type: String, attribute: "play-text" },
|
|
115
|
+
ratio: { type: String, reflect: true },
|
|
116
|
+
look: { type: String, reflect: true },
|
|
117
|
+
caption: { type: String },
|
|
118
|
+
duration: { type: String },
|
|
119
|
+
transcript: { type: String },
|
|
120
|
+
transcriptText: { type: String, attribute: "transcript-text" },
|
|
121
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
122
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
constructor() {
|
|
126
|
+
super();
|
|
127
|
+
this.videoSrc = "";
|
|
128
|
+
this.label = "Video";
|
|
129
|
+
this.posterSrc = "";
|
|
130
|
+
this.captionsSrc = "";
|
|
131
|
+
this.transcriptHref = "";
|
|
132
|
+
this.playText = "Play video";
|
|
133
|
+
this.ratio = "16:9";
|
|
134
|
+
this.look = "plain";
|
|
135
|
+
this.caption = "";
|
|
136
|
+
this.duration = "";
|
|
137
|
+
this.transcript = "";
|
|
138
|
+
this.transcriptText = "";
|
|
139
|
+
this.playing = false;
|
|
140
|
+
this.spaceAbove = "none";
|
|
141
|
+
this.spaceBelow = "none";
|
|
142
|
+
}
|
|
143
|
+
static {
|
|
144
|
+
this.styles = [
|
|
145
|
+
...ImpaktElement.styles,
|
|
146
|
+
focusRing,
|
|
147
|
+
spaceAround,
|
|
148
|
+
card,
|
|
149
|
+
css`
|
|
150
|
+
:host { display: block; }
|
|
151
|
+
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }
|
|
152
|
+
:host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
|
|
153
|
+
:host([ratio='1:1']) .frame { aspect-ratio: 1; }
|
|
154
|
+
:host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }
|
|
155
|
+
iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }
|
|
156
|
+
.play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }
|
|
157
|
+
.disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }
|
|
158
|
+
/* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
|
|
159
|
+
.label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type("lg")} font-weight: ${fontWeight("semibold")}; text-align: start; }
|
|
160
|
+
.foot { margin: ${space(2)} 0 0; ${type("sm")} }
|
|
161
|
+
.foot a { color: ${t.link}; }
|
|
162
|
+
.empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
|
|
163
|
+
/* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */
|
|
164
|
+
.window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${t.borderThin} solid var(--stage-rule); }
|
|
165
|
+
.bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }
|
|
166
|
+
.bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }
|
|
167
|
+
.bar .dot:first-child { background: ${token("color.accent.default", "#ffd43b")}; }
|
|
168
|
+
.bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
169
|
+
:host([look='window']) .frame { border-radius: 0; background: var(--stage); }
|
|
170
|
+
:host([look='window']) .play { background: none; color: inherit; }
|
|
171
|
+
:host([look='window']) .disc { display: none; }
|
|
172
|
+
:host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type("md")} font-weight: ${fontWeight("medium")}; color: ${token("color.accent.on", "#111111")}; background: ${token("color.accent.default", "#ffd43b")}; }
|
|
173
|
+
:host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token("color.accent.default", "#ffd43b")} 88%, #ffffff); }
|
|
174
|
+
:host([look='window']) .play:focus-visible { outline: none; }
|
|
175
|
+
:host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }
|
|
176
|
+
.length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
177
|
+
.transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }
|
|
178
|
+
.transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight("medium")}; list-style: none; }
|
|
179
|
+
.transcript summary::-webkit-details-marker { display: none; }
|
|
180
|
+
.transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }
|
|
181
|
+
.transcript[open] summary::before { content: '−'; }
|
|
182
|
+
.transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }
|
|
183
|
+
.transcript p { margin: 0; }
|
|
184
|
+
@media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }
|
|
185
|
+
`
|
|
186
|
+
];
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
const embed = embedOf(this.videoSrc, pageLocale(this));
|
|
190
|
+
let player;
|
|
191
|
+
if (!this.videoSrc) player = html`<div class="empty">${say("Add a video address")}</div>`;
|
|
192
|
+
else if (embed && this.playing)
|
|
193
|
+
player = html`<iframe src=${embed} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`;
|
|
194
|
+
else if (embed)
|
|
195
|
+
player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt="" />` : nothing}
|
|
196
|
+
<button class="play" type="button" @click=${() => {
|
|
197
|
+
this.playing = true;
|
|
198
|
+
}}>
|
|
199
|
+
<span class="disc" aria-hidden="true"><svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></span>
|
|
200
|
+
<span class="label">${this.playText}${this.duration ? html` <span class="length">${this.duration}</span>` : nothing}<span class="visually-hidden">: ${this.label}</span></span>
|
|
201
|
+
</button>`;
|
|
202
|
+
else
|
|
203
|
+
player = html`<video controls preload="metadata" poster=${this.posterSrc || nothing} aria-label=${this.label}>
|
|
204
|
+
<source src=${this.videoSrc} />
|
|
205
|
+
${this.captionsSrc ? html`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />` : nothing}
|
|
206
|
+
</video>`;
|
|
207
|
+
const frame = html`<div class="frame" part="frame">${player}</div>`;
|
|
208
|
+
const paragraphs = (this.transcript ?? "").split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
|
|
209
|
+
return html`${this.look === "window" ? html`<div class="window" part="window">
|
|
210
|
+
<div class="bar" aria-hidden="true"><span class="dot"></span><span class="dot"></span><span class="dot"></span>${this.caption ? html`<span class="caption">${this.caption}</span>` : nothing}</div>
|
|
211
|
+
${frame}
|
|
212
|
+
</div>` : frame}
|
|
213
|
+
${paragraphs.length ? html`<details class="transcript" part="transcript"><summary>${this.transcriptText || say("Read the transcript")}</summary><div class="words">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>` : nothing}
|
|
214
|
+
${this.transcriptHref ? html`<p class="foot"><a href=${this.transcriptHref}>${say("Read the transcript")}<span class="visually-hidden">${say(" of {video}", { video: this.label })}</span></a></p>` : nothing}`;
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
ImpaktVideo.createProperty("playing", { state: true });
|
|
218
|
+
customElements.define("impakt-plan-comparison", ImpaktPlanComparison);
|
|
219
|
+
customElements.define("impakt-video", ImpaktVideo);
|
|
220
|
+
|
|
221
|
+
export {
|
|
222
|
+
ImpaktPlanComparison,
|
|
223
|
+
embedOf,
|
|
224
|
+
ImpaktVideo
|
|
225
|
+
};
|
|
226
|
+
//# sourceMappingURL=chunk-GQ2I44OU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/selling.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\n/** The arrow after a button's words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h18M13 1l5 5-5 5\" /></svg>`;\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as £12. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader, and a line a plan does not have also says \"· not included\"\n * in muted words on the screen. On a narrow screen the plans stack, each with\n * its own list.\n *\n * Each plan is a card with a 1px border in the text colour and no shadow. The\n * plan with a `badge` is filled with the text colour, its badge in monospace\n * capitals and its price, ticks and button in the accent, a pair the tokens\n * already hold at 4.5:1 on ink (1.4.3).\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { --plan-accent: ${token('color.accent.default', '#ffd43b')}; --plan-on-accent: ${token('color.accent.on', '#111111')}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n /* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */\n .plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }\n .badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('medium')}; color: inherit; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; letter-spacing: -0.03em; color: inherit; }\n /* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */\n .top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }\n .period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }\n .note { margin: 0; ${type('sm')} color: var(--plan-muted, ${t.textMuted}); }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }\n .mark { flex-shrink: 0; inline-size: 1em; text-align: start; }\n .top li[data-has='true'] .mark { color: var(--plan-accent); }\n .plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n .plan .btn:hover { background: ${t.brandHover}; }\n .plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }\n .plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }\n @media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n // A line the plan has is ticked and says so to a screen reader; one it lacks says \"not included\" on the screen too.\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '√' : '–'}</span><span>${r.label}${\n has ? html`<span class=\"visually-hidden\">: ${say('included')}</span>` : html`<span class=\"not\"> · ${say('not included')}</span>`\n }</span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</a>`\n : html`<button class=\"btn\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * `look=\"window\"` draws it in a window on an ink stage, as a product\n * walkthrough is shown: a bar with three dots and a caption in monospace\n * capitals, and an accent Play button with the video's length beside its\n * words. The stage stays ink in both themes. `transcript` puts what the video\n * shows on the page itself, in a section that opens under it, as an\n * alternative to a link to it (1.2.1, 1.2.3).\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n look: { type: String, reflect: true },\n caption: { type: String },\n duration: { type: String },\n transcript: { type: String },\n transcriptText: { type: String, attribute: 'transcript-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n /** `plain` is the video alone. `window` draws it in a window with a bar and a caption, on an ink stage. */\n declare look: 'plain' | 'window';\n /** With `window`: the words in the window's bar, such as \"Walkthrough video\". Decoration: `label` is what is read. */\n declare caption: string;\n /** How long the video is, such as \"2 min\", shown beside the Play button's words and read with them. */\n declare duration: string;\n /** What the video shows, as words, shown in a section that opens under it. Blank lines start a new paragraph. */\n declare transcript: string;\n /** The words on the line that opens the transcript, such as \"Read what the video shows\". */\n declare transcriptText: string;\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.look = 'plain';\n this.caption = '';\n this.duration = '';\n this.transcript = '';\n this.transcriptText = '';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n /* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */\n .window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${t.borderThin} solid var(--stage-rule); }\n .bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }\n .bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }\n .bar .dot:first-child { background: ${token('color.accent.default', '#ffd43b')}; }\n .bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n :host([look='window']) .frame { border-radius: 0; background: var(--stage); }\n :host([look='window']) .play { background: none; color: inherit; }\n :host([look='window']) .disc { display: none; }\n :host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: ${token('color.accent.on', '#111111')}; background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token('color.accent.default', '#ffd43b')} 88%, #ffffff); }\n :host([look='window']) .play:focus-visible { outline: none; }\n :host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }\n .length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }\n .transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight('medium')}; list-style: none; }\n .transcript summary::-webkit-details-marker { display: none; }\n .transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }\n .transcript[open] summary::before { content: '−'; }\n .transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }\n .transcript p { margin: 0; }\n @media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <span class=\"disc\" aria-hidden=\"true\"><svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M8 5v14l11-7z\"/></svg></span>\n <span class=\"label\">${this.playText}${this.duration ? html` <span class=\"length\">${this.duration}</span>` : nothing}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n const frame = html`<div class=\"frame\" part=\"frame\">${player}</div>`;\n const paragraphs = (this.transcript ?? '')\n .split(/\\n\\s*\\n/)\n .map((p) => p.trim())\n .filter(Boolean);\n return html`${\n this.look === 'window'\n ? html`<div class=\"window\" part=\"window\">\n <div class=\"bar\" aria-hidden=\"true\"><span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>${this.caption ? html`<span class=\"caption\">${this.caption}</span>` : nothing}</div>\n ${frame}\n </div>`\n : frame\n }\n ${\n paragraphs.length\n ? html`<details class=\"transcript\" part=\"transcript\"><summary>${this.transcriptText || say('Read the transcript')}</summary><div class=\"words\">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>`\n : nothing\n }\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n }\n}\n"],"mappings":";AAAA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,KAAK,YAAY,eAAe,WAAW,YAAY,gBAAgB,YAAY,OAAO,aAAa,GAAG,OAAO,YAAY;AAItI,IAAM,OAAO;AAAA,wBACW,EAAE,WAAW,oBAAoB,EAAE,QAAQ,iBAAiB,EAAE,QAAQ,eAAe,EAAE,QAAQ;AAAA,iCACtF,EAAE,WAAW,KAAK,KAAK,KAAK,CAAC,iBAAiB,WAAW,MAAM,CAAC,YAAY,EAAE,WAAW;AAAA,8GACZ,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,iCAAiC,WAAW,UAAU,CAAC,YAAY,EAAE,OAAO,wCA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