@atomic-ui/blocks 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +3157 -97
- package/dist/chunk-2URXTXNQ.js +296 -0
- package/dist/chunk-2URXTXNQ.js.map +1 -0
- package/dist/chunk-7X4WGV6K.js +97 -0
- package/dist/chunk-7X4WGV6K.js.map +1 -0
- package/dist/{chunk-QGVIJNTD.js → chunk-CCFBROX3.js} +127 -41
- package/dist/chunk-CCFBROX3.js.map +1 -0
- package/dist/{chunk-NLHFBIGQ.js → chunk-EYP5LWUR.js} +28 -10
- package/dist/chunk-EYP5LWUR.js.map +1 -0
- package/dist/chunk-GRKPKJZH.js +275 -0
- package/dist/chunk-GRKPKJZH.js.map +1 -0
- package/dist/{chunk-OR4U4UJQ.js → chunk-MX7FU5JE.js} +69 -1
- package/dist/chunk-MX7FU5JE.js.map +1 -0
- package/dist/{chunk-UVHQY3QJ.js → chunk-NHWD2LUR.js} +2 -2
- package/dist/chunk-NHWD2LUR.js.map +1 -0
- package/dist/{chunk-FLOKZ7O3.js → chunk-PIUPEB4I.js} +44 -11
- package/dist/chunk-PIUPEB4I.js.map +1 -0
- package/dist/{chunk-HNCJLMQB.js → chunk-R7SSIE2E.js} +26 -8
- package/dist/chunk-R7SSIE2E.js.map +1 -0
- package/dist/{chunk-LJ6AQO26.js → chunk-SYTQIQT2.js} +73 -18
- package/dist/chunk-SYTQIQT2.js.map +1 -0
- package/dist/chunk-WGDMORWT.js +48 -0
- package/dist/chunk-WGDMORWT.js.map +1 -0
- package/dist/{chunk-PALYJCLC.js → chunk-XB6FD4SF.js} +3 -3
- package/dist/chunk-XB6FD4SF.js.map +1 -0
- package/dist/chunk-XNRFZCNB.js +499 -0
- package/dist/chunk-XNRFZCNB.js.map +1 -0
- package/dist/{chunk-CC2U2L2H.js → chunk-YXMXLVK7.js} +3 -3
- package/dist/chunk-YXMXLVK7.js.map +1 -0
- package/dist/{chunk-YC6KXE6O.js → chunk-ZD75GU6J.js} +7 -4
- package/dist/chunk-ZD75GU6J.js.map +1 -0
- package/dist/{chunk-TT2PTEQO.js → chunk-ZODL5HD4.js} +64 -17
- package/dist/chunk-ZODL5HD4.js.map +1 -0
- package/dist/components/card-grid.js +1 -1
- package/dist/components/changelog.d.ts +24 -0
- package/dist/components/changelog.js +2 -2
- package/dist/components/estimator.d.ts +25 -0
- package/dist/components/estimator.js +1 -1
- package/dist/components/g2-case.d.ts +225 -0
- package/dist/components/g2-case.js +16 -0
- package/dist/components/g2-case.js.map +1 -0
- package/dist/components/g2-shared.d.ts +28 -0
- package/dist/components/g2-shared.js +35 -0
- package/dist/components/g2-shared.js.map +1 -0
- package/dist/components/g2-site.d.ts +493 -0
- package/dist/components/g2-site.js +26 -0
- package/dist/components/g2-site.js.map +1 -0
- package/dist/components/g2-tools.d.ts +77 -0
- package/dist/components/g2-tools.js +8 -0
- package/dist/components/g2-tools.js.map +1 -0
- package/dist/components/journey.d.ts +79 -9
- package/dist/components/journey.js +1 -1
- package/dist/components/marketing.d.ts +23 -0
- package/dist/components/marketing.js +1 -1
- package/dist/components/organisms.d.ts +23 -2
- package/dist/components/organisms.js +1 -1
- package/dist/components/property.js +1 -1
- package/dist/components/scene.js +1 -1
- package/dist/components/scrubber.js +1 -1
- package/dist/components/selling.d.ts +42 -1
- package/dist/components/selling.js +1 -1
- package/dist/components/site.d.ts +78 -0
- package/dist/components/site.js +1 -1
- package/dist/components/studio.d.ts +87 -6
- package/dist/components/studio.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +81 -42
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +1373 -787
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-CC2U2L2H.js.map +0 -1
- package/dist/chunk-FLOKZ7O3.js.map +0 -1
- package/dist/chunk-HNCJLMQB.js.map +0 -1
- package/dist/chunk-LJ6AQO26.js.map +0 -1
- package/dist/chunk-NLHFBIGQ.js.map +0 -1
- package/dist/chunk-OR4U4UJQ.js.map +0 -1
- package/dist/chunk-PALYJCLC.js.map +0 -1
- package/dist/chunk-QGVIJNTD.js.map +0 -1
- package/dist/chunk-SOFMXF32.js +0 -142
- package/dist/chunk-SOFMXF32.js.map +0 -1
- package/dist/chunk-TT2PTEQO.js.map +0 -1
- package/dist/chunk-UVHQY3QJ.js.map +0 -1
- package/dist/chunk-YC6KXE6O.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/property.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, fontWeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, £385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires {CustomEvent<{ plot: SitePlot }>} impakt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpaktSitePlan extends ImpaktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.text}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impakt-solid-card, ${t.surfaceCard}); --plan-text: var(--impakt-solid-text, ${t.text}); --plan-heading: var(--impakt-solid-heading, ${t.text}); --plan-muted: var(--impakt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impakt-color-surface-card: var(--plan-card); --impakt-color-text-default: var(--plan-text); --impakt-color-text-heading: var(--plan-heading); --impakt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen)\n this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' · ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktMortgageCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.text}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `,\n ];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% · ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpaktBeforeAfter extends ImpaktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => {\n this.position = Number((e.target as HTMLInputElement).value);\n }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpaktStickyBar extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `,\n ];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impakt-bottom-bar', height);\n else root.removeProperty('--impakt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpaktLocationCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n .row a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: -2px; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-plan', ImpaktSitePlan);\ncustomElements.define('impakt-mortgage-calculator', ImpaktMortgageCalculator);\ncustomElements.define('impakt-before-after', ImpaktBeforeAfter);\ncustomElements.define('impakt-sticky-bar', ImpaktStickyBar);\ncustomElements.define('impakt-location-card', ImpaktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-plan': ImpaktSitePlan;\n 'impakt-mortgage-calculator': ImpaktMortgageCalculator;\n 'impakt-before-after': ImpaktBeforeAfter;\n 'impakt-sticky-bar': ImpaktStickyBar;\n 'impakt-location-card': ImpaktLocationCard;\n }\n}\n"],"mappings":";AAAA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,KAAK,YAAY,eAAe,WAAW,YAAY,YAAY,OAAO,aAAa,GAAG,MAAM,eAAe;AA8BjH,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,OAAO,EAA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Aa,0BAA0B,UAAU,IAAI,KAAK,cAAc,GAAG,QAAQ,eAAe,MAAM,CAAC,SAAS,OAAO;AAAA;AAAA;AAAA,EAGjI;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,8BAA8B,wBAAwB;AAC5E,eAAe,OAAO,uBAAuB,iBAAiB;AAC9D,eAAe,OAAO,qBAAqB,eAAe;AAC1D,eAAe,OAAO,wBAAwB,kBAAkB;","names":[]}
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import {
|
|
2
|
+
accent,
|
|
3
|
+
accentOn,
|
|
4
|
+
ink,
|
|
5
|
+
inkLine,
|
|
6
|
+
inkMuted,
|
|
7
|
+
inkRaised,
|
|
8
|
+
levelOf,
|
|
9
|
+
monoLabel,
|
|
10
|
+
pad,
|
|
11
|
+
paper
|
|
12
|
+
} from "./chunk-WGDMORWT.js";
|
|
13
|
+
|
|
14
|
+
// packages/blocks/src/components/g2-site.ts
|
|
15
|
+
import { css, html, nothing } from "lit";
|
|
16
|
+
import { ImpaktElement, focusRing, fontWeight, say, space, spaceAround, t } from "@atomic-ui/ui";
|
|
17
|
+
var STAGE_WORDS = {
|
|
18
|
+
note: ["01", "Discover", "Note"],
|
|
19
|
+
wireframe: ["02", "Design low-fi", "Wireframe"],
|
|
20
|
+
component: ["03", "Design hi-fi", "Component"],
|
|
21
|
+
code: ["04", "Build", "Code"],
|
|
22
|
+
live: ["05", "Launch", "Live"]
|
|
23
|
+
};
|
|
24
|
+
var ImpaktStageTag = class extends ImpaktElement {
|
|
25
|
+
static {
|
|
26
|
+
this.properties = {
|
|
27
|
+
stage: { type: String, reflect: true },
|
|
28
|
+
index: { type: String },
|
|
29
|
+
phase: { type: String },
|
|
30
|
+
label: { type: String },
|
|
31
|
+
onInk: { type: Boolean, reflect: true, attribute: "on-ink" },
|
|
32
|
+
announce: { type: Boolean }
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
constructor() {
|
|
36
|
+
super();
|
|
37
|
+
this.stage = "";
|
|
38
|
+
this.index = "";
|
|
39
|
+
this.phase = "";
|
|
40
|
+
this.label = "";
|
|
41
|
+
this.onInk = false;
|
|
42
|
+
this.announce = false;
|
|
43
|
+
}
|
|
44
|
+
static {
|
|
45
|
+
this.styles = [
|
|
46
|
+
...ImpaktElement.styles,
|
|
47
|
+
css`
|
|
48
|
+
:host { display: inline-block; vertical-align: middle; }
|
|
49
|
+
.tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${ink}; border: 1px solid ${ink}; ${monoLabel}; font-size: 0.75rem; font-weight: ${fontWeight("medium")}; white-space: nowrap; }
|
|
50
|
+
:host([on-ink]) .tag { background: ${inkRaised}; border-color: ${inkLine}; }
|
|
51
|
+
.index { color: ${accent}; }
|
|
52
|
+
.phase { color: ${paper}; }
|
|
53
|
+
.label { color: ${inkMuted}; }
|
|
54
|
+
@media (prefers-color-scheme: dark) { .tag { border-color: ${inkLine}; } }
|
|
55
|
+
@media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }
|
|
56
|
+
`
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
const words = this.stage && this.stage in STAGE_WORDS ? STAGE_WORDS[this.stage] : void 0;
|
|
61
|
+
const index = this.index || words?.[0] || "";
|
|
62
|
+
const phase = this.phase || (words ? say(words[1]) : "");
|
|
63
|
+
const label = this.label || (words ? say(words[2]) : "");
|
|
64
|
+
if (!index && !phase && !label) return html``;
|
|
65
|
+
return html`<span class="tag" part="tag" aria-hidden=${this.announce ? nothing : "true"}
|
|
66
|
+
>${index ? html`<span class="index" part="index">${index}</span>` : nothing}${phase ? html`<span class="phase" part="phase">${phase}</span>` : nothing}${label ? html`<span class="label" part="label">${label}</span>` : nothing}</span
|
|
67
|
+
>`;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var ImpaktSectionHead = class extends ImpaktElement {
|
|
71
|
+
static {
|
|
72
|
+
this.properties = {
|
|
73
|
+
label: { type: String },
|
|
74
|
+
heading: { type: String },
|
|
75
|
+
lead: { type: String },
|
|
76
|
+
size: { type: String, reflect: true },
|
|
77
|
+
level: { type: Number, reflect: true },
|
|
78
|
+
leadPosition: { type: String, reflect: true, attribute: "lead-position" },
|
|
79
|
+
stage: { type: String },
|
|
80
|
+
stageOnInk: { type: Boolean, attribute: "stage-on-ink" },
|
|
81
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
82
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
constructor() {
|
|
86
|
+
super();
|
|
87
|
+
this.label = "";
|
|
88
|
+
this.heading = "";
|
|
89
|
+
this.lead = "";
|
|
90
|
+
this.size = "m";
|
|
91
|
+
this.level = 2;
|
|
92
|
+
this.leadPosition = "below";
|
|
93
|
+
this.stage = "";
|
|
94
|
+
this.stageOnInk = false;
|
|
95
|
+
this.spaceAbove = "none";
|
|
96
|
+
this.spaceBelow = "none";
|
|
97
|
+
}
|
|
98
|
+
static {
|
|
99
|
+
this.styles = [
|
|
100
|
+
...ImpaktElement.styles,
|
|
101
|
+
spaceAround,
|
|
102
|
+
css`
|
|
103
|
+
:host { display: block; container-type: inline-size; color: ${t.text}; }
|
|
104
|
+
.top { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; min-block-size: 29px; }
|
|
105
|
+
.label { margin: 0; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; color: ${t.textMuted}; }
|
|
106
|
+
.body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${space(10)}; row-gap: ${space(6)}; align-items: end; margin-block-start: ${space(6)}; }
|
|
107
|
+
.heading { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight("semibold")}; color: var(--impakt-color-text-heading, ${t.text}); text-wrap: balance; overflow-wrap: anywhere; }
|
|
108
|
+
:host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
109
|
+
:host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }
|
|
110
|
+
:host([size='xl']) .heading { font-size: clamp(3rem, 0.8rem + 10cqi, 7.5rem); line-height: 0.95; letter-spacing: -0.05em; }
|
|
111
|
+
.lead { margin: ${space(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${t.textMuted}; }
|
|
112
|
+
.side { display: grid; gap: ${space(6)}; justify-items: end; }
|
|
113
|
+
/* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */
|
|
114
|
+
.body.aside { align-items: center; }
|
|
115
|
+
.side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }
|
|
116
|
+
.side:not(:has(.lead)) { align-self: center; }
|
|
117
|
+
::slotted([slot='aside']) { display: block; max-inline-size: 100%; }
|
|
118
|
+
@container (max-width: 47.99rem) {
|
|
119
|
+
.body { grid-template-columns: minmax(0, 1fr); }
|
|
120
|
+
.side { justify-items: stretch; }
|
|
121
|
+
.side .lead { inline-size: auto; }
|
|
122
|
+
}
|
|
123
|
+
`
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
render() {
|
|
127
|
+
const lead = html`<p class="lead" part="lead"><slot name="lead">${this.lead}</slot></p>`;
|
|
128
|
+
const showLead = Boolean(this.lead) || this.hasSlot("lead");
|
|
129
|
+
const inner = html`<slot name="heading">${this.heading}</slot>`;
|
|
130
|
+
const heading = Number(this.level) === 1 ? html`<h1 class="heading" part="heading">${inner}</h1>` : html`<h2 class="heading" part="heading">${inner}</h2>`;
|
|
131
|
+
const side = this.leadPosition === "side";
|
|
132
|
+
return html`<header part="head">
|
|
133
|
+
<div class="top">
|
|
134
|
+
${this.label ? html`<p class="label" part="label"><span aria-hidden="true"># </span>${this.label}</p>` : html`<span></span>`}
|
|
135
|
+
<slot name="tag">${this.stage ? html`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>` : nothing}</slot>
|
|
136
|
+
</div>
|
|
137
|
+
<div class=${this.hasSlot("aside") ? "body aside" : "body"}>
|
|
138
|
+
<div class="main">${heading}${showLead && !side ? lead : nothing}</div>
|
|
139
|
+
<div class="side">${showLead && side ? lead : nothing}<slot name="aside"></slot></div>
|
|
140
|
+
</div>
|
|
141
|
+
</header>`;
|
|
142
|
+
}
|
|
143
|
+
/** Whether a child is in the named slot. On a server, where there are no children, only the attribute counts. */
|
|
144
|
+
hasSlot(name) {
|
|
145
|
+
const children = this.children;
|
|
146
|
+
if (!children) return false;
|
|
147
|
+
return Array.from(children).some((c) => c.getAttribute("slot") === name);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
var ImpaktServiceCard = class extends ImpaktElement {
|
|
151
|
+
static {
|
|
152
|
+
this.properties = {
|
|
153
|
+
number: { type: String },
|
|
154
|
+
heading: { type: String },
|
|
155
|
+
text: { type: String },
|
|
156
|
+
tags: { type: String },
|
|
157
|
+
href: { type: String },
|
|
158
|
+
linkText: { type: String, attribute: "link-text" },
|
|
159
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
160
|
+
featured: { type: Boolean, reflect: true }
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
constructor() {
|
|
164
|
+
super();
|
|
165
|
+
this.featured = false;
|
|
166
|
+
this.number = "";
|
|
167
|
+
this.heading = "";
|
|
168
|
+
this.text = "";
|
|
169
|
+
this.tags = "";
|
|
170
|
+
this.href = "";
|
|
171
|
+
this.linkText = "Learn more";
|
|
172
|
+
this.headingLevel = 3;
|
|
173
|
+
}
|
|
174
|
+
static {
|
|
175
|
+
this.styles = [
|
|
176
|
+
...ImpaktElement.styles,
|
|
177
|
+
css`
|
|
178
|
+
:host { display: block; block-size: 100%; }
|
|
179
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${space(6)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
180
|
+
.top { display: flex; align-items: center; justify-content: space-between; }
|
|
181
|
+
.number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }
|
|
182
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }
|
|
183
|
+
.foot { display: grid; gap: ${space(3)}; }
|
|
184
|
+
.heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight("semibold")}; line-height: 1.15; letter-spacing: -0.02em; }
|
|
185
|
+
.heading a { color: inherit; text-decoration: none; }
|
|
186
|
+
.heading a::after { content: ''; position: absolute; inset: 0; }
|
|
187
|
+
.heading a:focus-visible { outline: none; }
|
|
188
|
+
.heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }
|
|
189
|
+
.text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }
|
|
190
|
+
.tags { margin: ${space(1)} 0 0; ${monoLabel}; color: ${t.textMuted}; }
|
|
191
|
+
.more { margin-block-start: ${space(2)}; ${monoLabel}; font-weight: ${fontWeight("medium")}; }
|
|
192
|
+
article:has(a):hover, article:focus-within, :host([featured]) article { background: ${ink}; color: ${paper}; border-color: ${ink}; }
|
|
193
|
+
article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${inkMuted}; }
|
|
194
|
+
article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${accent}; }
|
|
195
|
+
@media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }
|
|
196
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }
|
|
197
|
+
`
|
|
198
|
+
];
|
|
199
|
+
}
|
|
200
|
+
render() {
|
|
201
|
+
const level = levelOf(this.headingLevel);
|
|
202
|
+
return html`<article part="card">
|
|
203
|
+
<div class="top" aria-hidden="true">
|
|
204
|
+
<span class="number" part="number">${this.number}</span>
|
|
205
|
+
<span class="dot" part="dot"></span>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="foot">
|
|
208
|
+
<div class="heading" part="heading" role="heading" aria-level=${level}>
|
|
209
|
+
${this.href ? html`<a href=${this.href} part="link">${this.heading}</a>` : this.heading}
|
|
210
|
+
</div>
|
|
211
|
+
${this.text ? html`<p class="text" part="text">${this.text}</p>` : nothing}
|
|
212
|
+
${this.tags ? html`<p class="tags" part="tags">${this.tags}</p>` : nothing}
|
|
213
|
+
${this.href && this.linkText ? html`<span class="more" part="more" aria-hidden="true">${this.linkText} →</span>` : nothing}
|
|
214
|
+
</div>
|
|
215
|
+
</article>`;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
var ImpaktCursor = class extends ImpaktElement {
|
|
219
|
+
static {
|
|
220
|
+
this.properties = {
|
|
221
|
+
name: { type: String },
|
|
222
|
+
variant: { type: String, reflect: true },
|
|
223
|
+
drift: { type: Boolean, reflect: true }
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
constructor() {
|
|
227
|
+
super();
|
|
228
|
+
this.name = "";
|
|
229
|
+
this.variant = "ink";
|
|
230
|
+
this.drift = false;
|
|
231
|
+
}
|
|
232
|
+
static {
|
|
233
|
+
this.styles = [
|
|
234
|
+
...ImpaktElement.styles,
|
|
235
|
+
css`
|
|
236
|
+
:host { display: inline-block; position: relative; pointer-events: none; }
|
|
237
|
+
.cursor { display: inline-flex; align-items: flex-start; }
|
|
238
|
+
svg { display: block; flex: none; }
|
|
239
|
+
.arrow { fill: ${ink}; stroke: ${paper}; }
|
|
240
|
+
.name { margin: 16px 0 0 -2px; padding: 4px 7px; ${monoLabel}; font-weight: ${fontWeight("medium")}; white-space: nowrap; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }
|
|
241
|
+
:host([variant='outline']) .name { background: ${t.surfaceCard}; color: ${t.text}; border-color: ${t.text}; }
|
|
242
|
+
:host([variant='accent']) .name { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }
|
|
243
|
+
:host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }
|
|
244
|
+
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }
|
|
245
|
+
@media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }
|
|
246
|
+
@media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }
|
|
247
|
+
`
|
|
248
|
+
];
|
|
249
|
+
}
|
|
250
|
+
render() {
|
|
251
|
+
return html`<span class="cursor" part="cursor" aria-hidden="true">
|
|
252
|
+
<svg viewBox="0 0 16 22" width="16" height="22" focusable="false"><path class="arrow" d="M1.5 1.5v16.2l4.3-4.1 3 6.6 2.6-1.2-3-6.5h6z" stroke-width="1.25" stroke-linejoin="round" /></svg>
|
|
253
|
+
${this.name ? html`<span class="name" part="name">${this.name}</span>` : nothing}
|
|
254
|
+
</span>`;
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
var ImpaktHandNote = class extends ImpaktElement {
|
|
258
|
+
static {
|
|
259
|
+
this.properties = {
|
|
260
|
+
text: { type: String },
|
|
261
|
+
arrow: { type: String, reflect: true },
|
|
262
|
+
decorative: { type: Boolean, reflect: true }
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
constructor() {
|
|
266
|
+
super();
|
|
267
|
+
this.text = "";
|
|
268
|
+
this.arrow = "none";
|
|
269
|
+
this.decorative = false;
|
|
270
|
+
}
|
|
271
|
+
static {
|
|
272
|
+
this.styles = [
|
|
273
|
+
...ImpaktElement.styles,
|
|
274
|
+
css`
|
|
275
|
+
:host { display: inline-block; max-inline-size: 18rem; }
|
|
276
|
+
.note { display: inline-flex; align-items: center; gap: ${space(2)}; }
|
|
277
|
+
:host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }
|
|
278
|
+
:host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }
|
|
279
|
+
p { margin: 0; font-family: var(--impakt-font-family-hand, ${t.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${t.textMuted}; }
|
|
280
|
+
svg { flex: none; color: ${t.textMuted}; }
|
|
281
|
+
:host([arrow='left']) svg { transform: scaleX(-1); }
|
|
282
|
+
:host([arrow='down']) svg { transform: rotate(90deg); }
|
|
283
|
+
:host([arrow='up']) svg { transform: rotate(-90deg); }
|
|
284
|
+
@media (forced-colors: active) { p, svg { color: CanvasText; } }
|
|
285
|
+
`
|
|
286
|
+
];
|
|
287
|
+
}
|
|
288
|
+
render() {
|
|
289
|
+
const arrow = this.arrow && this.arrow !== "none" ? html`<svg viewBox="0 0 40 24" width="40" height="24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M2 16c8-10 20-12 34-6M30 4l6 6-7 4" /></svg>` : nothing;
|
|
290
|
+
return html`<div class="note" part="note" aria-hidden=${this.decorative ? "true" : nothing}><p part="text"><slot>${this.text}</slot></p>${arrow}</div>`;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
var ImpaktFacts = class extends ImpaktElement {
|
|
294
|
+
static {
|
|
295
|
+
this.properties = {
|
|
296
|
+
items: { type: Array },
|
|
297
|
+
layout: { type: String, reflect: true },
|
|
298
|
+
size: { type: String, reflect: true },
|
|
299
|
+
label: { type: String }
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
constructor() {
|
|
303
|
+
super();
|
|
304
|
+
this.items = [];
|
|
305
|
+
this.layout = "columns";
|
|
306
|
+
this.size = "md";
|
|
307
|
+
this.label = "";
|
|
308
|
+
}
|
|
309
|
+
static {
|
|
310
|
+
this.styles = [
|
|
311
|
+
...ImpaktElement.styles,
|
|
312
|
+
focusRing,
|
|
313
|
+
css`
|
|
314
|
+
:host { display: block; color: ${t.text}; }
|
|
315
|
+
dl { margin: 0; display: grid; gap: ${space(5)}; }
|
|
316
|
+
:host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${space(5)}; row-gap: ${space(6)}; }
|
|
317
|
+
:host([layout='columns']) .fact { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }
|
|
318
|
+
dt { ${monoLabel}; color: ${t.textMuted}; }
|
|
319
|
+
dd { margin: ${space(2)} 0 0; font-family: ${t.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }
|
|
320
|
+
:host([layout='columns']) dd { margin-block-start: ${space(3)}; }
|
|
321
|
+
.sm { font-size: 1rem; }
|
|
322
|
+
.md { font-size: 1.125rem; }
|
|
323
|
+
.lg { font-size: 1.5rem; letter-spacing: -0.01em; }
|
|
324
|
+
.xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }
|
|
325
|
+
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
|
|
326
|
+
a:hover { text-decoration-thickness: 2px; }
|
|
327
|
+
@media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }
|
|
328
|
+
`
|
|
329
|
+
];
|
|
330
|
+
}
|
|
331
|
+
render() {
|
|
332
|
+
if (!this.items.length) return html``;
|
|
333
|
+
return html`<dl part="list" aria-label=${this.label || nothing}>
|
|
334
|
+
${this.items.map(
|
|
335
|
+
(item) => html`<div class="fact" part="fact">
|
|
336
|
+
<dt part="label">${item.label}</dt>
|
|
337
|
+
<dd part="value" class=${item.size ?? this.size}>${item.href ? html`<a href=${item.href}>${item.value}</a>` : item.value}</dd>
|
|
338
|
+
</div>`
|
|
339
|
+
)}
|
|
340
|
+
</dl>`;
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
var ImpaktNumberedList = class extends ImpaktElement {
|
|
344
|
+
static {
|
|
345
|
+
this.properties = {
|
|
346
|
+
items: { type: Array },
|
|
347
|
+
start: { type: Number },
|
|
348
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
349
|
+
label: { type: String }
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
constructor() {
|
|
353
|
+
super();
|
|
354
|
+
this.items = [];
|
|
355
|
+
this.start = 1;
|
|
356
|
+
this.headingLevel = 3;
|
|
357
|
+
this.label = "";
|
|
358
|
+
}
|
|
359
|
+
static {
|
|
360
|
+
this.styles = [
|
|
361
|
+
...ImpaktElement.styles,
|
|
362
|
+
css`
|
|
363
|
+
:host { display: block; container-type: inline-size; color: ${t.text}; }
|
|
364
|
+
ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.text}; }
|
|
365
|
+
li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${space(10)}; align-items: center; padding-block: ${space(6)}; border-block-end: 1px solid ${t.rule}; }
|
|
366
|
+
.n { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${t.textMuted}; }
|
|
367
|
+
.heading { margin: 0; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight("semibold")}; line-height: 1.15; letter-spacing: -0.025em; }
|
|
368
|
+
.text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${t.textMuted}; }
|
|
369
|
+
@container (max-width: 47.99rem) {
|
|
370
|
+
li { grid-template-columns: minmax(0, 1fr); row-gap: ${space(2)}; }
|
|
371
|
+
}
|
|
372
|
+
@media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }
|
|
373
|
+
`
|
|
374
|
+
];
|
|
375
|
+
}
|
|
376
|
+
render() {
|
|
377
|
+
if (!this.items.length) return html``;
|
|
378
|
+
const level = levelOf(this.headingLevel);
|
|
379
|
+
const start = Number.isFinite(Number(this.start)) ? Number(this.start) : 1;
|
|
380
|
+
return html`<ol part="list" role="list" start=${start} aria-label=${this.label || nothing}>
|
|
381
|
+
${this.items.map(
|
|
382
|
+
(item, i) => html`<li part="item">
|
|
383
|
+
<span class="n" aria-hidden="true">${pad(start + i)}</span>
|
|
384
|
+
<div class="heading" role="heading" aria-level=${level} part="heading">${item.heading}</div>
|
|
385
|
+
${item.text ? html`<p class="text" part="text">${item.text}</p>` : html`<span></span>`}
|
|
386
|
+
</li>`
|
|
387
|
+
)}
|
|
388
|
+
</ol>`;
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
var ImpaktColumnList = class extends ImpaktElement {
|
|
392
|
+
static {
|
|
393
|
+
this.properties = {
|
|
394
|
+
columns: { type: Array },
|
|
395
|
+
headingLevel: { type: Number, attribute: "heading-level" }
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
constructor() {
|
|
399
|
+
super();
|
|
400
|
+
this.columns = [];
|
|
401
|
+
this.headingLevel = 3;
|
|
402
|
+
}
|
|
403
|
+
static {
|
|
404
|
+
this.styles = [
|
|
405
|
+
...ImpaktElement.styles,
|
|
406
|
+
css`
|
|
407
|
+
:host { display: block; color: ${t.text}; }
|
|
408
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${space(8)} ${space(5)}; }
|
|
409
|
+
section { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }
|
|
410
|
+
.heading { margin: 0; ${monoLabel}; color: ${t.textMuted}; }
|
|
411
|
+
ul { margin: ${space(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${space(2)}; }
|
|
412
|
+
li { font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight("semibold")}; line-height: 1.2; letter-spacing: -0.02em; }
|
|
413
|
+
@media (forced-colors: active) { section { border-color: CanvasText; } }
|
|
414
|
+
`
|
|
415
|
+
];
|
|
416
|
+
}
|
|
417
|
+
render() {
|
|
418
|
+
if (!this.columns.length) return html``;
|
|
419
|
+
const level = levelOf(this.headingLevel);
|
|
420
|
+
return html`<div class="grid" part="grid">
|
|
421
|
+
${this.columns.map(
|
|
422
|
+
(col) => html`<section part="column">
|
|
423
|
+
<div class="heading" role="heading" aria-level=${level} part="heading">${col.heading}</div>
|
|
424
|
+
<ul role="list" part="list">${(col.items ?? []).map((item) => html`<li part="item">${item}</li>`)}</ul>
|
|
425
|
+
</section>`
|
|
426
|
+
)}
|
|
427
|
+
</div>`;
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
var ImpaktOfficeCard = class extends ImpaktElement {
|
|
431
|
+
static {
|
|
432
|
+
this.properties = {
|
|
433
|
+
hours: { type: String },
|
|
434
|
+
name: { type: String },
|
|
435
|
+
region: { type: String },
|
|
436
|
+
text: { type: String },
|
|
437
|
+
tag: { type: String },
|
|
438
|
+
headingLevel: { type: Number, attribute: "heading-level" }
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
constructor() {
|
|
442
|
+
super();
|
|
443
|
+
this.hours = "";
|
|
444
|
+
this.name = "";
|
|
445
|
+
this.region = "";
|
|
446
|
+
this.text = "";
|
|
447
|
+
this.tag = "";
|
|
448
|
+
this.headingLevel = 3;
|
|
449
|
+
}
|
|
450
|
+
static {
|
|
451
|
+
this.styles = [
|
|
452
|
+
...ImpaktElement.styles,
|
|
453
|
+
css`
|
|
454
|
+
:host { display: block; block-size: 100%; container-type: inline-size; }
|
|
455
|
+
article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(2)}; padding: ${space(8)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }
|
|
456
|
+
.top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${space(2)}; }
|
|
457
|
+
.hours { margin: 0; ${monoLabel}; color: ${t.textMuted}; }
|
|
458
|
+
.tag { margin: 0; padding: 3px 6px; ${monoLabel}; font-weight: ${fontWeight("medium")}; background: ${accent}; color: ${accentOn}; }
|
|
459
|
+
.name { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${fontWeight("semibold")}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
|
|
460
|
+
.region { margin: ${space(2)} 0 0; font-size: 1rem; line-height: 1.4; }
|
|
461
|
+
.text { margin: ${space(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }
|
|
462
|
+
@container (max-width: 22rem) { article { padding: ${space(5)}; } }
|
|
463
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }
|
|
464
|
+
`
|
|
465
|
+
];
|
|
466
|
+
}
|
|
467
|
+
render() {
|
|
468
|
+
const level = levelOf(this.headingLevel);
|
|
469
|
+
return html`<article part="card">
|
|
470
|
+
${this.hours || this.tag ? html`<div class="top">${this.hours ? html`<p class="hours" part="hours">${this.hours}</p>` : html`<span></span>`}${this.tag ? html`<p class="tag" part="tag">${this.tag}</p>` : nothing}</div>` : nothing}
|
|
471
|
+
<div class="name" role="heading" aria-level=${level} part="name">${this.name}</div>
|
|
472
|
+
${this.region ? html`<p class="region" part="region">${this.region}</p>` : nothing}
|
|
473
|
+
${this.text ? html`<p class="text" part="text">${this.text}</p>` : nothing}
|
|
474
|
+
</article>`;
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
customElements.define("impakt-stage-tag", ImpaktStageTag);
|
|
478
|
+
customElements.define("impakt-section-head", ImpaktSectionHead);
|
|
479
|
+
customElements.define("impakt-service-card", ImpaktServiceCard);
|
|
480
|
+
customElements.define("impakt-cursor", ImpaktCursor);
|
|
481
|
+
customElements.define("impakt-hand-note", ImpaktHandNote);
|
|
482
|
+
customElements.define("impakt-facts", ImpaktFacts);
|
|
483
|
+
customElements.define("impakt-numbered-list", ImpaktNumberedList);
|
|
484
|
+
customElements.define("impakt-column-list", ImpaktColumnList);
|
|
485
|
+
customElements.define("impakt-office-card", ImpaktOfficeCard);
|
|
486
|
+
|
|
487
|
+
export {
|
|
488
|
+
STAGE_WORDS,
|
|
489
|
+
ImpaktStageTag,
|
|
490
|
+
ImpaktSectionHead,
|
|
491
|
+
ImpaktServiceCard,
|
|
492
|
+
ImpaktCursor,
|
|
493
|
+
ImpaktHandNote,
|
|
494
|
+
ImpaktFacts,
|
|
495
|
+
ImpaktNumberedList,
|
|
496
|
+
ImpaktColumnList,
|
|
497
|
+
ImpaktOfficeCard
|
|
498
|
+
};
|
|
499
|
+
//# sourceMappingURL=chunk-XNRFZCNB.js.map
|