@atomic-ui/ui 0.3.0 → 0.5.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 +31 -33
- package/custom-elements.json +5986 -15880
- package/dist/base/FieldElement.d.ts +4 -4
- package/dist/base/{ImpktElement.d.ts → ImpaktElement.d.ts} +2 -2
- package/dist/base/styles.d.ts +7 -0
- package/dist/base/tokens.d.ts +1 -1
- package/dist/base/tone.d.ts +20 -0
- package/dist/{chunk-3RE4H2XO.js → chunk-3EF4T242.js} +7 -7
- package/dist/chunk-3EF4T242.js.map +1 -0
- package/dist/{chunk-NKMVICB5.js → chunk-5Y3HYRCU.js} +7 -7
- package/dist/chunk-5Y3HYRCU.js.map +1 -0
- package/dist/{chunk-ZOTAAYO5.js → chunk-5ZQVL3V2.js} +19 -12
- package/dist/chunk-5ZQVL3V2.js.map +1 -0
- package/dist/{chunk-4OYHT4BN.js → chunk-A7YBFS4H.js} +15 -15
- package/dist/chunk-A7YBFS4H.js.map +1 -0
- package/dist/{chunk-WGPB3QQU.js → chunk-ACQ4KYPR.js} +9 -9
- package/dist/chunk-ACQ4KYPR.js.map +1 -0
- package/dist/{chunk-DAH7RLW3.js → chunk-DE3INTHZ.js} +6 -6
- package/dist/chunk-DE3INTHZ.js.map +1 -0
- package/dist/{chunk-HXINWP3V.js → chunk-EJD6LT7E.js} +20 -83
- package/dist/chunk-EJD6LT7E.js.map +1 -0
- package/dist/{chunk-P6GDMZK4.js → chunk-EJSX4WCD.js} +9 -9
- package/dist/chunk-EJSX4WCD.js.map +1 -0
- package/dist/chunk-FMSC7J7J.js +76 -0
- package/dist/chunk-FMSC7J7J.js.map +1 -0
- package/dist/{chunk-46BYUQ5A.js → chunk-FWR6SEIA.js} +33 -33
- package/dist/chunk-FWR6SEIA.js.map +1 -0
- package/dist/{chunk-CUUBAETM.js → chunk-GJPHQLLN.js} +8 -8
- package/dist/chunk-GJPHQLLN.js.map +1 -0
- package/dist/{chunk-R7FKGFW6.js → chunk-HNBG2POR.js} +7 -7
- package/dist/chunk-HNBG2POR.js.map +1 -0
- package/dist/{chunk-DKZ425AM.js → chunk-HNZQ7LM4.js} +11 -11
- package/dist/chunk-HNZQ7LM4.js.map +1 -0
- package/dist/{chunk-55DK75QF.js → chunk-I54DOEZB.js} +6 -6
- package/dist/chunk-I54DOEZB.js.map +1 -0
- package/dist/{chunk-J2FACXYI.js → chunk-PANH23MF.js} +12 -12
- package/dist/chunk-PANH23MF.js.map +1 -0
- package/dist/{chunk-KKJEEKL2.js → chunk-PYVUQNFQ.js} +8 -8
- package/dist/chunk-PYVUQNFQ.js.map +1 -0
- package/dist/{chunk-RWWRTURA.js → chunk-Q54FX3SY.js} +8 -8
- package/dist/chunk-Q54FX3SY.js.map +1 -0
- package/dist/{chunk-AUVIOU5G.js → chunk-QBORJTS4.js} +36 -36
- package/dist/chunk-QBORJTS4.js.map +1 -0
- package/dist/{chunk-5QSTXIPG.js → chunk-RXX4CN5J.js} +7 -7
- package/dist/chunk-RXX4CN5J.js.map +1 -0
- package/dist/{chunk-XPCU4KUY.js → chunk-SV77SN6P.js} +7 -7
- package/dist/chunk-SV77SN6P.js.map +1 -0
- package/dist/{chunk-FVCM4WHD.js → chunk-TAZZLOUY.js} +10 -10
- package/dist/chunk-TAZZLOUY.js.map +1 -0
- package/dist/{chunk-KMCGX76Y.js → chunk-TRZO5CHU.js} +7 -7
- package/dist/chunk-TRZO5CHU.js.map +1 -0
- package/dist/{chunk-F4YQWKK2.js → chunk-UPOTBKKK.js} +7 -7
- package/dist/chunk-UPOTBKKK.js.map +1 -0
- package/dist/{chunk-APJ5JGRW.js → chunk-WP5WJ4V5.js} +6 -6
- package/dist/chunk-WP5WJ4V5.js.map +1 -0
- package/dist/{chunk-TCXKZDMR.js → chunk-WS5AUJ35.js} +7 -7
- package/dist/chunk-WS5AUJ35.js.map +1 -0
- package/dist/{chunk-7P4Z4CLK.js → chunk-WWYYNR3Z.js} +50 -49
- package/dist/chunk-WWYYNR3Z.js.map +1 -0
- package/dist/{chunk-RYBY35QE.js → chunk-XU2XODVH.js} +6 -6
- package/dist/chunk-XU2XODVH.js.map +1 -0
- package/dist/{chunk-3KO55PZK.js → chunk-YR6T73GY.js} +18 -11
- package/dist/chunk-YR6T73GY.js.map +1 -0
- package/dist/{chunk-IOBSIAHB.js → chunk-YYYQPKQ7.js} +24 -24
- package/dist/chunk-YYYQPKQ7.js.map +1 -0
- package/dist/{chunk-PO6FCAIS.js → chunk-Z45LY6BT.js} +9 -9
- package/dist/chunk-Z45LY6BT.js.map +1 -0
- package/dist/{chunk-DJEZW7AC.js → chunk-ZQBEFP2O.js} +7 -7
- package/dist/chunk-ZQBEFP2O.js.map +1 -0
- package/dist/chunk-ZS7RPXCT.js +47 -0
- package/dist/chunk-ZS7RPXCT.js.map +1 -0
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +4 -4
- package/dist/components/alert.d.ts +3 -3
- package/dist/components/alert.js +4 -4
- package/dist/components/app-ui.d.ts +25 -25
- package/dist/components/app-ui.js +21 -21
- package/dist/components/badge.d.ts +37 -0
- package/dist/components/badge.js +9 -0
- package/dist/components/blocks.d.ts +10 -73
- package/dist/components/blocks.js +10 -13
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.js +5 -5
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +5 -5
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +5 -5
- package/dist/components/chip.d.ts +58 -0
- package/dist/components/chip.js +8 -0
- package/dist/components/date-input.d.ts +2 -2
- package/dist/components/date-input.js +5 -5
- package/dist/components/dialog.d.ts +4 -4
- package/dist/components/dialog.js +4 -4
- package/dist/components/fieldset.d.ts +3 -3
- package/dist/components/fieldset.js +4 -4
- package/dist/components/grid.d.ts +3 -3
- package/dist/components/grid.js +4 -4
- package/dist/components/help.d.ts +3 -3
- package/dist/components/help.js +4 -4
- package/dist/components/icon.d.ts +3 -3
- package/dist/components/icon.js +4 -4
- package/dist/components/journey.d.ts +18 -18
- package/dist/components/journey.js +15 -15
- package/dist/components/layout.d.ts +9 -9
- package/dist/components/layout.js +10 -10
- package/dist/components/link.d.ts +3 -3
- package/dist/components/link.js +5 -5
- package/dist/components/list.d.ts +3 -3
- package/dist/components/list.js +4 -4
- package/dist/components/media.d.ts +8 -8
- package/dist/components/media.js +8 -8
- package/dist/components/navigation.d.ts +5 -5
- package/dist/components/navigation.js +7 -7
- package/dist/components/page.d.ts +5 -5
- package/dist/components/page.js +6 -6
- package/dist/components/price.d.ts +3 -3
- package/dist/components/price.js +4 -4
- package/dist/components/progress.d.ts +3 -3
- package/dist/components/progress.js +4 -4
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +5 -5
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +5 -5
- package/dist/components/summary-list.d.ts +3 -3
- package/dist/components/summary-list.js +4 -4
- package/dist/components/table.d.ts +6 -6
- package/dist/components/table.js +5 -5
- package/dist/components/text-input.d.ts +2 -2
- package/dist/components/text-input.js +5 -5
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +5 -5
- package/dist/index.d.ts +47 -40
- package/dist/index.js +206 -270
- package/dist/standalone/atomic-ui.js +796 -2002
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/dist/standalone/index.html +51 -52
- package/package.json +4 -4
- package/specimen/index.html +51 -52
- package/dist/chunk-37PA72FC.js +0 -725
- package/dist/chunk-37PA72FC.js.map +0 -1
- package/dist/chunk-3KO55PZK.js.map +0 -1
- package/dist/chunk-3RE4H2XO.js.map +0 -1
- package/dist/chunk-46BYUQ5A.js.map +0 -1
- package/dist/chunk-4OYHT4BN.js.map +0 -1
- package/dist/chunk-55DK75QF.js.map +0 -1
- package/dist/chunk-5QSTXIPG.js.map +0 -1
- package/dist/chunk-7P4Z4CLK.js.map +0 -1
- package/dist/chunk-APJ5JGRW.js.map +0 -1
- package/dist/chunk-AUVIOU5G.js.map +0 -1
- package/dist/chunk-CUUBAETM.js.map +0 -1
- package/dist/chunk-DAH7RLW3.js.map +0 -1
- package/dist/chunk-DJEZW7AC.js.map +0 -1
- package/dist/chunk-DKZ425AM.js.map +0 -1
- package/dist/chunk-F4YQWKK2.js.map +0 -1
- package/dist/chunk-FVCM4WHD.js.map +0 -1
- package/dist/chunk-GBRML4RF.js +0 -264
- package/dist/chunk-GBRML4RF.js.map +0 -1
- package/dist/chunk-HXINWP3V.js.map +0 -1
- package/dist/chunk-IOBSIAHB.js.map +0 -1
- package/dist/chunk-IZOTGWWI.js +0 -361
- package/dist/chunk-IZOTGWWI.js.map +0 -1
- package/dist/chunk-J2FACXYI.js.map +0 -1
- package/dist/chunk-KKJEEKL2.js.map +0 -1
- package/dist/chunk-KMCGX76Y.js.map +0 -1
- package/dist/chunk-NKMVICB5.js.map +0 -1
- package/dist/chunk-OFLMG6RN.js +0 -428
- package/dist/chunk-OFLMG6RN.js.map +0 -1
- package/dist/chunk-P6GDMZK4.js.map +0 -1
- package/dist/chunk-PO6FCAIS.js.map +0 -1
- package/dist/chunk-PWLZFGS3.js +0 -494
- package/dist/chunk-PWLZFGS3.js.map +0 -1
- package/dist/chunk-QJIB36DM.js +0 -249
- package/dist/chunk-QJIB36DM.js.map +0 -1
- package/dist/chunk-R7FKGFW6.js.map +0 -1
- package/dist/chunk-RWWRTURA.js.map +0 -1
- package/dist/chunk-RYBY35QE.js.map +0 -1
- package/dist/chunk-S7F5VKWU.js +0 -453
- package/dist/chunk-S7F5VKWU.js.map +0 -1
- package/dist/chunk-T5W3FDSF.js +0 -396
- package/dist/chunk-T5W3FDSF.js.map +0 -1
- package/dist/chunk-TCXKZDMR.js.map +0 -1
- package/dist/chunk-WGPB3QQU.js.map +0 -1
- package/dist/chunk-XPCU4KUY.js.map +0 -1
- package/dist/chunk-YRYZUYY7.js +0 -236
- package/dist/chunk-YRYZUYY7.js.map +0 -1
- package/dist/chunk-ZOTAAYO5.js.map +0 -1
- package/dist/components/changelog.d.ts +0 -386
- package/dist/components/changelog.js +0 -25
- package/dist/components/estimator.d.ts +0 -246
- package/dist/components/estimator.js +0 -16
- package/dist/components/marketing.d.ts +0 -370
- package/dist/components/marketing.js +0 -21
- package/dist/components/marketing.js.map +0 -1
- package/dist/components/organisms.d.ts +0 -559
- package/dist/components/organisms.js +0 -25
- package/dist/components/organisms.js.map +0 -1
- package/dist/components/property.d.ts +0 -389
- package/dist/components/property.js +0 -20
- package/dist/components/property.js.map +0 -1
- package/dist/components/scene.d.ts +0 -138
- package/dist/components/scene.js +0 -8
- package/dist/components/scene.js.map +0 -1
- package/dist/components/scrubber.d.ts +0 -86
- package/dist/components/scrubber.js +0 -8
- package/dist/components/scrubber.js.map +0 -1
- package/dist/components/selling.d.ts +0 -409
- package/dist/components/selling.js +0 -25
- package/dist/components/selling.js.map +0 -1
- package/dist/components/site.d.ts +0 -283
- package/dist/components/site.js +0 -20
- package/dist/components/site.js.map +0 -1
- /package/dist/components/{changelog.js.map → badge.js.map} +0 -0
- /package/dist/components/{estimator.js.map → chip.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/blocks.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, touchTarget, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, lineHeight, space, spaceAround, t } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/**\n * A line between two parts of a page.\n *\n * It is decoration, so a screen reader passes over it. Where the change of\n * subject matters, a heading says so better.\n *\n * @category layout\n * @icon divider\n */\nexport class ImpktDivider extends ImpktElement {\n static properties = {\n spacing: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n };\n /** Space above and below the line. */\n declare spacing: 'sm' | 'md' | 'lg' | 'xl';\n declare tone: 'subtle' | 'strong';\n\n constructor() {\n super();\n this.spacing = 'md';\n this.tone = 'subtle';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: block; }\n hr { margin: ${space(4)} 0; border: 0; border-block-start: ${t.borderThin} solid ${t.border}; opacity: 0.5; }\n :host([tone='strong']) hr { opacity: 1; border-block-start-width: ${t.borderThick}; }\n :host([spacing='sm']) hr { margin-block: ${space(2)}; }\n :host([spacing='lg']) hr { margin-block: ${space(8)}; }\n :host([spacing='xl']) hr { margin-block: ${space(12)}; }\n `];\n\n render(): TemplateResult {\n return html`<hr aria-hidden=\"true\" part=\"line\" />`;\n }\n}\n\n/**\n * Empty space, from the spacing scale, for the rare place where the gaps of the\n * containers around it are not enough.\n *\n * @category layout\n * @icon spacer\n */\nexport class ImpktSpacer extends ImpktElement {\n static properties = { size: { type: String, reflect: true } };\n declare size: 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.size = 'md';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: block; block-size: ${space(4)}; }\n :host([size='sm']) { block-size: ${space(2)}; }\n :host([size='lg']) { block-size: ${space(8)}; }\n :host([size='xl']) { block-size: ${space(12)}; }\n :host([size='2xl']) { block-size: ${space(16)}; }\n `];\n\n render(): TemplateResult {\n return html``;\n }\n}\n\n/**\n * Words a screen reader says that are not shown: \"(opens a map)\" after a link\n * whose purpose is clear on screen from where it sits.\n *\n * @category typography\n * @icon hidden\n * @slot - The words to say.\n */\nexport class ImpktVisuallyHidden extends ImpktElement {\n static styles = [...ImpktElement.styles, css`:host { ${visuallyHidden} }`];\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/** One tab and what it shows. */\nexport interface TabItem {\n id: string;\n label: string;\n /** The panel's words. A child with `slot` set to the tab's id is shown instead, for anything richer. */\n body: string;\n}\n\n/**\n * Panels of content behind a row of tabs, one shown at a time: the floor plans\n * of three house types, or a case's summary, tasks and files.\n *\n * It follows the ARIA tabs pattern. The tabs are one stop in the tab order,\n * the arrow keys, Home and End move between them, and each panel is labelled\n * by its tab. Use an accordion instead when someone may want to compare panels.\n *\n * **The tabs stay on one row** and scroll sideways when they do not fit, as the\n * design guide sets, and the chosen tab is scrolled into view, so on a phone it\n * is never hidden off the edge. With `two-rows`, a set of more than four tabs is\n * laid out in two rows on a narrow screen instead, so every tab can be seen.\n *\n * **The chosen tab is kept** when the tabs are given again, as a React or Vue app\n * does on every render, so long as a tab with that id is still there.\n *\n * A panel shows its item's `body`, or a child whose `slot` is the item's id.\n *\n * @category content\n * @icon tabs\n * @slot - A child with `slot` set to a tab's id is that tab's panel.\n * @fires {CustomEvent<{ value: string }>} impkt-change - When another tab is chosen.\n */\nexport class ImpktTabs extends ImpktElement {\n static properties = {\n items: { type: Array },\n selected: { type: String, reflect: true },\n label: { type: String },\n twoRows: { type: Boolean, reflect: true, attribute: 'two-rows' },\n };\n declare items: TabItem[];\n /** The id of the tab shown first. The first tab when it is empty. */\n declare selected: string;\n /** What the set of tabs is about, for a screen reader. */\n declare label: string;\n /** On a narrow screen, lay more than four tabs out in two rows rather than scroll them. */\n declare twoRows: boolean;\n\n constructor() {\n super();\n this.items = [];\n this.selected = '';\n this.label = '';\n this.twoRows = false;\n }\n\n static styles = [...ImpktElement.styles, focusRing, touchTarget(\"[role='tab']\"), css`\n :host { display: block; container-type: inline-size; }\n [role='tablist'] { display: flex; gap: ${space(1)}; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }\n [role='tab'] { ${targetSize} flex: none; padding: ${space(3)} ${space(4)}; font: inherit; font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: ${t.textMuted}; background: transparent; border: 0; border-block-end: 3px solid transparent; margin-block-end: -1px; cursor: pointer; border-radius: ${t.radius} ${t.radius} 0 0; }\n /* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */\n [role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }\n [role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }\n [role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }\n [role='tabpanel'] { padding-block: ${space(5)}; line-height: ${lineHeight('normal')}; }\n .body { white-space: pre-line; }\n @container (max-width: 40rem) {\n :host([two-rows]) [role='tablist'].many { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); overflow: visible; border-block-end: 0; gap: ${space(1)}; }\n :host([two-rows]) .many [role='tab'] { white-space: normal; padding-inline: ${space(2)}; margin: 0; border-block-end-width: 3px; border-block-end-color: ${t.rule}; border-radius: ${t.radius}; }\n :host([two-rows]) .many [role='tab'][aria-selected='true'] { border-block-end-color: currentColor; background: ${t.brandSubtle}; }\n }\n @media (forced-colors: active) { [role='tab'][aria-selected='true'] { border-block-end-color: Highlight; } }\n `];\n\n private current(): string {\n const items = this.items ?? [];\n return items.some((i) => i.id === this.selected) ? this.selected : items[0]?.id ?? '';\n }\n\n private choose(id: string, focus: boolean): void {\n if (id === this.current()) return;\n this.selected = id;\n this.dispatchEvent(new CustomEvent('impkt-change', { detail: { value: id }, bubbles: true, composed: true }));\n if (focus) void this.updateComplete.then(() => this.renderRoot.querySelector<HTMLElement>(`#${this.id_(`tab-${id}`)}`)?.focus({ preventScroll: true }));\n }\n\n private onKey(event: KeyboardEvent): void {\n const items = this.items ?? [];\n const at = items.findIndex((i) => i.id === this.current());\n const to = { ArrowRight: at + 1, ArrowLeft: at - 1, Home: 0, End: items.length - 1 }[event.key];\n if (to === undefined || !items.length) return;\n event.preventDefault();\n this.choose(items[(to + items.length) % items.length]!.id, true);\n }\n\n /**\n * Bring the chosen tab into view inside the row of tabs. Only the row scrolls:\n * `scrollIntoView` would scroll the page too, and move someone who is reading\n * further down.\n */\n private reveal(): void {\n const list = this.renderRoot.querySelector<HTMLElement>(\"[role='tablist']\");\n const tab = this.renderRoot.querySelector<HTMLElement>(\"[role='tab'][aria-selected='true']\");\n if (!list || !tab || list.scrollWidth <= list.clientWidth) return;\n const start = tab.offsetLeft - list.offsetLeft;\n const end = start + tab.offsetWidth;\n if (start < list.scrollLeft) list.scrollLeft = start - 16;\n else if (end > list.scrollLeft + list.clientWidth) list.scrollLeft = end - list.clientWidth + 16;\n }\n\n updated(changed: Map<string, unknown>): void {\n if (changed.has('selected') || changed.has('items')) this.reveal();\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.current();\n const many = items.length > 4;\n return html`<div role=\"tablist\" aria-label=${this.label || nothing} part=\"tabs\" class=${many ? 'many' : ''} style=${many ? `--columns:${Math.ceil(items.length / 2)}` : nothing} @keydown=${this.onKey}>\n ${items.map((item) => html`<button role=\"tab\" type=\"button\" id=${this.id_(`tab-${item.id}`)} aria-selected=${item.id === current ? 'true' : 'false'} aria-controls=${this.id_(`panel-${item.id}`)} tabindex=${item.id === current ? '0' : '-1'} @click=${() => this.choose(item.id, false)}>${item.label}</button>`)}\n </div>\n ${items.map((item) => html`<div role=\"tabpanel\" id=${this.id_(`panel-${item.id}`)} aria-labelledby=${this.id_(`tab-${item.id}`)} tabindex=\"0\" ?hidden=${item.id !== current} part=\"panel\"><slot name=${item.id}><span class=\"body\">${item.body}</span></slot></div>`)}`;\n }\n}\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpktCardGrid extends ImpktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.hairline}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}; overflow: hidden; transition: box-shadow 150ms ease-in-out, transform 150ms ease-in-out; }\n li.linked:hover { box-shadow: ${t.shadowLg}; transform: translateY(-2px); }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n .badge { align-self: flex-start; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; background: ${t.brandSubtle}; color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.hairline}; }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map((card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`)}</ul>`;\n }\n}\n\ncustomElements.define('impkt-divider', ImpktDivider);\ncustomElements.define('impkt-spacer', ImpktSpacer);\ncustomElements.define('impkt-visually-hidden', ImpktVisuallyHidden);\ncustomElements.define('impkt-tabs', ImpktTabs);\ncustomElements.define('impkt-card-grid', ImpktCardGrid);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-divider': ImpktDivider; 'impkt-spacer': ImpktSpacer; 'impkt-visually-hidden': ImpktVisuallyHidden; 'impkt-tabs': ImpktTabs; 'impkt-card-grid': ImpktCardGrid;\n }\n}\n"],"mappings":";;;;;;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K,KAAK,YAAY,OAAO;AAAA,mDAC5B,KAAK,YAAY,IAAI,KAAK,OAAO,eAAe,KAAK,IAAI,IAAI,KAAK,OAAO,SAAS,KAAK,OAAO;AAAA,UACvI,KAAK,OAAO,uBAAuB,KAAK,IAAI,SAAS,OAAO;AAAA,UAC5D,KAAK,OAAO,6CAA6C,QAAQ,eAAe,KAAK,CAAC,YAAY,OAAO;AAAA;AAAA,UAEzG,CAAC;AAAA,EACT;AACF;AAEA,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,yBAAyB,mBAAmB;AAClE,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,mBAAmB,aAAa;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { visuallyHidden as hiddenStyle } from '../base/styles';\nimport { fontSize, fontWeight, lineHeight, space, spaceAround, t, type } from '../base/tokens';\n\n/**\n * Layout and typography primitives.\n *\n * These are the components a composition is mostly made of, and they are\n * deliberately dull. Their one job is that spacing, type and colour come from\n * tokens, so that a page built in the CMS cannot contain a hard-coded 13px.\n */\n\n/** Vertical rhythm. Every gap is a spacing token, never a number.\n *\n * @category layout\n * @icon stack\n * @slot - The things being stacked.\n */\nexport class ImpktStack extends ImpktElement {\n static properties = {\n gap: { type: String, reflect: true },\n align: { type: String, reflect: true },\n direction: { type: String, reflect: true },\n justify: { 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 gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /** How the items line up across the stack. */\n declare align: 'stretch' | 'start' | 'center' | 'end';\n /** Down the page, or along a row that wraps when it runs out of room, such as a row of buttons. */\n declare direction: 'vertical' | 'horizontal';\n /** Where the items sit along a row. */\n declare justify: 'start' | 'center' | 'end' | 'between';\n /** Space before the stack, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Space after the stack, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.gap = 'md';\n this.align = 'stretch';\n this.direction = 'vertical';\n this.justify = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpktElement.styles,\n spaceAround,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n :host([gap='none']) { gap: 0; }\n :host([gap='xs']) { gap: ${space(1)}; }\n :host([align='start']) { align-items: flex-start; }\n :host([align='center']) { align-items: center; text-align: center; }\n :host([align='end']) { align-items: flex-end; }\n :host([direction='horizontal']) { flex-direction: row; flex-wrap: wrap; align-items: center; }\n :host([direction='horizontal'][align='start']) { align-items: flex-start; }\n :host([direction='horizontal'][align='end']) { align-items: flex-end; }\n :host([direction='horizontal'][align='center']) { text-align: start; }\n :host([justify='center']) { justify-content: center; }\n :host([justify='end']) { justify-content: flex-end; }\n :host([justify='between']) { justify-content: space-between; }\n :host([gap='sm']) { gap: ${space(2)}; }\n :host([gap='md']) { gap: ${space(4)}; }\n :host([gap='lg']) { gap: ${space(6)}; }\n :host([gap='xl']) { gap: ${space(8)}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/** A surface. What text is read against, and what contrast is measured from.\n *\n * @category layout\n * @icon card\n * @slot - What sits on the card.\n */\nexport class ImpktCard extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n padding: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n ratio: { type: String, reflect: true },\n badge: { type: String },\n raised: { type: Boolean, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The card's surface. Text on a brand card takes the brand's text colour. */\n declare tone: 'default' | 'subtle' | 'brand' | 'outline' | 'plain';\n /** Space inside the card. */\n declare padding: 'none' | 'sm' | 'md' | 'lg';\n /** A picture across the top of the card. */\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A short label on the picture, such as \"3 left\". */\n declare badge: string;\n /** The picture's shape. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n /** Lifted off the page with a soft shadow and no edge, as a form that floats beside its words is. */\n declare raised: boolean;\n /** Space before the card, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Space after the card, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.tone = 'default';\n this.padding = 'lg';\n this.imageSrc = '';\n this.imageAlt = '';\n this.ratio = '16:9';\n this.badge = '';\n this.raised = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpktElement.styles,\n spaceAround,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.hairline};\n border-radius: ${t.radiusXl};\n box-shadow: ${t.shadowSm};\n overflow: hidden;\n --ratio: 16 / 9;\n }\n :host([tone='subtle']) { background: ${t.surfaceSubtle}; border-color: transparent; box-shadow: none; }\n :host([tone='brand']) { background: ${t.brand}; border-color: transparent; color: ${t.onBrand}; --impkt-eyebrow: ${t.onBrand}; --impkt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impkt-color-text-heading: ${t.onBrand}; --impkt-color-text-default: ${t.onBrand}; --impkt-color-text-muted: ${t.onBrand}; --impkt-color-text-link: ${t.onBrand}; }\n :host([tone='outline']) { background: transparent; box-shadow: none; border-color: ${t.rule}; }\n :host([raised]) { border-color: transparent; box-shadow: 0 24px 60px rgb(16 19 23 / 12%), 0 2px 6px rgb(16 19 23 / 6%); border-radius: ${t.radius2xl}; }\n :host([tone='plain']) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }\n :host([ratio='4:3']) { --ratio: 4 / 3; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n .body { padding: ${space(6)}; flex: 1; display: flex; flex-direction: column; }\n :host([padding='none']) .body { padding: 0; }\n :host([padding='sm']) .body { padding: ${space(3)}; }\n :host([padding='md']) .body { padding: ${space(4)}; }\n :host([tone='plain']) .body { padding-inline: 0; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .picture { position: relative; }\n .tag { position: absolute; inset-block-start: ${space(4)}; inset-inline-start: ${space(4)}; padding: ${space(1.5)} ${space(3)}; font-size: ${fontSize('sm')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; }\n @media (forced-colors: active) { :host { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.imageSrc ? html`<div class=\"picture\"><img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />${this.badge ? html`<span class=\"tag\">${this.badge}</span>` : nothing}</div>` : nothing}<div class=\"body\" part=\"body\"><slot></slot></div>`;\n }\n}\n\n/**\n * A heading.\n *\n * `level` is required and renders the matching `<h1>`–`<h6>`, because heading\n * level is document structure rather than appearance: a screen-reader user\n * navigates by it, and a page whose levels skip is a page they cannot skim.\n * Size is a separate property, so a visually small `<h2>` needs no lie about\n * its level — which is the usual reason levels end up wrong.\n\n *\n * @category typography\n * @icon heading\n * @role heading\n * @slot - The heading text.\n */\nexport class ImpktHeading extends ImpktElement {\n static properties = {\n level: { type: Number, reflect: true },\n size: { type: String, reflect: true },\n eyebrow: { type: String, reflect: true },\n align: { type: String, reflect: true },\n screenReaderOnly: { type: Boolean, reflect: true, attribute: 'screen-reader-only' },\n };\n\n declare level: 1 | 2 | 3 | 4 | 5 | 6;\n declare size: '5xl' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md' | 'sm';\n /** A short label above the heading, such as \"Why Larkfield\". Part of the heading, read before it. */\n declare eyebrow: string;\n declare align: 'start' | 'center';\n /**\n * Read by screen readers and search engines, but not drawn: for a heading\n * whose words are already in a picture, such as a hero drawn as artwork.\n * The page still has its heading; nobody sees it twice. An eyebrow still shows.\n */\n declare screenReaderOnly: boolean;\n\n constructor() {\n super();\n this.level = 2;\n this.size = 'xl';\n this.eyebrow = '';\n this.align = 'start';\n this.screenReaderOnly = false;\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n color: ${t.textHeading};\n font-family: ${t.fontHeading};\n font-weight: ${fontWeight('bold')};\n line-height: ${lineHeight('tight')};\n }\n :host([size='5xl']) { ${type('5xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='4xl']) { ${type('4xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='3xl']) { ${type('3xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='2xl']) { ${type('2xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='xl']) { ${type('xl')} }\n :host([size='lg']) { ${type('lg')} }\n :host([size='md']) { ${type('md')} }\n :host([size='sm']) { ${type('sm')} }\n .h { text-wrap: balance; }\n .h {\n margin: 0;\n font: inherit;\n color: inherit;\n }\n :host([align='center']) { text-align: center; }\n /* Only the words go: an eyebrow over a heading drawn as a picture still shows. */\n :host([screen-reader-only]) .words { ${hiddenStyle} }\n :host([screen-reader-only]:not([eyebrow])) { ${hiddenStyle} }\n .eyebrow {\n display: block;\n margin-block-end: ${space(2)};\n color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand}));\n font-family: var(--impkt-font-family-eyebrow, ${t.fontBody});\n font-size: var(--impkt-font-size-eyebrow, ${fontSize('sm')});\n font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight('semibold')});\n letter-spacing: 0.06em;\n text-transform: uppercase;\n }\n `,\n ];\n\n render(): TemplateResult {\n // A `role=\"heading\"` with `aria-level` rather than six branches of\n // template. The native element would be marginally better; this is the one\n // place where Lit's lack of a dynamic tag makes the explicit role the\n // honest trade, and the role is fully supported.\n return html`<div class=\"h\" role=\"heading\" aria-level=${this.level} part=\"heading\">\n ${this.eyebrow ? html`<span class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}<span style=\"position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)\">: </span></span>` : nothing}<span class=\"words\"><slot></slot></span>\n </div>`;\n }\n}\n\n/** A paragraph.\n *\n * @category typography\n * @icon text\n * @slot - The paragraph text.\n */\nexport class ImpktText extends ImpktElement {\n static properties = {\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n look: { type: String, reflect: true },\n };\n\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n declare tone: 'default' | 'muted';\n declare align: 'start' | 'center';\n /** `code` sets the words in the brand's monospace face on a faint panel, for a line like \"base: main ← compare: you/idea\". */\n declare look: 'prose' | 'code';\n\n constructor() {\n super();\n this.size = 'md';\n this.tone = 'default';\n this.align = 'start';\n this.look = 'prose';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n /* 1.4.8 asks for 1.5 within a paragraph, and it is the default here\n rather than an option, because body text is what it is about. */\n line-height: ${lineHeight('normal')};\n /* 1.4.12 Text Spacing: a user stylesheet must be able to widen this\n without clipping, which a max-width in ch units survives and a\n fixed pixel height does not. */\n max-inline-size: 70ch;\n }\n :host([size='sm']) { ${type('sm')} }\n :host([size='md']) { ${type('md')} }\n :host([size='lg']) { ${type('lg')} }\n :host([size='xl']) { ${type('xl')} }\n p { text-wrap: pretty; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n :host([align='center']) { text-align: center; margin-inline: auto; }\n :host([look='code']) { font-family: ${t.fontMono}; ${type('sm')} padding: ${space(2)} ${space(3)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 6%, transparent); max-inline-size: none; }\n p {\n margin: 0;\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<p part=\"text\"><slot></slot></p>`;\n }\n}\n\ncustomElements.define('impkt-stack', ImpktStack);\ncustomElements.define('impkt-card', ImpktCard);\ncustomElements.define('impkt-heading', ImpktHeading);\ncustomElements.define('impkt-text', ImpktText);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-stack': ImpktStack;\n 'impkt-card': ImpktCard;\n 'impkt-heading': ImpktHeading;\n 'impkt-text': ImpktText;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAmBjD,IAAM,aAAN,cAAyB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACnC,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACrC,WAAW,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACzC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACvC,YAAY,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,cAAc;AAAA,MACpE,YAAY,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,cAAc;AAAA,IACtE;AAAA;AAAA,EAaA,cAAc;AACZ,UAAM;AACN,SAAK,MAAM;AACX,SAAK,QAAQ;AACb,SAAK,YAAY;AACjB,SAAK,UAAU;AACf,SAAK,aAAa;AAClB,SAAK,aAAa;AAAA,EACpB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAM6B,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAWR,MAAM,CAAC,CAAC;AAAA,iCACR,MAAM,CAAC,CAAC;AAAA,iCACR,MAAM,CAA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AA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKmB,WAAW,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAMd,KAAK,IAAI,CAAC;AAAA,6BACV,KAAK,IAAI,CAAC;AAAA,6BACV,KAAK,IAAI,CAAC;AAAA,6BACV,KAAK,IAAI,CAAC;AAAA;AAAA,uCAEA,EAAE,SAAS;AAAA;AAAA,4CAEN,EAAE,QAAQ,KAAK,KAAK,IAAI,CAAC,aAAa,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,oBAAoB,EAAE,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhI;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,EACT;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;AAC/C,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,cAAc,SAAS;","names":[]}
|
package/dist/chunk-IZOTGWWI.js
DELETED
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
iconSvg
|
|
3
|
-
} from "./chunk-NKMVICB5.js";
|
|
4
|
-
import {
|
|
5
|
-
ImpktElement,
|
|
6
|
-
fontSize,
|
|
7
|
-
fontWeight,
|
|
8
|
-
lineHeight,
|
|
9
|
-
space,
|
|
10
|
-
spaceAround,
|
|
11
|
-
t,
|
|
12
|
-
type
|
|
13
|
-
} from "./chunk-3KO55PZK.js";
|
|
14
|
-
|
|
15
|
-
// packages/ui/src/components/marketing.ts
|
|
16
|
-
import { css, html, nothing } from "lit";
|
|
17
|
-
var heading = (level, text, cls) => html`<div class=${cls} role="heading" aria-level=${level}>${text}</div>`;
|
|
18
|
-
var headingStyles = css`
|
|
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, 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
|
-
.body { margin: 0; line-height: ${lineHeight("normal")}; max-inline-size: 65ch; }
|
|
22
|
-
`;
|
|
23
|
-
var ImpktHero = class extends ImpktElement {
|
|
24
|
-
static {
|
|
25
|
-
this.properties = {
|
|
26
|
-
eyebrow: { type: String },
|
|
27
|
-
heading: { type: String },
|
|
28
|
-
lead: { type: String },
|
|
29
|
-
level: { type: Number, reflect: true },
|
|
30
|
-
imageSrc: { type: String, attribute: "image-src" },
|
|
31
|
-
imageAlt: { type: String, attribute: "image-alt" },
|
|
32
|
-
treatment: { type: String, reflect: true },
|
|
33
|
-
ratingText: { type: String, attribute: "rating-text" },
|
|
34
|
-
eyebrowIcon: { type: String, attribute: "eyebrow-icon" },
|
|
35
|
-
align: { type: String, reflect: true },
|
|
36
|
-
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
37
|
-
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
constructor() {
|
|
41
|
-
super();
|
|
42
|
-
this.eyebrow = "";
|
|
43
|
-
this.heading = "";
|
|
44
|
-
this.lead = "";
|
|
45
|
-
this.level = 1;
|
|
46
|
-
this.imageSrc = "";
|
|
47
|
-
this.imageAlt = "";
|
|
48
|
-
this.treatment = "split";
|
|
49
|
-
this.ratingText = "";
|
|
50
|
-
this.eyebrowIcon = "none";
|
|
51
|
-
this.align = "start";
|
|
52
|
-
this.spaceAbove = "none";
|
|
53
|
-
this.spaceBelow = "none";
|
|
54
|
-
}
|
|
55
|
-
static {
|
|
56
|
-
this.styles = [...ImpktElement.styles, spaceAround, headingStyles, css`
|
|
57
|
-
:host { display: block; container-type: inline-size; }
|
|
58
|
-
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }
|
|
59
|
-
.hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
|
|
60
|
-
.words { display: flex; flex-direction: column; gap: ${space(4)}; }
|
|
61
|
-
:host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }
|
|
62
|
-
.h { ${type("5xl")} letter-spacing: ${t.trackingTight}; text-wrap: balance; }
|
|
63
|
-
.body { ${type("lg")} color: ${t.textMuted}; text-wrap: pretty; }
|
|
64
|
-
@container (max-width: 40rem) { .h { ${type("4xl")} } }
|
|
65
|
-
.actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }
|
|
66
|
-
:host([align='center']) .actions { justify-content: center; }
|
|
67
|
-
img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }
|
|
68
|
-
@container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }
|
|
69
|
-
/* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */
|
|
70
|
-
.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; }
|
|
71
|
-
.cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
|
|
72
|
-
.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%); }
|
|
73
|
-
.cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
|
|
74
|
-
.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; }
|
|
75
|
-
.chip-line { position: relative; z-index: 1; block-size: 0; }
|
|
76
|
-
.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}; }
|
|
77
|
-
.finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }
|
|
78
|
-
.cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }
|
|
79
|
-
.cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }
|
|
80
|
-
@container (max-width: 64rem) { .chip { display: none; } }
|
|
81
|
-
@container (max-width: 30rem) { .finder { display: none; } }
|
|
82
|
-
@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; } }
|
|
83
|
-
`];
|
|
84
|
-
}
|
|
85
|
-
render() {
|
|
86
|
-
if (this.treatment === "cover" && this.imageSrc) {
|
|
87
|
-
return html`<div class="cover" part="hero">
|
|
88
|
-
${this.ratingText ? html`<div class="chip-line"><div class="chip">${iconSvg("star", "20px")}${this.ratingText}</div></div>` : nothing}
|
|
89
|
-
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
90
|
-
<div class="words">
|
|
91
|
-
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon !== "none" ? iconSvg(this.eyebrowIcon, "16px") : nothing}${this.eyebrow}</p>` : nothing}
|
|
92
|
-
${heading(this.level, this.heading, "h")}
|
|
93
|
-
${this.lead ? html`<p class="body">${this.lead}</p>` : nothing}
|
|
94
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
95
|
-
</div>
|
|
96
|
-
<div class="finder"><slot name="search"></slot></div>
|
|
97
|
-
</div>`;
|
|
98
|
-
}
|
|
99
|
-
const pictured = Boolean(this.imageSrc) && this.align !== "center";
|
|
100
|
-
return html`<div class="hero ${pictured ? "pictured" : ""}" part="hero">
|
|
101
|
-
<div class="words">
|
|
102
|
-
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
|
|
103
|
-
${heading(this.level, this.heading, "h")}
|
|
104
|
-
${this.lead ? html`<p class="body">${this.lead}</p>` : nothing}
|
|
105
|
-
<div class="actions"><slot name="actions"></slot></div>
|
|
106
|
-
</div>
|
|
107
|
-
${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />` : nothing}
|
|
108
|
-
</div>`;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
var ImpktFeatureList = class extends ImpktElement {
|
|
112
|
-
static {
|
|
113
|
-
this.properties = {
|
|
114
|
-
items: { type: Array },
|
|
115
|
-
columns: { type: String, reflect: true },
|
|
116
|
-
headingLevel: { type: Number, attribute: "heading-level" },
|
|
117
|
-
layout: { type: String, reflect: true },
|
|
118
|
-
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
119
|
-
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
constructor() {
|
|
123
|
-
super();
|
|
124
|
-
this.items = [];
|
|
125
|
-
this.columns = "three";
|
|
126
|
-
this.headingLevel = 3;
|
|
127
|
-
this.layout = "stacked";
|
|
128
|
-
this.spaceAbove = "none";
|
|
129
|
-
this.spaceBelow = "none";
|
|
130
|
-
}
|
|
131
|
-
static {
|
|
132
|
-
this.styles = [...ImpktElement.styles, spaceAround, headingStyles, css`
|
|
133
|
-
:host { display: block; container-type: inline-size; }
|
|
134
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
135
|
-
:host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
136
|
-
:host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
137
|
-
li { display: flex; flex-direction: column; gap: ${space(2)}; }
|
|
138
|
-
:host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }
|
|
139
|
-
:host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }
|
|
140
|
-
.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)}; }
|
|
141
|
-
:host([layout='inline']) .icon { margin: 0; }
|
|
142
|
-
.h { font-size: ${fontSize("lg")}; }
|
|
143
|
-
.body { color: ${t.text}; }
|
|
144
|
-
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
145
|
-
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
146
|
-
`];
|
|
147
|
-
}
|
|
148
|
-
render() {
|
|
149
|
-
return html`<ul part="list">${(this.items ?? []).map((item) => html`<li part="item">
|
|
150
|
-
${item.icon ? html`<span class="icon">${iconSvg(item.icon, "24px")}</span>` : nothing}
|
|
151
|
-
<div class="words">${heading(this.headingLevel, item.heading, "h")}${item.text ? html`<p class="body">${item.text}</p>` : nothing}</div>
|
|
152
|
-
</li>`)}</ul>`;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
var ImpktQuote = class extends ImpktElement {
|
|
156
|
-
static {
|
|
157
|
-
this.properties = {
|
|
158
|
-
quote: { type: String },
|
|
159
|
-
person: { type: String },
|
|
160
|
-
about: { type: String },
|
|
161
|
-
imageSrc: { type: String, attribute: "image-src" },
|
|
162
|
-
size: { type: String, reflect: true },
|
|
163
|
-
align: { type: String, reflect: true },
|
|
164
|
-
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
165
|
-
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
constructor() {
|
|
169
|
-
super();
|
|
170
|
-
this.quote = "";
|
|
171
|
-
this.person = "";
|
|
172
|
-
this.about = "";
|
|
173
|
-
this.imageSrc = "";
|
|
174
|
-
this.size = "md";
|
|
175
|
-
this.align = "start";
|
|
176
|
-
this.spaceAbove = "none";
|
|
177
|
-
this.spaceBelow = "none";
|
|
178
|
-
}
|
|
179
|
-
static {
|
|
180
|
-
this.styles = [...ImpktElement.styles, spaceAround, css`
|
|
181
|
-
:host { display: block; }
|
|
182
|
-
figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }
|
|
183
|
-
:host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }
|
|
184
|
-
blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize("lg")}; line-height: ${lineHeight("normal")}; color: inherit; }
|
|
185
|
-
:host([size='lg']) blockquote { font-size: ${fontSize("2xl")}; line-height: ${lineHeight("tight")}; }
|
|
186
|
-
blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
|
|
187
|
-
figcaption { display: flex; align-items: center; gap: ${space(3)}; }
|
|
188
|
-
img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
|
|
189
|
-
.name { font-weight: ${fontWeight("semibold")}; }
|
|
190
|
-
.detail { color: ${t.textMuted}; font-size: ${fontSize("sm")}; }
|
|
191
|
-
`];
|
|
192
|
-
}
|
|
193
|
-
render() {
|
|
194
|
-
return html`<figure part="figure">
|
|
195
|
-
<blockquote part="quote">${this.quote}</blockquote>
|
|
196
|
-
${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}
|
|
197
|
-
</figure>`;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
var ImpktStat = class extends ImpktElement {
|
|
201
|
-
static {
|
|
202
|
-
this.properties = {
|
|
203
|
-
figure: { type: String },
|
|
204
|
-
label: { type: String },
|
|
205
|
-
note: { type: String },
|
|
206
|
-
size: { type: String, reflect: true },
|
|
207
|
-
align: { type: String, reflect: true }
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
constructor() {
|
|
211
|
-
super();
|
|
212
|
-
this.figure = "";
|
|
213
|
-
this.label = "";
|
|
214
|
-
this.note = "";
|
|
215
|
-
this.size = "md";
|
|
216
|
-
this.align = "start";
|
|
217
|
-
}
|
|
218
|
-
static {
|
|
219
|
-
this.styles = [...ImpktElement.styles, css`
|
|
220
|
-
:host { display: block; }
|
|
221
|
-
.stat { display: flex; flex-direction: column; gap: ${space(1)}; }
|
|
222
|
-
:host([align='center']) .stat { align-items: center; text-align: center; }
|
|
223
|
-
.value { font-family: ${t.fontHeading}; font-size: ${fontSize("3xl")}; font-weight: ${fontWeight("bold")}; line-height: 1; color: ${t.textHeading}; }
|
|
224
|
-
:host([size='lg']) .value { font-size: ${fontSize("5xl")}; }
|
|
225
|
-
:host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
|
|
226
|
-
.label { font-weight: ${fontWeight("semibold")}; }
|
|
227
|
-
.detail { color: ${t.textMuted}; font-size: ${fontSize("sm")}; }
|
|
228
|
-
`];
|
|
229
|
-
}
|
|
230
|
-
render() {
|
|
231
|
-
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>`;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
var ImpktBadge = class extends ImpktElement {
|
|
235
|
-
static {
|
|
236
|
-
this.properties = {
|
|
237
|
-
tone: { type: String, reflect: true },
|
|
238
|
-
icon: { type: String }
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
constructor() {
|
|
242
|
-
super();
|
|
243
|
-
this.tone = "neutral";
|
|
244
|
-
this.icon = "none";
|
|
245
|
-
}
|
|
246
|
-
static {
|
|
247
|
-
this.styles = [...ImpktElement.styles, css`
|
|
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("sm")} font-weight: ${fontWeight("medium")}; background: ${t.surfaceInset}; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.hairline}; }
|
|
250
|
-
:host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }
|
|
251
|
-
:host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
252
|
-
:host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }
|
|
253
|
-
:host([tone='danger']) span { background: ${t.dangerSubtle}; color: ${t.dangerText}; }
|
|
254
|
-
:host([tone='info']) span { background: ${t.infoSubtle}; color: ${t.infoText}; }
|
|
255
|
-
@media (forced-colors: active) { span { border-color: CanvasText; } }
|
|
256
|
-
`];
|
|
257
|
-
}
|
|
258
|
-
render() {
|
|
259
|
-
return html`<span part="badge">${iconSvg(this.icon, "1em")}<slot></slot></span>`;
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
var ImpktAnnouncement = class extends ImpktElement {
|
|
263
|
-
static {
|
|
264
|
-
this.properties = {
|
|
265
|
-
message: { type: String },
|
|
266
|
-
linkText: { type: String, attribute: "link-text" },
|
|
267
|
-
href: { type: String }
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
constructor() {
|
|
271
|
-
super();
|
|
272
|
-
this.message = "";
|
|
273
|
-
this.linkText = "";
|
|
274
|
-
this.href = "";
|
|
275
|
-
}
|
|
276
|
-
static {
|
|
277
|
-
this.styles = [...ImpktElement.styles, css`
|
|
278
|
-
:host { display: block; }
|
|
279
|
-
.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}; }
|
|
280
|
-
:host { margin-inline: calc(var(--impkt-bleed, 1) * (50% - 50vw)); }
|
|
281
|
-
a { display: inline-flex; align-items: center; gap: ${space(1)}; color: inherit; font-weight: ${fontWeight("semibold")}; }
|
|
282
|
-
`];
|
|
283
|
-
}
|
|
284
|
-
render() {
|
|
285
|
-
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>`;
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
var ImpktSearchBar = class extends ImpktElement {
|
|
289
|
-
static {
|
|
290
|
-
this.properties = {
|
|
291
|
-
items: { type: Array },
|
|
292
|
-
buttonText: { type: String, attribute: "button-text" },
|
|
293
|
-
action: { type: String },
|
|
294
|
-
label: { type: String },
|
|
295
|
-
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
296
|
-
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
constructor() {
|
|
300
|
-
super();
|
|
301
|
-
this.items = [];
|
|
302
|
-
this.buttonText = "Search";
|
|
303
|
-
this.action = "";
|
|
304
|
-
this.label = "Search";
|
|
305
|
-
this.spaceAbove = "none";
|
|
306
|
-
this.spaceBelow = "none";
|
|
307
|
-
}
|
|
308
|
-
static {
|
|
309
|
-
this.styles = [...ImpktElement.styles, spaceAround, css`
|
|
310
|
-
:host { display: block; container-type: inline-size; }
|
|
311
|
-
form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }
|
|
312
|
-
.field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }
|
|
313
|
-
label { ${type("sm")} color: ${t.textMuted}; }
|
|
314
|
-
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; }
|
|
315
|
-
select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }
|
|
316
|
-
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; }
|
|
317
|
-
button:hover { background: ${t.brandHover}; }
|
|
318
|
-
@container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }
|
|
319
|
-
@container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }
|
|
320
|
-
`];
|
|
321
|
-
}
|
|
322
|
-
submit(event) {
|
|
323
|
-
const data = new FormData(event.currentTarget);
|
|
324
|
-
const values = {};
|
|
325
|
-
data.forEach((value, key) => {
|
|
326
|
-
if (value !== "") values[key] = String(value);
|
|
327
|
-
});
|
|
328
|
-
this.dispatchEvent(new CustomEvent("impkt-submit", { detail: { values }, bubbles: true, composed: true }));
|
|
329
|
-
if (!this.action) event.preventDefault();
|
|
330
|
-
}
|
|
331
|
-
render() {
|
|
332
|
-
return html`<form role="search" aria-label=${this.label} method="get" action=${this.action || nothing} @submit=${this.submit} part="form">
|
|
333
|
-
${(this.items ?? []).map((field, i) => {
|
|
334
|
-
const id = this.id_(`field-${i}`);
|
|
335
|
-
const choices = String(field.options ?? "").split(",").map((o) => o.trim()).filter(Boolean);
|
|
336
|
-
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, "-")}>
|
|
337
|
-
<option value="">${field.placeholder || "Any"}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}
|
|
338
|
-
</select></div>`;
|
|
339
|
-
})}
|
|
340
|
-
<button type="submit">${this.buttonText}</button>
|
|
341
|
-
</form>`;
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
customElements.define("impkt-search-bar", ImpktSearchBar);
|
|
345
|
-
customElements.define("impkt-announcement", ImpktAnnouncement);
|
|
346
|
-
customElements.define("impkt-hero", ImpktHero);
|
|
347
|
-
customElements.define("impkt-feature-list", ImpktFeatureList);
|
|
348
|
-
customElements.define("impkt-quote", ImpktQuote);
|
|
349
|
-
customElements.define("impkt-stat", ImpktStat);
|
|
350
|
-
customElements.define("impkt-badge", ImpktBadge);
|
|
351
|
-
|
|
352
|
-
export {
|
|
353
|
-
ImpktHero,
|
|
354
|
-
ImpktFeatureList,
|
|
355
|
-
ImpktQuote,
|
|
356
|
-
ImpktStat,
|
|
357
|
-
ImpktBadge,
|
|
358
|
-
ImpktAnnouncement,
|
|
359
|
-
ImpktSearchBar
|
|
360
|
-
};
|
|
361
|
-
//# sourceMappingURL=chunk-IZOTGWWI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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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BAAsB,EAAE,SAAS,MAAM,QAAQ,MAAM,MAAM,YAAY,EAAE,QAAQ,eAAe,GAAG,CAAC;AAAA,6BAC5I,MAAM,eAAe,KAAK,YAAY,QAAQ,IAAI,CAAC,MAAM,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC;AAAA;AAAA,IAEvH,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 +0,0 @@
|
|
|
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,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AG,aAAa,QAAQ,WAAW;AAAA,yCACb,SAAS,IAAI,CAAC;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 +0,0 @@
|
|
|
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,IAA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