@atomic-ui/ui 0.1.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -95
- package/custom-elements.json +25364 -0
- package/dist/base/FieldElement.d.ts +11 -0
- package/dist/base/ImpktElement.d.ts +14 -0
- package/dist/base/locale.d.ts +8 -0
- package/dist/base/say.d.ts +1 -0
- package/dist/base/scroll-lock.d.ts +2 -0
- package/dist/base/styles.d.ts +25 -6
- package/dist/base/tokens.d.ts +5 -1
- package/dist/chunk-2YRTFWW2.js +26 -0
- package/dist/chunk-2YRTFWW2.js.map +1 -0
- package/dist/{chunk-X7IPZPTG.js → chunk-37PA72FC.js} +34 -19
- package/dist/chunk-37PA72FC.js.map +1 -0
- package/dist/chunk-3IGNZTJU.js +14 -0
- package/dist/chunk-3IGNZTJU.js.map +1 -0
- package/dist/{chunk-NTNXHLTM.js → chunk-3KO55PZK.js} +47 -2
- package/dist/chunk-3KO55PZK.js.map +1 -0
- package/dist/chunk-3RE4H2XO.js +53 -0
- package/dist/chunk-3RE4H2XO.js.map +1 -0
- package/dist/{chunk-5EA4IDUD.js → chunk-46BYUQ5A.js} +2 -2
- package/dist/{chunk-WECSVHIM.js → chunk-4OYHT4BN.js} +7 -3
- package/dist/chunk-4OYHT4BN.js.map +1 -0
- package/dist/{chunk-4HU4Y23Q.js → chunk-55DK75QF.js} +6 -4
- package/dist/chunk-55DK75QF.js.map +1 -0
- package/dist/{chunk-XVKEM5JY.js → chunk-5QSTXIPG.js} +2 -2
- package/dist/{chunk-QCNT7D5V.js → chunk-7P4Z4CLK.js} +63 -20
- package/dist/chunk-7P4Z4CLK.js.map +1 -0
- package/dist/{chunk-GSCVG2ER.js → chunk-APJ5JGRW.js} +3 -3
- package/dist/chunk-AUVIOU5G.js +522 -0
- package/dist/chunk-AUVIOU5G.js.map +1 -0
- package/dist/{chunk-6ICOJPMD.js → chunk-CUUBAETM.js} +4 -3
- package/dist/chunk-CUUBAETM.js.map +1 -0
- package/dist/{chunk-NQKYHILD.js → chunk-DAH7RLW3.js} +3 -3
- package/dist/{chunk-OB7LC6NJ.js → chunk-DJEZW7AC.js} +2 -2
- package/dist/{chunk-XJP45LFA.js → chunk-DKZ425AM.js} +15 -5
- package/dist/chunk-DKZ425AM.js.map +1 -0
- package/dist/{chunk-GO2IBRFP.js → chunk-F4YQWKK2.js} +7 -4
- package/dist/chunk-F4YQWKK2.js.map +1 -0
- package/dist/chunk-FVCM4WHD.js +328 -0
- package/dist/chunk-FVCM4WHD.js.map +1 -0
- package/dist/chunk-GBRML4RF.js +264 -0
- package/dist/chunk-GBRML4RF.js.map +1 -0
- package/dist/{chunk-ZQJD4YEJ.js → chunk-HXINWP3V.js} +42 -13
- package/dist/chunk-HXINWP3V.js.map +1 -0
- package/dist/{chunk-T6L3USBZ.js → chunk-IOBSIAHB.js} +23 -11
- package/dist/chunk-IOBSIAHB.js.map +1 -0
- package/dist/{chunk-7Y6UCSUS.js → chunk-IZOTGWWI.js} +5 -5
- package/dist/chunk-IZOTGWWI.js.map +1 -0
- package/dist/{chunk-MLVUMCQ2.js → chunk-J2FACXYI.js} +14 -5
- package/dist/chunk-J2FACXYI.js.map +1 -0
- package/dist/{chunk-VTFCTWSX.js → chunk-KKJEEKL2.js} +33 -7
- package/dist/chunk-KKJEEKL2.js.map +1 -0
- package/dist/{chunk-HWWA27DN.js → chunk-KMCGX76Y.js} +2 -2
- package/dist/{chunk-2YQA3VBY.js → chunk-NKMVICB5.js} +4 -2
- package/dist/chunk-NKMVICB5.js.map +1 -0
- package/dist/{chunk-ZBLTU67D.js → chunk-OFLMG6RN.js} +15 -11
- package/dist/chunk-OFLMG6RN.js.map +1 -0
- package/dist/{chunk-CMAU4DSB.js → chunk-P6GDMZK4.js} +5 -5
- package/dist/chunk-P6GDMZK4.js.map +1 -0
- package/dist/{chunk-MOEMFL4K.js → chunk-PO6FCAIS.js} +5 -5
- package/dist/chunk-PO6FCAIS.js.map +1 -0
- package/dist/chunk-PWLZFGS3.js +494 -0
- package/dist/chunk-PWLZFGS3.js.map +1 -0
- package/dist/chunk-QJIB36DM.js +249 -0
- package/dist/chunk-QJIB36DM.js.map +1 -0
- package/dist/{chunk-TPF4MOMF.js → chunk-R7FKGFW6.js} +7 -4
- package/dist/chunk-R7FKGFW6.js.map +1 -0
- package/dist/{chunk-ZGAOMRYD.js → chunk-RWWRTURA.js} +3 -3
- package/dist/{chunk-QDNI54ON.js → chunk-RYBY35QE.js} +10 -8
- package/dist/chunk-RYBY35QE.js.map +1 -0
- package/dist/chunk-S7F5VKWU.js +453 -0
- package/dist/chunk-S7F5VKWU.js.map +1 -0
- package/dist/chunk-T5W3FDSF.js +396 -0
- package/dist/chunk-T5W3FDSF.js.map +1 -0
- package/dist/{chunk-BTGCUONV.js → chunk-TCXKZDMR.js} +2 -2
- package/dist/{chunk-C36CZRHK.js → chunk-WGPB3QQU.js} +43 -13
- package/dist/chunk-WGPB3QQU.js.map +1 -0
- package/dist/{chunk-G6OVKNL7.js → chunk-XPCU4KUY.js} +5 -4
- package/dist/chunk-XPCU4KUY.js.map +1 -0
- package/dist/chunk-YRYZUYY7.js +236 -0
- package/dist/chunk-YRYZUYY7.js.map +1 -0
- package/dist/{chunk-7BIQ3K6H.js → chunk-ZOTAAYO5.js} +12 -2
- package/dist/chunk-ZOTAAYO5.js.map +1 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/alert.js +2 -2
- package/dist/components/app-ui.d.ts +28 -12
- package/dist/components/app-ui.js +6 -4
- package/dist/components/blocks.d.ts +28 -2
- package/dist/components/blocks.js +3 -3
- package/dist/components/button.d.ts +7 -0
- package/dist/components/button.js +3 -3
- package/dist/components/changelog.d.ts +386 -0
- package/dist/components/changelog.js +25 -0
- package/dist/components/changelog.js.map +1 -0
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +3 -3
- package/dist/components/date-input.js +3 -3
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.js +3 -2
- package/dist/components/estimator.d.ts +246 -0
- package/dist/components/estimator.js +16 -0
- package/dist/components/estimator.js.map +1 -0
- package/dist/components/fieldset.js +2 -2
- package/dist/components/grid.js +2 -2
- package/dist/components/help.js +2 -2
- package/dist/components/icon.d.ts +2 -0
- package/dist/components/icon.js +2 -2
- package/dist/components/journey.d.ts +447 -0
- package/dist/components/journey.js +22 -0
- package/dist/components/journey.js.map +1 -0
- package/dist/components/layout.d.ts +24 -0
- package/dist/components/layout.js +2 -2
- package/dist/components/link.js +3 -3
- package/dist/components/list.d.ts +50 -0
- package/dist/components/list.js +8 -0
- package/dist/components/list.js.map +1 -0
- package/dist/components/marketing.d.ts +1 -1
- package/dist/components/marketing.js +3 -3
- package/dist/components/media.d.ts +10 -0
- package/dist/components/media.js +2 -2
- package/dist/components/navigation.d.ts +16 -0
- package/dist/components/navigation.js +3 -3
- package/dist/components/organisms.d.ts +13 -1
- package/dist/components/organisms.js +3 -3
- package/dist/components/page.js +2 -2
- package/dist/components/price.d.ts +1 -1
- package/dist/components/price.js +3 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/property.d.ts +1 -1
- package/dist/components/property.js +4 -3
- package/dist/components/radio-group.js +3 -3
- package/dist/components/scene.d.ts +138 -0
- package/dist/components/scene.js +8 -0
- package/dist/components/scene.js.map +1 -0
- package/dist/components/scrubber.d.ts +86 -0
- package/dist/components/scrubber.js +8 -0
- package/dist/components/scrubber.js.map +1 -0
- package/dist/components/select.js +3 -3
- package/dist/components/selling.d.ts +409 -0
- package/dist/components/selling.js +25 -0
- package/dist/components/selling.js.map +1 -0
- package/dist/components/site.d.ts +283 -0
- package/dist/components/site.js +20 -0
- package/dist/components/site.js.map +1 -0
- package/dist/components/summary-list.js +2 -2
- package/dist/components/table.d.ts +94 -2
- package/dist/components/table.js +4 -2
- package/dist/components/text-input.js +3 -3
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.js +3 -3
- package/dist/index.d.ts +10 -2
- package/dist/index.js +135 -55
- package/dist/standalone/atomic-ui.js +3134 -0
- package/dist/standalone/atomic-ui.js.map +7 -0
- package/dist/standalone/index.html +174 -0
- package/package.json +26 -7
- package/scripts/copy-to-product.mjs +52 -0
- package/specimen/index.html +174 -0
- package/dist/chunk-2YQA3VBY.js.map +0 -1
- package/dist/chunk-4HU4Y23Q.js.map +0 -1
- package/dist/chunk-6ICOJPMD.js.map +0 -1
- package/dist/chunk-7BIQ3K6H.js.map +0 -1
- package/dist/chunk-7Y6UCSUS.js.map +0 -1
- package/dist/chunk-C36CZRHK.js.map +0 -1
- package/dist/chunk-CMAU4DSB.js.map +0 -1
- package/dist/chunk-G6OVKNL7.js.map +0 -1
- package/dist/chunk-GO2IBRFP.js.map +0 -1
- package/dist/chunk-MLVUMCQ2.js.map +0 -1
- package/dist/chunk-MOEMFL4K.js.map +0 -1
- package/dist/chunk-NTNXHLTM.js.map +0 -1
- package/dist/chunk-QCNT7D5V.js.map +0 -1
- package/dist/chunk-QDNI54ON.js.map +0 -1
- package/dist/chunk-T6L3USBZ.js.map +0 -1
- package/dist/chunk-TPF4MOMF.js.map +0 -1
- package/dist/chunk-VTFCTWSX.js.map +0 -1
- package/dist/chunk-VWNBB7FW.js +0 -104
- package/dist/chunk-VWNBB7FW.js.map +0 -1
- package/dist/chunk-WECSVHIM.js.map +0 -1
- package/dist/chunk-X7IPZPTG.js.map +0 -1
- package/dist/chunk-XJP45LFA.js.map +0 -1
- package/dist/chunk-ZBLTU67D.js.map +0 -1
- package/dist/chunk-ZQJD4YEJ.js.map +0 -1
- /package/dist/{chunk-5EA4IDUD.js.map → chunk-46BYUQ5A.js.map} +0 -0
- /package/dist/{chunk-XVKEM5JY.js.map → chunk-5QSTXIPG.js.map} +0 -0
- /package/dist/{chunk-GSCVG2ER.js.map → chunk-APJ5JGRW.js.map} +0 -0
- /package/dist/{chunk-NQKYHILD.js.map → chunk-DAH7RLW3.js.map} +0 -0
- /package/dist/{chunk-OB7LC6NJ.js.map → chunk-DJEZW7AC.js.map} +0 -0
- /package/dist/{chunk-HWWA27DN.js.map → chunk-KMCGX76Y.js.map} +0 -0
- /package/dist/{chunk-ZGAOMRYD.js.map → chunk-RWWRTURA.js.map} +0 -0
- /package/dist/{chunk-BTGCUONV.js.map → chunk-TCXKZDMR.js.map} +0 -0
|
@@ -22,6 +22,11 @@ import { ImpktElement } from './ImpktElement';
|
|
|
22
22
|
* the controls that take a `width`, through `--impkt-field-width`.
|
|
23
23
|
*/
|
|
24
24
|
export declare const fieldWidths: import("lit").CSSResult;
|
|
25
|
+
/**
|
|
26
|
+
* The base of every form control.
|
|
27
|
+
*
|
|
28
|
+
* @fires {CustomEvent<{ value: string }>} impkt-change - When the answer changes. The answer is in detail.value.
|
|
29
|
+
*/
|
|
25
30
|
export declare abstract class FieldElement extends ImpktElement {
|
|
26
31
|
/** Form controls participate in a `<form>` like native ones. */
|
|
27
32
|
static formAssociated: boolean;
|
|
@@ -88,6 +93,12 @@ export declare abstract class FieldElement extends ImpktElement {
|
|
|
88
93
|
* already learned to ignore it.
|
|
89
94
|
*/
|
|
90
95
|
protected get describedBy(): string | typeof nothing;
|
|
96
|
+
/**
|
|
97
|
+
* Focusing the element focuses its control, so `el.focus()` from an app, a
|
|
98
|
+
* React ref or the error summary's link lands where someone can type, rather
|
|
99
|
+
* than on a host that cannot take focus and so silently does nothing.
|
|
100
|
+
*/
|
|
101
|
+
focus(options?: FocusOptions): void;
|
|
91
102
|
/** Subclasses render the control itself; everything round it is here. */
|
|
92
103
|
protected abstract renderControl(): TemplateResult;
|
|
93
104
|
/**
|
|
@@ -18,4 +18,18 @@ export declare class ImpktElement extends LitElement {
|
|
|
18
18
|
*/
|
|
19
19
|
protected readonly uid: string;
|
|
20
20
|
protected id_(part: string): string;
|
|
21
|
+
/** @ignore */
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
/**
|
|
24
|
+
* The words a component ships with, in the page's language (ADR 0026).
|
|
25
|
+
*
|
|
26
|
+
* Defaults stay plain English in the constructor, so the component manifest
|
|
27
|
+
* still sees them (a prop with no default is read as required). When the
|
|
28
|
+
* element joins the page, each word it holds is looked up in the site's
|
|
29
|
+
* wording; anything that is not one of Strata's own words, such as a page's
|
|
30
|
+
* own text or a variant name, is left exactly as it is.
|
|
31
|
+
*
|
|
32
|
+
* @ignore
|
|
33
|
+
*/
|
|
34
|
+
private sayDefaults;
|
|
21
35
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The locale a component formats dates, numbers and money in: the language of
|
|
3
|
+
* the page around it (ADR 0026). A delivered page sets `lang` on its root, or
|
|
4
|
+
* on a part of the page in another language, and every component reads the
|
|
5
|
+
* nearest one. English is British English, which is what Strata's sites wrote
|
|
6
|
+
* before they had languages.
|
|
7
|
+
*/
|
|
8
|
+
export declare function pageLocale(el?: Element | null): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function say(english: string, values?: Record<string, string | number>): string;
|
package/dist/base/styles.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared style fragments.
|
|
3
|
+
*
|
|
4
|
+
* Three of these carry an accessibility guarantee and are therefore not
|
|
5
|
+
* negotiable per component: the focus ring, the minimum target size and the
|
|
6
|
+
* reduced-motion rule. A component that wants its own focus treatment is a
|
|
7
|
+
* component that will get it subtly wrong on one brand, so there is one.
|
|
8
|
+
*/
|
|
9
|
+
import { type CSSResult } from 'lit';
|
|
1
10
|
/**
|
|
2
11
|
* The focus ring.
|
|
3
12
|
*
|
|
@@ -11,9 +20,9 @@
|
|
|
11
20
|
* who most need it.
|
|
12
21
|
*
|
|
13
22
|
* The colours come from locked tokens a brand cannot reach
|
|
14
|
-
* ([ADR 0010](
|
|
23
|
+
* ([ADR 0010](https://github.com/matthill8286/strata/blob/main/docs/decisions/0010-what-a-brand-may-set.md)).
|
|
15
24
|
*/
|
|
16
|
-
export declare const focusRing:
|
|
25
|
+
export declare const focusRing: CSSResult;
|
|
17
26
|
/**
|
|
18
27
|
* WCAG 2.2, 2.5.8 Target Size (Minimum): 24 by 24 CSS pixels.
|
|
19
28
|
*
|
|
@@ -22,7 +31,7 @@ export declare const focusRing: import("lit").CSSResult;
|
|
|
22
31
|
* is deliberately outside the spacing scale — otherwise a brand tightening its
|
|
23
32
|
* spacing unit would shrink every tap target with it.
|
|
24
33
|
*/
|
|
25
|
-
export declare const targetSize:
|
|
34
|
+
export declare const targetSize: CSSResult;
|
|
26
35
|
/**
|
|
27
36
|
* Visible to a screen reader, invisible on screen.
|
|
28
37
|
*
|
|
@@ -30,13 +39,23 @@ export declare const targetSize: import("lit").CSSResult;
|
|
|
30
39
|
* hidden`, both of which remove the text from the accessibility tree — which
|
|
31
40
|
* is the one thing this must not do.
|
|
32
41
|
*/
|
|
33
|
-
export declare const visuallyHidden:
|
|
42
|
+
export declare const visuallyHidden: CSSResult;
|
|
34
43
|
/**
|
|
35
44
|
* 2.3.3 Animation from Interactions, and plain decency.
|
|
36
45
|
*
|
|
37
46
|
* `0.01ms` rather than `0` because a zero-duration transition does not fire a
|
|
38
47
|
* `transitionend` event in every engine, and components that wait for one hang.
|
|
39
48
|
*/
|
|
40
|
-
export declare const reducedMotion:
|
|
49
|
+
export declare const reducedMotion: CSSResult;
|
|
41
50
|
/** The base every component starts from. */
|
|
42
|
-
export declare const base:
|
|
51
|
+
export declare const base: CSSResult;
|
|
52
|
+
/**
|
|
53
|
+
* On a touch screen a control is at least 44 by 44 CSS pixels.
|
|
54
|
+
*
|
|
55
|
+
* The 24px floor above is WCAG 2.2's minimum, and it is right for a mouse. A finger
|
|
56
|
+
* is broader, and the design guide sets 44px on a touch screen, which is also
|
|
57
|
+
* 2.5.5's enhanced size. It is applied by pointer rather than by width, because a
|
|
58
|
+
* small laptop window is still driven by a mouse and a large tablet by a finger.
|
|
59
|
+
* Pass the selectors that are the controls, inside the component's shadow root.
|
|
60
|
+
*/
|
|
61
|
+
export declare const touchTarget: (selector: string) => CSSResult;
|
package/dist/base/tokens.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Components never name a colour, a size or a radius. They name a token, and a
|
|
5
5
|
* brand decides what it holds — which is what makes a rebrand a content
|
|
6
6
|
* publish rather than a rebuild
|
|
7
|
-
* ([ADR 0005](
|
|
7
|
+
* ([ADR 0005](https://github.com/matthill8286/strata/blob/main/docs/decisions/0005-design-tokens.md)).
|
|
8
8
|
*
|
|
9
9
|
* Every reference carries a fallback so that a component dropped onto a page
|
|
10
10
|
* with no token stylesheet still renders something legible. An unstyled
|
|
@@ -51,6 +51,10 @@ export declare const t: {
|
|
|
51
51
|
readonly infoSubtle: CSSResult;
|
|
52
52
|
readonly fontBody: CSSResult;
|
|
53
53
|
readonly fontHeading: CSSResult;
|
|
54
|
+
/** Code-like labels: hashes, branches, version lines. */
|
|
55
|
+
readonly fontMono: CSSResult;
|
|
56
|
+
/** The small line above a heading: the body face, or the code face for a brand that asks. */
|
|
57
|
+
readonly fontEyebrow: CSSResult;
|
|
54
58
|
readonly focusShadow: CSSResult;
|
|
55
59
|
readonly focusOffset: CSSResult;
|
|
56
60
|
readonly targetMin: CSSResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// packages/ui/src/base/scroll-lock.ts
|
|
2
|
+
var holders = /* @__PURE__ */ new Set();
|
|
3
|
+
var before = null;
|
|
4
|
+
function lockScroll(holder) {
|
|
5
|
+
if (typeof document === "undefined" || holders.has(holder)) return;
|
|
6
|
+
holders.add(holder);
|
|
7
|
+
if (holders.size > 1) return;
|
|
8
|
+
const root = document.documentElement;
|
|
9
|
+
const bar = window.innerWidth - root.clientWidth;
|
|
10
|
+
before = { overflow: root.style.overflow, paddingRight: root.style.paddingRight };
|
|
11
|
+
root.style.overflow = "hidden";
|
|
12
|
+
if (bar > 0) root.style.paddingRight = `${bar}px`;
|
|
13
|
+
}
|
|
14
|
+
function unlockScroll(holder) {
|
|
15
|
+
if (typeof document === "undefined" || !holders.delete(holder) || holders.size > 0 || !before) return;
|
|
16
|
+
const root = document.documentElement;
|
|
17
|
+
root.style.overflow = before.overflow;
|
|
18
|
+
root.style.paddingRight = before.paddingRight;
|
|
19
|
+
before = null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
lockScroll,
|
|
24
|
+
unlockScroll
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=chunk-2YRTFWW2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/base/scroll-lock.ts"],"sourcesContent":["/**\n * Stop the page behind a modal dialog or drawer from scrolling.\n *\n * `showModal()` makes the page inert, but it still scrolls, so a wheel or a\n * finger on the backdrop moves the page out from under the dialog, and on a\n * phone the dialog appears to drift. Each open modal takes a hold, and the\n * page scrolls again once the last one lets go, so a dialog opened from a\n * drawer does not unlock the page when it closes. The scrollbar's width is put\n * back as padding, so the page does not shift sideways as it locks.\n */\nconst holders = new Set<object>();\nlet before: { overflow: string; paddingRight: string } | null = null;\n\nexport function lockScroll(holder: object): void {\n if (typeof document === 'undefined' || holders.has(holder)) return;\n holders.add(holder);\n if (holders.size > 1) return;\n const root = document.documentElement;\n const bar = window.innerWidth - root.clientWidth;\n before = { overflow: root.style.overflow, paddingRight: root.style.paddingRight };\n root.style.overflow = 'hidden';\n if (bar > 0) root.style.paddingRight = `${bar}px`;\n}\n\nexport function unlockScroll(holder: object): void {\n if (typeof document === 'undefined' || !holders.delete(holder) || holders.size > 0 || !before) return;\n const root = document.documentElement;\n root.style.overflow = before.overflow;\n root.style.paddingRight = before.paddingRight;\n before = null;\n}\n"],"mappings":";AAUA,IAAM,UAAU,oBAAI,IAAY;AAChC,IAAI,SAA4D;AAEzD,SAAS,WAAW,QAAsB;AAC/C,MAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,MAAM,EAAG;AAC5D,UAAQ,IAAI,MAAM;AAClB,MAAI,QAAQ,OAAO,EAAG;AACtB,QAAM,OAAO,SAAS;AACtB,QAAM,MAAM,OAAO,aAAa,KAAK;AACrC,WAAS,EAAE,UAAU,KAAK,MAAM,UAAU,cAAc,KAAK,MAAM,aAAa;AAChF,OAAK,MAAM,WAAW;AACtB,MAAI,MAAM,EAAG,MAAK,MAAM,eAAe,GAAG,GAAG;AAC/C;AAEO,SAAS,aAAa,QAAsB;AACjD,MAAI,OAAO,aAAa,eAAe,CAAC,QAAQ,OAAO,MAAM,KAAK,QAAQ,OAAO,KAAK,CAAC,OAAQ;AAC/F,QAAM,OAAO,SAAS;AACtB,OAAK,MAAM,WAAW,OAAO;AAC7B,OAAK,MAAM,eAAe,OAAO;AACjC,WAAS;AACX;","names":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NKMVICB5.js";
|
|
4
4
|
import {
|
|
5
5
|
ImpktElement,
|
|
6
6
|
focusRing,
|
|
7
7
|
fontWeight,
|
|
8
8
|
lineHeight,
|
|
9
|
+
say,
|
|
9
10
|
space,
|
|
10
11
|
spaceAround,
|
|
11
12
|
t,
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
token,
|
|
14
15
|
type,
|
|
15
16
|
visuallyHidden
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3KO55PZK.js";
|
|
17
18
|
|
|
18
19
|
// packages/ui/src/components/organisms.ts
|
|
19
20
|
import { css, html, nothing } from "lit";
|
|
@@ -25,7 +26,7 @@ var roundButton = css`
|
|
|
25
26
|
.round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
|
|
26
27
|
`;
|
|
27
28
|
var headingStyles = css`
|
|
28
|
-
.eyebrow { margin: 0; color: var(--impkt-eyebrow, ${t.brand}); ${type("sm")} font-weight: ${fontWeight("semibold")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
29
|
+
.eyebrow { margin: 0; color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand})); ${type("sm")} font-size: var(--impkt-font-size-eyebrow, var(--impkt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight("semibold")}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
29
30
|
.h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight("bold")}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }
|
|
30
31
|
.lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }
|
|
31
32
|
`;
|
|
@@ -113,8 +114,8 @@ var ImpktCarousel = class extends ImpktElement {
|
|
|
113
114
|
this.count = slides.length;
|
|
114
115
|
slides.forEach((slide, i) => {
|
|
115
116
|
slide.setAttribute("role", "group");
|
|
116
|
-
slide.setAttribute("aria-roledescription", "slide");
|
|
117
|
-
slide.setAttribute("aria-label",
|
|
117
|
+
slide.setAttribute("aria-roledescription", say("slide"));
|
|
118
|
+
slide.setAttribute("aria-label", say("{slide} of {slides}", { slide: i + 1, slides: slides.length }));
|
|
118
119
|
});
|
|
119
120
|
this.measure();
|
|
120
121
|
this.requestUpdate();
|
|
@@ -214,18 +215,18 @@ var ImpktCarousel = class extends ImpktElement {
|
|
|
214
215
|
}
|
|
215
216
|
render() {
|
|
216
217
|
const stops = Array.from({ length: this.last + 1 }, (_, i) => i);
|
|
217
|
-
return html`<section aria-roledescription
|
|
218
|
+
return html`<section aria-roledescription=${say("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
|
|
218
219
|
@mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>
|
|
219
220
|
<div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
|
|
220
221
|
<div class="controls" part="controls">
|
|
221
|
-
<div class="dots">${stops.length > 1 ? stops.map((i) => html`<button class="dot" type="button" aria-label=${
|
|
222
|
+
<div class="dots">${stops.length > 1 ? stops.map((i) => html`<button class="dot" type="button" aria-label=${say("Go to slide {slide}", { slide: i + 1 })} aria-current=${i === this.index ? "true" : "false"} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>
|
|
222
223
|
<div class="buttons">
|
|
223
|
-
${this.canPlay ? html`<button class="round" type="button" aria-label=${this.paused ? "Play the slides" : "Pause the slides"} @click=${this.togglePause}>${this.paused ? iconSvg("arrow-right", "18px") : html`<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg>`}</button>` : nothing}
|
|
224
|
-
<button class="round" type="button" aria-label
|
|
225
|
-
<button class="round" type="button" aria-label
|
|
224
|
+
${this.canPlay ? html`<button class="round" type="button" aria-label=${say(this.paused ? "Play the slides" : "Pause the slides")} @click=${this.togglePause}>${this.paused ? iconSvg("arrow-right", "18px") : html`<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg>`}</button>` : nothing}
|
|
225
|
+
<button class="round" type="button" aria-label=${say("Previous slide")} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg("arrow-left", "18px")}</button>
|
|
226
|
+
<button class="round" type="button" aria-label=${say("Next slide")} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg("arrow-right", "18px")}</button>
|
|
226
227
|
</div>
|
|
227
228
|
</div>
|
|
228
|
-
<p class="sr-only" aria-live="polite"
|
|
229
|
+
<p class="sr-only" aria-live="polite">${say("Slide {slide} of {slides}", { slide: this.index + 1, slides: this.count })}</p>
|
|
229
230
|
</section>`;
|
|
230
231
|
}
|
|
231
232
|
};
|
|
@@ -341,16 +342,16 @@ var ImpktGallery = class extends ImpktElement {
|
|
|
341
342
|
return html`<ul aria-label=${this.label} part="list">${items.map((item, i) => {
|
|
342
343
|
const span = gallerySpan(i, items.length, this.layout);
|
|
343
344
|
return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>
|
|
344
|
-
<button class="open" type="button" aria-label=${
|
|
345
|
+
<button class="open" type="button" aria-label=${say("View larger: {picture}", { picture: item.alt })} @click=${(e) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading="lazy" /></button>
|
|
345
346
|
</li>`;
|
|
346
347
|
})}</ul>
|
|
347
348
|
<dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
|
|
348
349
|
${current ? html`<div class="stage">
|
|
349
|
-
<div class="bar"><span>${this.shown + 1} of ${items.length}</span><button class="round" type="button" aria-label
|
|
350
|
+
<div class="bar"><span>${this.shown + 1} of ${items.length}</span><button class="round" type="button" aria-label=${say("Close")} @click=${this.close}>${iconSvg("close", "18px")}</button></div>
|
|
350
351
|
<div class="middle">
|
|
351
|
-
<button class="round" type="button" aria-label
|
|
352
|
+
<button class="round" type="button" aria-label=${say("Previous picture")} @click=${() => this.step(-1)}>${iconSvg("arrow-left", "18px")}</button>
|
|
352
353
|
<figure><img src=${current.src} alt=${current.alt} /></figure>
|
|
353
|
-
<button class="round" type="button" aria-label
|
|
354
|
+
<button class="round" type="button" aria-label=${say("Next picture")} @click=${() => this.step(1)}>${iconSvg("arrow-right", "18px")}</button>
|
|
354
355
|
</div>
|
|
355
356
|
<p class="caption">${current.caption ?? current.alt}</p>
|
|
356
357
|
</div>` : nothing}
|
|
@@ -393,6 +394,7 @@ var ImpktSteps = class extends ImpktElement {
|
|
|
393
394
|
this.properties = {
|
|
394
395
|
items: { type: Array },
|
|
395
396
|
orientation: { type: String, reflect: true },
|
|
397
|
+
look: { type: String, reflect: true },
|
|
396
398
|
headingLevel: { type: Number, attribute: "heading-level" },
|
|
397
399
|
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
398
400
|
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
@@ -402,6 +404,7 @@ var ImpktSteps = class extends ImpktElement {
|
|
|
402
404
|
super();
|
|
403
405
|
this.items = [];
|
|
404
406
|
this.orientation = "horizontal";
|
|
407
|
+
this.look = "numbered";
|
|
405
408
|
this.headingLevel = 3;
|
|
406
409
|
this.spaceAbove = "none";
|
|
407
410
|
this.spaceBelow = "none";
|
|
@@ -414,6 +417,7 @@ var ImpktSteps = class extends ImpktElement {
|
|
|
414
417
|
li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type("sm")} font-weight: ${fontWeight("bold")}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }
|
|
415
418
|
li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }
|
|
416
419
|
.h { ${type("lg")} letter-spacing: 0; }
|
|
420
|
+
.meta { margin: 0; ${type("sm")} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }
|
|
417
421
|
.body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight("normal")}; text-wrap: pretty; }
|
|
418
422
|
:host([orientation='vertical']) ol { grid-auto-flow: row; }
|
|
419
423
|
:host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
|
|
@@ -425,11 +429,22 @@ var ImpktSteps = class extends ImpktElement {
|
|
|
425
429
|
li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
|
|
426
430
|
li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
|
|
427
431
|
}
|
|
428
|
-
|
|
432
|
+
:host([look='ruled']) li { padding-block-start: ${space(5)}; border-block-start: 3px solid var(--rule); }
|
|
433
|
+
:host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
|
|
434
|
+
:host([look='ruled']) ol { gap: ${space(5)}; }
|
|
435
|
+
/* On a phone the ruled steps become a branch graph: one trunk down the left, and each step a coloured branch off it with a dot. */
|
|
436
|
+
@container (max-width: 40rem) {
|
|
437
|
+
:host([look='ruled']) ol { gap: 0; }
|
|
438
|
+
:host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }
|
|
439
|
+
:host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; border-radius: 0; margin: 0; background: ${t.text}; }
|
|
440
|
+
:host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${space(3)}; inset-inline-start: 2px; inset-inline-end: auto; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }
|
|
441
|
+
}
|
|
442
|
+
@media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } }
|
|
429
443
|
`];
|
|
430
444
|
}
|
|
431
445
|
render() {
|
|
432
|
-
return html`<ol part="list">${(this.items ?? []).map((step) => html`<li part="step">
|
|
446
|
+
return html`<ol part="list">${(this.items ?? []).map((step, i) => html`<li part="step" style=${this.look === "ruled" ? `--rule:var(--impkt-color-chart-${i % 5 + 1}, ${"var(--impkt-color-brand-default, #1f4ed8)"})` : nothing}>
|
|
447
|
+
${step.meta ? html`<p class="meta">${step.meta}</p>` : nothing}
|
|
433
448
|
<div class="h" role="heading" aria-level=${this.headingLevel}>${step.heading}</div>
|
|
434
449
|
${step.text ? html`<p class="body">${step.text}</p>` : nothing}
|
|
435
450
|
</li>`)}</ol>`;
|
|
@@ -571,7 +586,7 @@ var ImpktCtaBanner = class extends ImpktElement {
|
|
|
571
586
|
</div>`;
|
|
572
587
|
}
|
|
573
588
|
};
|
|
574
|
-
var stars = (rating) => html`<span class="stars" role="img" aria-label=${
|
|
589
|
+
var stars = (rating) => html`<span class="stars" role="img" aria-label=${say("Rated {rating} out of 5", { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill=${n <= rating ? "currentColor" : "none"} stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z"/></svg>`)}</span>`;
|
|
575
590
|
var initials = (name) => name.split(/\s+/).filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== "and").slice(0, 2).map((w) => w[0].toUpperCase()).join("");
|
|
576
591
|
var ImpktReviews = class extends ImpktElement {
|
|
577
592
|
static {
|
|
@@ -707,4 +722,4 @@ export {
|
|
|
707
722
|
ImpktReviews,
|
|
708
723
|
ImpktNewsletter
|
|
709
724
|
};
|
|
710
|
-
//# sourceMappingURL=chunk-
|
|
725
|
+
//# sourceMappingURL=chunk-37PA72FC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/organisms.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say } from '../base/say';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, visuallyHidden } from '../base/styles';\nimport { fontWeight, lineHeight, space, spaceAround, t, token, type } from '../base/tokens';\nimport { iconSvg } from './icon';\n\nconst token_accent = token('color.accent.default', '#c8a15a');\n\nconst reducedMotion = (): boolean =>\n typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** A round control laid over or beside content: previous, next, close. */\nconst roundButton = css`\n .round { ${targetSize} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.rule}; border-radius: 50%; box-shadow: ${t.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }\n .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }\n .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }\n`;\n\nconst headingStyles = css`\n .eyebrow { margin: 0; color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impkt-font-size-eyebrow, var(--impkt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }\n`;\n\n/**\n * Slides that move sideways: house types, reviews, the rooms of a show home.\n * Put anything in it, one child to a slide.\n *\n * It follows the ARIA carousel pattern. Each slide is named \"2 of 6\", a live\n * region says where you are, and it can be moved with the buttons, the dots,\n * the arrow keys, a swipe or a scroll.\n *\n * **It moves only when asked.** Autoplay is off by default. Turned on, it has a\n * Pause button, stops while pointed at or focused, and never runs for someone\n * who has asked for reduced motion (2.2.2).\n *\n * @category content\n * @icon carousel\n * @slot - The slides, one child to each.\n */\nexport class ImpktCarousel extends ImpktElement {\n static properties = {\n label: { type: String },\n perView: { type: String, reflect: true, attribute: 'per-view' },\n arrows: { type: String, reflect: true },\n autoplay: { type: Boolean, reflect: true },\n seconds: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** What the slides are, for a screen reader, such as \"House types\". */\n declare label: string;\n /** How many slides show at once on a wide screen. A tablet shows at most two, and a phone one. */\n declare perView: '1' | '2' | '3';\n /** Where the arrows sit: under the slides, or level with the heading above them. */\n declare arrows: 'below' | 'top';\n /** Move on by itself. People can pause it, and it never runs for those who ask for less motion. */\n declare autoplay: boolean;\n /** How long each slide stays, when it moves by itself. */\n declare seconds: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private index = 0;\n private count = 0;\n /** How many slides fit right now, which the width decides. */\n private visible: number | null = null;\n /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */\n private heading: number | null = null;\n private settle: ReturnType<typeof setTimeout> | undefined;\n private observer: ResizeObserver | undefined;\n private paused = false;\n private held = false;\n private timer: ReturnType<typeof setInterval> | undefined;\n\n constructor() {\n super();\n this.label = 'Slides';\n this.perView = '1';\n this.arrows = 'below';\n this.autoplay = false;\n this.seconds = 6;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, roundButton, css`\n :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }\n :host([per-view='2']) { --most: 2; }\n :host([per-view='3']) { --most: 3; }\n .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${space(1)} ${space(2)}; border-radius: ${t.radiusLg}; }\n .track::-webkit-scrollbar { display: none; }\n ::slotted(*) { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-inline-size: 0; scroll-snap-align: start; box-sizing: border-box; }\n /* Whole slides only: a slice of the next one reads as content spilling out of the page. */\n @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }\n @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }\n .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }\n .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }\n .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }\n .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 999px; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }\n .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }\n .buttons { display: flex; gap: ${space(2)}; }\n section { position: relative; }\n @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }\n `];\n\n private get track(): HTMLElement | null {\n return this.renderRoot.querySelector('.track');\n }\n\n private get slides(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n\n /** The last slide that can sit at the start of the row. */\n private get last(): number {\n return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));\n }\n\n /** Count what actually fits, and keep the row on a real stop when that changes. */\n private measure(): void {\n const track = this.track;\n const first = this.slides[0];\n if (!track || !first) return;\n const width = first.getBoundingClientRect().width;\n if (width <= 0) return;\n const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;\n const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));\n if (fits === this.visible) return;\n this.visible = fits;\n this.index = Math.min(this.index, this.last);\n const slide = this.slides[this.index];\n if (slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n this.requestUpdate();\n }\n\n private onSlots(): void {\n const slides = this.slides;\n this.count = slides.length;\n slides.forEach((slide, i) => {\n slide.setAttribute('role', 'group');\n slide.setAttribute('aria-roledescription', say('slide'));\n slide.setAttribute('aria-label', say('{slide} of {slides}', { slide: i + 1, slides: slides.length }));\n });\n this.measure();\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const target = Math.min(this.last, Math.max(0, to));\n this.index = target;\n this.heading = target;\n clearTimeout(this.settle);\n // If the row has not got there by now (a tab in the background, say), put it there.\n this.settle = setTimeout(() => {\n const arrived = this.heading === null;\n this.heading = null;\n const track = this.track;\n const slide = this.slides[this.index];\n if (!arrived && track && slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n }, 900);\n this.requestUpdate();\n const track = this.track;\n const slide = this.slides[target];\n if (track && slide && typeof track.scrollTo === 'function') {\n track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? 'auto' : 'smooth' });\n }\n }\n\n private onScroll(): void {\n const track = this.track;\n const slides = this.slides;\n if (!track || !slides.length) return;\n let nearest = 0;\n let distance = Infinity;\n slides.forEach((slide, i) => {\n const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);\n if (d < distance) { distance = d; nearest = i; }\n });\n if (this.heading !== null) {\n if (nearest === this.heading && distance < 2) { this.heading = null; clearTimeout(this.settle); }\n return;\n }\n if (nearest !== this.index) { this.index = Math.min(nearest, this.last); this.requestUpdate(); }\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') { event.preventDefault(); this.go(this.index + 1); }\n if (event.key === 'ArrowLeft') { event.preventDefault(); this.go(this.index - 1); }\n }\n\n private get canPlay(): boolean {\n return this.autoplay && !reducedMotion();\n }\n\n private restart(): void {\n clearInterval(this.timer);\n this.timer = undefined;\n if (!this.canPlay || this.paused || this.held) return;\n this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1000);\n }\n\n private hold(held: boolean): void {\n this.held = held;\n this.restart();\n }\n\n private togglePause(): void {\n this.paused = !this.paused;\n this.restart();\n this.requestUpdate();\n }\n\n protected firstUpdated(): void {\n if (typeof ResizeObserver === 'function' && this.track) {\n this.observer = new ResizeObserver(() => this.measure());\n this.observer.observe(this.track);\n }\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('autoplay') || changed.has('seconds')) this.restart();\n if (changed.has('perView')) this.measure();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.track) this.observer?.observe(this.track);\n this.restart();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n clearInterval(this.timer);\n clearTimeout(this.settle);\n }\n\n render(): TemplateResult {\n const stops = Array.from({ length: this.last + 1 }, (_, i) => i);\n return html`<section aria-roledescription=${say('carousel')} aria-label=${this.label} part=\"carousel\" @keydown=${this.onKey}\n @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>\n <div class=\"track\" part=\"track\" tabindex=\"0\" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>\n <div class=\"controls\" part=\"controls\">\n <div class=\"dots\">${stops.length > 1 ? stops.map((i) => html`<button class=\"dot\" type=\"button\" aria-label=${say('Go to slide {slide}', { slide: i + 1 })} aria-current=${i === this.index ? 'true' : 'false'} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>\n <div class=\"buttons\">\n ${this.canPlay ? html`<button class=\"round\" type=\"button\" aria-label=${say(this.paused ? 'Play the slides' : 'Pause the slides')} @click=${this.togglePause}>${this.paused ? iconSvg('arrow-right', '18px') : html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/><rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/></svg>`}</button>` : nothing}\n <button class=\"round\" type=\"button\" aria-label=${say('Previous slide')} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg('arrow-left', '18px')}</button>\n <button class=\"round\" type=\"button\" aria-label=${say('Next slide')} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">${say('Slide {slide} of {slides}', { slide: this.index + 1, slides: this.count })}</p>\n </section>`;\n }\n}\n\n/** One picture in a gallery. */\nexport interface GalleryItem {\n id?: string;\n src: string;\n alt: string;\n caption?: string;\n}\n\n/**\n * How far a gallery picture stretches so that no row ends in a gap, on a wide\n * container and on a narrow one. The large first picture keeps its own size.\n */\nexport function gallerySpan(index: number, count: number, layout: 'feature' | 'grid'): { wide: number; narrow: number; rows: number } {\n const last = index === count - 1;\n const span = { wide: 1, narrow: 1, rows: 1 };\n if (layout === 'grid') {\n if (last) { span.wide = count % 3 ? 4 - (count % 3) : 1; span.narrow = count % 2 ? 2 : 1; }\n return span;\n }\n if (index === 0) return span;\n if (count === 2) return { wide: 2, narrow: 2, rows: 2 };\n if (count === 3) return { ...span, wide: 2 };\n if (last) {\n const extra = (count - 5) % 4;\n span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;\n span.narrow = count % 2 ? 1 : 2;\n }\n return span;\n}\n\n/**\n * A set of pictures, with the first shown large, that open full screen one at\n * a time: the rooms of a show home, or views of a development.\n *\n * Each picture is a button. The full-screen view is a real modal dialog, so\n * focus stays inside it, Escape closes it and focus returns to the picture that\n * opened it. The arrow keys move between pictures.\n *\n * @category media\n * @icon gallery\n */\nexport class ImpktGallery extends ImpktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\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: GalleryItem[];\n /** One large picture with smaller ones beside it, or an even grid. */\n declare layout: 'feature' | 'grid';\n /** What the pictures are of, 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 private shown = -1;\n private opener: HTMLElement | null = null;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'feature';\n this.label = 'Gallery';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, roundButton, css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }\n :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }\n li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }\n :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }\n .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${t.surfaceInset}; border-radius: ${t.radiusXl}; overflow: hidden; cursor: zoom-in; }\n .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }\n .open:hover img { transform: scale(1.03); }\n @container (max-width: 40rem) { ul, :host([layout='grid']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } li { grid-column: span var(--span-narrow, 1); } }\n dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }\n dialog::backdrop { background: rgb(10 14 12 / 0.9); }\n .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${space(4)}; gap: ${space(3)}; color: #fff; }\n .bar { display: flex; align-items: center; justify-content: space-between; ${type('sm')} }\n .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }\n .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }\n figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }\n .caption { margin: 0; text-align: center; ${type('sm')} }\n `];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n private open(index: number, event: Event): void {\n this.opener = event.currentTarget as HTMLElement;\n this.shown = index;\n this.requestUpdate();\n void this.updateComplete.then(() => {\n const d = this.dialog;\n if (d && !d.open) { if (typeof d.showModal === 'function') d.showModal(); else d.setAttribute('open', ''); }\n });\n }\n\n private close(): void {\n const d = this.dialog;\n if (d?.open) { if (typeof d.close === 'function') d.close(); else d.removeAttribute('open'); }\n this.onClosed();\n }\n\n private onClosed(): void {\n if (this.shown === -1) return;\n this.shown = -1;\n this.requestUpdate();\n this.opener?.focus();\n }\n\n private step(by: number): void {\n const n = (this.items ?? []).length;\n if (!n || this.shown < 0) return;\n this.shown = (this.shown + by + n) % n;\n this.requestUpdate();\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') { event.preventDefault(); this.step(1); }\n if (event.key === 'ArrowLeft') { event.preventDefault(); this.step(-1); }\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.shown >= 0 ? items[this.shown] : undefined;\n return html`<ul aria-label=${this.label} part=\"list\">${items.map((item, i) => { const span = gallerySpan(i, items.length, this.layout); return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>\n <button class=\"open\" type=\"button\" aria-label=${say('View larger: {picture}', { picture: item.alt })} @click=${(e: Event) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading=\"lazy\" /></button>\n </li>`; })}</ul>\n <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>\n ${current ? html`<div class=\"stage\">\n <div class=\"bar\"><span>${this.shown + 1} of ${items.length}</span><button class=\"round\" type=\"button\" aria-label=${say('Close')} @click=${this.close}>${iconSvg('close', '18px')}</button></div>\n <div class=\"middle\">\n <button class=\"round\" type=\"button\" aria-label=${say('Previous picture')} @click=${() => this.step(-1)}>${iconSvg('arrow-left', '18px')}</button>\n <figure><img src=${current.src} alt=${current.alt} /></figure>\n <button class=\"round\" type=\"button\" aria-label=${say('Next picture')} @click=${() => this.step(1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n <p class=\"caption\">${current.caption ?? current.alt}</p>\n </div>` : nothing}\n </dialog>`;\n }\n}\n\n/** One accreditation or partner. */\nexport interface LogoItem {\n id?: string;\n src: string;\n alt: string;\n href?: string;\n}\n\n/**\n * A row of logos that lends trust: accreditations, awards, lenders, partners.\n *\n * The logos are drawn quietly so they do not fight the page, and come to full\n * colour when pointed at. Each one is named by its alt text.\n *\n * @category content\n * @icon logos\n */\nexport class ImpktLogoCloud extends ImpktElement {\n static properties = {\n heading: { type: String },\n items: { type: Array },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the logos, such as \"Accredited by\". */\n declare heading: string;\n declare items: LogoItem[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.items = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; }\n p { margin: 0 0 ${space(6)}; text-align: center; color: ${t.textMuted}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${space(8)} ${space(12)}; }\n img { display: block; block-size: 40px; inline-size: auto; max-inline-size: 160px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease-in-out, opacity 200ms ease-in-out; }\n li:hover img { filter: none; opacity: 1; }\n a { display: block; border-radius: ${t.radiusSm}; }\n `];\n\n render(): TemplateResult {\n return html`${this.heading ? html`<p part=\"heading\">${this.heading}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map((logo) => html`<li>${logo.href ? html`<a href=${logo.href}><img src=${logo.src} alt=${logo.alt} /></a>` : html`<img src=${logo.src} alt=${logo.alt} />`}</li>`)}</ul>`;\n }\n}\n\n/** One step in a process. */\nexport interface StepItem {\n id?: string;\n heading: string;\n text?: string;\n /** A short line above the heading, such as how long the step takes. */\n meta?: string;\n}\n\n/**\n * A process, in order, joined by a line: how buying a home works, what happens\n * after you apply.\n *\n * It is an ordered list, so a screen reader says the number and how many there\n * are. The numbers are drawn from the list, not typed in.\n *\n * @category content\n * @icon steps\n */\nexport class ImpktSteps extends ImpktElement {\n static properties = {\n items: { type: Array },\n orientation: { type: String, reflect: true },\n look: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: StepItem[];\n /** Across the page, or down it. Across becomes down on a narrow screen. */\n declare orientation: 'horizontal' | 'vertical';\n /**\n * `numbered` joins numbered circles with a line. `ruled` gives each step a\n * coloured rule along its top, in the brand's chart colours, as a project\n * plan's phases are drawn. The steps are an ordered list either way.\n */\n declare look: 'numbered' | 'ruled';\n /** The level of each step's heading. One below the heading above the steps. */\n declare headingLevel: 2 | 3 | 4;\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.orientation = 'horizontal';\n this.look = 'numbered';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, headingStyles, css`\n :host { display: block; container-type: inline-size; }\n ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${space(6)}; }\n li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }\n li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type('sm')} font-weight: ${fontWeight('bold')}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }\n .h { ${type('lg')} letter-spacing: 0; }\n .meta { margin: 0; ${type('sm')} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }\n .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; text-wrap: pretty; }\n :host([orientation='vertical']) ol { grid-auto-flow: row; }\n :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }\n :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n @container (max-width: 40rem) {\n ol { grid-auto-flow: row; }\n li { padding-inline-start: 56px; min-block-size: 56px; }\n li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n }\n :host([look='ruled']) li { padding-block-start: ${space(5)}; border-block-start: 3px solid var(--rule); }\n :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }\n :host([look='ruled']) ol { gap: ${space(5)}; }\n /* On a phone the ruled steps become a branch graph: one trunk down the left, and each step a coloured branch off it with a dot. */\n @container (max-width: 40rem) {\n :host([look='ruled']) ol { gap: 0; }\n :host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }\n :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; border-radius: 0; margin: 0; background: ${t.text}; }\n :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${space(3)}; inset-inline-start: 2px; inset-inline-end: auto; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }\n }\n @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } }\n `];\n\n render(): TemplateResult {\n return html`<ol part=\"list\">${(this.items ?? []).map((step, i) => html`<li part=\"step\" style=${this.look === 'ruled' ? `--rule:var(--impkt-color-chart-${(i % 5) + 1}, ${'var(--impkt-color-brand-default, #1f4ed8)'})` : nothing}>\n ${step.meta ? html`<p class=\"meta\">${step.meta}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${step.heading}</div>\n ${step.text ? html`<p class=\"body\">${step.text}</p>` : nothing}\n </li>`)}</ol>`;\n }\n}\n\n/**\n * A picture beside words, the working section of a marketing page: a heading,\n * a line of text, a short list of points and an action.\n *\n * On a phone the words come first, whichever side the picture is on, so the\n * reading order never depends on the layout.\n *\n * @category layout\n * @icon split\n * @role heading\n * @slot actions - Buttons and links under the words.\n */\nexport class ImpktMediaSplit extends ImpktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n imageSide: { type: String, reflect: true, attribute: 'image-side' },\n insetSrc: { type: String, attribute: 'inset-src' },\n insetAlt: { type: String, attribute: 'inset-alt' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** Short points, each drawn with a tick. */\n declare points: string[];\n /** The heading's level in the page. */\n declare level: 2 | 3;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A smaller picture overlapping the corner of the main one. */\n declare insetSrc: string;\n declare insetAlt: string;\n /** Which side the picture sits on, on a wide screen. */\n declare imageSide: 'start' | 'end';\n /** The picture's shape. */\n declare ratio: '4:3' | '1:1' | '3:2' | '16:9';\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.points = [];\n this.level = 2;\n this.imageSrc = '';\n this.imageAlt = '';\n this.imageSide = 'end';\n this.insetSrc = '';\n this.insetAlt = '';\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, headingStyles, css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }\n :host([image-side='start']) .picture { order: -1; }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }\n li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight('normal')}; }\n .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${t.brandSubtle}; color: ${t.brand}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .picture { position: relative; }\n .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }\n .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-sizing: border-box; }\n @container (max-width: 48rem) {\n .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n :host([image-side='start']) .picture { order: 0; }\n .h { ${type('3xl')} }\n }\n `];\n\n render(): TemplateResult {\n return html`<div class=\"split\" part=\"split\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.level}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class=\"tick\">${iconSvg('check', '14px')}</span><span>${p}</span></li>`)}</ul>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${this.imageSrc ? html`<div class=\"picture ${this.insetSrc ? 'has-inset' : ''}\"><img src=${this.imageSrc} alt=${this.imageAlt} loading=\"lazy\" part=\"image\" />${this.insetSrc ? html`<img class=\"inset\" src=${this.insetSrc} alt=${this.insetAlt} loading=\"lazy\" />` : nothing}</div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * The closing push of a page: a rounded panel with a heading, a line of text\n * and the page's main action, set apart from everything above it.\n *\n * @category layout\n * @icon banner\n * @slot actions - The buttons.\n */\nexport class ImpktCtaBanner extends ImpktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The panel's colour. */\n declare tone: 'brand' | 'subtle' | 'card';\n /** Words beside the action, centred above it, or above it on the left. */\n declare align: 'split' | 'center' | 'stacked';\n /** A photo behind the words, with a scrim so they stay readable. */\n declare imageSrc: string;\n declare imageAlt: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.tone = 'brand';\n this.align = 'split';\n this.imageSrc = '';\n this.imageAlt = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, headingStyles, css`\n :host { display: block; container-type: inline-size; }\n .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${space(8)}; padding: ${space(16)}; border-radius: ${t.radius2xl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }\n :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowLg}; }\n /* Only the words take the light colours: a button in the actions keeps its own. */\n :host([tone='brand']) .words { --impkt-color-text-heading: ${t.onBrand}; --impkt-color-text-default: ${t.onBrand}; --impkt-color-text-muted: ${t.onBrand}; --impkt-color-text-link: ${t.onBrand}; }\n /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */\n :host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${t.onBrand} 18%, transparent), transparent); pointer-events: none; }\n .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impkt-color-text-heading: #fff; }\n .panel.pictured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.8) 0%, rgb(18 31 26 / 0.1) 75%); }\n .panel.pictured .words, .panel.pictured .actions { z-index: 1; }\n @container (max-width: 48rem) { .panel.pictured { justify-content: flex-end; } .panel.pictured::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.15) 0%, rgb(18 31 26 / 0.85) 100%); } }\n .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }\n :host([align='center']) .panel { flex-direction: column; text-align: center; }\n :host([align='center']) .words { align-items: center; }\n @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${space(8)} ${space(6)}; } .h { ${type('3xl')} } :host([align='center']) .panel { align-items: center; } }\n @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }\n `];\n\n render(): TemplateResult {\n return html`<div class=\"panel ${this.imageSrc ? 'pictured' : ''}\" part=\"panel\">\n ${this.imageSrc ? html`<img class=\"photo\" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}\n <div class=\"words\">\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>`;\n }\n}\n\n/** One review. */\nexport interface ReviewItem {\n id?: string;\n quote: string;\n person: string;\n about?: string;\n rating?: number;\n avatarSrc?: string;\n}\n\nconst stars = (rating: number): TemplateResult => html`<span class=\"stars\" role=\"img\" aria-label=${say('Rated {rating} out of 5', { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" fill=${n <= rating ? 'currentColor' : 'none'} stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><path d=\"M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z\"/></svg>`)}</span>`;\n\nconst initials = (name: string): string => name.split(/\\s+/).filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== 'and').slice(0, 2).map((w) => w[0]!.toUpperCase()).join('');\n\n/**\n * What customers say, in cards, with their rating and a face or their\n * initials, and a summary line above them.\n *\n * A rating is said in words as well as drawn in stars.\n *\n * @category content\n * @icon reviews\n */\nexport class ImpktReviews extends ImpktElement {\n static properties = {\n summary: { type: String },\n rating: { type: Number },\n items: { type: Array },\n columns: { 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 line above the reviews, such as \"4.8 from 312 buyers\". */\n declare summary: string;\n /** The overall rating out of 5, drawn beside the summary. */\n declare rating: number | undefined;\n declare items: ReviewItem[];\n declare columns: 'two' | 'three';\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.summary = '';\n this.rating = undefined;\n this.items = [];\n this.columns = 'three';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n blockquote { margin: 0; flex: 1; ${type('md')} text-wrap: pretty; }\n .who { display: flex; align-items: center; gap: ${space(3)}; }\n .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${t.brandSubtle}; color: ${t.brand}; ${type('sm')} font-weight: ${fontWeight('bold')}; }\n .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; ${type('sm')} }\n .about { color: ${t.textMuted}; ${type('sm')} }\n @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n render(): TemplateResult {\n return html`${this.summary || this.rating ? html`<p class=\"top\" part=\"summary\" style=\"margin-block-start:0\">${this.rating ? stars(Math.round(this.rating)) : nothing}<span>${this.summary}</span></p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map((r) => html`<li part=\"review\">\n ${r.rating ? stars(r.rating) : nothing}\n <blockquote>${r.quote}</blockquote>\n <div class=\"who\"><span class=\"face\" aria-hidden=\"true\">${r.avatarSrc ? html`<img src=${r.avatarSrc} alt=\"\" />` : initials(r.person)}</span><span><span class=\"name\">${r.person}</span>${r.about ? html`<br /><span class=\"about\">${r.about}</span>` : nothing}</span></div>\n </li>`)}</ul>`;\n }\n}\n\n/**\n * An email sign-up in one line: release dates, price lists, launch news.\n *\n * The field has a real label, the browser checks the address, and what happens\n * with the address is said beside the button. The app receives the address and\n * says when it is done.\n *\n * @category form\n * @icon mail\n * @fires {CustomEvent<{ email: string }>} impkt-submit - When a valid address is sent. The address is in detail.email.\n */\nexport class ImpktNewsletter extends ImpktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n label: { type: String },\n buttonText: { type: String, attribute: 'button-text' },\n smallPrint: { type: String, attribute: 'small-print' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The field's label. */\n declare label: string;\n declare buttonText: string;\n /** What happens with the address, such as how to stop the emails. */\n declare smallPrint: string;\n /** What is said once the address is sent. */\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private done = false;\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.label = 'Email address';\n this.buttonText = 'Sign up';\n this.smallPrint = '';\n this.doneText = 'Thank you. You’re on the list.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, headingStyles, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; }\n .h { ${type('2xl')} }\n form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }\n label { grid-column: 1 / -1; ${type('sm')} font-weight: ${fontWeight('semibold')}; }\n input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${space(2.5)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; }\n button { ${targetSize} min-block-size: 44px; padding: ${space(2)} ${space(5)}; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type('sm')} }\n .done { margin: 0; ${type('md')} font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = event.currentTarget as HTMLFormElement;\n if (typeof form.reportValidity === 'function' && !form.reportValidity()) return;\n const email = (form.querySelector('input') as HTMLInputElement).value.trim();\n this.dispatchEvent(new CustomEvent('impkt-submit', { detail: { email }, bubbles: true, composed: true }));\n this.done = true;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const field = this.id_('email');\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div aria-live=\"polite\">${this.done ? html`<p class=\"done\">${this.doneText}</p>` : html`<form @submit=${this.submit}>\n <label for=${field}>${this.label}</label>\n <input id=${field} type=\"email\" name=\"email\" autocomplete=\"email\" required />\n <button type=\"submit\">${this.buttonText}</button>\n ${this.smallPrint ? html`<p class=\"note\">${this.smallPrint}</p>` : nothing}\n </form>`}</div>\n </div>`;\n }\n}\n\ncustomElements.define('impkt-carousel', ImpktCarousel);\ncustomElements.define('impkt-gallery', ImpktGallery);\ncustomElements.define('impkt-logo-cloud', ImpktLogoCloud);\ncustomElements.define('impkt-steps', ImpktSteps);\ncustomElements.define('impkt-media-split', ImpktMediaSplit);\ncustomElements.define('impkt-cta-banner', ImpktCtaBanner);\ncustomElements.define('impkt-reviews', ImpktReviews);\ncustomElements.define('impkt-newsletter', ImpktNewsletter);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-carousel': ImpktCarousel; 'impkt-gallery': ImpktGallery; 'impkt-logo-cloud': ImpktLogoCloud; 'impkt-steps': ImpktSteps;\n 'impkt-media-split': ImpktMediaSplit; 'impkt-cta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base/locale.ts
|
|
2
|
+
function pageLocale(el) {
|
|
3
|
+
const fromElement = el?.closest?.("[lang]")?.getAttribute("lang");
|
|
4
|
+
const fromHost = !fromElement && el ? el.getRootNode?.()?.host?.closest?.("[lang]")?.getAttribute("lang") ?? "" : "";
|
|
5
|
+
const fromPage = typeof document !== "undefined" ? document.documentElement.lang : "";
|
|
6
|
+
const lang = (fromElement || fromHost || fromPage || "").trim();
|
|
7
|
+
if (!lang || lang.toLowerCase() === "en") return "en-GB";
|
|
8
|
+
return lang;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
pageLocale
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk-3IGNZTJU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/base/locale.ts"],"sourcesContent":["/**\n * The locale a component formats dates, numbers and money in: the language of\n * the page around it (ADR 0026). A delivered page sets `lang` on its root, or\n * on a part of the page in another language, and every component reads the\n * nearest one. English is British English, which is what Strata's sites wrote\n * before they had languages.\n */\nexport function pageLocale(el?: Element | null): string {\n const fromElement = el?.closest?.('[lang]')?.getAttribute('lang');\n const fromHost = !fromElement && el ? ((el.getRootNode?.() as ShadowRoot | undefined)?.host?.closest?.('[lang]')?.getAttribute('lang') ?? '') : '';\n const fromPage = typeof document !== 'undefined' ? document.documentElement.lang : '';\n const lang = (fromElement || fromHost || fromPage || '').trim();\n if (!lang || lang.toLowerCase() === 'en') return 'en-GB';\n return lang;\n}\n"],"mappings":";AAOO,SAAS,WAAW,IAA6B;AACtD,QAAM,cAAc,IAAI,UAAU,QAAQ,GAAG,aAAa,MAAM;AAChE,QAAM,WAAW,CAAC,eAAe,KAAO,GAAG,cAAc,GAA8B,MAAM,UAAU,QAAQ,GAAG,aAAa,MAAM,KAAK,KAAM;AAChJ,QAAM,WAAW,OAAO,aAAa,cAAc,SAAS,gBAAgB,OAAO;AACnF,QAAM,QAAQ,eAAe,YAAY,YAAY,IAAI,KAAK;AAC9D,MAAI,CAAC,QAAQ,KAAK,YAAY,MAAM,KAAM,QAAO;AACjD,SAAO;AACT;","names":[]}
|
|
@@ -32,6 +32,10 @@ var t = {
|
|
|
32
32
|
infoSubtle: token("color.status.info.subtle", "#e4eafa"),
|
|
33
33
|
fontBody: token("font.family.body", "system-ui, sans-serif"),
|
|
34
34
|
fontHeading: token("font.family.heading", "system-ui, sans-serif"),
|
|
35
|
+
/** Code-like labels: hashes, branches, version lines. */
|
|
36
|
+
fontMono: token("font.family.mono", "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"),
|
|
37
|
+
/** The small line above a heading: the body face, or the code face for a brand that asks. */
|
|
38
|
+
fontEyebrow: token("font.family.eyebrow", "inherit"),
|
|
35
39
|
focusShadow: token("focus.ring.shadow", "0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a"),
|
|
36
40
|
focusOffset: token("focus.ring.offset", "2px"),
|
|
37
41
|
targetMin: token("target.min", "24px"),
|
|
@@ -77,7 +81,7 @@ var spaceAround = css`
|
|
|
77
81
|
`;
|
|
78
82
|
|
|
79
83
|
// packages/ui/src/base/styles.ts
|
|
80
|
-
import { css as css2 } from "lit";
|
|
84
|
+
import { css as css2, unsafeCSS as unsafeCSS2 } from "lit";
|
|
81
85
|
var focusRing = css2`
|
|
82
86
|
:host(:focus-visible),
|
|
83
87
|
:host(:not([disabled])) :focus-visible {
|
|
@@ -129,6 +133,19 @@ var base = css2`
|
|
|
129
133
|
box-sizing: inherit;
|
|
130
134
|
}
|
|
131
135
|
`;
|
|
136
|
+
var touchTarget = (selector) => (
|
|
137
|
+
// Under :host, so it outweighs the component's own rule for the same control whatever the order.
|
|
138
|
+
unsafeCSS2(`@media (pointer: coarse) { :host :is(${selector}) { min-block-size: 44px; min-inline-size: 44px; } }`)
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
// packages/ui/src/base/say.ts
|
|
142
|
+
var WORDING = Symbol.for("strata.wording");
|
|
143
|
+
function say(english, values) {
|
|
144
|
+
const words = globalThis[WORDING]?.words;
|
|
145
|
+
const chosen = words?.[english];
|
|
146
|
+
const text = typeof chosen === "string" && chosen.trim() ? chosen : english;
|
|
147
|
+
return values ? text.replace(/\{(\w+)\}/g, (whole, name) => name in values ? String(values[name]) : whole) : text;
|
|
148
|
+
}
|
|
132
149
|
|
|
133
150
|
// packages/ui/src/base/ImpktElement.ts
|
|
134
151
|
import { LitElement, css as css3 } from "lit";
|
|
@@ -151,6 +168,32 @@ var ImpktElement = class extends LitElement {
|
|
|
151
168
|
id_(part) {
|
|
152
169
|
return `${this.uid}-${part}`;
|
|
153
170
|
}
|
|
171
|
+
/** @ignore */
|
|
172
|
+
connectedCallback() {
|
|
173
|
+
super.connectedCallback();
|
|
174
|
+
this.sayDefaults();
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The words a component ships with, in the page's language (ADR 0026).
|
|
178
|
+
*
|
|
179
|
+
* Defaults stay plain English in the constructor, so the component manifest
|
|
180
|
+
* still sees them (a prop with no default is read as required). When the
|
|
181
|
+
* element joins the page, each word it holds is looked up in the site's
|
|
182
|
+
* wording; anything that is not one of Strata's own words, such as a page's
|
|
183
|
+
* own text or a variant name, is left exactly as it is.
|
|
184
|
+
*
|
|
185
|
+
* @ignore
|
|
186
|
+
*/
|
|
187
|
+
sayDefaults() {
|
|
188
|
+
const props = this.constructor.elementProperties;
|
|
189
|
+
const self = this;
|
|
190
|
+
for (const name of props.keys()) {
|
|
191
|
+
const value = self[name];
|
|
192
|
+
if (typeof value !== "string" || !value) continue;
|
|
193
|
+
const said = say(value);
|
|
194
|
+
if (said !== value) self[name] = said;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
154
197
|
};
|
|
155
198
|
|
|
156
199
|
export {
|
|
@@ -165,6 +208,8 @@ export {
|
|
|
165
208
|
focusRing,
|
|
166
209
|
targetSize,
|
|
167
210
|
visuallyHidden,
|
|
211
|
+
touchTarget,
|
|
212
|
+
say,
|
|
168
213
|
ImpktElement
|
|
169
214
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-3KO55PZK.js.map
|