@atomic-ui/blocks 0.7.2 → 0.9.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 +1 -1
- package/custom-elements.json +1372 -0
- package/dist/{chunk-YWATQR3J.js → chunk-CPOCQURG.js} +7 -1
- package/dist/chunk-CPOCQURG.js.map +1 -0
- package/dist/chunk-QGVIJNTD.js +447 -0
- package/dist/chunk-QGVIJNTD.js.map +1 -0
- package/dist/chunk-SOFMXF32.js +142 -0
- package/dist/chunk-SOFMXF32.js.map +1 -0
- package/dist/components/journey.d.ts +106 -0
- package/dist/components/journey.js +9 -0
- package/dist/components/journey.js.map +1 -0
- package/dist/components/site.d.ts +11 -0
- package/dist/components/site.js +1 -1
- package/dist/components/studio.d.ts +430 -0
- package/dist/components/studio.js +19 -0
- package/dist/components/studio.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/standalone/atomic-ui-blocks.js +879 -663
- package/dist/standalone/atomic-ui-blocks.js.map +4 -4
- package/package.json +3 -3
- package/dist/chunk-YWATQR3J.js.map +0 -1
|
@@ -126,6 +126,7 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
126
126
|
static {
|
|
127
127
|
this.properties = {
|
|
128
128
|
brand: { type: String },
|
|
129
|
+
brandSize: { type: String, reflect: true, attribute: "brand-size" },
|
|
129
130
|
log: { type: Array },
|
|
130
131
|
columns: { type: Array },
|
|
131
132
|
columnsOnPhone: { type: String, attribute: "columns-on-phone", reflect: true },
|
|
@@ -137,6 +138,7 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
137
138
|
constructor() {
|
|
138
139
|
super();
|
|
139
140
|
this.brand = "";
|
|
141
|
+
this.brandSize = "lg";
|
|
140
142
|
this.log = [];
|
|
141
143
|
this.columns = [];
|
|
142
144
|
this.columnsOnPhone = "shown";
|
|
@@ -153,6 +155,10 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
153
155
|
:host { display: block; container-type: inline-size; position: relative; padding-block: ${space(8)} ${space(4)}; margin-block-end: calc(-1 * ${space(8)}); }
|
|
154
156
|
.top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${space(10)}; }
|
|
155
157
|
.brand { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
|
|
158
|
+
/* The name as a wordmark across the whole footer, under the columns. */
|
|
159
|
+
:host([brand-size='display']) .top { grid-template-columns: 1fr; }
|
|
160
|
+
:host([brand-size='display']) .top > div:first-child { order: 2; }
|
|
161
|
+
:host([brand-size='display']) .brand { font-weight: ${fontWeight("semibold")}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }
|
|
156
162
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
157
163
|
.log { margin-block-start: ${space(8)}; display: grid; gap: ${space(3)}; font-family: ${MONO}; font-size: ${fontSize("sm")}; }
|
|
158
164
|
.log li { display: flex; align-items: center; gap: ${space(3)}; opacity: 0.72; }
|
|
@@ -203,4 +209,4 @@ export {
|
|
|
203
209
|
ImpaktWordmark,
|
|
204
210
|
ImpaktSiteFooter
|
|
205
211
|
};
|
|
206
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-CPOCQURG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/site.ts"],"sourcesContent":["/**\n * A site's own header and footer, drawn as one piece each, for the layout's\n * header and footer slots, and the wordmark that starts a header.\n *\n * The chip that sits beside a wordmark is a product component, `impakt-chip`,\n * and comes from `@atomic-ui/ui`.\n *\n * The page frame (`impakt-page`) gives them their landmarks, so neither draws a\n * `<header>` or `<footer>` of its own: a second banner would be one a screen\n * reader announces twice.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\n// The base, the tokens and the nav and button these draw come from @atomic-ui/ui, which defines its elements on import.\nimport { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, type, toneOf, type NavLink, type Tone } from '@atomic-ui/ui';\n\n/** The footer stripe's colours, left to right. */\n/** The stripe's segments take the brand's chart colours in order. */\nconst STRIPE = [0, 1, 2, 3, 4];\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n// Quieter words are faded to 0.72, no further: that keeps them at 4.5:1 on the page and card colours (1.4.3).\n\n/**\n * The site header: the brand, the main links and one call to action, with an\n * optional chip beside the brand and a status before the action.\n *\n * The links fold behind a Menu button when they do not fit, as `impakt-nav`\n * does. The chip and the status are labels, not controls, and they are left\n * out on a phone so the brand, the menu and the action keep the row.\n *\n * **Build your own.** Place components in its three slots, start, middle and\n * end, and each slot that holds something replaces what the props draw there:\n * a wordmark and chips at the start, a nav in the middle, a status and a\n * button at the end, in any order. Give a component `hideOn: 'phone'` to leave\n * it out on a phone, so the phone's header is built from the same pieces.\n *\n * @category layout\n * @icon header\n * @slot start - The brand: a wordmark or logo, and any chips beside it.\n * @slot middle - The links, usually one nav.\n * @slot end - A status and the call to action.\n * @fires {CustomEvent<null>} impakt-action - When the call to action is pressed.\n */\nexport class ImpaktSiteHeader extends ImpaktElement {\n static properties = {\n brand: { type: String },\n logoSrc: { type: String, attribute: 'logo-src' },\n logoAlt: { type: String, attribute: 'logo-alt' },\n home: { type: String },\n badge: { type: String },\n meta: { type: String },\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n status: { type: String },\n statusMeta: { type: String, attribute: 'status-meta' },\n statusTone: { type: String, attribute: 'status-tone' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n };\n /** The site's name, set as a wordmark when there is no logo picture. */\n declare brand: string;\n /** A logo picture, used instead of the wordmark. */\n declare logoSrc: string;\n /** What the logo says. Leave empty to use the brand name. */\n declare logoAlt: string;\n /** Where the brand links to. */\n declare home: string;\n /** A short chip beside the brand, such as \"main\". */\n declare badge: string;\n /** A code-like line after the chip, such as a commit hash. */\n declare meta: string;\n declare links: NavLink[];\n /** The name of the links' landmark. */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /** A status before the action, such as the stage the site is at. */\n declare status: string;\n /** A code-like line in the status, such as a hash. */\n declare statusMeta: string;\n declare statusTone: Tone;\n declare actionText: string;\n declare actionHref: string;\n\n constructor() {\n super();\n this.brand = '';\n this.logoSrc = '';\n this.logoAlt = '';\n this.home = '/';\n this.badge = '';\n this.meta = '';\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.status = '';\n this.statusMeta = '';\n this.statusTone = 'success';\n this.actionText = '';\n this.actionHref = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n .bar { display: flex; align-items: center; gap: ${space(6)}; }\n .start { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }\n .middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }\n slot { display: contents; }\n .brand { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; ${type('2xl')} letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n .brand img { display: block; block-size: 32px; inline-size: auto; }\n .chip { display: inline-flex; align-items: center; gap: ${space(1)}; padding: 2px ${space(2)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${MONO}; font-size: ${fontSize('xs')}; }\n .chip svg { inline-size: 12px; block-size: 12px; }\n .meta { font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .middle impakt-nav { flex: 1 1 8rem; }\n .end { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .end:empty, .start:empty { display: none; }\n .status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius: 999px; background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize('xs')}; white-space: nowrap; }\n .status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }\n .status .hash { opacity: 0.72; }\n @container (max-width: 56rem) { .chip, .meta, .status { display: none; } .bar { gap: ${space(3)}; } }\n `,\n ];\n\n private act(): void {\n this.dispatchEvent(new CustomEvent('impakt-action', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;\n // Each region shows what is placed in its slot, or, when nothing is, what the props describe.\n return html`<div class=\"bar\" part=\"bar\">\n <div class=\"start\"><slot name=\"start\">\n ${this.brand || this.logoSrc ? html`<a class=\"brand\" href=${this.home || '/'} part=\"brand\">${wordmark}</a>` : nothing}\n ${this.badge ? html`<span class=\"chip\" part=\"badge\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>${this.badge}</span>` : nothing}\n ${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}\n </slot></div>\n <div class=\"middle\"><slot name=\"middle\">${(this.links ?? []).length ? html`<impakt-nav align=\"center\" size=\"sm\" .links=${this.links} .label=${this.label} .menuText=${this.menuText}></impakt-nav>` : nothing}</slot></div>\n <div class=\"end\"><slot name=\"end\">\n ${this.status ? html`<span class=\"status\" part=\"status\" style=${`--tone:${toneOf(this.statusTone, 0)}`}><span class=\"dot\" aria-hidden=\"true\"></span>${this.status}${this.statusMeta ? html` <span class=\"hash\">${this.statusMeta}</span>` : nothing}</span>` : nothing}\n ${this.actionText ? html`<impakt-button variant=\"primary\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}\n </slot></div>\n </div>`;\n }\n}\n\n/**\n * The site's name as a wordmark, or its logo, linking home: the start of a\n * site header.\n *\n * @category layout\n * @icon logo\n */\nexport class ImpaktWordmark extends ImpaktElement {\n static properties = {\n text: { type: String },\n src: { type: String },\n alt: { type: String },\n href: { type: String },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n /** The name, set in the heading face. */\n declare text: string;\n /** A logo picture, used instead of the name. */\n declare src: string;\n /** What the logo says. Leave empty to use the name. */\n declare alt: string;\n declare href: string;\n /** Larger on a wide header, smaller on a phone's. */\n declare size: 'sm' | 'md' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.text = '';\n this.src = '';\n this.alt = '';\n this.href = '/';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n hideOn,\n css`\n :host { display: inline-flex; align-items: center; flex: none; }\n a { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n :host([size='sm']) a { ${type('xl')} } :host([size='md']) a { ${type('2xl')} } :host([size='lg']) a { ${type('3xl')} }\n img { display: block; block-size: 32px; inline-size: auto; }\n @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${type('xl')} } }\n `,\n ];\n\n render(): TemplateResult {\n // The name arrives as the element's words when a page places it, or as `text` when it is set directly.\n return html`<a href=${this.href || '/'} part=\"link\">${this.src ? html`<img src=${this.src} alt=${this.alt || this.text || this.textContent?.trim() || ''} />` : html`<slot>${this.text}</slot>`}</a>`;\n }\n}\n\n/** One line of a footer's log: a code, what it says, and the colour of its dot. */\nexport interface FooterLogLine {\n meta?: string;\n text: string;\n tone?: Tone;\n}\n\n/** A column of footer links under a short heading. */\nexport interface FooterColumn {\n heading: string;\n links: NavLink[];\n}\n\n/**\n * The site footer: the footer band with the brand set large, an optional log of\n * lines beside it, columns of links, a legal line and a stripe of the brand's\n * colours along the foot.\n *\n * Each column is a list under its own heading, so a screen reader can move\n * from one to the next. The log is a list too; its dots are decoration.\n *\n * @category layout\n * @icon footer\n */\nexport class ImpaktSiteFooter extends ImpaktElement {\n static properties = {\n brand: { type: String },\n brandSize: { type: String, reflect: true, attribute: 'brand-size' },\n log: { type: Array },\n columns: { type: Array },\n columnsOnPhone: { type: String, attribute: 'columns-on-phone', reflect: true },\n legal: { type: String },\n stripe: { type: Boolean, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The site's name, set large. */\n declare brand: string;\n /**\n * How large the name is set. `display` runs it the full width of the footer,\n * under the columns, sized by the footer's own width so it never spills at\n * 320px.\n */\n declare brandSize: 'lg' | 'display';\n /** Lines set in code type under the brand, newest first. The first is bright. */\n declare log: FooterLogLine[];\n declare columns: FooterColumn[];\n /** `hidden` leaves the link columns out on a phone, so the footer there is the name, the lines and the legal line. */\n declare columnsOnPhone: 'shown' | 'hidden';\n /** The line at the foot, such as the copyright. */\n declare legal: string;\n /** A stripe of the brand's colours along the bottom edge. */\n declare stripe: boolean;\n /** The level of each column's heading. */\n declare headingLevel: 2 | 3 | 4;\n\n constructor() {\n super();\n this.brand = '';\n this.brandSize = 'lg';\n this.log = [];\n this.columns = [];\n this.columnsOnPhone = 'shown';\n this.legal = '';\n this.stripe = false;\n this.headingLevel = 2;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */\n :host { display: block; container-type: inline-size; position: relative; padding-block: ${space(8)} ${space(4)}; margin-block-end: calc(-1 * ${space(8)}); }\n .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${space(10)}; }\n .brand { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }\n /* The name as a wordmark across the whole footer, under the columns. */\n :host([brand-size='display']) .top { grid-template-columns: 1fr; }\n :host([brand-size='display']) .top > div:first-child { order: 2; }\n :host([brand-size='display']) .brand { font-weight: ${fontWeight('semibold')}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }\n ul { list-style: none; margin: 0; padding: 0; }\n .log { margin-block-start: ${space(8)}; display: grid; gap: ${space(3)}; font-family: ${MONO}; font-size: ${fontSize('sm')}; }\n .log li { display: flex; align-items: center; gap: ${space(3)}; opacity: 0.72; }\n .log li:first-child { opacity: 1; }\n .log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }\n .log .code { margin-inline-end: ${space(3)}; }\n .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${space(8)}; }\n .h { margin: 0 0 ${space(4)}; font-family: ${MONO}; font-size: ${fontSize('xs')}; font-weight: ${fontWeight('medium')}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }\n .columns ul { display: grid; gap: ${space(3)}; }\n a { color: inherit; text-decoration: none; font-weight: ${fontWeight('medium')}; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n .legal { margin: ${space(16)} 0 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }\n .stripe span { flex: 1; }\n @container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }\n @media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }\n `,\n ];\n\n private heading(text: string): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel || 2, 2), 4);\n return level === 3 ? html`<h3 class=\"h\">${text}</h3>` : level === 4 ? html`<h4 class=\"h\">${text}</h4>` : html`<h2 class=\"h\">${text}</h2>`;\n }\n\n render(): TemplateResult {\n const log = this.log ?? [];\n return html`<div part=\"footer\">\n <div class=\"top\">\n <div>\n ${this.brand ? html`<p class=\"brand\" part=\"brand\">${this.brand}</p>` : nothing}\n ${log.length ? html`<ul class=\"log\" part=\"log\">${log.map((line, i) => html`<li style=${`--tone:${toneOf(line.tone ?? (i === 0 ? 'success' : 'accent'), i)}`}><span class=\"dot\" aria-hidden=\"true\"></span><span>${line.meta ? html`<span class=\"code\">${line.meta}</span>` : nothing}${line.text}</span></li>`)}</ul>` : nothing}\n </div>\n <div class=\"columns\" part=\"columns\" style=${`--count:${Math.max(1, (this.columns ?? []).length)}`}>\n ${(this.columns ?? []).map((column) => html`<div>${this.heading(column.heading)}<ul>${(column.links ?? []).map((link) => html`<li><a href=${link.href}>${link.label}</a></li>`)}</ul></div>`)}\n </div>\n </div>\n ${this.legal ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>` : nothing}\n ${this.stripe ? html`<div class=\"stripe\" aria-hidden=\"true\">${STRIPE.map((i) => html`<span style=${`background:${toneOf(undefined, i)}`}></span>`)}</div>` : nothing}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-header', ImpaktSiteHeader);\ncustomElements.define('impakt-wordmark', ImpaktWordmark);\ncustomElements.define('impakt-site-footer', ImpaktSiteFooter);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-header': ImpaktSiteHeader;\n 'impakt-wordmark': ImpaktWordmark;\n 'impakt-site-footer': ImpaktSiteFooter;\n }\n}\n"],"mappings":";AAWA,SAAS,KAAK,MAAM,eAAoC;AAExD,SAAS,eAAe,WAAW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AK,KAAK,SAAS,OAAO;AAAA,QAC5E,KAAK,SAAS,8CAA8C,OAAO,IAAI,CAAC,MAAM,mBAAmB,cAAc,OAAO,QAAW,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,OAAO;AAAA;AAAA,EAExK;AACF;AAEA,eAAe,OAAO,sBAAsB,gBAAgB;AAC5D,eAAe,OAAO,mBAAmB,cAAc;AACvD,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
|
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
// packages/blocks/src/components/studio.ts
|
|
2
|
+
import { css, html, nothing } from "lit";
|
|
3
|
+
import {
|
|
4
|
+
ImpaktElement,
|
|
5
|
+
focusRing,
|
|
6
|
+
fontSize,
|
|
7
|
+
fontWeight,
|
|
8
|
+
lineHeight,
|
|
9
|
+
lockScroll,
|
|
10
|
+
space,
|
|
11
|
+
spaceAround,
|
|
12
|
+
t,
|
|
13
|
+
token,
|
|
14
|
+
unlockScroll
|
|
15
|
+
} from "@atomic-ui/ui";
|
|
16
|
+
var arrow = html`<svg viewBox="0 0 22 22" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false">
|
|
17
|
+
<path d="M5 17 17 5M8 5h9v9" />
|
|
18
|
+
</svg>`;
|
|
19
|
+
var ImpaktWorkList = class extends ImpaktElement {
|
|
20
|
+
static {
|
|
21
|
+
this.properties = {
|
|
22
|
+
items: { type: Array },
|
|
23
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
24
|
+
start: { type: Number },
|
|
25
|
+
label: { type: String },
|
|
26
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
27
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
this.items = [];
|
|
33
|
+
this.headingLevel = 3;
|
|
34
|
+
this.start = 1;
|
|
35
|
+
this.label = "";
|
|
36
|
+
this.spaceAbove = "none";
|
|
37
|
+
this.spaceBelow = "none";
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
this.styles = [
|
|
41
|
+
...ImpaktElement.styles,
|
|
42
|
+
focusRing,
|
|
43
|
+
spaceAround,
|
|
44
|
+
css`
|
|
45
|
+
:host { display: block; container: impakt-work-list / inline-size; }
|
|
46
|
+
ol { list-style: none; margin: 0; padding: 0; border-block-start: ${t.borderThin} solid ${t.text}; }
|
|
47
|
+
li { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; column-gap: ${space(6)}; padding: ${space(5)} ${space(8)}; border-block-end: ${t.borderThin} solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
|
|
48
|
+
.number { font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; font-variant-numeric: tabular-nums; color: ${t.textMuted}; }
|
|
49
|
+
.name { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${fontWeight("semibold")}; line-height: 1; letter-spacing: -0.05em; color: ${t.text}; overflow-wrap: anywhere; }
|
|
50
|
+
.name a { color: inherit; text-decoration: none; }
|
|
51
|
+
/* The link is stretched over the row, so the row is one target. */
|
|
52
|
+
.name a::after { content: ''; position: absolute; inset: 0; }
|
|
53
|
+
.name a:focus-visible { outline: none; }
|
|
54
|
+
.name a:focus-visible::after { box-shadow: ${t.focusShadow}; }
|
|
55
|
+
.meta { font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }
|
|
56
|
+
.arrow { display: flex; color: ${t.text}; }
|
|
57
|
+
/* Pointed at or focused, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */
|
|
58
|
+
li:has(a):hover, li:has(a:focus-visible) { background: ${t.text}; }
|
|
59
|
+
li:has(a):hover .name, li:has(a:focus-visible) .name { color: ${t.surfaceCard}; }
|
|
60
|
+
li:has(a):hover :is(.number, .meta), li:has(a:focus-visible) :is(.number, .meta) { color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); }
|
|
61
|
+
li:has(a):hover .arrow, li:has(a:focus-visible) .arrow { color: ${token("color.accent.default", "currentColor")}; }
|
|
62
|
+
@container impakt-work-list (max-width: 40rem) {
|
|
63
|
+
li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${space(3)}; padding-inline: ${space(4)}; }
|
|
64
|
+
.meta { grid-column: 2; grid-row: 2; margin-block-start: ${space(2)}; }
|
|
65
|
+
.arrow { grid-column: 3; grid-row: 1; }
|
|
66
|
+
}
|
|
67
|
+
@media (forced-colors: active) {
|
|
68
|
+
li:has(a):hover, li:has(a:focus-visible) { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }
|
|
69
|
+
li:has(a):hover :is(.name, .number, .meta, .arrow), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow) { color: CanvasText; }
|
|
70
|
+
}
|
|
71
|
+
`
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return html`<ol role="list" part="list" aria-label=${this.label || nothing}>
|
|
76
|
+
${this.items.map((item, index) => {
|
|
77
|
+
const number = String(this.start + index).padStart(2, "0");
|
|
78
|
+
return html`<li part="row">
|
|
79
|
+
<span class="number" aria-hidden="true">${number}</span>
|
|
80
|
+
<div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
|
|
81
|
+
${item.href ? html`<a href=${item.href} part="link">${item.name}</a>` : item.name}
|
|
82
|
+
</div>
|
|
83
|
+
${item.meta ? html`<span class="meta" part="meta">${item.meta}</span>` : html`<span></span>`}
|
|
84
|
+
${item.href ? html`<span class="arrow">${arrow}</span>` : html`<span></span>`}
|
|
85
|
+
</li>`;
|
|
86
|
+
})}
|
|
87
|
+
</ol>`;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
var ImpaktStatRow = class extends ImpaktElement {
|
|
91
|
+
static {
|
|
92
|
+
this.properties = {
|
|
93
|
+
items: { type: Array },
|
|
94
|
+
label: { type: String },
|
|
95
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
96
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
constructor() {
|
|
100
|
+
super();
|
|
101
|
+
this.items = [];
|
|
102
|
+
this.label = "";
|
|
103
|
+
this.spaceAbove = "none";
|
|
104
|
+
this.spaceBelow = "none";
|
|
105
|
+
}
|
|
106
|
+
static {
|
|
107
|
+
this.styles = [
|
|
108
|
+
...ImpaktElement.styles,
|
|
109
|
+
spaceAround,
|
|
110
|
+
css`
|
|
111
|
+
:host { display: block; container: impakt-stat-row / inline-size; }
|
|
112
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: ${space(6)}; }
|
|
113
|
+
li { border-block-start: ${t.borderThin} solid ${t.rule}; padding-block-start: ${space(5)}; }
|
|
114
|
+
p { margin: 0; display: flex; flex-direction: column; gap: ${space(2)}; }
|
|
115
|
+
.value { font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${fontWeight("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }
|
|
116
|
+
.label { font-size: ${fontSize("sm")}; line-height: ${lineHeight("normal")}; color: ${t.textMuted}; }
|
|
117
|
+
.note { font-size: ${fontSize("sm")}; color: ${t.textMuted}; }
|
|
118
|
+
`
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
render() {
|
|
122
|
+
return html`<ul role="list" part="list" aria-label=${this.label || nothing}>
|
|
123
|
+
${this.items.map(
|
|
124
|
+
(item) => html`<li part="stat">
|
|
125
|
+
<p><span class="value" part="value">${item.figure}</span> <span class="label" part="label">${item.label}</span>${item.note ? html` <span class="note">${item.note}</span>` : nothing}</p>
|
|
126
|
+
</li>`
|
|
127
|
+
)}
|
|
128
|
+
</ul>`;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
var ImpaktFaq = class extends ImpaktElement {
|
|
132
|
+
static {
|
|
133
|
+
this.properties = {
|
|
134
|
+
eyebrow: { type: String },
|
|
135
|
+
heading: { type: String },
|
|
136
|
+
lead: { type: String },
|
|
137
|
+
items: { type: Array },
|
|
138
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
139
|
+
open: { type: Array },
|
|
140
|
+
multiple: { type: Boolean },
|
|
141
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
142
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
constructor() {
|
|
146
|
+
super();
|
|
147
|
+
this.eyebrow = "";
|
|
148
|
+
this.heading = "";
|
|
149
|
+
this.lead = "";
|
|
150
|
+
this.items = [];
|
|
151
|
+
this.headingLevel = 2;
|
|
152
|
+
this.open = [];
|
|
153
|
+
this.multiple = true;
|
|
154
|
+
this.spaceAbove = "none";
|
|
155
|
+
this.spaceBelow = "none";
|
|
156
|
+
}
|
|
157
|
+
static {
|
|
158
|
+
this.styles = [
|
|
159
|
+
...ImpaktElement.styles,
|
|
160
|
+
spaceAround,
|
|
161
|
+
css`
|
|
162
|
+
:host { display: block; container: impakt-faq / inline-size; }
|
|
163
|
+
.head { display: flex; flex-direction: column; gap: ${space(4)}; margin-block-end: ${space(10)}; max-inline-size: 44rem; }
|
|
164
|
+
.eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize("sm")}; color: var(--impakt-eyebrow, ${t.textMuted}); }
|
|
165
|
+
.heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${fontWeight("semibold")}; line-height: 1.04; letter-spacing: -0.04em; color: ${t.textHeading}; }
|
|
166
|
+
.lead { margin: 0; font-size: ${fontSize("md")}; line-height: ${lineHeight("normal")}; color: ${t.textMuted}; }
|
|
167
|
+
impakt-accordion { border-block-start: ${t.borderThin} solid ${t.rule}; }
|
|
168
|
+
`
|
|
169
|
+
];
|
|
170
|
+
}
|
|
171
|
+
render() {
|
|
172
|
+
const headingId = this.id_("heading");
|
|
173
|
+
const level = Math.min(Math.max(this.headingLevel, 1), 5);
|
|
174
|
+
const head = this.eyebrow || this.heading || this.lead ? html`<div class="head" part="head">
|
|
175
|
+
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
|
|
176
|
+
${this.heading ? html`<div id=${headingId} class="heading" part="heading" role="heading" aria-level=${level}>${this.heading}</div>` : nothing}
|
|
177
|
+
${this.lead ? html`<p class="lead" part="lead">${this.lead}</p>` : nothing}
|
|
178
|
+
</div>` : nothing;
|
|
179
|
+
const accordion = html`<impakt-accordion part="questions" .items=${this.items} .headingLevel=${level + 1} .open=${this.open} .multiple=${this.multiple}>
|
|
180
|
+
${this.items.map((item) => html`<slot name=${`panel-${item.id}`} slot=${`panel-${item.id}`}>${item.body}</slot>`)}
|
|
181
|
+
</impakt-accordion>`;
|
|
182
|
+
return this.heading ? html`<section aria-labelledby=${headingId}>${head}${accordion}</section>` : html`<div>${head}${accordion}</div>`;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
var ImpaktSiteMenu = class extends ImpaktElement {
|
|
186
|
+
constructor() {
|
|
187
|
+
super();
|
|
188
|
+
this.hasFooter = false;
|
|
189
|
+
this.open = false;
|
|
190
|
+
this.links = [];
|
|
191
|
+
this.current = "";
|
|
192
|
+
this.brand = "";
|
|
193
|
+
this.home = "/";
|
|
194
|
+
this.label = "Menu";
|
|
195
|
+
this.closeText = "Close";
|
|
196
|
+
}
|
|
197
|
+
static {
|
|
198
|
+
this.properties = {
|
|
199
|
+
open: { type: Boolean, reflect: true },
|
|
200
|
+
links: { type: Array },
|
|
201
|
+
current: { type: String },
|
|
202
|
+
brand: { type: String },
|
|
203
|
+
home: { type: String },
|
|
204
|
+
label: { type: String },
|
|
205
|
+
closeText: { type: String, attribute: "close-text" }
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static {
|
|
209
|
+
this.styles = [
|
|
210
|
+
...ImpaktElement.styles,
|
|
211
|
+
focusRing,
|
|
212
|
+
css`
|
|
213
|
+
/* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
|
|
214
|
+
:host { --impakt-menu: ${t.text}; --impakt-menu-on: ${t.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-menu-rule: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }
|
|
215
|
+
dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; overflow: auto; background: var(--impakt-menu); color: var(--impakt-menu-on); }
|
|
216
|
+
dialog[open] { display: flex; }
|
|
217
|
+
dialog::backdrop { background: var(--impakt-menu); }
|
|
218
|
+
.bar { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(2)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }
|
|
219
|
+
.brand { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: ${fontSize("md")}; font-weight: ${fontWeight("semibold")}; border-radius: ${t.radiusSm}; }
|
|
220
|
+
.close { display: inline-flex; align-items: center; gap: ${space(2)}; min-block-size: 44px; padding: 0 ${space(4)}; font: inherit; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("medium")}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
221
|
+
nav { flex: 1; padding: ${space(6)} ${space(5)} 0; }
|
|
222
|
+
ol { list-style: none; margin: 0; padding: 0; }
|
|
223
|
+
li { border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }
|
|
224
|
+
li a { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-block: ${space(4)}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${fontWeight("semibold")}; line-height: 1; letter-spacing: -0.05em; }
|
|
225
|
+
li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
|
|
226
|
+
.number { font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
|
|
227
|
+
/*
|
|
228
|
+
* The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
|
|
229
|
+
* --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
|
|
230
|
+
*/
|
|
231
|
+
a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
|
|
232
|
+
a[aria-current] .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }
|
|
233
|
+
.foot { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(8)} ${space(5)} calc(${space(8)} + env(safe-area-inset-bottom)); }
|
|
234
|
+
.foot[hidden] { display: none; }
|
|
235
|
+
/* What is slotted at the foot is read on ink too. */
|
|
236
|
+
::slotted(*) { --impakt-color-text-default: var(--impakt-menu-on); --impakt-color-text-heading: var(--impakt-menu-on); --impakt-color-text-muted: var(--impakt-menu-muted); --impakt-color-text-link: var(--impakt-menu-on); --impakt-color-text-link-hover: var(--impakt-menu-on); color: var(--impakt-menu-on); }
|
|
237
|
+
@media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
|
|
238
|
+
`
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
get dialog() {
|
|
242
|
+
return this.renderRoot.querySelector("dialog");
|
|
243
|
+
}
|
|
244
|
+
updated(changed) {
|
|
245
|
+
if (!changed.has("open")) return;
|
|
246
|
+
const dialog = this.dialog;
|
|
247
|
+
if (!dialog) return;
|
|
248
|
+
if (this.open) {
|
|
249
|
+
if (typeof dialog.showModal === "function") dialog.showModal();
|
|
250
|
+
else dialog.setAttribute("open", "");
|
|
251
|
+
lockScroll(this);
|
|
252
|
+
} else {
|
|
253
|
+
if (typeof dialog.close === "function" && dialog.open) dialog.close();
|
|
254
|
+
else dialog.removeAttribute("open");
|
|
255
|
+
unlockScroll(this);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
disconnectedCallback() {
|
|
259
|
+
super.disconnectedCallback();
|
|
260
|
+
unlockScroll(this);
|
|
261
|
+
}
|
|
262
|
+
close() {
|
|
263
|
+
if (!this.open) return;
|
|
264
|
+
this.open = false;
|
|
265
|
+
this.dispatchEvent(new CustomEvent("impakt-close", { bubbles: true, composed: true }));
|
|
266
|
+
}
|
|
267
|
+
footerChanged(event) {
|
|
268
|
+
this.hasFooter = event.target.assignedNodes().length > 0;
|
|
269
|
+
this.requestUpdate();
|
|
270
|
+
}
|
|
271
|
+
render() {
|
|
272
|
+
return html`<dialog part="dialog" aria-label=${this.label} @cancel=${() => this.close()} @close=${() => this.close()}>
|
|
273
|
+
<div class="bar" part="bar">
|
|
274
|
+
${this.brand ? html`<a class="brand" href=${this.home || "/"} part="brand">${this.brand}</a>` : html`<span></span>`}
|
|
275
|
+
<button class="close" type="button" part="close" @click=${() => this.close()}>
|
|
276
|
+
<span>${this.closeText}</span>
|
|
277
|
+
<svg viewBox="0 0 12 12" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" focusable="false"><path d="M1 1l10 10M11 1 1 11" /></svg>
|
|
278
|
+
</button>
|
|
279
|
+
</div>
|
|
280
|
+
<nav aria-label=${this.label} part="nav">
|
|
281
|
+
<ol role="list">
|
|
282
|
+
${(this.links ?? []).map((link, index) => {
|
|
283
|
+
const current = !!this.current && link.href === this.current;
|
|
284
|
+
return html`<li>
|
|
285
|
+
<a href=${link.href} aria-current=${current ? "page" : nothing} part="link" @click=${() => this.close()}>
|
|
286
|
+
<span class="words">${link.label}</span><span class="number" aria-hidden="true">${String(index + 1).padStart(2, "0")}</span>
|
|
287
|
+
</a>
|
|
288
|
+
</li>`;
|
|
289
|
+
})}
|
|
290
|
+
</ol>
|
|
291
|
+
</nav>
|
|
292
|
+
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
293
|
+
</dialog>`;
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
var ImpaktOffer = class extends ImpaktElement {
|
|
297
|
+
static {
|
|
298
|
+
this.properties = {
|
|
299
|
+
eyebrow: { type: String },
|
|
300
|
+
heading: { type: String },
|
|
301
|
+
lead: { type: String },
|
|
302
|
+
points: { type: Array },
|
|
303
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
304
|
+
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
305
|
+
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
constructor() {
|
|
309
|
+
super();
|
|
310
|
+
this.eyebrow = "";
|
|
311
|
+
this.heading = "";
|
|
312
|
+
this.lead = "";
|
|
313
|
+
this.points = [];
|
|
314
|
+
this.headingLevel = 2;
|
|
315
|
+
this.spaceAbove = "none";
|
|
316
|
+
this.spaceBelow = "none";
|
|
317
|
+
}
|
|
318
|
+
static {
|
|
319
|
+
this.styles = [
|
|
320
|
+
...ImpaktElement.styles,
|
|
321
|
+
spaceAround,
|
|
322
|
+
css`
|
|
323
|
+
:host { display: block; container: impakt-offer / inline-size; }
|
|
324
|
+
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(12)}; align-items: start; }
|
|
325
|
+
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${space(5)}; }
|
|
326
|
+
.eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize("sm")}; color: var(--impakt-eyebrow, ${t.textMuted}); }
|
|
327
|
+
.heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.75rem); font-weight: ${fontWeight("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }
|
|
328
|
+
.lead { margin: 0; max-inline-size: 32rem; font-size: ${fontSize("md")}; line-height: ${lineHeight("normal")}; color: ${t.text}; }
|
|
329
|
+
ol { list-style: none; margin: 0; padding: 0; }
|
|
330
|
+
li { display: flex; gap: ${space(5)}; padding-block: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; font-size: ${fontSize("lg")}; font-weight: ${fontWeight("medium")}; line-height: 1.2; color: ${t.text}; }
|
|
331
|
+
.number { flex: none; font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("regular")}; line-height: 1.6; }
|
|
332
|
+
@container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; gap: ${space(8)}; } }
|
|
333
|
+
`
|
|
334
|
+
];
|
|
335
|
+
}
|
|
336
|
+
render() {
|
|
337
|
+
const level = Math.min(Math.max(this.headingLevel, 1), 6);
|
|
338
|
+
return html`<div class="offer" part="offer">
|
|
339
|
+
<div class="copy">
|
|
340
|
+
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
|
|
341
|
+
${this.heading ? html`<div class="heading" part="heading" role="heading" aria-level=${level}>${this.heading}</div>` : nothing}
|
|
342
|
+
${this.lead ? html`<p class="lead" part="lead">${this.lead}</p>` : nothing}
|
|
343
|
+
<slot name="actions"></slot>
|
|
344
|
+
</div>
|
|
345
|
+
${(this.points ?? []).length ? html`<ol role="list" part="points">
|
|
346
|
+
${this.points.map((point, index) => html`<li><span class="number" aria-hidden="true">${String(index + 1).padStart(2, "0")}</span><span>${point}</span></li>`)}
|
|
347
|
+
</ol>` : nothing}
|
|
348
|
+
</div>`;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
var ImpaktPostCard = class extends ImpaktElement {
|
|
352
|
+
static {
|
|
353
|
+
this.properties = {
|
|
354
|
+
heading: { type: String },
|
|
355
|
+
text: { type: String },
|
|
356
|
+
meta: { type: String },
|
|
357
|
+
href: { type: String },
|
|
358
|
+
linkText: { type: String, attribute: "link-text" },
|
|
359
|
+
headingLevel: { type: Number, attribute: "heading-level" }
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
constructor() {
|
|
363
|
+
super();
|
|
364
|
+
this.heading = "";
|
|
365
|
+
this.text = "";
|
|
366
|
+
this.meta = "";
|
|
367
|
+
this.href = "";
|
|
368
|
+
this.linkText = "";
|
|
369
|
+
this.headingLevel = 3;
|
|
370
|
+
}
|
|
371
|
+
static {
|
|
372
|
+
this.styles = [
|
|
373
|
+
...ImpaktElement.styles,
|
|
374
|
+
focusRing,
|
|
375
|
+
css`
|
|
376
|
+
:host { display: block; block-size: 100%; }
|
|
377
|
+
article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; transition: background-color 140ms ease-out; }
|
|
378
|
+
.meta { margin: 0; font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }
|
|
379
|
+
.heading { font-family: ${t.fontHeading}; font-size: ${fontSize("xl")}; font-weight: ${fontWeight("semibold")}; line-height: 1.15; letter-spacing: -0.025em; color: ${t.text}; }
|
|
380
|
+
.heading a { color: inherit; text-decoration: none; }
|
|
381
|
+
.heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
382
|
+
.heading a:focus-visible { outline: none; }
|
|
383
|
+
.heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }
|
|
384
|
+
article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
|
|
385
|
+
.text { margin: 0; font-size: ${fontSize("sm")}; line-height: ${lineHeight("normal")}; color: ${t.textMuted}; }
|
|
386
|
+
.more { margin-block-start: auto; font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; }
|
|
387
|
+
@media (forced-colors: active) { article { border-color: CanvasText; } }
|
|
388
|
+
`
|
|
389
|
+
];
|
|
390
|
+
}
|
|
391
|
+
render() {
|
|
392
|
+
const level = Math.min(Math.max(this.headingLevel, 1), 6);
|
|
393
|
+
return html`<article part="card">
|
|
394
|
+
${this.meta ? html`<p class="meta" part="meta">${this.meta}</p>` : nothing}
|
|
395
|
+
<div class="heading" part="heading" role="heading" aria-level=${level}>${this.href ? html`<a href=${this.href} part="link">${this.heading}</a>` : this.heading}</div>
|
|
396
|
+
${this.text ? html`<p class="text" part="text">${this.text}</p>` : nothing}
|
|
397
|
+
${this.linkText && this.href ? html`<span class="more" aria-hidden="true">${this.linkText} →</span>` : nothing}
|
|
398
|
+
</article>`;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
var ImpaktHighlight = class extends ImpaktElement {
|
|
402
|
+
static {
|
|
403
|
+
this.properties = {
|
|
404
|
+
label: { type: String }
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
constructor() {
|
|
408
|
+
super();
|
|
409
|
+
this.label = "";
|
|
410
|
+
}
|
|
411
|
+
static {
|
|
412
|
+
this.styles = [
|
|
413
|
+
...ImpaktElement.styles,
|
|
414
|
+
css`
|
|
415
|
+
:host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${token("color.accent.default", "#ffd43b")}; color: ${token("color.accent.on", "#1a1a1a")}; outline: 1.5px solid ${token("color.accent.on", "#1a1a1a")}; outline-offset: -1px; }
|
|
416
|
+
.handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${t.surfaceCard}; border: 1.5px solid ${token("color.accent.on", "#1a1a1a")}; }
|
|
417
|
+
.handle:nth-of-type(1) { inset-block-start: -4px; inset-inline-start: -4px; }
|
|
418
|
+
.handle:nth-of-type(2) { inset-block-start: -4px; inset-inline-end: -4px; }
|
|
419
|
+
.handle:nth-of-type(3) { inset-block-end: -4px; inset-inline-start: -4px; }
|
|
420
|
+
.handle:nth-of-type(4) { inset-block-end: -4px; inset-inline-end: -4px; }
|
|
421
|
+
.label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; border-radius: 3px; }
|
|
422
|
+
@media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label { background: CanvasText; color: Canvas; } }
|
|
423
|
+
`
|
|
424
|
+
];
|
|
425
|
+
}
|
|
426
|
+
render() {
|
|
427
|
+
return html`<slot></slot><span class="handle" aria-hidden="true"></span><span class="handle" aria-hidden="true"></span><span class="handle" aria-hidden="true"></span><span class="handle" aria-hidden="true"></span>${this.label ? html`<span class="label" part="label" aria-hidden="true">${this.label}</span>` : nothing}`;
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
customElements.define("impakt-work-list", ImpaktWorkList);
|
|
431
|
+
customElements.define("impakt-stat-row", ImpaktStatRow);
|
|
432
|
+
customElements.define("impakt-faq", ImpaktFaq);
|
|
433
|
+
customElements.define("impakt-site-menu", ImpaktSiteMenu);
|
|
434
|
+
customElements.define("impakt-offer", ImpaktOffer);
|
|
435
|
+
customElements.define("impakt-post-card", ImpaktPostCard);
|
|
436
|
+
customElements.define("impakt-highlight", ImpaktHighlight);
|
|
437
|
+
|
|
438
|
+
export {
|
|
439
|
+
ImpaktWorkList,
|
|
440
|
+
ImpaktStatRow,
|
|
441
|
+
ImpaktFaq,
|
|
442
|
+
ImpaktSiteMenu,
|
|
443
|
+
ImpaktOffer,
|
|
444
|
+
ImpaktPostCard,
|
|
445
|
+
ImpaktHighlight
|
|
446
|
+
};
|
|
447
|
+
//# sourceMappingURL=chunk-QGVIJNTD.js.map
|