@atomic-ui/ui 0.1.7 → 0.3.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 +82 -95
- package/custom-elements.json +25364 -0
- package/dist/base/FieldElement.d.ts +11 -0
- package/dist/base/ImpktElement.d.ts +14 -0
- package/dist/base/locale.d.ts +8 -0
- package/dist/base/say.d.ts +1 -0
- package/dist/base/scroll-lock.d.ts +2 -0
- package/dist/base/styles.d.ts +25 -6
- package/dist/base/tokens.d.ts +5 -1
- package/dist/chunk-2YRTFWW2.js +26 -0
- package/dist/chunk-2YRTFWW2.js.map +1 -0
- package/dist/{chunk-X7IPZPTG.js → chunk-37PA72FC.js} +34 -19
- package/dist/chunk-37PA72FC.js.map +1 -0
- package/dist/chunk-3IGNZTJU.js +14 -0
- package/dist/chunk-3IGNZTJU.js.map +1 -0
- package/dist/{chunk-NTNXHLTM.js → chunk-3KO55PZK.js} +47 -2
- package/dist/chunk-3KO55PZK.js.map +1 -0
- package/dist/chunk-3RE4H2XO.js +53 -0
- package/dist/chunk-3RE4H2XO.js.map +1 -0
- package/dist/{chunk-5EA4IDUD.js → chunk-46BYUQ5A.js} +2 -2
- package/dist/{chunk-WECSVHIM.js → chunk-4OYHT4BN.js} +7 -3
- package/dist/chunk-4OYHT4BN.js.map +1 -0
- package/dist/{chunk-4HU4Y23Q.js → chunk-55DK75QF.js} +6 -4
- package/dist/chunk-55DK75QF.js.map +1 -0
- package/dist/{chunk-XVKEM5JY.js → chunk-5QSTXIPG.js} +2 -2
- package/dist/{chunk-QCNT7D5V.js → chunk-7P4Z4CLK.js} +63 -20
- package/dist/chunk-7P4Z4CLK.js.map +1 -0
- package/dist/{chunk-GSCVG2ER.js → chunk-APJ5JGRW.js} +3 -3
- package/dist/chunk-AUVIOU5G.js +522 -0
- package/dist/chunk-AUVIOU5G.js.map +1 -0
- package/dist/{chunk-6ICOJPMD.js → chunk-CUUBAETM.js} +4 -3
- package/dist/chunk-CUUBAETM.js.map +1 -0
- package/dist/{chunk-NQKYHILD.js → chunk-DAH7RLW3.js} +3 -3
- package/dist/{chunk-OB7LC6NJ.js → chunk-DJEZW7AC.js} +2 -2
- package/dist/{chunk-XJP45LFA.js → chunk-DKZ425AM.js} +15 -5
- package/dist/chunk-DKZ425AM.js.map +1 -0
- package/dist/{chunk-GO2IBRFP.js → chunk-F4YQWKK2.js} +7 -4
- package/dist/chunk-F4YQWKK2.js.map +1 -0
- package/dist/chunk-FVCM4WHD.js +328 -0
- package/dist/chunk-FVCM4WHD.js.map +1 -0
- package/dist/chunk-GBRML4RF.js +264 -0
- package/dist/chunk-GBRML4RF.js.map +1 -0
- package/dist/{chunk-ZQJD4YEJ.js → chunk-HXINWP3V.js} +42 -13
- package/dist/chunk-HXINWP3V.js.map +1 -0
- package/dist/{chunk-T6L3USBZ.js → chunk-IOBSIAHB.js} +23 -11
- package/dist/chunk-IOBSIAHB.js.map +1 -0
- package/dist/{chunk-7Y6UCSUS.js → chunk-IZOTGWWI.js} +5 -5
- package/dist/chunk-IZOTGWWI.js.map +1 -0
- package/dist/{chunk-MLVUMCQ2.js → chunk-J2FACXYI.js} +14 -5
- package/dist/chunk-J2FACXYI.js.map +1 -0
- package/dist/{chunk-VTFCTWSX.js → chunk-KKJEEKL2.js} +33 -7
- package/dist/chunk-KKJEEKL2.js.map +1 -0
- package/dist/{chunk-HWWA27DN.js → chunk-KMCGX76Y.js} +2 -2
- package/dist/{chunk-2YQA3VBY.js → chunk-NKMVICB5.js} +4 -2
- package/dist/chunk-NKMVICB5.js.map +1 -0
- package/dist/{chunk-ZBLTU67D.js → chunk-OFLMG6RN.js} +15 -11
- package/dist/chunk-OFLMG6RN.js.map +1 -0
- package/dist/{chunk-CMAU4DSB.js → chunk-P6GDMZK4.js} +5 -5
- package/dist/chunk-P6GDMZK4.js.map +1 -0
- package/dist/{chunk-MOEMFL4K.js → chunk-PO6FCAIS.js} +5 -5
- package/dist/chunk-PO6FCAIS.js.map +1 -0
- package/dist/chunk-PWLZFGS3.js +494 -0
- package/dist/chunk-PWLZFGS3.js.map +1 -0
- package/dist/chunk-QJIB36DM.js +249 -0
- package/dist/chunk-QJIB36DM.js.map +1 -0
- package/dist/{chunk-TPF4MOMF.js → chunk-R7FKGFW6.js} +7 -4
- package/dist/chunk-R7FKGFW6.js.map +1 -0
- package/dist/{chunk-ZGAOMRYD.js → chunk-RWWRTURA.js} +3 -3
- package/dist/{chunk-QDNI54ON.js → chunk-RYBY35QE.js} +10 -8
- package/dist/chunk-RYBY35QE.js.map +1 -0
- package/dist/chunk-S7F5VKWU.js +453 -0
- package/dist/chunk-S7F5VKWU.js.map +1 -0
- package/dist/chunk-T5W3FDSF.js +396 -0
- package/dist/chunk-T5W3FDSF.js.map +1 -0
- package/dist/{chunk-BTGCUONV.js → chunk-TCXKZDMR.js} +2 -2
- package/dist/{chunk-C36CZRHK.js → chunk-WGPB3QQU.js} +43 -13
- package/dist/chunk-WGPB3QQU.js.map +1 -0
- package/dist/{chunk-G6OVKNL7.js → chunk-XPCU4KUY.js} +5 -4
- package/dist/chunk-XPCU4KUY.js.map +1 -0
- package/dist/chunk-YRYZUYY7.js +236 -0
- package/dist/chunk-YRYZUYY7.js.map +1 -0
- package/dist/{chunk-7BIQ3K6H.js → chunk-ZOTAAYO5.js} +12 -2
- package/dist/chunk-ZOTAAYO5.js.map +1 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/alert.js +2 -2
- package/dist/components/app-ui.d.ts +28 -12
- package/dist/components/app-ui.js +6 -4
- package/dist/components/blocks.d.ts +28 -2
- package/dist/components/blocks.js +3 -3
- package/dist/components/button.d.ts +7 -0
- package/dist/components/button.js +3 -3
- package/dist/components/changelog.d.ts +386 -0
- package/dist/components/changelog.js +25 -0
- package/dist/components/changelog.js.map +1 -0
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +3 -3
- package/dist/components/date-input.js +3 -3
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.js +3 -2
- package/dist/components/estimator.d.ts +246 -0
- package/dist/components/estimator.js +16 -0
- package/dist/components/estimator.js.map +1 -0
- package/dist/components/fieldset.js +2 -2
- package/dist/components/grid.js +2 -2
- package/dist/components/help.js +2 -2
- package/dist/components/icon.d.ts +2 -0
- package/dist/components/icon.js +2 -2
- package/dist/components/journey.d.ts +447 -0
- package/dist/components/journey.js +22 -0
- package/dist/components/journey.js.map +1 -0
- package/dist/components/layout.d.ts +24 -0
- package/dist/components/layout.js +2 -2
- package/dist/components/link.js +3 -3
- package/dist/components/list.d.ts +50 -0
- package/dist/components/list.js +8 -0
- package/dist/components/list.js.map +1 -0
- package/dist/components/marketing.d.ts +1 -1
- package/dist/components/marketing.js +3 -3
- package/dist/components/media.d.ts +10 -0
- package/dist/components/media.js +2 -2
- package/dist/components/navigation.d.ts +16 -0
- package/dist/components/navigation.js +3 -3
- package/dist/components/organisms.d.ts +13 -1
- package/dist/components/organisms.js +3 -3
- package/dist/components/page.js +2 -2
- package/dist/components/price.d.ts +1 -1
- package/dist/components/price.js +3 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/property.d.ts +1 -1
- package/dist/components/property.js +4 -3
- package/dist/components/radio-group.js +3 -3
- package/dist/components/scene.d.ts +138 -0
- package/dist/components/scene.js +8 -0
- package/dist/components/scene.js.map +1 -0
- package/dist/components/scrubber.d.ts +86 -0
- package/dist/components/scrubber.js +8 -0
- package/dist/components/scrubber.js.map +1 -0
- package/dist/components/select.js +3 -3
- package/dist/components/selling.d.ts +409 -0
- package/dist/components/selling.js +25 -0
- package/dist/components/selling.js.map +1 -0
- package/dist/components/site.d.ts +283 -0
- package/dist/components/site.js +20 -0
- package/dist/components/site.js.map +1 -0
- package/dist/components/summary-list.js +2 -2
- package/dist/components/table.d.ts +94 -2
- package/dist/components/table.js +4 -2
- package/dist/components/text-input.js +3 -3
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.js +3 -3
- package/dist/index.d.ts +10 -2
- package/dist/index.js +135 -55
- package/dist/standalone/atomic-ui.js +3134 -0
- package/dist/standalone/atomic-ui.js.map +7 -0
- package/dist/standalone/index.html +174 -0
- package/package.json +26 -7
- package/scripts/copy-to-product.mjs +52 -0
- package/specimen/index.html +174 -0
- package/dist/chunk-2YQA3VBY.js.map +0 -1
- package/dist/chunk-4HU4Y23Q.js.map +0 -1
- package/dist/chunk-6ICOJPMD.js.map +0 -1
- package/dist/chunk-7BIQ3K6H.js.map +0 -1
- package/dist/chunk-7Y6UCSUS.js.map +0 -1
- package/dist/chunk-C36CZRHK.js.map +0 -1
- package/dist/chunk-CMAU4DSB.js.map +0 -1
- package/dist/chunk-G6OVKNL7.js.map +0 -1
- package/dist/chunk-GO2IBRFP.js.map +0 -1
- package/dist/chunk-MLVUMCQ2.js.map +0 -1
- package/dist/chunk-MOEMFL4K.js.map +0 -1
- package/dist/chunk-NTNXHLTM.js.map +0 -1
- package/dist/chunk-QCNT7D5V.js.map +0 -1
- package/dist/chunk-QDNI54ON.js.map +0 -1
- package/dist/chunk-T6L3USBZ.js.map +0 -1
- package/dist/chunk-TPF4MOMF.js.map +0 -1
- package/dist/chunk-VTFCTWSX.js.map +0 -1
- package/dist/chunk-VWNBB7FW.js +0 -104
- package/dist/chunk-VWNBB7FW.js.map +0 -1
- package/dist/chunk-WECSVHIM.js.map +0 -1
- package/dist/chunk-X7IPZPTG.js.map +0 -1
- package/dist/chunk-XJP45LFA.js.map +0 -1
- package/dist/chunk-ZBLTU67D.js.map +0 -1
- package/dist/chunk-ZQJD4YEJ.js.map +0 -1
- /package/dist/{chunk-5EA4IDUD.js.map → chunk-46BYUQ5A.js.map} +0 -0
- /package/dist/{chunk-XVKEM5JY.js.map → chunk-5QSTXIPG.js.map} +0 -0
- /package/dist/{chunk-GSCVG2ER.js.map → chunk-APJ5JGRW.js.map} +0 -0
- /package/dist/{chunk-NQKYHILD.js.map → chunk-DAH7RLW3.js.map} +0 -0
- /package/dist/{chunk-OB7LC6NJ.js.map → chunk-DJEZW7AC.js.map} +0 -0
- /package/dist/{chunk-HWWA27DN.js.map → chunk-KMCGX76Y.js.map} +0 -0
- /package/dist/{chunk-ZGAOMRYD.js.map → chunk-RWWRTURA.js.map} +0 -0
- /package/dist/{chunk-BTGCUONV.js.map → chunk-TCXKZDMR.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NKMVICB5.js";
|
|
4
4
|
import {
|
|
5
5
|
ImpktElement,
|
|
6
6
|
fontSize,
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
spaceAround,
|
|
11
11
|
t,
|
|
12
12
|
type
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3KO55PZK.js";
|
|
14
14
|
|
|
15
15
|
// packages/ui/src/components/marketing.ts
|
|
16
16
|
import { css, html, nothing } from "lit";
|
|
17
17
|
var heading = (level, text, cls) => html`<div class=${cls} role="heading" aria-level=${level}>${text}</div>`;
|
|
18
18
|
var headingStyles = css`
|
|
19
19
|
.h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; line-height: ${lineHeight("tight")}; }
|
|
20
|
-
.eyebrow { margin: 0; color: var(--impkt-eyebrow, ${t.brand}); ${type("sm")} font-weight: ${fontWeight("semibold")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
20
|
+
.eyebrow { margin: 0; color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand})); ${type("sm")} font-size: var(--impkt-font-size-eyebrow, var(--impkt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight("semibold")}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
21
21
|
.body { margin: 0; line-height: ${lineHeight("normal")}; max-inline-size: 65ch; }
|
|
22
22
|
`;
|
|
23
23
|
var ImpktHero = class extends ImpktElement {
|
|
@@ -246,7 +246,7 @@ var ImpktBadge = class extends ImpktElement {
|
|
|
246
246
|
static {
|
|
247
247
|
this.styles = [...ImpktElement.styles, css`
|
|
248
248
|
:host { display: inline-flex; }
|
|
249
|
-
span { display: inline-flex; align-items: center; gap: ${space(1)}; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; ${type("
|
|
249
|
+
span { display: inline-flex; align-items: center; gap: ${space(1)}; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; ${type("sm")} font-weight: ${fontWeight("medium")}; background: ${t.surfaceInset}; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.hairline}; }
|
|
250
250
|
:host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }
|
|
251
251
|
:host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
252
252
|
:host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }
|
|
@@ -358,4 +358,4 @@ export {
|
|
|
358
358
|
ImpktAnnouncement,
|
|
359
359
|
ImpktSearchBar
|
|
360
360
|
};
|
|
361
|
-
//# sourceMappingURL=chunk-
|
|
361
|
+
//# sourceMappingURL=chunk-IZOTGWWI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, lineHeight, space, spaceAround, t, type } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/** A heading at a level the author chose, drawn at a size the component chose. */\nconst heading = (level: number, text: string, cls: string): TemplateResult =>\n html`<div class=${cls} role=\"heading\" aria-level=${level}>${text}</div>`;\n\nconst headingStyles = css`\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .eyebrow { margin: 0; color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impkt-font-size-eyebrow, var(--impkt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; max-inline-size: 65ch; }\n`;\n\n/**\n * The opening of a page: a short label, a big heading, a line of text, the\n * page's main actions and, beside them, a picture.\n *\n * Put the buttons in the `actions` slot. The picture goes beside the words on\n * a wide screen and below them on a phone, so the heading is always the first\n * thing read.\n *\n * @category layout\n * @icon hero\n * @role heading\n * @slot actions - The page's main buttons and links.\n * @slot search - A search bar across the bottom of a full-picture hero.\n */\nexport class ImpktHero extends ImpktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n treatment: { type: String, reflect: true },\n ratingText: { type: String, attribute: 'rating-text' },\n eyebrowIcon: { type: String, attribute: 'eyebrow-icon' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A short label above the heading, such as the name of the development. */\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** The heading's level in the page. A page's hero is usually its only level 1. */\n declare level: 1 | 2;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** The picture beside the words, or filling the whole block with the words over it. */\n declare treatment: 'split' | 'cover';\n /** A short line of proof on the picture, such as \"4.8 from 312 buyers\". */\n declare ratingText: string;\n /** A small picture before the eyebrow on a full-picture hero. */\n declare eyebrowIcon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';\n /** Where the words sit. Centred heroes have no picture beside them. */\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.level = 1;\n this.imageSrc = '';\n this.imageAlt = '';\n this.treatment = 'split';\n this.ratingText = '';\n this.eyebrowIcon = 'none';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, headingStyles, css`\n :host { display: block; container-type: inline-size; }\n .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }\n .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }\n .h { ${type('5xl')} letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { ${type('lg')} color: ${t.textMuted}; text-wrap: pretty; }\n @container (max-width: 40rem) { .h { ${type('4xl')} } }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n :host([align='center']) .actions { justify-content: center; }\n img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }\n @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }\n /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */\n .cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impkt-bleed, 1) * (50% - 50vw)); padding: ${space(32)} max(${space(8)}, calc(var(--impkt-bleed, 1) * (50vw - 50%))) ${space(24)}; overflow: hidden; color: #fff; --impkt-color-text-heading: #fff; }\n .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }\n .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }\n .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }\n .cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: 999px; text-transform: none; letter-spacing: 0; }\n .chip-line { position: relative; z-index: 1; block-size: 0; }\n .chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }\n .finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }\n .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }\n .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }\n @container (max-width: 64rem) { .chip { display: none; } }\n @container (max-width: 30rem) { .finder { display: none; } }\n @container (max-width: 48rem) { .finder { margin-block-start: ${space(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${space(32)} ${space(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }\n `];\n\n render(): TemplateResult {\n if (this.treatment === 'cover' && this.imageSrc) {\n return html`<div class=\"cover\" part=\"hero\">\n ${this.ratingText ? html`<div class=\"chip-line\"><div class=\"chip\">${iconSvg('star', '20px')}${this.ratingText}</div></div>` : nothing}\n <img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrowIcon !== 'none' ? iconSvg(this.eyebrowIcon, '16px') : nothing}${this.eyebrow}</p>` : nothing}\n ${heading(this.level, this.heading, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n <div class=\"finder\"><slot name=\"search\"></slot></div>\n </div>`;\n }\n const pictured = Boolean(this.imageSrc) && this.align !== 'center';\n return html`<div class=\"hero ${pictured ? 'pictured' : ''}\" part=\"hero\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${heading(this.level, this.heading, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />` : nothing}\n </div>`;\n }\n}\n\n/** One benefit or feature in a list of them. */\nexport interface FeatureItem {\n id?: string;\n icon?: string;\n heading: string;\n text?: string;\n}\n\n/**\n * Benefits or features side by side, each with an icon, a short heading and a\n * line of text: \"Ten years of cover\", \"Lower bills from day one\".\n *\n * The icons are decoration, because each heading already says what it is.\n * The items are a list, so a screen reader says how many there are.\n *\n * @category content\n * @icon features\n */\nexport class ImpktFeatureList extends ImpktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n layout: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: FeatureItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each item's heading. One below the heading above the list. */\n declare headingLevel: 2 | 3 | 4;\n /** Icons above the words, or beside them. */\n declare layout: 'stacked' | 'inline';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.layout = 'stacked';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, headingStyles, css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(2)}; }\n :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }\n :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }\n .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${t.radiusLg}; background: ${t.brandSubtle}; color: ${t.brand}; margin-block-end: ${space(2)}; }\n :host([layout='inline']) .icon { margin: 0; }\n .h { font-size: ${fontSize('lg')}; }\n .body { color: ${t.text}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map((item) => html`<li part=\"item\">\n ${item.icon ? html`<span class=\"icon\">${iconSvg(item.icon, '24px')}</span>` : nothing}\n <div class=\"words\">${heading(this.headingLevel, item.heading, 'h')}${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}</div>\n </li>`)}</ul>`;\n }\n}\n\n/**\n * Something a customer said, and who said it.\n *\n * It is a `blockquote` with a `figcaption`, so the words and the person are\n * tied together for a screen reader as well as on the screen.\n *\n * @category content\n * @icon quote\n */\nexport class ImpktQuote extends ImpktElement {\n static properties = {\n quote: { type: String },\n person: { type: String },\n about: { type: String },\n imageSrc: { type: String, attribute: 'image-src' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The words they said, without quotation marks. */\n declare quote: string;\n /** Who said it. */\n declare person: string;\n /** Who they are, such as \"Bought at Larkfield Meadows, 2025\". */\n declare about: string;\n /** A photo of them. It is decoration, because their name is beside it. */\n declare imageSrc: string;\n declare size: 'md' | 'lg';\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.quote = '';\n this.person = '';\n this.about = '';\n this.imageSrc = '';\n this.size = 'md';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, css`\n :host { display: block; }\n figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }\n :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }\n blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; line-height: ${lineHeight('normal')}; color: inherit; }\n :host([size='lg']) blockquote { font-size: ${fontSize('2xl')}; line-height: ${lineHeight('tight')}; }\n blockquote::before { content: '\\\\201C'; } blockquote::after { content: '\\\\201D'; }\n figcaption { display: flex; align-items: center; gap: ${space(3)}; }\n img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `];\n\n render(): TemplateResult {\n return html`<figure part=\"figure\">\n <blockquote part=\"quote\">${this.quote}</blockquote>\n ${this.person ? html`<figcaption>${this.imageSrc ? html`<img src=${this.imageSrc} alt=\"\" />` : nothing}<span><span class=\"name\">${this.person}</span>${this.about ? html`<br /><span class=\"detail\">${this.about}</span>` : nothing}</span></figcaption>` : nothing}\n </figure>`;\n }\n}\n\n/**\n * A number that makes a point, with what it counts beneath it: \"36 years\",\n * \"Building in Kent since 1987\".\n *\n * @category content\n * @icon stat\n */\nexport class ImpktStat extends ImpktElement {\n static properties = {\n figure: { type: String },\n label: { type: String },\n note: { type: String },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** How large the number is drawn. */\n declare size: 'md' | 'lg' | 'xl';\n /** The number, written as it should appear, such as \"36\" or \"£280k\". */\n declare figure: string;\n /** What the number counts. */\n declare label: string;\n /** A line more, if the label needs it. */\n declare note: string;\n declare align: 'start' | 'center';\n\n constructor() {\n super();\n this.figure = '';\n this.label = '';\n this.note = '';\n this.size = 'md';\n this.align = 'start';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: block; }\n .stat { display: flex; flex-direction: column; gap: ${space(1)}; }\n :host([align='center']) .stat { align-items: center; text-align: center; }\n .value { font-family: ${t.fontHeading}; font-size: ${fontSize('3xl')}; font-weight: ${fontWeight('bold')}; line-height: 1; color: ${t.textHeading}; }\n :host([size='lg']) .value { font-size: ${fontSize('5xl')}; }\n :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }\n .label { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `];\n\n render(): TemplateResult {\n // Read as one phrase, \"36 years\", rather than a bare number and then a label.\n return html`<p class=\"stat\" part=\"stat\" style=\"margin:0\"><span class=\"value\">${this.figure}</span> <span class=\"label\">${this.label}</span>${this.note ? html` <span class=\"detail\">${this.note}</span>` : nothing}</p>`;\n }\n}\n\n/**\n * A short label on something: \"New\", \"Selling fast\", \"2 left\".\n *\n * The tone colours it, and the words carry the meaning, so it reads the same\n * without the colour (1.4.1).\n *\n * @category feedback\n * @icon badge\n * @slot - The badge's words.\n */\nexport class ImpktBadge extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n icon: { type: String },\n };\n declare tone: 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info';\n /** An icon before the words. */\n declare icon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';\n\n constructor() {\n super();\n this.tone = 'neutral';\n this.icon = 'none';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: inline-flex; }\n span { display: inline-flex; align-items: center; gap: ${space(1)}; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; ${type('sm')} font-weight: ${fontWeight('medium')}; background: ${t.surfaceInset}; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.hairline}; }\n :host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }\n :host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }\n :host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }\n :host([tone='danger']) span { background: ${t.dangerSubtle}; color: ${t.dangerText}; }\n :host([tone='info']) span { background: ${t.infoSubtle}; color: ${t.infoText}; }\n @media (forced-colors: active) { span { border-color: CanvasText; } }\n `];\n\n render(): TemplateResult {\n return html`<span part=\"badge\">${iconSvg(this.icon, '1em')}<slot></slot></span>`;\n }\n}\n\n/**\n * A thin line of news across the top of a page: a launch, a change to opening\n * hours. Keep it to one short sentence.\n *\n * @category feedback\n * @icon alert\n */\nexport class ImpktAnnouncement extends ImpktElement {\n static properties = {\n message: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n href: { type: String },\n };\n declare message: string;\n declare linkText: string;\n declare href: string;\n\n constructor() {\n super();\n this.message = '';\n this.linkText = '';\n this.href = '';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: block; }\n .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${space(2)} ${space(3)}; padding: ${space(2.5)} ${space(5)}; ${type('sm')} text-align: center; color: ${t.onBrand}; background: ${t.brand}; }\n :host { margin-inline: calc(var(--impkt-bleed, 1) * (50% - 50vw)); }\n a { display: inline-flex; align-items: center; gap: ${space(1)}; color: inherit; font-weight: ${fontWeight('semibold')}; }\n `];\n\n render(): TemplateResult {\n return html`<div class=\"bar\" part=\"bar\"><span>${this.message}</span>${this.linkText && this.href ? html`<a href=${this.href}>${this.linkText}${iconSvg('arrow-right', '14px')}</a>` : nothing}</div>`;\n }\n}\n\n/** One choice in a search bar. */\nexport interface SearchField {\n id?: string;\n /** The name it sends, such as \"bedrooms\". */\n name?: string;\n label: string;\n /** What it shows before anything is chosen. */\n placeholder?: string;\n /** The other choices, separated by commas. */\n options?: string;\n}\n\n/**\n * A row of choices and one button that finds what fits: where, how many\n * bedrooms, up to what budget.\n *\n * Each choice is a native select with a real label. It sends the visitor to\n * `action` with their choices in the address, so it works as a plain link can.\n *\n * @category form\n * @icon search\n * @fires {CustomEvent<{ values: Record<string, string> }>} impkt-submit - When the search is run. The choices are in detail.values.\n */\nexport class ImpktSearchBar extends ImpktElement {\n static properties = {\n items: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n action: { type: String },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: SearchField[];\n declare buttonText: string;\n /** Where the search goes. Leave empty to handle it in the app. */\n declare action: string;\n /** What the search is called for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.buttonText = 'Search';\n this.action = '';\n this.label = 'Search';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }\n label { ${type('sm')} color: ${t.textMuted}; }\n select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: transparent; border: 0; border-radius: ${t.radiusSm}; cursor: pointer; }\n select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }\n button { flex: none; min-block-size: 48px; padding: ${space(3)} ${space(6)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }\n @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }\n `];\n\n private submit(event: SubmitEvent): void {\n const data = new FormData(event.currentTarget as HTMLFormElement);\n const values: Record<string, string> = {};\n data.forEach((value, key) => { if (value !== '') values[key] = String(value); });\n this.dispatchEvent(new CustomEvent('impkt-submit', { detail: { values }, bubbles: true, composed: true }));\n if (!this.action) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`<form role=\"search\" aria-label=${this.label} method=\"get\" action=${this.action || nothing} @submit=${this.submit} part=\"form\">\n ${(this.items ?? []).map((field, i) => {\n const id = this.id_(`field-${i}`);\n const choices = String(field.options ?? '').split(',').map((o) => o.trim()).filter(Boolean);\n return html`<div class=\"field\"><label for=${id}>${field.label}</label><select id=${id} name=${field.name || field.label.toLowerCase().replace(/[^a-z0-9]+/g, '-')}>\n <option value=\"\">${field.placeholder || 'Any'}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}\n </select></div>`;\n })}\n <button type=\"submit\">${this.buttonText}</button>\n </form>`;\n }\n}\n\ncustomElements.define('impkt-search-bar', ImpktSearchBar);\ncustomElements.define('impkt-announcement', ImpktAnnouncement);\ncustomElements.define('impkt-hero', ImpktHero);\ncustomElements.define('impkt-feature-list', ImpktFeatureList);\ncustomElements.define('impkt-quote', ImpktQuote);\ncustomElements.define('impkt-stat', ImpktStat);\ncustomElements.define('impkt-badge', ImpktBadge);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-hero': ImpktHero; 'impkt-feature-list': ImpktFeatureList; 'impkt-quote': ImpktQuote; 'impkt-stat': ImpktStat; 'impkt-badge': ImpktBadge;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAMxD,IAAM,UAAU,CAAC,OAAe,MAAc,QAC5C,kBAAkB,GAAG,8BAA8B,KAAK,IAAI,IAAI;AAElE,IAAM,gBAAgB;AAAA,2BACK,EAAE,WAAW,kBAAkB,EAAE,WAAW,kBAAkB,WAAW,MAAM,CAAC,kBAAkB,WAAW,OAAO,CAAC;AAAA,sFAC1D,EAAE,KAAK,OAAO,KAAK,IAAI,CAAC,iGAAiG,EAAE,WAAW,mDAAmD,WAAW,UAAU,CAAC,sBAAsB,EAAE,YAAY;AAAA,oCACrS,WAAW,QAAQ,CAAC;AAAA;AAiBjD,IAAM,YAAN,cAAwB,aAAa;AAAA,EAC1C;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,OAAO;AAAA,M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H,CAAC,CAAC;AAAA,8BACsB,KAAK,UAAU;AAAA;AAAA,EAE3C;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,sBAAsB,iBAAiB;AAC7D,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,sBAAsB,gBAAgB;AAC5D,eAAe,OAAO,eAAe,UAAU;AAC/C,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NKMVICB5.js";
|
|
4
4
|
import {
|
|
5
5
|
ImpktElement,
|
|
6
6
|
focusRing,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
t,
|
|
11
11
|
targetSize,
|
|
12
12
|
visuallyHidden
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3KO55PZK.js";
|
|
14
14
|
|
|
15
15
|
// packages/ui/src/components/navigation.ts
|
|
16
16
|
import { css, html, nothing } from "lit";
|
|
17
17
|
function where(href) {
|
|
18
|
-
if (typeof location === "undefined" || !href) return null;
|
|
18
|
+
if (typeof location === "undefined" || !href || href.startsWith("#")) return null;
|
|
19
19
|
let path;
|
|
20
20
|
try {
|
|
21
21
|
path = new URL(href, location.href).pathname.replace(/\/$/, "") || "/";
|
|
@@ -36,6 +36,8 @@ var ImpktNav = class extends ImpktElement {
|
|
|
36
36
|
this.links = [];
|
|
37
37
|
this.label = "Main";
|
|
38
38
|
this.menuText = "Menu";
|
|
39
|
+
this.menuLook = "button";
|
|
40
|
+
this.size = "md";
|
|
39
41
|
this.align = "end";
|
|
40
42
|
}
|
|
41
43
|
static {
|
|
@@ -43,6 +45,8 @@ var ImpktNav = class extends ImpktElement {
|
|
|
43
45
|
links: { type: Array },
|
|
44
46
|
label: { type: String },
|
|
45
47
|
menuText: { type: String, attribute: "menu-text" },
|
|
48
|
+
menuLook: { type: String, reflect: true, attribute: "menu-look" },
|
|
49
|
+
size: { type: String, reflect: true },
|
|
46
50
|
align: { type: String, reflect: true }
|
|
47
51
|
};
|
|
48
52
|
}
|
|
@@ -69,6 +73,11 @@ var ImpktNav = class extends ImpktElement {
|
|
|
69
73
|
/* When they do not fit, the links fold behind a Menu button and open as a panel under it. */
|
|
70
74
|
:host([folded]) { flex: 0 0 auto; }
|
|
71
75
|
:host([folded]) .toggle { display: inline-flex; }
|
|
76
|
+
:host([menu-look='icon']) .toggle { inline-size: 44px; block-size: 44px; padding: 0; justify-content: center; border: 0; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; }
|
|
77
|
+
:host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
78
|
+
:host([size='sm']) ul { column-gap: ${space(6)}; }
|
|
79
|
+
:host([size='sm']) a { padding-inline: 0; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("medium")}; }
|
|
80
|
+
:host([size='sm'][folded]) a { padding-inline: ${space(3)}; }
|
|
72
81
|
:host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${space(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${space(2)}; background: ${t.surfaceCard}; color: ${t.text}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }
|
|
73
82
|
:host([folded]) ul.open { display: flex; }
|
|
74
83
|
:host([folded]) li { text-align: start; }
|
|
@@ -116,7 +125,7 @@ var ImpktNav = class extends ImpktElement {
|
|
|
116
125
|
render() {
|
|
117
126
|
const list = this.id_("links");
|
|
118
127
|
return html`<nav aria-label=${this.label || nothing} part="nav" @keydown=${this.onKey}>
|
|
119
|
-
<button class="toggle" type="button" aria-expanded=${this.open ? "true" : "false"} aria-controls=${list} @click=${this.toggle}>${iconSvg(this.open ? "close" : "menu")}
|
|
128
|
+
<button class="toggle" type="button" aria-expanded=${this.open ? "true" : "false"} aria-controls=${list} @click=${this.toggle}>${iconSvg(this.open ? "close" : this.menuLook === "icon" ? "menu-two" : "menu")}<span class="words">${this.menuText}</span></button>
|
|
120
129
|
<ul id=${list} class=${this.open ? "open" : ""} part="list">
|
|
121
130
|
${(this.links ?? []).map((link) => {
|
|
122
131
|
const current = where(link.href);
|
|
@@ -164,4 +173,4 @@ export {
|
|
|
164
173
|
ImpktNav,
|
|
165
174
|
ImpktBreadcrumbs
|
|
166
175
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
176
|
+
//# sourceMappingURL=chunk-J2FACXYI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/** One link in a navigation or a trail. */\nexport interface NavLink {\n label: string;\n href: string;\n}\n\n/** Whether a link is the page the visitor is on, or a page above it. */\nfunction where(href: string): 'page' | 'section' | null {\n // A link to a place on this page, or to nowhere yet (\"#\"), is not where the reader is.\n if (typeof location === 'undefined' || !href || href.startsWith('#')) return null;\n let path: string;\n try { path = new URL(href, location.href).pathname.replace(/\\/$/, '') || '/'; } catch { return null; }\n const here = location.pathname.replace(/\\/$/, '') || '/';\n if (path === here) return 'page';\n return path !== '/' && here.startsWith(`${path}/`) ? 'section' : null;\n}\n\n/**\n * The site's main navigation: a row of links that folds into a Menu button\n * when there is not room for all of them, whatever the screen.\n *\n * **The page you are on is marked in words as well as colour.** Its link\n * carries `aria-current=\"page\"`, which a screen reader announces, and an\n * underline, so it does not rely on colour alone (1.4.1).\n *\n * **The menu is a disclosure, not a pop-up.** The Menu button says whether the\n * list is open (`aria-expanded`), the links follow it in the reading order, and\n * Escape closes it and returns focus to the button.\n *\n * @category action\n * @icon menu\n */\nexport class ImpktNav extends ImpktElement {\n static properties = {\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n menuLook: { type: String, reflect: true, attribute: 'menu-look' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** The links, in order. */\n declare links: NavLink[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /**\n * The Menu button: `button` with its words, or `icon`, a round button with\n * only the icon, the words kept as its name for screen readers.\n */\n declare menuLook: 'button' | 'icon';\n /** `sm` sets the links a step smaller and closer, as a site header's are. */\n declare size: 'md' | 'sm';\n /** Where the links sit along the row. */\n declare align: 'start' | 'center' | 'end';\n /** Whether the menu is open on a narrow screen. Not a setting: it is the visitor's. */\n private menuOpen = false;\n private get open(): boolean { return this.menuOpen; }\n private set open(next: boolean) { this.menuOpen = next; this.requestUpdate(); }\n\n constructor() {\n super();\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.menuLook = 'button';\n this.size = 'md';\n this.align = 'end';\n }\n\n static styles = [...ImpktElement.styles, focusRing, css`\n /* It grows to fill a row it sits in, because it measures itself to decide when to fold. */\n :host { display: block; flex: 1 1 8rem; min-inline-size: 0; }\n nav { display: flex; flex-direction: column; position: relative; }\n li { flex: none; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${space(1)} ${space(6)}; align-items: center; justify-content: flex-end; }\n :host([align='start']) ul { justify-content: flex-start; }\n :host([align='center']) ul { justify-content: center; }\n a { ${targetSize} display: inline-flex; align-items: center; padding: ${space(2)} ${space(1)}; color: inherit; font-weight: ${fontWeight('semibold')}; text-decoration: none; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }\n .toggle { display: none; ${targetSize} align-items: center; gap: ${space(2)}; align-self: flex-end; padding: ${space(2)} ${space(3)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }\n /* When they do not fit, the links fold behind a Menu button and open as a panel under it. */\n :host([folded]) { flex: 0 0 auto; }\n :host([folded]) .toggle { display: inline-flex; }\n :host([menu-look='icon']) .toggle { inline-size: 44px; block-size: 44px; padding: 0; justify-content: center; border: 0; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; }\n :host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n :host([size='sm']) ul { column-gap: ${space(6)}; }\n :host([size='sm']) a { padding-inline: 0; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; }\n :host([size='sm'][folded]) a { padding-inline: ${space(3)}; }\n :host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${space(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${space(2)}; background: ${t.surfaceCard}; color: ${t.text}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }\n :host([folded]) ul.open { display: flex; }\n :host([folded]) li { text-align: start; }\n :host([folded]) a { display: flex; padding: ${space(3)} ${space(3)}; }\n `];\n\n /** The width the links need in one row. Measured once for each set of links, and again while folded it cannot be read. */\n private needs = 0;\n private resize?: ResizeObserver;\n\n private fit(): void {\n const room = this.getBoundingClientRect().width;\n if (room <= 0) return;\n if (!this.needs) {\n this.removeAttribute('folded');\n const items = Array.from(this.renderRoot.querySelectorAll('li'));\n const gap = Number.parseFloat(getComputedStyle(this.renderRoot.querySelector('ul')!).columnGap) || 0;\n this.needs = items.reduce((total, item) => total + item.getBoundingClientRect().width, 0) + gap * Math.max(0, items.length - 1);\n }\n const fold = this.needs > room;\n this.toggleAttribute('folded', fold);\n if (!fold && this.menuOpen) this.open = false;\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('links')) { this.needs = 0; this.fit(); }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (typeof ResizeObserver === 'function') {\n this.resize = new ResizeObserver(() => this.fit());\n this.resize.observe(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resize?.disconnect();\n }\n\n private toggle(): void {\n this.open = !this.open;\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.open) return;\n this.open = false;\n this.renderRoot.querySelector<HTMLButtonElement>('.toggle')?.focus();\n }\n\n render(): TemplateResult {\n const list = this.id_('links');\n return html`<nav aria-label=${this.label || nothing} part=\"nav\" @keydown=${this.onKey}>\n <button class=\"toggle\" type=\"button\" aria-expanded=${this.open ? 'true' : 'false'} aria-controls=${list} @click=${this.toggle}>${iconSvg(this.open ? 'close' : this.menuLook === 'icon' ? 'menu-two' : 'menu')}<span class=\"words\">${this.menuText}</span></button>\n <ul id=${list} class=${this.open ? 'open' : ''} part=\"list\">\n ${(this.links ?? []).map((link) => {\n const current = where(link.href);\n return html`<li><a href=${link.href} aria-current=${current === 'page' ? 'page' : current === 'section' ? 'true' : nothing} part=\"link\">${link.label}</a></li>`;\n })}\n </ul>\n </nav>`;\n }\n}\n\n/**\n * Where the page sits in the site, as a trail of links back to the top: Home,\n * then Developments, then this page.\n *\n * The last item is the page itself. It is not a link, and it carries\n * `aria-current=\"page\"`. The separators are drawn, not written, so a screen\n * reader reads the trail as a list rather than a string of slashes.\n *\n * @category action\n * @icon breadcrumbs\n */\nexport class ImpktBreadcrumbs extends ImpktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n };\n /** The trail, from the top of the site down to this page. */\n declare items: NavLink[];\n /** What the trail is called for a screen reader. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Breadcrumb';\n }\n\n static styles = [...ImpktElement.styles, focusRing, css`\n :host { display: block; font-size: ${fontSize('sm')}; }\n ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${space(1)}; }\n li { display: inline-flex; align-items: center; gap: ${space(1)}; }\n li + li::before { content: ''; inline-size: 0.45em; block-size: 0.45em; border-block-start: 1.5px solid ${t.textMuted}; border-inline-end: 1.5px solid ${t.textMuted}; transform: rotate(45deg); margin-inline: ${space(1)} ${space(2)}; }\n a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }\n a:hover { color: ${t.linkHover}; }\n [aria-current] { color: ${t.textMuted}; }\n .sr-only { ${visuallyHidden} }\n `];\n\n render(): TemplateResult {\n const items = this.items ?? [];\n return html`<nav aria-label=${this.label} part=\"nav\"><ol>\n ${items.map((item, i) => html`<li>${i === items.length - 1\n ? html`<span aria-current=\"page\">${item.label}</span>`\n : html`<a href=${item.href} part=\"link\">${item.label}</a>`}</li>`)}\n </ol></nav>`;\n }\n}\n\ncustomElements.define('impkt-nav', ImpktNav);\ncustomElements.define('impkt-breadcrumbs', ImpktBreadcrumbs);\ndeclare global { interface HTMLElementTagNameMap { 'impkt-nav': ImpktNav; 'impkt-breadcrumbs': ImpktBreadcrumbs } }\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAaxD,SAAS,MAAM,MAAyC;AAEtD,MAAI,OAAO,aAAa,eAAe,CAAC,QAAQ,KAAK,WAAW,GAAG,EAAG,QAAO;AAC7E,MAAI;AACJ,MAAI;AAAE,WAAO,IAAI,IAAI,MAAM,SAAS,IAAI,EAAE,SAAS,QAAQ,OAAO,EAAE,KAAK;AAAA,EAAK,QAAQ;AAAE,WAAO;AAAA,EAAM;AACrG,QAAM,OAAO,SAAS,SAAS,QAAQ,OAAO,EAAE,KAAK;AACrD,MAAI,SAAS,KAAM,QAAO;AAC1B,SAAO,SAAS,OAAO,KAAK,WAAW,GAA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AAAA,8GACuD,MAAM,CAAC,CAAC;AAAA,2DAC3D,MAAM,CAAC,CAAC;AAAA,8GAC2C,EAAE,SAAS,oCAAoC,EAAE,SAAS,8CAA8C,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAAA,iBACzN,EAAE,IAAI,8EAA8E,EAAE,QAAQ;AAAA,uBACxF,EAAE,SAAS;AAAA,8BACJ,EAAE,SAAS;AAAA,iBACxB,cAAc;AAAA,GAC5B;AAAA;AAAA,EAED,SAAyB;AACvB,UAAM,QAAQ,KAAK,SAAS,CAAC;AAC7B,WAAO,uBAAuB,KAAK,KAAK;AAAA,QACpC,MAAM,IAAI,CAAC,MAAM,MAAM,WAAW,MAAM,MAAM,SAAS,IACrD,iCAAiC,KAAK,KAAK,YAC3C,eAAe,KAAK,IAAI,gBAAgB,KAAK,KAAK,MAAM,OAAO,CAAC;AAAA;AAAA,EAExE;AACF;AAEA,eAAe,OAAO,aAAa,QAAQ;AAC3C,eAAe,OAAO,qBAAqB,gBAAgB;","names":[]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
lockScroll,
|
|
3
|
+
unlockScroll
|
|
4
|
+
} from "./chunk-2YRTFWW2.js";
|
|
1
5
|
import {
|
|
2
6
|
ImpktElement,
|
|
3
7
|
focusRing,
|
|
@@ -5,8 +9,9 @@ import {
|
|
|
5
9
|
fontWeight,
|
|
6
10
|
space,
|
|
7
11
|
t,
|
|
8
|
-
targetSize
|
|
9
|
-
|
|
12
|
+
targetSize,
|
|
13
|
+
touchTarget
|
|
14
|
+
} from "./chunk-3KO55PZK.js";
|
|
10
15
|
|
|
11
16
|
// packages/ui/src/components/dialog.ts
|
|
12
17
|
import { html, css, nothing } from "lit";
|
|
@@ -16,7 +21,8 @@ var ImpktDialog = class extends ImpktElement {
|
|
|
16
21
|
open: { type: Boolean, reflect: true },
|
|
17
22
|
heading: { type: String },
|
|
18
23
|
closeLabel: { type: String, attribute: "close-label" },
|
|
19
|
-
dismissible: { type: Boolean }
|
|
24
|
+
dismissible: { type: Boolean },
|
|
25
|
+
phoneFullScreen: { type: Boolean, reflect: true, attribute: "phone-full-screen" }
|
|
20
26
|
};
|
|
21
27
|
}
|
|
22
28
|
constructor() {
|
|
@@ -25,11 +31,13 @@ var ImpktDialog = class extends ImpktElement {
|
|
|
25
31
|
this.heading = "";
|
|
26
32
|
this.closeLabel = "Close";
|
|
27
33
|
this.dismissible = true;
|
|
34
|
+
this.phoneFullScreen = false;
|
|
28
35
|
}
|
|
29
36
|
static {
|
|
30
37
|
this.styles = [
|
|
31
38
|
...ImpktElement.styles,
|
|
32
39
|
focusRing,
|
|
40
|
+
touchTarget(".close"),
|
|
33
41
|
css`
|
|
34
42
|
dialog {
|
|
35
43
|
padding: 0;
|
|
@@ -65,8 +73,21 @@ var ImpktDialog = class extends ImpktElement {
|
|
|
65
73
|
.body {
|
|
66
74
|
padding: ${space(4)} ${space(5)} ${space(5)};
|
|
67
75
|
}
|
|
76
|
+
@media (max-width: 40rem) {
|
|
77
|
+
:host([phone-full-screen]) dialog {
|
|
78
|
+
inline-size: 100vw;
|
|
79
|
+
max-inline-size: 100vw;
|
|
80
|
+
block-size: 100dvh;
|
|
81
|
+
max-block-size: 100dvh;
|
|
82
|
+
margin: 0;
|
|
83
|
+
border-radius: 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
68
86
|
.close {
|
|
69
87
|
${targetSize}
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
70
91
|
flex: none;
|
|
71
92
|
background: none;
|
|
72
93
|
border: 0;
|
|
@@ -89,12 +110,17 @@ var ImpktDialog = class extends ImpktElement {
|
|
|
89
110
|
if (this.open) {
|
|
90
111
|
if (typeof dialog.showModal === "function") dialog.showModal();
|
|
91
112
|
else dialog.setAttribute("open", "");
|
|
92
|
-
|
|
93
|
-
dialog.close();
|
|
113
|
+
lockScroll(this);
|
|
94
114
|
} else {
|
|
95
|
-
dialog.
|
|
115
|
+
if (typeof dialog.close === "function" && dialog.open) dialog.close();
|
|
116
|
+
else dialog.removeAttribute("open");
|
|
117
|
+
unlockScroll(this);
|
|
96
118
|
}
|
|
97
119
|
}
|
|
120
|
+
disconnectedCallback() {
|
|
121
|
+
super.disconnectedCallback();
|
|
122
|
+
unlockScroll(this);
|
|
123
|
+
}
|
|
98
124
|
close() {
|
|
99
125
|
this.open = false;
|
|
100
126
|
this.dispatchEvent(new CustomEvent("impkt-close", { bubbles: true, composed: true }));
|
|
@@ -129,4 +155,4 @@ customElements.define("impkt-dialog", ImpktDialog);
|
|
|
129
155
|
export {
|
|
130
156
|
ImpktDialog
|
|
131
157
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
158
|
+
//# sourceMappingURL=chunk-KKJEEKL2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/dialog.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, touchTarget } from '../base/styles';\nimport { lockScroll, unlockScroll } from '../base/scroll-lock';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\n/**\n * A modal dialog — \"are you sure you want to leave this order?\".\n *\n * **It is a native `<dialog>` opened with `showModal()`, and that is the whole\n * design.** The platform then provides, correctly and in every browser: a\n * focus trap, Escape to close, the rest of the page made inert so a screen\n * reader cannot wander out of the dialog, rendering in the top layer so no\n * `z-index` can cover it, and focus returned to whatever opened it when it\n * closes.\n *\n * Every one of those is a thing hand-rolled modals get wrong. The focus trap\n * is the famous one, but inertness is the worse failure: a dialog that traps\n * the Tab key but leaves the background in the accessibility tree lets a\n * screen-reader user read straight past it into a page they cannot interact\n * with, and nothing on screen tells them that is what happened.\n *\n * What is left to get right is the labelling. `aria-labelledby` points at the\n * dialog's own heading, so it is announced by name on open rather than as\n * \"dialog\".\n *\n * Two things the platform leaves out are added. The page behind does not scroll\n * while the dialog is open, so a finger on the backdrop does not move the page\n * out from under it. And with `phone-full-screen` the dialog fills a phone's\n * screen, which suits a dialog holding a form; a short question is better left\n * as a box in the middle, which is the default.\n\n *\n * @category feedback\n * @icon dialog\n * @fires {CustomEvent<null>} impkt-close - When the dialog is closed.\n * @slot - The body of the dialog.\n */\nexport class ImpktDialog extends ImpktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n heading: { type: String },\n closeLabel: { type: String, attribute: 'close-label' },\n dismissible: { type: Boolean },\n phoneFullScreen: { type: Boolean, reflect: true, attribute: 'phone-full-screen' },\n };\n\n declare open: boolean;\n declare heading: string;\n declare closeLabel: string;\n /** When false, Escape and the backdrop do not close it — a decision must be made. */\n declare dismissible: boolean;\n /** Fill the screen on a phone, for a dialog that holds a form or a long text. */\n declare phoneFullScreen: boolean;\n\n constructor() {\n super();\n this.open = false;\n this.heading = '';\n this.closeLabel = 'Close';\n this.dismissible = true;\n this.phoneFullScreen = false;\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n touchTarget('.close'),\n css`\n dialog {\n padding: 0;\n border: 0;\n border-radius: ${t.radius2xl};\n background: ${t.surfaceCard};\n color: ${t.text};\n box-shadow: ${t.shadowXl}, 0 0 0 1px ${t.hairline};\n max-inline-size: min(32rem, calc(100vw - 2rem));\n /* 1.4.10 Reflow: a dialog taller than the viewport must scroll inside\n itself rather than clipping, at 320px and at 400% zoom alike. */\n max-block-size: calc(100vh - 2rem);\n overflow: auto;\n }\n dialog::backdrop {\n background: color-mix(in srgb, ${t.text} 30%, transparent);\n backdrop-filter: blur(2px);\n }\n .head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: ${space(3)};\n padding: ${space(5)} ${space(5)} 0;\n }\n .heading {\n margin: 0;\n font-family: ${t.fontHeading};\n font-size: ${fontSize('xl')};\n font-weight: ${fontWeight('bold')};\n color: ${t.textHeading};\n }\n .body {\n padding: ${space(4)} ${space(5)} ${space(5)};\n }\n @media (max-width: 40rem) {\n :host([phone-full-screen]) dialog {\n inline-size: 100vw;\n max-inline-size: 100vw;\n block-size: 100dvh;\n max-block-size: 100dvh;\n margin: 0;\n border-radius: 0;\n }\n }\n .close {\n ${targetSize}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n background: none;\n border: 0;\n border-radius: ${t.radius};\n font: inherit;\n font-size: ${fontSize('lg')};\n color: ${t.text};\n cursor: pointer;\n }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n // happy-dom and older engines do not implement showModal. Falling back to\n // the `open` attribute renders a NON-modal dialog — no focus trap, no\n // inert background — so it is used only to keep tests and ancient browsers\n // from throwing, never as an equivalent.\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private close(): void {\n this.open = false;\n this.dispatchEvent(new CustomEvent('impkt-close', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n return html`\n <dialog\n part=\"dialog\"\n aria-labelledby=${this.heading ? this.id_('heading') : nothing}\n @cancel=${(e: Event) => {\n // `cancel` fires on Escape. Blocking it is what makes a dialog\n // non-dismissible, and it is why `dismissible` exists rather than\n // leaving a caller to re-open on close.\n if (!this.dismissible) e.preventDefault();\n else this.close();\n }}\n @close=${() => { if (this.open) this.close(); }}\n >\n <div class=\"head\">\n ${this.heading\n ? html`<h2 class=\"heading\" id=${this.id_('heading')} part=\"heading\">${this.heading}</h2>`\n : nothing}\n ${this.dismissible\n ? html`<button class=\"close\" part=\"close\" type=\"button\" @click=${this.close}>\n <span aria-hidden=\"true\">×</span>\n <span class=\"sr-only\" style=\"position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)\">${this.closeLabel}</span>\n </button>`\n : nothing}\n </div>\n <div class=\"body\" part=\"body\"><slot></slot></div>\n </dialog>\n `;\n }\n}\n\ncustomElements.define('impkt-dialog', ImpktDialog);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-dialog': ImpktDialog }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAsCjD,IAAM,cAAN,cAA0B,aAAa;AAAA,EAC5C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACrC,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,aAAa,EAAE,MAAM,QAAQ;AAAA,MAC7B,iBAAiB,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,oBAAoB;AAAA,IAClF;AAAA;AAAA,EAUA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,aAAa;AAClB,SAAK,cAAc;AACnB,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA,YAAY,QAAQ;AAAA,MACpB;AAAA;AAAA;AAAA;AAAA,yBAIqB,EAAE,SAAS;AAAA,sBACd,EAAE,WAAW;AAAA,iBAClB,EAAE,IAAI;AAAA,sBACD,EAAE,QAAQ,eAAe,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAQhB,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOhC,MAAM,CAAC,CAAC;AAAA,mBACJ,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,uBAIhB,EAAE,WAAW;AAAA,qBACf,SAAS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AAC,KAAK,YAAa,GAAE,eAAe;AAAA,UACnC,MAAK,MAAM;AAAA,IAClB,CAAC;AAAA,iBACQ,MAAM;AAAE,UAAI,KAAK,KAAM,MAAK,MAAM;AAAA,IAAG,CAAC;AAAA;AAAA;AAAA,YAG3C,KAAK,UACH,8BAA8B,KAAK,IAAI,SAAS,CAAC,mBAAmB,KAAK,OAAO,UAChF,OAAO;AAAA,YACT,KAAK,cACH,+DAA+D,KAAK,KAAK;AAAA;AAAA,4HAEqC,KAAK,UAAU;AAAA,2BAE7H,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnB;AACF;AAEA,eAAe,OAAO,gBAAgB,WAAW;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
focusRing,
|
|
4
4
|
fontWeight,
|
|
5
5
|
t
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3KO55PZK.js";
|
|
7
7
|
|
|
8
8
|
// packages/ui/src/components/help.ts
|
|
9
9
|
import { html, css, nothing } from "lit";
|
|
@@ -81,4 +81,4 @@ customElements.define("impkt-help", ImpktHelp);
|
|
|
81
81
|
export {
|
|
82
82
|
ImpktHelp
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-KMCGX76Y.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpktElement,
|
|
3
3
|
t
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3KO55PZK.js";
|
|
5
5
|
|
|
6
6
|
// packages/ui/src/components/icon.ts
|
|
7
7
|
import { css, html, nothing, svg } from "lit";
|
|
@@ -13,6 +13,8 @@ var ICONS = {
|
|
|
13
13
|
check: svg`<path d="M5 12.5l4.5 4.5L19 7"/>`,
|
|
14
14
|
close: svg`<path d="M6 6l12 12M18 6L6 18"/>`,
|
|
15
15
|
menu: svg`<path d="M4 7h16M4 12h16M4 17h16"/>`,
|
|
16
|
+
/** Two lines: a menu drawn quieter, as a round icon button. */
|
|
17
|
+
"menu-two": svg`<path d="M5 9.5h14M5 14.5h14"/>`,
|
|
16
18
|
plus: svg`<path d="M12 5v14M5 12h14"/>`,
|
|
17
19
|
minus: svg`<path d="M5 12h14"/>`,
|
|
18
20
|
search: svg`<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4 4"/>`,
|
|
@@ -82,4 +84,4 @@ export {
|
|
|
82
84
|
iconSvg,
|
|
83
85
|
ImpktIcon
|
|
84
86
|
};
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-NKMVICB5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/icon.ts"],"sourcesContent":["import { css, html, nothing, svg, type SVGTemplateResult, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { t } from '../base/tokens';\n\n/**\n * The icons the library draws, each on a 24 by 24 grid in strokes of the\n * current text colour. Kept to a set the components need and editors reach\n * for, so an icon always matches the line weight of the ones beside it.\n */\nexport const ICONS = {\n 'arrow-right': svg`<path d=\"M5 12h14M13 6l6 6-6 6\"/>`,\n 'arrow-left': svg`<path d=\"M19 12H5M11 6l-6 6 6 6\"/>`,\n 'chevron-right': svg`<path d=\"M9 6l6 6-6 6\"/>`,\n 'chevron-down': svg`<path d=\"M6 9l6 6 6-6\"/>`,\n check: svg`<path d=\"M5 12.5l4.5 4.5L19 7\"/>`,\n close: svg`<path d=\"M6 6l12 12M18 6L6 18\"/>`,\n menu: svg`<path d=\"M4 7h16M4 12h16M4 17h16\"/>`,\n /** Two lines: a menu drawn quieter, as a round icon button. */\n 'menu-two': svg`<path d=\"M5 9.5h14M5 14.5h14\"/>`,\n plus: svg`<path d=\"M12 5v14M5 12h14\"/>`,\n minus: svg`<path d=\"M5 12h14\"/>`,\n search: svg`<circle cx=\"11\" cy=\"11\" r=\"6.5\"/><path d=\"M16 16l4 4\"/>`,\n external: svg`<path d=\"M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5\"/>`,\n download: svg`<path d=\"M12 4v11M7 10l5 5 5-5M5 20h14\"/>`,\n home: svg`<path d=\"M4 11l8-7 8 7M6 9.5V20h12V9.5\"/><path d=\"M10 20v-6h4v6\"/>`,\n phone: svg`<path d=\"M7 3.5h3l1.5 4-2 1.5a11 11 0 0 0 5.5 5.5l1.5-2 4 1.5v3a2 2 0 0 1-2 2A16 16 0 0 1 5 5.5a2 2 0 0 1 2-2z\"/>`,\n mail: svg`<rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"1.5\"/><path d=\"M4 7l8 6 8-6\"/>`,\n 'map-pin': svg`<path d=\"M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z\"/><circle cx=\"12\" cy=\"10\" r=\"2.5\"/>`,\n calendar: svg`<rect x=\"4\" y=\"5.5\" width=\"16\" height=\"14.5\" rx=\"1.5\"/><path d=\"M4 10h16M8.5 3.5v4M15.5 3.5v4\"/>`,\n clock: svg`<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 7.5V12l3 2\"/>`,\n user: svg`<circle cx=\"12\" cy=\"8.5\" r=\"3.5\"/><path d=\"M5 20a7 7 0 0 1 14 0\"/>`,\n star: svg`<path d=\"M12 4l2.4 5 5.4.6-4 3.7 1.1 5.4L12 16l-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z\"/>`,\n heart: svg`<path d=\"M12 19.5s-7.5-4.6-7.5-10A4 4 0 0 1 12 7a4 4 0 0 1 7.5 2.5c0 5.4-7.5 10-7.5 10z\"/>`,\n shield: svg`<path d=\"M12 3.5l7 2.5v5.5c0 4.5-3 7.8-7 9-4-1.2-7-4.5-7-9V6z\"/><path d=\"M9 12l2 2 4-4\"/>`,\n leaf: svg`<path d=\"M5 19c0-8 5-13 14-14 0 9-5 14-13 14z\"/><path d=\"M5 19l7-7\"/>`,\n sun: svg`<circle cx=\"12\" cy=\"12\" r=\"3.5\"/><path d=\"M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6L7 7M17 17l1.4 1.4M5.6 18.4L7 17M17 7l1.4-1.4\"/>`,\n bolt: svg`<path d=\"M13 3L5 13.5h6L10 21l8-10.5h-6z\"/>`,\n key: svg`<circle cx=\"8\" cy=\"15\" r=\"3.5\"/><path d=\"M10.5 12.5L19 4M16 7l2.5 2.5M14 9l2 2\"/>`,\n info: svg`<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 11v5.5M12 7.5v.5\"/>`,\n warning: svg`<path d=\"M12 4l9 15.5H3z\"/><path d=\"M12 10v4M12 16.5v.5\"/>`,\n document: svg`<path d=\"M6 3.5h8l4 4V20a.5.5 0 0 1-.5.5h-11A.5.5 0 0 1 6 20z\"/><path d=\"M14 3.5V8h4M9 13h6M9 16.5h6\"/>`,\n pound: svg`<path d=\"M16 6.5a3.5 3.5 0 0 0-6.5 1.8V20M7 13h7M7 20h10\"/>`,\n chat: svg`<path d=\"M4.5 5.5h15v10h-9l-4 3.5v-3.5h-2z\"/>`,\n} as const satisfies Record<string, SVGTemplateResult>;\n\nexport type IconName = keyof typeof ICONS;\nexport const ICON_NAMES = Object.keys(ICONS) as IconName[];\n\n/** An icon as markup, for components that draw one beside their own words. Always decorative. */\nexport function iconSvg(name: string | undefined, size = '1.25em'): TemplateResult | typeof nothing {\n const shape = name ? ICONS[name as IconName] : undefined;\n if (!shape) return nothing;\n return html`<svg class=\"icon\" viewBox=\"0 0 24 24\" width=${size} height=${size} fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">${shape}</svg>`;\n}\n\n/**\n * A small picture that stands for something: a phone beside a number, a tick\n * beside a benefit.\n *\n * **An icon is decorative unless it is labelled.** With no `label` it is\n * hidden from screen readers, because the words beside it already say what it\n * means. Give it a label only when it stands alone and carries meaning (1.1.1).\n *\n * @category media\n * @icon star\n */\nexport class ImpktIcon extends ImpktElement {\n static properties = {\n name: { type: String, reflect: true },\n label: { type: String },\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n };\n /** Which icon. */\n declare name: 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';\n /** What the icon means, when it stands alone. Leave empty when words beside it say the same. */\n declare label: string;\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** The icon's colour. */\n declare tone: 'inherit' | 'brand' | 'muted';\n\n constructor() {\n super();\n this.name = 'star';\n this.label = '';\n this.size = 'md';\n this.tone = 'inherit';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: inline-flex; vertical-align: middle; line-height: 0; }\n :host([tone='brand']) { color: ${t.brand}; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n @media (forced-colors: active) { :host { color: CanvasText; } }\n `];\n\n render(): TemplateResult {\n const size = { sm: '16px', md: '24px', lg: '32px', xl: '48px' }[this.size] ?? '24px';\n const drawn = iconSvg(this.name, size);\n return this.label ? html`<span role=\"img\" aria-label=${this.label}>${drawn}</span>` : html`${drawn}`;\n }\n}\n\ncustomElements.define('impkt-icon', ImpktIcon);\ndeclare global { interface HTMLElementTagNameMap { 'impkt-icon': ImpktIcon } }\n"],"mappings":";;;;;;AAAA,SAAS,KAAK,MAAM,SAAS,WAAwD;AAS9E,IAAM,QAAQ;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA;AAAA,E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I,OAAO,EAAE,KAAK,IAAI,KAAK;AAC9E,UAAM,QAAQ,QAAQ,KAAK,MAAM,IAAI;AACrC,WAAO,KAAK,QAAQ,mCAAmC,KAAK,KAAK,IAAI,KAAK,YAAY,OAAO,KAAK;AAAA,EACpG;AACF;AAEA,eAAe,OAAO,cAAc,SAAS;","names":[]}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pageLocale
|
|
3
|
+
} from "./chunk-3IGNZTJU.js";
|
|
1
4
|
import {
|
|
2
5
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NKMVICB5.js";
|
|
4
7
|
import {
|
|
5
8
|
ImpktElement,
|
|
6
9
|
focusRing,
|
|
7
10
|
fontWeight,
|
|
11
|
+
say,
|
|
8
12
|
space,
|
|
9
13
|
spaceAround,
|
|
10
14
|
t,
|
|
11
15
|
targetSize,
|
|
12
16
|
type
|
|
13
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3KO55PZK.js";
|
|
14
18
|
|
|
15
19
|
// packages/ui/src/components/property.ts
|
|
16
20
|
import { css, html, nothing } from "lit";
|
|
@@ -180,7 +184,7 @@ var ImpktMortgageCalculator = class extends ImpktElement {
|
|
|
180
184
|
}
|
|
181
185
|
money(amount) {
|
|
182
186
|
try {
|
|
183
|
-
return new Intl.NumberFormat(
|
|
187
|
+
return new Intl.NumberFormat(pageLocale(this), { style: "currency", currency: this.currency, maximumFractionDigits: 0 }).format(amount);
|
|
184
188
|
} catch {
|
|
185
189
|
return String(Math.round(amount));
|
|
186
190
|
}
|
|
@@ -197,19 +201,19 @@ var ImpktMortgageCalculator = class extends ImpktElement {
|
|
|
197
201
|
return html`<div class="wrap" part="wrap">
|
|
198
202
|
<div class="inputs">
|
|
199
203
|
${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
|
|
200
|
-
<div><label for=${this.id_("price")}
|
|
201
|
-
<div><label for=${this.id_("deposit")}
|
|
204
|
+
<div><label for=${this.id_("price")}>${say("Home price")}</label><input id=${this.id_("price")} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this.price)} @input=${this.field("price")} /></div>
|
|
205
|
+
<div><label for=${this.id_("deposit")}>${say("Deposit")} <span class="read">${this.depositPercent}% · ${this.money(deposit)}</span></label><input id=${this.id_("deposit")} type="range" min="5" max="60" step="1" .value=${String(this.depositPercent)} @input=${this.field("depositPercent")} /></div>
|
|
202
206
|
<div class="two">
|
|
203
|
-
<div><label for=${this.id_("years")}
|
|
204
|
-
<div><label for=${this.id_("rate")}
|
|
207
|
+
<div><label for=${this.id_("years")}>${say("Term")} <span class="read">${say("{years} years", { years: this.years })}</span></label><input id=${this.id_("years")} type="range" min="5" max="40" step="1" .value=${String(this.years)} @input=${this.field("years")} /></div>
|
|
208
|
+
<div><label for=${this.id_("rate")}>${say("Interest rate (%)")}</label><input id=${this.id_("rate")} type="number" min="0" max="20" step="0.05" inputmode="decimal" .value=${String(this.rate)} @input=${this.field("rate")} /></div>
|
|
205
209
|
</div>
|
|
206
210
|
</div>
|
|
207
211
|
<div class="result">
|
|
208
|
-
<p class="caption"
|
|
212
|
+
<p class="caption">${say("Estimated monthly repayment")}</p>
|
|
209
213
|
<output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(monthly)}</output>
|
|
210
214
|
<dl>
|
|
211
|
-
<div><dt
|
|
212
|
-
<div><dt
|
|
215
|
+
<div><dt>${say("You would borrow")}</dt><dd>${this.money(loan)}</dd></div>
|
|
216
|
+
<div><dt>${say("Total repayable")}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>
|
|
213
217
|
</dl>
|
|
214
218
|
</div>
|
|
215
219
|
${this.smallPrint ? html`<p class="small">${this.smallPrint}</p>` : nothing}
|
|
@@ -421,4 +425,4 @@ export {
|
|
|
421
425
|
ImpktStickyBar,
|
|
422
426
|
ImpktLocationCard
|
|
423
427
|
};
|
|
424
|
-
//# sourceMappingURL=chunk-
|
|
428
|
+
//# sourceMappingURL=chunk-OFLMG6RN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/property.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say } from '../base/say';\nimport { pageLocale } from '../base/locale';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontWeight, space, spaceAround, t, type } from '../base/tokens';\nimport { iconSvg } from './icon';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, £385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires {CustomEvent<{ plot: SitePlot }>} impkt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpktSitePlan extends ImpktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: 999px; }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.textMuted}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impkt-solid-card, ${t.surfaceCard}); --plan-text: var(--impkt-solid-text, ${t.text}); --plan-heading: var(--impkt-solid-heading, ${t.text}); --plan-muted: var(--impkt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impkt-color-surface-card: var(--plan-card); --impkt-color-text-default: var(--plan-text); --impkt-color-text-heading: var(--plan-heading); --impkt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen) this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impkt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' · ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpktMortgageCalculator extends ImpktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.textMuted}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => { this[key] = Number((event.target as HTMLInputElement).value) || 0; };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% · ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpktBeforeAfter extends ImpktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => { this.position = Number((e.target as HTMLInputElement).value); }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpktStickyBar extends ImpktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [...ImpktElement.styles, focusRing, css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impkt-bottom-bar', height);\n else root.removeProperty('--impkt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpktLocationCard extends ImpktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\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 address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impkt-site-plan', ImpktSitePlan);\ncustomElements.define('impkt-mortgage-calculator', ImpktMortgageCalculator);\ncustomElements.define('impkt-before-after', ImpktBeforeAfter);\ncustomElements.define('impkt-sticky-bar', ImpktStickyBar);\ncustomElements.define('impkt-location-card', ImpktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-site-plan': ImpktSitePlan; 'impkt-mortgage-calculator': ImpktMortgageCalculator; 'impkt-before-after': ImpktBeforeAfter;\n 'impkt-sticky-bar': ImpktStickyBar; 'impkt-location-card': ImpktLocationCard;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAoCjD,IAAM,gBAAN,cAA4B,aAAa;AAAA,EAC9C;AAAA,SAAO,aAAa;AAAA,MAClB,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACrC,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,eAAe,EAAE,MAAM,QAAQ,WAAW,iBAAiB;AAAA,MAC3D,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,YAAY,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,cAAc;AAAA,MACpE,YAAY,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,cAAc;AAAA,IACtE;AAAA;AAAA,EAoBA,cAAc;AACZ,UAAM;AACN,SAAK,WAAW;AAChB,SAAK,WAAW;AAChB,SAAK,QAAQ,CAAC;AACd,SAAK,OAAO;AACZ,S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