@atomic-ui/blocks 0.10.0 → 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/blocks/src/components/marketing.ts
|
|
2
2
|
import { css, html, nothing } from "lit";
|
|
3
|
-
import { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, type, iconSvg } from "@atomic-ui/ui";
|
|
3
|
+
import { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from "@atomic-ui/ui";
|
|
4
4
|
var heading = (level, text, cls) => html`<div class=${cls} role="heading" aria-level=${level}>${text}</div>`;
|
|
5
5
|
var headingStyles = css`
|
|
6
6
|
.h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; line-height: ${lineHeight("tight")}; }
|
|
@@ -62,7 +62,7 @@ var ImpaktHero = class extends ImpaktElement {
|
|
|
62
62
|
.cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
|
|
63
63
|
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }
|
|
64
64
|
.cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
|
|
65
|
-
.cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius:
|
|
65
|
+
.cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); text-transform: none; letter-spacing: 0; }
|
|
66
66
|
.chip-line { position: relative; z-index: 1; block-size: 0; }
|
|
67
67
|
.chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type("sm")} font-weight: ${fontWeight("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }
|
|
68
68
|
.finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }
|
|
@@ -81,7 +81,7 @@ var ImpaktHero = class extends ImpaktElement {
|
|
|
81
81
|
<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
|
|
82
82
|
<div class="words">
|
|
83
83
|
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon !== "none" ? iconSvg(this.eyebrowIcon, "16px") : nothing}${this.eyebrow}</p>` : nothing}
|
|
84
|
-
${heading(this.level, this.heading
|
|
84
|
+
${heading(this.level, html`<slot name="heading">${this.heading}</slot>`, "h")}
|
|
85
85
|
${this.lead ? html`<p class="body">${this.lead}</p>` : nothing}
|
|
86
86
|
<div class="actions"><slot name="actions"></slot></div>
|
|
87
87
|
</div>
|
|
@@ -92,7 +92,7 @@ var ImpaktHero = class extends ImpaktElement {
|
|
|
92
92
|
return html`<div class="hero ${pictured ? "pictured" : ""}" part="hero">
|
|
93
93
|
<div class="words">
|
|
94
94
|
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
|
|
95
|
-
${heading(this.level, this.heading
|
|
95
|
+
${heading(this.level, html`<slot name="heading">${this.heading}</slot>`, "h")}
|
|
96
96
|
${this.lead ? html`<p class="body">${this.lead}</p>` : nothing}
|
|
97
97
|
<div class="actions"><slot name="actions"></slot></div>
|
|
98
98
|
</div>
|
|
@@ -107,6 +107,7 @@ var ImpaktFeatureList = class extends ImpaktElement {
|
|
|
107
107
|
columns: { type: String, reflect: true },
|
|
108
108
|
headingLevel: { type: Number, attribute: "heading-level" },
|
|
109
109
|
layout: { type: String, reflect: true },
|
|
110
|
+
look: { type: String, reflect: true },
|
|
110
111
|
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
111
112
|
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
112
113
|
};
|
|
@@ -117,6 +118,7 @@ var ImpaktFeatureList = class extends ImpaktElement {
|
|
|
117
118
|
this.columns = "three";
|
|
118
119
|
this.headingLevel = 3;
|
|
119
120
|
this.layout = "stacked";
|
|
121
|
+
this.look = "icons";
|
|
120
122
|
this.spaceAbove = "none";
|
|
121
123
|
this.spaceBelow = "none";
|
|
122
124
|
}
|
|
@@ -137,16 +139,32 @@ var ImpaktFeatureList = class extends ImpaktElement {
|
|
|
137
139
|
:host([layout='inline']) .icon { margin: 0; }
|
|
138
140
|
.h { font-size: ${fontSize("lg")}; }
|
|
139
141
|
.body { color: ${t.text}; }
|
|
142
|
+
/* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */
|
|
143
|
+
:host([look='ruled']) li { gap: ${space(3)}; padding-block-start: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; }
|
|
144
|
+
:host(:is([look='ruled'], [look='numbered'])) .icon { display: none; }
|
|
145
|
+
:host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${fontWeight("semibold")}; letter-spacing: -0.02em; line-height: 1.2; }
|
|
146
|
+
:host(:is([look='ruled'], [look='numbered'])) .body { color: ${t.textMuted}; }
|
|
147
|
+
:host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${space(3)}; }
|
|
148
|
+
/* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */
|
|
149
|
+
:host([look='numbered']) ul { gap: ${space(3)}; }
|
|
150
|
+
:host([look='numbered']) li { gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; }
|
|
151
|
+
.top { display: flex; align-items: center; justify-content: space-between; font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; color: ${t.text}; }
|
|
152
|
+
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${t.text}; }
|
|
153
|
+
.dot.attention { background: ${token("color.accent.default", "#ffd43b")}; box-shadow: inset 0 0 0 1px ${t.text}; }
|
|
154
|
+
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
155
|
+
@media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }
|
|
140
156
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
141
157
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
142
158
|
`
|
|
143
159
|
];
|
|
144
160
|
}
|
|
145
161
|
render() {
|
|
162
|
+
const numbered = this.look === "numbered";
|
|
146
163
|
return html`<ul part="list">${(this.items ?? []).map(
|
|
147
|
-
(item) => html`<li part="item">
|
|
148
|
-
${
|
|
149
|
-
|
|
164
|
+
(item, index) => html`<li part="item">
|
|
165
|
+
${numbered ? html`<div class="top" aria-hidden="true"><span>${String(index + 1).padStart(2, "0")}</span><span class=${item.attention ? "dot attention" : "dot"}></span></div>` : nothing}
|
|
166
|
+
${item.icon && this.look !== "ruled" && !numbered ? html`<span class="icon">${iconSvg(item.icon, "24px")}</span>` : nothing}
|
|
167
|
+
<div class="words">${heading(this.headingLevel, html`${item.heading}${numbered && item.attention ? html`<span class="sr"> (${item.attention})</span>` : nothing}`, "h")}${item.text ? html`<p class="body">${item.text}</p>` : nothing}</div>
|
|
150
168
|
</li>`
|
|
151
169
|
)}</ul>`;
|
|
152
170
|
}
|
|
@@ -341,4 +359,4 @@ export {
|
|
|
341
359
|
ImpaktAnnouncement,
|
|
342
360
|
ImpaktSearchBar
|
|
343
361
|
};
|
|
344
|
-
//# sourceMappingURL=chunk-
|
|
362
|
+
//# sourceMappingURL=chunk-R7SSIE2E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\n/** A heading at a level the author chose, drawn at a size the component chose. */\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult =>\n html`<div class=${cls} role=\"heading\" aria-level=${level}>${text}</div>`;\n\nconst headingStyles = css`\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; max-inline-size: 65ch; }\n`;\n\n/**\n * The opening of a page: a short label, a big heading, a line of text, the\n * page's main actions and, beside them, a picture.\n *\n * Put the buttons in the `actions` slot. The picture goes beside the words on\n * a wide screen and below them on a phone, so the heading is always the first\n * thing read.\n *\n * @category layout\n * @icon hero\n * @role heading\n * A heading with more than words in it, such as a word picked out with\n * `impakt-highlight`, is slotted as `heading`; it stays the hero's heading at\n * its `level`, and `heading` is then only the fallback.\n *\n * @slot heading - The heading's words, when they hold more than text, such as an `impakt-highlight`.\n * @slot actions - The page's main buttons and links.\n * @slot search - A search bar across the bottom of a full-picture hero.\n */\nexport class ImpaktHero extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n treatment: { type: String, reflect: true },\n ratingText: { type: String, attribute: 'rating-text' },\n eyebrowIcon: { type: String, attribute: 'eyebrow-icon' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A short label above the heading, such as the name of the development. */\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** The heading's level in the page. A page's hero is usually its only level 1. */\n declare level: 1 | 2;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** The picture beside the words, or filling the whole block with the words over it. */\n declare treatment: 'split' | 'cover';\n /** A short line of proof on the picture, such as \"4.8 from 312 buyers\". */\n declare ratingText: string;\n /** A small picture before the eyebrow on a full-picture hero. */\n declare eyebrowIcon:\n | 'none'\n | 'arrow-right'\n | 'arrow-left'\n | 'chevron-right'\n | 'chevron-down'\n | 'check'\n | 'close'\n | 'menu'\n | 'plus'\n | 'minus'\n | 'search'\n | 'external'\n | 'download'\n | 'home'\n | 'phone'\n | 'mail'\n | 'map-pin'\n | 'calendar'\n | 'clock'\n | 'user'\n | 'star'\n | 'heart'\n | 'shield'\n | 'leaf'\n | 'sun'\n | 'bolt'\n | 'key'\n | 'info'\n | 'warning'\n | 'document'\n | 'pound'\n | 'chat';\n /** Where the words sit. Centred heroes have no picture beside them. */\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.level = 1;\n this.imageSrc = '';\n this.imageAlt = '';\n this.treatment = 'split';\n this.ratingText = '';\n this.eyebrowIcon = 'none';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }\n .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }\n .h { ${type('5xl')} letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { ${type('lg')} color: ${t.textMuted}; text-wrap: pretty; }\n @container (max-width: 40rem) { .h { ${type('4xl')} } }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n :host([align='center']) .actions { justify-content: center; }\n img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }\n @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }\n /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */\n .cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${space(32)} max(${space(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${space(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }\n .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }\n .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }\n .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }\n .cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); text-transform: none; letter-spacing: 0; }\n .chip-line { position: relative; z-index: 1; block-size: 0; }\n .chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }\n .finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }\n .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }\n .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }\n @container (max-width: 64rem) { .chip { display: none; } }\n @container (max-width: 30rem) { .finder { display: none; } }\n @container (max-width: 48rem) { .finder { margin-block-start: ${space(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${space(32)} ${space(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }\n `,\n ];\n\n render(): TemplateResult {\n if (this.treatment === 'cover' && this.imageSrc) {\n return html`<div class=\"cover\" part=\"hero\">\n ${this.ratingText ? html`<div class=\"chip-line\"><div class=\"chip\">${iconSvg('star', '20px')}${this.ratingText}</div></div>` : nothing}\n <img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrowIcon !== 'none' ? iconSvg(this.eyebrowIcon, '16px') : nothing}${this.eyebrow}</p>` : nothing}\n ${heading(this.level, html`<slot name=\"heading\">${this.heading}</slot>`, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n <div class=\"finder\"><slot name=\"search\"></slot></div>\n </div>`;\n }\n const pictured = Boolean(this.imageSrc) && this.align !== 'center';\n return html`<div class=\"hero ${pictured ? 'pictured' : ''}\" part=\"hero\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${heading(this.level, html`<slot name=\"heading\">${this.heading}</slot>`, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />` : nothing}\n </div>`;\n }\n}\n\n/** One benefit or feature in a list of them. */\nexport interface FeatureItem {\n id?: string;\n icon?: string;\n heading: string;\n text?: string;\n /**\n * With `look=\"numbered\"`: a word or two read with the item when it is the\n * one that needs attention, such as \"Needs your attention\". Its dot then\n * turns to the accent; the word is what carries it to a screen reader.\n */\n attention?: string;\n}\n\n/**\n * Benefits or features side by side, each with an icon, a short heading and a\n * line of text: \"Ten years of cover\", \"Lower bills from day one\".\n *\n * The icons are decoration, because each heading already says what it is.\n * The items are a list, so a screen reader says how many there are.\n *\n * `look=\"ruled\"` draws each item under a 1px ink rule with no icon, the\n * heading at 24px and the text muted. `look=\"numbered\"` draws each as a card\n * with a 1px ink border, its number in monospace at the top left and a status\n * dot at the top right: ink, or the accent for the one item given\n * `attention`. The numbers and dots are decoration.\n *\n * @category content\n * @icon features\n */\nexport class ImpaktFeatureList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n layout: { type: String, reflect: true },\n look: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: FeatureItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each item's heading. One below the heading above the list. */\n declare headingLevel: 2 | 3 | 4;\n /** Icons above the words, or beside them. */\n declare layout: 'stacked' | 'inline';\n /** `icons` draws each item's icon. `ruled` sets each under a 1px ink rule. `numbered` sets each in a bordered card with its number and a status dot. */\n declare look: 'icons' | 'ruled' | 'numbered';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.layout = 'stacked';\n this.look = 'icons';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(2)}; }\n :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }\n :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }\n .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${t.radiusLg}; background: ${t.brandSubtle}; color: ${t.brand}; margin-block-end: ${space(2)}; }\n :host([layout='inline']) .icon { margin: 0; }\n .h { font-size: ${fontSize('lg')}; }\n .body { color: ${t.text}; }\n /* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */\n :host([look='ruled']) li { gap: ${space(3)}; padding-block-start: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; }\n :host(:is([look='ruled'], [look='numbered'])) .icon { display: none; }\n :host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1.2; }\n :host(:is([look='ruled'], [look='numbered'])) .body { color: ${t.textMuted}; }\n :host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${space(3)}; }\n /* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */\n :host([look='numbered']) ul { gap: ${space(3)}; }\n :host([look='numbered']) li { gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; }\n .top { display: flex; align-items: center; justify-content: space-between; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; color: ${t.text}; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${t.text}; }\n .dot.attention { background: ${token('color.accent.default', '#ffd43b')}; box-shadow: inset 0 0 0 1px ${t.text}; }\n .sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n @media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const numbered = this.look === 'numbered';\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item, index) => html`<li part=\"item\">\n ${numbered ? html`<div class=\"top\" aria-hidden=\"true\"><span>${String(index + 1).padStart(2, '0')}</span><span class=${item.attention ? 'dot attention' : 'dot'}></span></div>` : nothing}\n ${item.icon && this.look !== 'ruled' && !numbered ? html`<span class=\"icon\">${iconSvg(item.icon, '24px')}</span>` : nothing}\n <div class=\"words\">${heading(this.headingLevel, html`${item.heading}${numbered && item.attention ? html`<span class=\"sr\"> (${item.attention})</span>` : nothing}`, 'h')}${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}</div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * Something a customer said, and who said it.\n *\n * It is a `blockquote` with a `figcaption`, so the words and the person are\n * tied together for a screen reader as well as on the screen.\n *\n * @category content\n * @icon quote\n */\nexport class ImpaktQuote extends ImpaktElement {\n static properties = {\n quote: { type: String },\n person: { type: String },\n about: { type: String },\n imageSrc: { type: String, attribute: 'image-src' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The words they said, without quotation marks. */\n declare quote: string;\n /** Who said it. */\n declare person: string;\n /** Who they are, such as \"Bought at Larkfield Meadows, 2025\". */\n declare about: string;\n /** A photo of them. It is decoration, because their name is beside it. */\n declare imageSrc: string;\n declare size: 'md' | 'lg';\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.quote = '';\n this.person = '';\n this.about = '';\n this.imageSrc = '';\n this.size = 'md';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }\n :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }\n blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; line-height: ${lineHeight('normal')}; color: inherit; }\n :host([size='lg']) blockquote { font-size: ${fontSize('2xl')}; line-height: ${lineHeight('tight')}; }\n blockquote::before { content: '\\\\201C'; } blockquote::after { content: '\\\\201D'; }\n figcaption { display: flex; align-items: center; gap: ${space(3)}; }\n img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<figure part=\"figure\">\n <blockquote part=\"quote\">${this.quote}</blockquote>\n ${this.person ? html`<figcaption>${this.imageSrc ? html`<img src=${this.imageSrc} alt=\"\" />` : nothing}<span><span class=\"name\">${this.person}</span>${this.about ? html`<br /><span class=\"detail\">${this.about}</span>` : nothing}</span></figcaption>` : nothing}\n </figure>`;\n }\n}\n\n/**\n * A number that makes a point, with what it counts beneath it: \"36 years\",\n * \"Building in Kent since 1987\".\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStat extends ImpaktElement {\n static properties = {\n figure: { type: String },\n label: { type: String },\n note: { type: String },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** How large the number is drawn. */\n declare size: 'md' | 'lg' | 'xl';\n /** The number, written as it should appear, such as \"36\" or \"£280k\". */\n declare figure: string;\n /** What the number counts. */\n declare label: string;\n /** A line more, if the label needs it. */\n declare note: string;\n declare align: 'start' | 'center';\n\n constructor() {\n super();\n this.figure = '';\n this.label = '';\n this.note = '';\n this.size = 'md';\n this.align = 'start';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .stat { display: flex; flex-direction: column; gap: ${space(1)}; }\n :host([align='center']) .stat { align-items: center; text-align: center; }\n .value { font-family: ${t.fontHeading}; font-size: ${fontSize('3xl')}; font-weight: ${fontWeight('bold')}; line-height: 1; color: ${t.textHeading}; }\n :host([size='lg']) .value { font-size: ${fontSize('5xl')}; }\n :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }\n .label { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n // Read as one phrase, \"36 years\", rather than a bare number and then a label.\n return html`<p class=\"stat\" part=\"stat\" style=\"margin:0\"><span class=\"value\">${this.figure}</span> <span class=\"label\">${this.label}</span>${this.note ? html` <span class=\"detail\">${this.note}</span>` : nothing}</p>`;\n }\n}\n\n/**\n * A thin line of news across the top of a page: a launch, a change to opening\n * hours. Keep it to one short sentence.\n *\n * @category feedback\n * @icon alert\n */\nexport class ImpaktAnnouncement extends ImpaktElement {\n static properties = {\n message: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n href: { type: String },\n };\n declare message: string;\n declare linkText: string;\n declare href: string;\n\n constructor() {\n super();\n this.message = '';\n this.linkText = '';\n this.href = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${space(2)} ${space(3)}; padding: ${space(2.5)} ${space(5)}; ${type('sm')} text-align: center; color: ${t.onBrand}; background: ${t.brand}; }\n :host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }\n a { display: inline-flex; align-items: center; gap: ${space(1)}; min-block-size: ${t.targetMin}; color: inherit; font-weight: ${fontWeight('semibold')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"bar\" part=\"bar\"><span>${this.message}</span>${this.linkText && this.href ? html`<a href=${this.href}>${this.linkText}${iconSvg('arrow-right', '14px')}</a>` : nothing}</div>`;\n }\n}\n\n/** One choice in a search bar. */\nexport interface SearchField {\n id?: string;\n /** The name it sends, such as \"bedrooms\". */\n name?: string;\n label: string;\n /** What it shows before anything is chosen. */\n placeholder?: string;\n /** The other choices, separated by commas. */\n options?: string;\n}\n\n/**\n * A row of choices and one button that finds what fits: where, how many\n * bedrooms, up to what budget.\n *\n * Each choice is a native select with a real label. It sends the visitor to\n * `action` with their choices in the address, so it works as a plain link can.\n *\n * @category form\n * @icon search\n * @fires {CustomEvent<{ values: Record<string, string> }>} impakt-submit - When the search is run. The choices are in detail.values.\n */\nexport class ImpaktSearchBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n action: { type: String },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: SearchField[];\n declare buttonText: string;\n /** Where the search goes. Leave empty to handle it in the app. */\n declare action: string;\n /** What the search is called for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.buttonText = 'Search';\n this.action = '';\n this.label = 'Search';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }\n label { ${type('sm')} color: ${t.textMuted}; }\n select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: transparent; border: 0; border-radius: ${t.radiusSm}; cursor: pointer; }\n select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }\n button { flex: none; min-block-size: 48px; padding: ${space(3)} ${space(6)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }\n @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n const data = new FormData(event.currentTarget as HTMLFormElement);\n const values: Record<string, string> = {};\n data.forEach((value, key) => {\n if (value !== '') values[key] = String(value);\n });\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { values }, bubbles: true, composed: true }));\n if (!this.action) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`<form role=\"search\" aria-label=${this.label} method=\"get\" action=${this.action || nothing} @submit=${this.submit} part=\"form\">\n ${(this.items ?? []).map((field, i) => {\n const id = this.id_(`field-${i}`);\n const choices = String(field.options ?? '')\n .split(',')\n .map((o) => o.trim())\n .filter(Boolean);\n return html`<div class=\"field\"><label for=${id}>${field.label}</label><select id=${id} name=${field.name || field.label.toLowerCase().replace(/[^a-z0-9]+/g, '-')}>\n <option value=\"\">${field.placeholder || 'Any'}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}\n </select></div>`;\n })}\n <button type=\"submit\">${this.buttonText}</button>\n </form>`;\n }\n}\n\ncustomElements.define('impakt-search-bar', ImpaktSearchBar);\ncustomElements.define('impakt-announcement', ImpaktAnnouncement);\ncustomElements.define('impakt-hero', ImpaktHero);\ncustomElements.define('impakt-feature-list', ImpaktFeatureList);\ncustomElements.define('impakt-quote', ImpaktQuote);\ncustomElements.define('impakt-stat', ImpaktStat);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-hero': ImpaktHero;\n 'impakt-feature-list': ImpaktFeatureList;\n 'impakt-quote': ImpaktQuote;\n 'impakt-stat': ImpaktStat;\n }\n}\n"],"mappings":";AAAA,SAAS,KAAK,MAAM,eAAoC;AACxD,SAAS,eAAe,UAAU,YAAY,YAAY,OAAO,aAAa,GAAG,OAAO,MAAM,eAAe;AAG7G,IAAM,UAAU,CAAC,OAAe,MAA+B,QAC7D,kBAAkB,GAAG,8BAA8B,KAAK,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AAC,KAAK,OAAQ,OAAM,eAAe;AAAA,EACzC;AAAA,EAEA,SAAyB;AACvB,WAAO,sCAAsC,KAAK,KAAK,wBAAwB,KAAK,UAAU,OAAO,YAAY,KAAK,MAAM;AAAA,SACvH,KAAK,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,MAAM;AACrC,YAAM,KAAK,KAAK,IAAI,SAAS,CAAC,EAAE;AAChC,YAAM,UAAU,OAAO,MAAM,WAAW,EAAE,EACvC,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,OAAO;AACjB,aAAO,qCAAqC,EAAE,IAAI,MAAM,KAAK,sBAAsB,EAAE,SAAS,MAAM,QAAQ,MAAM,MAAM,YAAY,EAAE,QAAQ,eAAe,GAAG,CAAC;AAAA,6BAC5I,MAAM,eAAe,KAAK,YAAY,QAAQ,IAAI,CAAC,MAAM,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC;AAAA;AAAA,IAEvH,CAAC,CAAC;AAAA,8BACsB,KAAK,UAAU;AAAA;AAAA,EAE3C;AACF;AAEA,eAAe,OAAO,qBAAqB,eAAe;AAC1D,eAAe,OAAO,uBAAuB,kBAAkB;AAC/D,eAAe,OAAO,eAAe,UAAU;AAC/C,eAAe,OAAO,uBAAuB,iBAAiB;AAC9D,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/blocks/src/components/site.ts
|
|
2
2
|
import { css, html, nothing } from "lit";
|
|
3
|
-
import { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, type, toneOf } from "@atomic-ui/ui";
|
|
3
|
+
import { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, token, type, toneOf } from "@atomic-ui/ui";
|
|
4
4
|
var STRIPE = [0, 1, 2, 3, 4];
|
|
5
5
|
var MONO = t.fontMono;
|
|
6
6
|
var ImpaktSiteHeader = class extends ImpaktElement {
|
|
@@ -19,7 +19,14 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
19
19
|
statusMeta: { type: String, attribute: "status-meta" },
|
|
20
20
|
statusTone: { type: String, attribute: "status-tone" },
|
|
21
21
|
actionText: { type: String, attribute: "action-text" },
|
|
22
|
-
actionHref: { type: String, attribute: "action-href" }
|
|
22
|
+
actionHref: { type: String, attribute: "action-href" },
|
|
23
|
+
fold: { type: String, reflect: true },
|
|
24
|
+
mark: { type: String },
|
|
25
|
+
context: { type: String },
|
|
26
|
+
statusAt: { type: String, reflect: true, attribute: "status-at" },
|
|
27
|
+
navLook: { type: String, attribute: "nav-look" },
|
|
28
|
+
current: { type: String },
|
|
29
|
+
presence: { type: Array }
|
|
23
30
|
};
|
|
24
31
|
}
|
|
25
32
|
constructor() {
|
|
@@ -38,6 +45,13 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
38
45
|
this.statusTone = "success";
|
|
39
46
|
this.actionText = "";
|
|
40
47
|
this.actionHref = "";
|
|
48
|
+
this.fold = "measure";
|
|
49
|
+
this.mark = "";
|
|
50
|
+
this.context = "";
|
|
51
|
+
this.statusAt = "end";
|
|
52
|
+
this.navLook = "";
|
|
53
|
+
this.current = "";
|
|
54
|
+
this.presence = [];
|
|
41
55
|
}
|
|
42
56
|
static {
|
|
43
57
|
this.styles = [
|
|
@@ -45,6 +59,15 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
45
59
|
focusRing,
|
|
46
60
|
css`
|
|
47
61
|
:host { display: block; container-type: inline-size; }
|
|
62
|
+
/* With a mark, the name is set small beside it, as in the canvas header. */
|
|
63
|
+
.brand.marked { gap: ${space(3)}; font-size: ${fontSize("md")}; letter-spacing: -0.01em; }
|
|
64
|
+
.mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${t.text}; color: ${t.surfaceCard}; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("medium")}; }
|
|
65
|
+
.context { font-size: ${fontSize("sm")}; white-space: nowrap; }
|
|
66
|
+
.context .slash { margin-inline-end: ${space(2)}; opacity: 0.72; }
|
|
67
|
+
.presence { display: flex; }
|
|
68
|
+
.presence .avatar { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; box-sizing: border-box; margin-inline-start: -6px; border-radius: 50%; border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; font-family: ${MONO}; font-size: 0.625rem; line-height: 1; }
|
|
69
|
+
.presence .avatar:first-child { margin-inline-start: 0; }
|
|
70
|
+
.presence .avatar.accent { background: ${token("color.accent.default", "#ffd43b")}; color: ${token("color.accent.on", "#111111")}; }
|
|
48
71
|
.bar { display: flex; align-items: center; gap: ${space(6)}; }
|
|
49
72
|
.start { display: flex; align-items: center; gap: ${space(3)}; flex: none; }
|
|
50
73
|
.middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
|
|
@@ -56,18 +79,29 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
56
79
|
.chip svg { inline-size: 12px; block-size: 12px; }
|
|
57
80
|
.meta { font-family: ${MONO}; font-size: ${fontSize("xs")}; opacity: 0.72; }
|
|
58
81
|
.middle impakt-nav { flex: 1 1 8rem; }
|
|
82
|
+
/* File tabs sit in one box as wide as the tabs, centred between the name and the action. */
|
|
83
|
+
:host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }
|
|
59
84
|
.end { display: flex; align-items: center; gap: ${space(3)}; flex: none; }
|
|
60
85
|
.end:empty, .start:empty { display: none; }
|
|
61
|
-
.status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius:
|
|
86
|
+
.status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize("xs")}; white-space: nowrap; }
|
|
87
|
+
/* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */
|
|
88
|
+
.start .status { padding: 2px ${space(2)}; border-color: ${t.text}; border-radius: ${t.radius}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
89
|
+
.start .status .dot { inline-size: 6px; block-size: 6px; }
|
|
62
90
|
.status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
|
|
63
91
|
.status .hash { opacity: 0.72; }
|
|
64
|
-
@container (max-width:
|
|
92
|
+
@container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(2)}; } :host(:not([fold='narrow'])) .end { flex: 1 1 100%; } }
|
|
93
|
+
@container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${space(3)}; } }
|
|
65
94
|
/* With no script the links cannot fold behind a Menu button. On a narrow screen they take a
|
|
66
95
|
line of their own under the name and the action, and wrap there. */
|
|
67
96
|
@container (max-width: 40rem) {
|
|
68
|
-
:host(:not(:defined)) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }
|
|
69
|
-
:host(:not(:defined)) .start { flex: 1 1 auto; }
|
|
70
|
-
:host(:not(:defined)) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }
|
|
97
|
+
:host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }
|
|
98
|
+
:host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }
|
|
99
|
+
:host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }
|
|
100
|
+
/* fold="narrow": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */
|
|
101
|
+
:host([fold='narrow']) .middle { justify-content: flex-end; }
|
|
102
|
+
/* On the narrowest bars the action takes its own row, so the Menu button never spills over the brand. */
|
|
103
|
+
:host(:not([fold='narrow'])) .middle { justify-content: flex-end; min-inline-size: max-content; }
|
|
104
|
+
:host([fold='narrow']) .end > slot > impakt-button { display: none; }
|
|
71
105
|
}
|
|
72
106
|
`
|
|
73
107
|
];
|
|
@@ -77,16 +111,22 @@ var ImpaktSiteHeader = class extends ImpaktElement {
|
|
|
77
111
|
}
|
|
78
112
|
render() {
|
|
79
113
|
const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;
|
|
114
|
+
const status = 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;
|
|
115
|
+
const presence = this.presence ?? [];
|
|
80
116
|
return html`<div class="bar" part="bar">
|
|
81
117
|
<div class="start"><slot name="start">
|
|
82
|
-
${this.brand || this.logoSrc ? html`<a class
|
|
118
|
+
${this.brand || this.logoSrc ? html`<a class=${this.mark ? "brand marked" : "brand"} href=${this.home || "/"} part="brand">${this.mark ? html`<span class="mark" part="mark" aria-hidden="true">${this.mark}</span>` : nothing}${wordmark}</a>` : nothing}
|
|
119
|
+
${this.context ? html`<span class="context" part="context"><span class="slash" aria-hidden="true">/</span>${this.context}</span>` : nothing}
|
|
120
|
+
${this.statusAt === "start" ? status : nothing}
|
|
83
121
|
${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}
|
|
84
122
|
${this.meta ? html`<span class="meta" part="meta">${this.meta}</span>` : nothing}
|
|
85
123
|
</slot></div>
|
|
86
|
-
<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>
|
|
87
|
-
<div class="end"><slot name="
|
|
88
|
-
|
|
89
|
-
|
|
124
|
+
<div class="middle"><slot name="middle">${(this.links ?? []).length ? html`<impakt-nav align="center" size="sm" fold=${this.fold} look=${this.navLook || nothing} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold === "narrow" ? this.actionText : ""} .actionHref=${this.actionHref}></impakt-nav>` : nothing}</slot></div>
|
|
125
|
+
<div class="end"><slot name="presence">${presence.length ? html`<span class="presence" part="presence">${presence.map(
|
|
126
|
+
(person) => html`<span class=${person.accent ? "avatar accent" : "avatar"} role="img" aria-label=${person.name}>${person.initials ?? person.name.slice(0, 1).toUpperCase()}</span>`
|
|
127
|
+
)}</span>` : nothing}</slot><slot name="end">
|
|
128
|
+
${this.statusAt === "start" ? nothing : status}
|
|
129
|
+
${this.actionText ? html`<impakt-button variant="primary" size="sm" icon-after="arrow-right" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}
|
|
90
130
|
</slot></div>
|
|
91
131
|
</div>`;
|
|
92
132
|
}
|
|
@@ -139,7 +179,10 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
139
179
|
columnsOnPhone: { type: String, attribute: "columns-on-phone", reflect: true },
|
|
140
180
|
legal: { type: String },
|
|
141
181
|
stripe: { type: Boolean, reflect: true },
|
|
142
|
-
headingLevel: { type: Number, attribute: "heading-level" }
|
|
182
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
183
|
+
actionText: { type: String, attribute: "action-text" },
|
|
184
|
+
actionHref: { type: String, attribute: "action-href" },
|
|
185
|
+
tagline: { type: String }
|
|
143
186
|
};
|
|
144
187
|
}
|
|
145
188
|
constructor() {
|
|
@@ -152,6 +195,9 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
152
195
|
this.legal = "";
|
|
153
196
|
this.stripe = false;
|
|
154
197
|
this.headingLevel = 2;
|
|
198
|
+
this.actionText = "";
|
|
199
|
+
this.actionHref = "";
|
|
200
|
+
this.tagline = "";
|
|
155
201
|
}
|
|
156
202
|
static {
|
|
157
203
|
this.styles = [
|
|
@@ -178,9 +224,15 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
178
224
|
a { color: inherit; text-decoration: none; font-weight: ${fontWeight("medium")}; border-radius: ${t.radiusSm}; }
|
|
179
225
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
180
226
|
.legal { margin: ${space(16)} 0 0; font-family: ${MONO}; font-size: ${fontSize("xs")}; opacity: 0.72; }
|
|
227
|
+
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${space(2)} ${space(6)}; margin-block-start: ${space(16)}; }
|
|
228
|
+
.foot .legal { margin: 0; }
|
|
229
|
+
.tagline { margin: 0; font-family: ${MONO}; font-size: ${fontSize("xs")}; opacity: 0.72; text-align: end; }
|
|
230
|
+
.row { display: flex; align-items: flex-start; gap: ${space(8)}; }
|
|
231
|
+
.row .columns { flex: 1; }
|
|
232
|
+
.row impakt-button { flex: none; }
|
|
181
233
|
.stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
|
|
182
234
|
.stripe span { flex: 1; }
|
|
183
|
-
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
235
|
+
@container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }
|
|
184
236
|
@container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
|
|
185
237
|
@media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
|
|
186
238
|
`
|
|
@@ -198,11 +250,14 @@ var ImpaktSiteFooter = class extends ImpaktElement {
|
|
|
198
250
|
${this.brand ? html`<p class="brand" part="brand">${this.brand}</p>` : nothing}
|
|
199
251
|
${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}
|
|
200
252
|
</div>
|
|
201
|
-
<div class="
|
|
202
|
-
|
|
253
|
+
<div class="row">
|
|
254
|
+
<div class="columns" part="columns" style=${`--count:${Math.max(1, (this.columns ?? []).length)}`}>
|
|
255
|
+
${(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>`)}
|
|
256
|
+
</div>
|
|
257
|
+
${this.actionText ? html`<impakt-button variant="outline" icon-after="arrow-right" href=${this.actionHref || nothing} part="action">${this.actionText}</impakt-button>` : nothing}
|
|
203
258
|
</div>
|
|
204
259
|
</div>
|
|
205
|
-
${this.legal ? html`<p class="legal" part="legal">${this.legal}</p>` : nothing}
|
|
260
|
+
${this.tagline ? html`<div class="foot">${this.legal ? html`<p class="legal" part="legal">${this.legal}</p>` : html`<span></span>`}<p class="tagline" part="tagline">${this.tagline}</p></div>` : this.legal ? html`<p class="legal" part="legal">${this.legal}</p>` : nothing}
|
|
206
261
|
${this.stripe ? html`<div class="stripe" aria-hidden="true">${STRIPE.map((i) => html`<span style=${`background:${toneOf(void 0, i)}`}></span>`)}</div>` : nothing}
|
|
207
262
|
</div>`;
|
|
208
263
|
}
|
|
@@ -216,4 +271,4 @@ export {
|
|
|
216
271
|
ImpaktWordmark,
|
|
217
272
|
ImpaktSiteFooter
|
|
218
273
|
};
|
|
219
|
-
//# sourceMappingURL=chunk-
|
|
274
|
+
//# sourceMappingURL=chunk-SYTQIQT2.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, token, 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 * **A header for a studio's canvas.** `mark` draws a 28px ink square with a\n * letter in it before the name, `context` a path after it (\"/ home.canvas\"),\n * and `status-at=\"start\"` moves the status chip, a square with a dot and a\n * word such as \"Live\", up beside them. `nav-look=\"tabs\"` draws the links as\n * file tabs. `presence` draws a few small overlapping avatars of the people in\n * the file before the action; each is named for a screen reader.\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 presence - Avatars of the people in the file, before the action. Replaces what `presence` draws.\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 fold: { type: String, reflect: true },\n mark: { type: String },\n context: { type: String },\n statusAt: { type: String, reflect: true, attribute: 'status-at' },\n navLook: { type: String, attribute: 'nav-look' },\n current: { type: String },\n presence: { type: Array },\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 * How the links fold on a narrow screen. `measure` folds them when they do not fit, which needs\n * script. `narrow` folds them at 40rem in CSS: the Menu button then opens a whole-screen menu\n * with no script, and the header's action moves into that menu. Use `narrow` on a page that may\n * be shown without script.\n */\n declare fold: 'measure' | 'narrow';\n /** A letter or two in a 28px ink square before the name, such as \"i\". Decoration: the name is what is read. */\n declare mark: string;\n /** A path after the name, such as \"home.canvas\", drawn as \"/ home.canvas\". */\n declare context: string;\n /** Where the status sits: `end`, before the action, or `start`, after the name. */\n declare statusAt: 'start' | 'end';\n /** How the links are drawn, passed to `impakt-nav` as its `look`, such as `tabs` for file tabs. */\n declare navLook: string;\n /** The href of the link to mark as the page you are on, passed to the nav; unset, the nav works it out from the address. */\n declare current: string;\n /** The people in the file, drawn as small overlapping avatars. `accent` fills one in the accent. */\n declare presence: Array<{ name: string; initials?: string; accent?: boolean }>;\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 this.fold = 'measure';\n this.mark = '';\n this.context = '';\n this.statusAt = 'end';\n this.navLook = '';\n this.current = '';\n this.presence = [];\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n /* With a mark, the name is set small beside it, as in the canvas header. */\n .brand.marked { gap: ${space(3)}; font-size: ${fontSize('md')}; letter-spacing: -0.01em; }\n .mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${t.text}; color: ${t.surfaceCard}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; }\n .context { font-size: ${fontSize('sm')}; white-space: nowrap; }\n .context .slash { margin-inline-end: ${space(2)}; opacity: 0.72; }\n .presence { display: flex; }\n .presence .avatar { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; box-sizing: border-box; margin-inline-start: -6px; border-radius: 50%; border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; font-family: ${MONO}; font-size: 0.625rem; line-height: 1; }\n .presence .avatar:first-child { margin-inline-start: 0; }\n .presence .avatar.accent { background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#111111')}; }\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 /* File tabs sit in one box as wide as the tabs, centred between the name and the action. */\n :host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }\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: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize('xs')}; white-space: nowrap; }\n /* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */\n .start .status { padding: 2px ${space(2)}; border-color: ${t.text}; border-radius: ${t.radius}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .start .status .dot { inline-size: 6px; block-size: 6px; }\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: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(2)}; } :host(:not([fold='narrow'])) .end { flex: 1 1 100%; } }\n @container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${space(3)}; } }\n /* With no script the links cannot fold behind a Menu button. On a narrow screen they take a\n line of their own under the name and the action, and wrap there. */\n @container (max-width: 40rem) {\n :host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }\n :host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }\n :host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }\n /* fold=\"narrow\": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */\n :host([fold='narrow']) .middle { justify-content: flex-end; }\n /* On the narrowest bars the action takes its own row, so the Menu button never spills over the brand. */\n :host(:not([fold='narrow'])) .middle { justify-content: flex-end; min-inline-size: max-content; }\n :host([fold='narrow']) .end > slot > impakt-button { display: none; }\n }\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 const status = this.status\n ? 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>`\n : nothing;\n const presence = this.presence ?? [];\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=${this.mark ? 'brand marked' : 'brand'} href=${this.home || '/'} part=\"brand\">${this.mark ? html`<span class=\"mark\" part=\"mark\" aria-hidden=\"true\">${this.mark}</span>` : nothing}${wordmark}</a>` : nothing}\n ${this.context ? html`<span class=\"context\" part=\"context\"><span class=\"slash\" aria-hidden=\"true\">/</span>${this.context}</span>` : nothing}\n ${this.statusAt === 'start' ? status : 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\" fold=${this.fold} look=${this.navLook || nothing} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold === 'narrow' ? this.actionText : ''} .actionHref=${this.actionHref}></impakt-nav>` : nothing}</slot></div>\n <div class=\"end\"><slot name=\"presence\">${\n presence.length\n ? html`<span class=\"presence\" part=\"presence\">${presence.map(\n (person) =>\n html`<span class=${person.accent ? 'avatar accent' : 'avatar'} role=\"img\" aria-label=${person.name}>${person.initials ?? person.name.slice(0, 1).toUpperCase()}</span>`,\n )}</span>`\n : nothing\n }</slot><slot name=\"end\">\n ${this.statusAt === 'start' ? nothing : status}\n ${this.actionText ? html`<impakt-button variant=\"primary\" size=\"sm\" 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 * `action-text` and `action-href` put one outlined action at the end of the\n * columns' row, such as \"Back to top\". `tagline` sets a short line at the\n * other end of the legal line, such as \"Pixel to production\". On a phone the\n * columns sit two by two.\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 actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n tagline: { type: String },\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 /** The words on an outlined action at the end of the columns' row, such as \"Back to top\". */\n declare actionText: string;\n /** Where that action goes, such as \"#top\". */\n declare actionHref: string;\n /** A short line at the end of the legal line, such as \"Pixel to production\". */\n declare tagline: string;\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 this.actionText = '';\n this.actionHref = '';\n this.tagline = '';\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 .foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${space(2)} ${space(6)}; margin-block-start: ${space(16)}; }\n .foot .legal { margin: 0; }\n .tagline { margin: 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; text-align: end; }\n .row { display: flex; align-items: flex-start; gap: ${space(8)}; }\n .row .columns { flex: 1; }\n .row impakt-button { flex: none; }\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)); } .row { flex-direction: column; } }\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=\"row\">\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 ${this.actionText ? html`<impakt-button variant=\"outline\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} part=\"action\">${this.actionText}</impakt-button>` : nothing}\n </div>\n </div>\n ${\n this.tagline\n ? html`<div class=\"foot\">${this.legal ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>` : html`<span></span>`}<p class=\"tagline\" part=\"tagline\">${this.tagline}</p></div>`\n : this.legal\n ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>`\n : nothing\n }\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,QAAQ,UAAU,YAAY,OAAO,GAAG,OAAO,MAAM,cAAuC;AAI/H,IAAM,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AAG7B,IAAM,OAAO,EAAE;AAiCR,IAAM,mBAAN,cAA+B,cAAc;AAAA,EAClD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW;AAAA,MAC/C,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW;AAAA,MAC/C,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,MACjD,QAAQ,EAAE,MAAM,OAAO;AAAA,MACvB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA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AAW,CAAC,aAAa,CAAC;AAAA;AAAA,YAE7L,KAAK,aAAa,sEAAsE,KAAK,cAAc,OAAO,kBAAkB,KAAK,UAAU,qBAAqB,OAAO;AAAA;AAAA;AAAA,QAInL,KAAK,UACD,yBAAyB,KAAK,QAAQ,qCAAqC,KAAK,KAAK,SAAS,mBAAmB,qCAAqC,KAAK,OAAO,eAClK,KAAK,QACH,qCAAqC,KAAK,KAAK,SAC/C,OACR;AAAA,QACE,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,48 @@
|
|
|
1
|
+
// packages/blocks/src/components/g2-shared.ts
|
|
2
|
+
import { css, unsafeCSS } from "lit";
|
|
3
|
+
import { token } from "@atomic-ui/ui";
|
|
4
|
+
var ink = token("color.ink", "#111111");
|
|
5
|
+
var paper = token("color.paper", "#EFEFED");
|
|
6
|
+
var inkRaised = token("color.ink-raised", "#1C1C1C");
|
|
7
|
+
var inkLine = token("color.ink-line", "#2E2E2E");
|
|
8
|
+
var inkMuted = token("color.ink-muted", "#A8A8A6");
|
|
9
|
+
var accent = token("color.accent.default", "#FFD43B");
|
|
10
|
+
var accentOn = token("color.accent.on", "#111111");
|
|
11
|
+
var band = unsafeCSS("var(--impakt-band, var(--impakt-color-ink, #111111))");
|
|
12
|
+
var bandOn = unsafeCSS("var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))");
|
|
13
|
+
var bandMuted = unsafeCSS("var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))");
|
|
14
|
+
var bandRaised = unsafeCSS(
|
|
15
|
+
"var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))"
|
|
16
|
+
);
|
|
17
|
+
var bandLine = unsafeCSS(
|
|
18
|
+
"var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))"
|
|
19
|
+
);
|
|
20
|
+
var monoLabel = css`
|
|
21
|
+
font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
22
|
+
font-size: 0.6875rem;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
line-height: 1.4;
|
|
25
|
+
letter-spacing: 0.06em;
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
`;
|
|
28
|
+
var levelOf = (n, fallback = 3) => Math.min(Math.max(Number(n) || fallback, 1), 6);
|
|
29
|
+
var pad = (n) => String(n).padStart(2, "0");
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
ink,
|
|
33
|
+
paper,
|
|
34
|
+
inkRaised,
|
|
35
|
+
inkLine,
|
|
36
|
+
inkMuted,
|
|
37
|
+
accent,
|
|
38
|
+
accentOn,
|
|
39
|
+
band,
|
|
40
|
+
bandOn,
|
|
41
|
+
bandMuted,
|
|
42
|
+
bandRaised,
|
|
43
|
+
bandLine,
|
|
44
|
+
monoLabel,
|
|
45
|
+
levelOf,
|
|
46
|
+
pad
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=chunk-WGDMORWT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/g2-shared.ts"],"sourcesContent":["/**\n * The colours the G2 Noire blocks share.\n *\n * Two kinds. The fixed ink set is for a surface that stays ink in both themes,\n * such as a stage tag or a callout, so the yellow on it stays readable in dark.\n * The band set follows the `impakt-section` band a block sits on: `tone=\"ink\"`\n * sets `--impakt-band` and `--impakt-band-on`, and a block drawn outside any band\n * falls back to the ink values, so it is drawn as an ink panel of its own.\n *\n * Every value is a token with the G2 literal as its fallback, so the theme can\n * take them over without a change here.\n */\nimport { css, unsafeCSS } from 'lit';\nimport { token } from '@atomic-ui/ui';\n\n/** Ink, `#111111`. It does not flip in dark. */\nexport const ink = token('color.ink', '#111111');\n/** Paper, `#EFEFED`: text on ink. */\nexport const paper = token('color.paper', '#EFEFED');\n/** A raised surface on ink, `#1C1C1C`. */\nexport const inkRaised = token('color.ink-raised', '#1C1C1C');\n/** A line on ink, `#2E2E2E`. */\nexport const inkLine = token('color.ink-line', '#2E2E2E');\n/** Quiet text on ink, 7:1 on `#111111`. */\nexport const inkMuted = token('color.ink-muted', '#A8A8A6');\nexport const accent = token('color.accent.default', '#FFD43B');\nexport const accentOn = token('color.accent.on', '#111111');\n\n/** The band behind the block. */\nexport const band = unsafeCSS('var(--impakt-band, var(--impakt-color-ink, #111111))');\n/** Text on the band. */\nexport const bandOn = unsafeCSS('var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))');\n/** Quiet text on the band. */\nexport const bandMuted = unsafeCSS('var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))');\n/** A tile raised off the band: `#1C1C1C` on an ink band. */\nexport const bandRaised = unsafeCSS(\n 'var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n/** A line on the band: `#2E2E2E` on an ink band. */\nexport const bandLine = unsafeCSS(\n 'var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n\n/** Small uppercase mono, the G2 label: 11px, +6% tracking. */\nexport const monoLabel = css`\n font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n font-size: 0.6875rem;\n font-weight: 400;\n line-height: 1.4;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n`;\n\n/** The level a heading is given, kept between 1 and 6. */\nexport const levelOf = (n: number | undefined, fallback = 3): number => Math.min(Math.max(Number(n) || fallback, 1), 6);\n\n/** \"1\" → \"01\". */\nexport const pad = (n: number): string => String(n).padStart(2, '0');\n"],"mappings":";AAYA,SAAS,KAAK,iBAAiB;AAC/B,SAAS,aAAa;AAGf,IAAM,MAAM,MAAM,aAAa,SAAS;AAExC,IAAM,QAAQ,MAAM,eAAe,SAAS;AAE5C,IAAM,YAAY,MAAM,oBAAoB,SAAS;AAErD,IAAM,UAAU,MAAM,kBAAkB,SAAS;AAEjD,IAAM,WAAW,MAAM,mBAAmB,SAAS;AACnD,IAAM,SAAS,MAAM,wBAAwB,SAAS;AACtD,IAAM,WAAW,MAAM,mBAAmB,SAAS;AAGnD,IAAM,OAAO,UAAU,sDAAsD;AAE7E,IAAM,SAAS,UAAU,2DAA2D;AAEpF,IAAM,YAAY,UAAU,kEAAkE;AAE9F,IAAM,aAAa;AAAA,EACxB;AACF;AAEO,IAAM,WAAW;AAAA,EACtB;AACF;AAGO,IAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUlB,IAAM,UAAU,CAAC,GAAuB,WAAW,MAAc,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC;AAG/G,IAAM,MAAM,CAAC,MAAsB,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG;","names":[]}
|
|
@@ -55,7 +55,7 @@ var ImpaktSitePlan = class extends ImpaktElement {
|
|
|
55
55
|
.name { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
|
|
56
56
|
.sub { margin: 0; color: ${t.textMuted}; }
|
|
57
57
|
.price { margin: 0; ${type("xl")} font-weight: ${fontWeight("semibold")}; }
|
|
58
|
-
.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:
|
|
58
|
+
.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)); }
|
|
59
59
|
.status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }
|
|
60
60
|
.status.sold { color: ${t.text}; background: ${t.surfaceSubtle}; }
|
|
61
61
|
.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}; }
|
|
@@ -252,7 +252,7 @@ var ImpaktBeforeAfter = class extends ImpaktElement {
|
|
|
252
252
|
.frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }
|
|
253
253
|
img { display: block; inline-size: 100%; block-size: auto; }
|
|
254
254
|
.after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
|
|
255
|
-
.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:
|
|
255
|
+
.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}; }
|
|
256
256
|
.tag.b { inset-inline-start: ${space(3)}; }
|
|
257
257
|
.tag.a { inset-inline-end: ${space(3)}; }
|
|
258
258
|
.line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }
|
|
@@ -435,4 +435,4 @@ export {
|
|
|
435
435
|
ImpaktStickyBar,
|
|
436
436
|
ImpaktLocationCard
|
|
437
437
|
};
|
|
438
|
-
//# sourceMappingURL=chunk-
|
|
438
|
+
//# sourceMappingURL=chunk-XB6FD4SF.js.map
|