@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
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ImpktElement,
|
|
3
|
+
fontSize,
|
|
4
|
+
fontWeight,
|
|
5
|
+
say,
|
|
6
|
+
space,
|
|
7
|
+
t,
|
|
8
|
+
token
|
|
9
|
+
} from "./chunk-3KO55PZK.js";
|
|
10
|
+
|
|
11
|
+
// packages/ui/src/components/scene.ts
|
|
12
|
+
import { html, css, nothing } from "lit";
|
|
13
|
+
var clamp = (n) => Math.min(1, Math.max(0, n));
|
|
14
|
+
var ImpktScene = class extends ImpktElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
/**
|
|
18
|
+
* Whether a loop is paused: the scene's own state, set by its pause button
|
|
19
|
+
* or by `pause()`. A plain field rather than a property, so it is never one
|
|
20
|
+
* of the settings an author is offered.
|
|
21
|
+
*/
|
|
22
|
+
this.paused = false;
|
|
23
|
+
this.frame = 0;
|
|
24
|
+
this.started = 0;
|
|
25
|
+
this.reduced = false;
|
|
26
|
+
this.seekFrom = 0;
|
|
27
|
+
this.seekTo = 0;
|
|
28
|
+
this.seekStart = 0;
|
|
29
|
+
this.seekMs = 0;
|
|
30
|
+
this.onScroll = () => {
|
|
31
|
+
if (this.drive === "view" || this.drive === "page") this.schedule();
|
|
32
|
+
};
|
|
33
|
+
this.tick = (now) => {
|
|
34
|
+
this.frame = 0;
|
|
35
|
+
if (this.seekMs) {
|
|
36
|
+
if (!this.seekStart) this.seekStart = now;
|
|
37
|
+
const p = Math.min(1, (now - this.seekStart) / this.seekMs);
|
|
38
|
+
const e = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;
|
|
39
|
+
this.progress = this.seekFrom + (this.seekTo - this.seekFrom) * e;
|
|
40
|
+
if (p < 1) this.schedule();
|
|
41
|
+
else this.seekMs = 0;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (this.drive === "view") {
|
|
45
|
+
const r = this.getBoundingClientRect();
|
|
46
|
+
const vh = window.innerHeight || 1;
|
|
47
|
+
this.progress = clamp(-r.top / Math.max(1, r.height - vh));
|
|
48
|
+
} else if (this.drive === "page") {
|
|
49
|
+
const doc = document.documentElement;
|
|
50
|
+
this.progress = clamp(window.scrollY / Math.max(1, doc.scrollHeight - (window.innerHeight || 0)));
|
|
51
|
+
} else if (this.drive === "loop" && !this.paused && !this.reduced) {
|
|
52
|
+
if (!this.started) this.started = now - this.progress * this.duration * 1e3;
|
|
53
|
+
this.progress = (now - this.started) / (this.duration * 1e3) % 1;
|
|
54
|
+
this.schedule();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
this.togglePause = () => this.setPaused(!this.paused);
|
|
58
|
+
this.drive = "view";
|
|
59
|
+
this.layout = "stage";
|
|
60
|
+
this.length = 3;
|
|
61
|
+
this.duration = 8;
|
|
62
|
+
this.label = "Animation";
|
|
63
|
+
this.progress = 0;
|
|
64
|
+
this.controls = "below";
|
|
65
|
+
this.bleed = false;
|
|
66
|
+
this.hideOn = "never";
|
|
67
|
+
}
|
|
68
|
+
static {
|
|
69
|
+
this.properties = {
|
|
70
|
+
drive: { type: String, reflect: true },
|
|
71
|
+
layout: { type: String, reflect: true },
|
|
72
|
+
length: { type: Number },
|
|
73
|
+
duration: { type: Number },
|
|
74
|
+
label: { type: String },
|
|
75
|
+
progress: { type: Number },
|
|
76
|
+
controls: { type: String, reflect: true },
|
|
77
|
+
bleed: { type: Boolean, reflect: true },
|
|
78
|
+
hideOn: { type: String, reflect: true, attribute: "hide-on" }
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
static {
|
|
82
|
+
this.styles = [
|
|
83
|
+
...ImpktElement.styles,
|
|
84
|
+
css`
|
|
85
|
+
:host {
|
|
86
|
+
display: block;
|
|
87
|
+
position: relative;
|
|
88
|
+
}
|
|
89
|
+
:host([drive='view'][layout='stage']) {
|
|
90
|
+
min-height: calc(var(--impkt-scene-length, 3) * 100svh);
|
|
91
|
+
}
|
|
92
|
+
.frame {
|
|
93
|
+
display: grid;
|
|
94
|
+
grid-template-columns: minmax(0, 1fr);
|
|
95
|
+
}
|
|
96
|
+
:host([layout='split']) .frame {
|
|
97
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
98
|
+
gap: ${space(8)};
|
|
99
|
+
}
|
|
100
|
+
.stage {
|
|
101
|
+
position: sticky;
|
|
102
|
+
top: 0;
|
|
103
|
+
height: 100svh;
|
|
104
|
+
display: grid;
|
|
105
|
+
place-items: center;
|
|
106
|
+
overflow: clip;
|
|
107
|
+
}
|
|
108
|
+
/* What is on the stage is layered, as in a motion tool: each thing sits
|
|
109
|
+
over the one before, so a later layer's timeline can reveal it over an
|
|
110
|
+
earlier one. */
|
|
111
|
+
.stage ::slotted(*) {
|
|
112
|
+
grid-area: 1 / 1;
|
|
113
|
+
max-width: 100%;
|
|
114
|
+
}
|
|
115
|
+
:host([drive='loop']) .stage,
|
|
116
|
+
:host([drive='scrubber']) .stage {
|
|
117
|
+
position: relative;
|
|
118
|
+
height: auto;
|
|
119
|
+
min-height: 60svh;
|
|
120
|
+
}
|
|
121
|
+
.controls {
|
|
122
|
+
display: flex;
|
|
123
|
+
gap: ${space(3)};
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
padding-block: ${space(3)};
|
|
127
|
+
}
|
|
128
|
+
:host([bleed]) { margin-inline: calc(50% - 50vw); }
|
|
129
|
+
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
130
|
+
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
131
|
+
/* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
|
|
132
|
+
.stage > .controls { position: absolute; inset-inline: ${space(6)}; inset-block-end: ${space(6)}; z-index: 2; padding: 0; }
|
|
133
|
+
.stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impkt-color-surface-card, #fff); }
|
|
134
|
+
/* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
|
|
135
|
+
.controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
|
|
136
|
+
.pause {
|
|
137
|
+
min-width: ${token("target.min", "24px")};
|
|
138
|
+
min-height: ${token("target.min", "24px")};
|
|
139
|
+
padding: ${space(2)} ${space(4)};
|
|
140
|
+
border-radius: ${token("radius.full", "9999px")};
|
|
141
|
+
border: 1px solid ${t.border};
|
|
142
|
+
background: ${t.surfaceCard};
|
|
143
|
+
color: ${t.text};
|
|
144
|
+
font-size: ${fontSize("sm")};
|
|
145
|
+
font-weight: ${fontWeight("medium")};
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
}
|
|
148
|
+
.pause:focus-visible {
|
|
149
|
+
outline: none;
|
|
150
|
+
box-shadow: ${token("focus.ring.shadow", "0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
|
|
151
|
+
}
|
|
152
|
+
@media (max-width: 48rem) {
|
|
153
|
+
:host([layout='split']) .frame {
|
|
154
|
+
grid-template-columns: minmax(0, 1fr);
|
|
155
|
+
}
|
|
156
|
+
:host([layout='split']) .stage {
|
|
157
|
+
height: 50svh;
|
|
158
|
+
z-index: 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
@media (prefers-reduced-motion: reduce) {
|
|
162
|
+
:host {
|
|
163
|
+
min-height: 0 !important;
|
|
164
|
+
}
|
|
165
|
+
.stage {
|
|
166
|
+
position: relative;
|
|
167
|
+
height: auto;
|
|
168
|
+
gap: ${space(6)};
|
|
169
|
+
}
|
|
170
|
+
/* With less motion the layers are shown one after another, so every
|
|
171
|
+
state the scene would have moved through can still be seen. */
|
|
172
|
+
.stage ::slotted(*) {
|
|
173
|
+
grid-area: auto;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
`
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
/** @ignore */
|
|
180
|
+
connectedCallback() {
|
|
181
|
+
super.connectedCallback();
|
|
182
|
+
try {
|
|
183
|
+
this.reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
184
|
+
} catch {
|
|
185
|
+
this.reduced = false;
|
|
186
|
+
}
|
|
187
|
+
window.addEventListener("scroll", this.onScroll, { passive: true, capture: true });
|
|
188
|
+
window.addEventListener("resize", this.onScroll);
|
|
189
|
+
this.schedule();
|
|
190
|
+
}
|
|
191
|
+
/** @ignore */
|
|
192
|
+
disconnectedCallback() {
|
|
193
|
+
super.disconnectedCallback();
|
|
194
|
+
window.removeEventListener("scroll", this.onScroll, { capture: true });
|
|
195
|
+
window.removeEventListener("resize", this.onScroll);
|
|
196
|
+
if (this.frame) cancelAnimationFrame(this.frame);
|
|
197
|
+
this.frame = 0;
|
|
198
|
+
}
|
|
199
|
+
/** @ignore */
|
|
200
|
+
updated(changed) {
|
|
201
|
+
if (changed.has("length")) this.style.setProperty("--impkt-scene-length", String(this.length));
|
|
202
|
+
if (changed.has("progress")) this.publish();
|
|
203
|
+
if (changed.has("drive")) {
|
|
204
|
+
this.started = 0;
|
|
205
|
+
this.schedule();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks
|
|
210
|
+
* a scene to a named stop this way.
|
|
211
|
+
*/
|
|
212
|
+
seek(to, ms = 0) {
|
|
213
|
+
if (ms <= 0 || this.reduced) {
|
|
214
|
+
this.progress = clamp(to);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this.seekFrom = this.progress;
|
|
218
|
+
this.seekTo = clamp(to);
|
|
219
|
+
this.seekStart = 0;
|
|
220
|
+
this.seekMs = ms;
|
|
221
|
+
this.schedule();
|
|
222
|
+
}
|
|
223
|
+
schedule() {
|
|
224
|
+
if (!this.frame && typeof requestAnimationFrame === "function") this.frame = requestAnimationFrame(this.tick);
|
|
225
|
+
}
|
|
226
|
+
publish() {
|
|
227
|
+
this.style.setProperty("--impkt-scene-progress", this.progress.toFixed(4));
|
|
228
|
+
this.dispatchEvent(new CustomEvent("impkt-scene-progress", { detail: { progress: this.progress }, bubbles: true, composed: true }));
|
|
229
|
+
}
|
|
230
|
+
setPaused(paused) {
|
|
231
|
+
if (this.paused === paused) return;
|
|
232
|
+
this.paused = paused;
|
|
233
|
+
this.started = 0;
|
|
234
|
+
this.schedule();
|
|
235
|
+
this.requestUpdate();
|
|
236
|
+
}
|
|
237
|
+
/** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */
|
|
238
|
+
pause() {
|
|
239
|
+
this.setPaused(true);
|
|
240
|
+
}
|
|
241
|
+
render() {
|
|
242
|
+
const loop = this.drive === "loop";
|
|
243
|
+
const over = this.controls === "over" && !this.reduced;
|
|
244
|
+
const controls = html`<div class="controls" part="controls">
|
|
245
|
+
<slot name="controls"></slot>
|
|
246
|
+
${loop && !this.reduced ? html`<button class="pause" type="button" aria-pressed=${this.paused ? "true" : "false"} @click=${this.togglePause}>
|
|
247
|
+
${this.paused ? say("Play {name}", { name: this.label }) : say("Pause {name}", { name: this.label })}
|
|
248
|
+
</button>` : nothing}
|
|
249
|
+
</div>`;
|
|
250
|
+
const stage = html`<div class="stage" part="stage"><slot name="stage"></slot>${over ? controls : nothing}</div>`;
|
|
251
|
+
return html`
|
|
252
|
+
<div class="frame" part="frame" role="region" aria-label=${this.label}>
|
|
253
|
+
${this.layout === "split" ? html`<div class="content" part="content"><slot></slot></div>${stage}` : html`${stage}<div class="content" part="content"><slot></slot></div>`}
|
|
254
|
+
</div>
|
|
255
|
+
${over ? nothing : controls}
|
|
256
|
+
`;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
customElements.define("impkt-scene", ImpktScene);
|
|
260
|
+
|
|
261
|
+
export {
|
|
262
|
+
ImpktScene
|
|
263
|
+
};
|
|
264
|
+
//# sourceMappingURL=chunk-GBRML4RF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/scene.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport { say } from '../base/say';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\n\nexport type SceneDrive = 'view' | 'page' | 'loop' | 'scrubber';\nexport type SceneLayout = 'stage' | 'split';\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/**\n * A scene: a stage whose children move along a progress from 0 to 1.\n *\n * The children declare timelines in their `motion` block, and `@atomic-ui/motion`\n * compiles them to keyframes. This element owns only the progress, and where it\n * comes from is the `drive` (ADR 0027):\n *\n * - `view` — the scene's own passage through the viewport. The stage pins\n * while the scene scrolls past, for `length` screens, or beside the content\n * in the default slot when `layout` is `split`.\n * - `page` — the scroll position of the whole page.\n * - `loop` — time, over `duration` seconds, repeating. **It always shows a\n * pause button**, because anything that moves on its own for more than five\n * seconds must be pausable (WCAG 2.2.2), and a scene that could forget that\n * is one the gate would have to catch on every page.\n * - `scrubber` — an `impkt-scrubber` placed in the `controls` slot.\n *\n * Progress is published three ways: the `progress` property, the\n * `--impkt-scene-progress` custom property on the host, and an\n * `impkt-scene-progress` event. Engines with scroll-driven animations run `view`\n * and `page` scenes natively, and the runtime ignores the event for them.\n *\n * Under reduced motion a `loop` does not start, and nothing pins: the stage\n * and the content stack, so every state of the scene can be read in order.\n *\n * @category layout\n * @icon layers\n * @slot stage - What moves, layered one over another. Pinned while the scene plays,\n * beside the content in `split` layout, after it, so the words are read first.\n * @slot - Content that scrolls past the stage, such as chapters.\n * @slot controls - An `impkt-scrubber`, for a scene driven by one.\n * @fires {CustomEvent<{ progress: number }>} impkt-scene-progress - `{ progress }` whenever the progress changes.\n */\nexport class ImpktScene extends ImpktElement {\n static properties = {\n drive: { type: String, reflect: true },\n layout: { type: String, reflect: true },\n length: { type: Number },\n duration: { type: Number },\n label: { type: String },\n progress: { type: Number },\n controls: { type: String, reflect: true },\n bleed: { type: Boolean, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n\n /** Where the progress comes from. */\n declare drive: 'view' | 'page' | 'loop' | 'scrubber';\n /** `stage` pins one full-width stage; `split` pins it beside the content. */\n declare layout: 'stage' | 'split';\n /** How many screens of scrolling a `view` scene lasts, in `stage` layout. */\n declare length: number;\n /** Seconds per cycle of a `loop` scene. */\n declare duration: number;\n /** The scene's accessible name. Also names its pause button. */\n declare label: string;\n /** From 0 to 1. Set it to seek a `scrubber` scene, or where one starts. */\n declare progress: number;\n /**\n * Where the controls sit: `below` the stage, or `over` its foot, floating\n * on what it shows, as a video's do. Under reduced motion they sit below.\n */\n declare controls: 'below' | 'over';\n /** Run the stage to the window's edges, past the page's margins, as a hero drawn edge to edge does. */\n declare bleed: boolean;\n /**\n * Leave it out on a phone, or on anything wider, for a picture drawn twice:\n * once for a wide screen and once for a narrow one. Never both.\n */\n declare hideOn: 'never' | 'phone' | 'wide';\n /**\n * Whether a loop is paused: the scene's own state, set by its pause button\n * or by `pause()`. A plain field rather than a property, so it is never one\n * of the settings an author is offered.\n */\n private paused = false;\n\n private frame = 0;\n private started = 0;\n private reduced = false;\n private seekFrom = 0;\n private seekTo = 0;\n private seekStart = 0;\n private seekMs = 0;\n\n constructor() {\n super();\n this.drive = 'view';\n this.layout = 'stage';\n this.length = 3;\n this.duration = 8;\n this.label = 'Animation';\n this.progress = 0;\n this.controls = 'below';\n this.bleed = false;\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n position: relative;\n }\n :host([drive='view'][layout='stage']) {\n min-height: calc(var(--impkt-scene-length, 3) * 100svh);\n }\n .frame {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n gap: ${space(8)};\n }\n .stage {\n position: sticky;\n top: 0;\n height: 100svh;\n display: grid;\n place-items: center;\n overflow: clip;\n }\n /* What is on the stage is layered, as in a motion tool: each thing sits\n over the one before, so a later layer's timeline can reveal it over an\n earlier one. */\n .stage ::slotted(*) {\n grid-area: 1 / 1;\n max-width: 100%;\n }\n :host([drive='loop']) .stage,\n :host([drive='scrubber']) .stage {\n position: relative;\n height: auto;\n min-height: 60svh;\n }\n .controls {\n display: flex;\n gap: ${space(3)};\n align-items: center;\n justify-content: center;\n padding-block: ${space(3)};\n }\n :host([bleed]) { margin-inline: calc(50% - 50vw); }\n @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }\n @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }\n /* Over the stage, the controls float at its foot, above the layers and clear of its edges. */\n .stage > .controls { position: absolute; inset-inline: ${space(6)}; inset-block-end: ${space(6)}; z-index: 2; padding: 0; }\n .stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impkt-color-surface-card, #fff); }\n /* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */\n .controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }\n .pause {\n min-width: ${token('target.min', '24px')};\n min-height: ${token('target.min', '24px')};\n padding: ${space(2)} ${space(4)};\n border-radius: ${token('radius.full', '9999px')};\n border: 1px solid ${t.border};\n background: ${t.surfaceCard};\n color: ${t.text};\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n .pause:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n @media (max-width: 48rem) {\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .stage {\n height: 50svh;\n z-index: 1;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n min-height: 0 !important;\n }\n .stage {\n position: relative;\n height: auto;\n gap: ${space(6)};\n }\n /* With less motion the layers are shown one after another, so every\n state the scene would have moved through can still be seen. */\n .stage ::slotted(*) {\n grid-area: auto;\n }\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n try {\n this.reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n } catch {\n this.reduced = false;\n }\n window.addEventListener('scroll', this.onScroll, { passive: true, capture: true });\n window.addEventListener('resize', this.onScroll);\n this.schedule();\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.onScroll, { capture: true });\n window.removeEventListener('resize', this.onScroll);\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n\n /** @ignore */\n protected updated(changed: PropertyValues<this>): void {\n if (changed.has('length')) this.style.setProperty('--impkt-scene-length', String(this.length));\n if (changed.has('progress')) this.publish();\n if (changed.has('drive')) {\n this.started = 0;\n this.schedule();\n }\n }\n\n /**\n * Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks\n * a scene to a named stop this way.\n */\n seek(to: number, ms = 0): void {\n if (ms <= 0 || this.reduced) {\n this.progress = clamp(to);\n return;\n }\n this.seekFrom = this.progress;\n this.seekTo = clamp(to);\n this.seekStart = 0;\n this.seekMs = ms;\n this.schedule();\n }\n\n private onScroll = () => {\n if (this.drive === 'view' || this.drive === 'page') this.schedule();\n };\n\n private schedule(): void {\n if (!this.frame && typeof requestAnimationFrame === 'function') this.frame = requestAnimationFrame(this.tick);\n }\n\n private tick = (now: number) => {\n this.frame = 0;\n if (this.seekMs) {\n if (!this.seekStart) this.seekStart = now;\n const p = Math.min(1, (now - this.seekStart) / this.seekMs);\n // ease-in-out, so a jump between stops reads as travel rather than a cut\n const e = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;\n this.progress = this.seekFrom + (this.seekTo - this.seekFrom) * e;\n if (p < 1) this.schedule();\n else this.seekMs = 0;\n return;\n }\n if (this.drive === 'view') {\n const r = this.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n this.progress = clamp(-r.top / Math.max(1, r.height - vh));\n } else if (this.drive === 'page') {\n const doc = document.documentElement;\n this.progress = clamp(window.scrollY / Math.max(1, doc.scrollHeight - (window.innerHeight || 0)));\n } else if (this.drive === 'loop' && !this.paused && !this.reduced) {\n if (!this.started) this.started = now - this.progress * this.duration * 1000;\n this.progress = ((now - this.started) / (this.duration * 1000)) % 1;\n this.schedule();\n }\n };\n\n private publish(): void {\n this.style.setProperty('--impkt-scene-progress', this.progress.toFixed(4));\n this.dispatchEvent(new CustomEvent('impkt-scene-progress', { detail: { progress: this.progress }, bubbles: true, composed: true }));\n }\n\n private setPaused(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n this.started = 0;\n this.schedule();\n this.requestUpdate();\n }\n\n private togglePause = () => this.setPaused(!this.paused);\n\n /** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */\n pause(): void {\n this.setPaused(true);\n }\n\n render(): TemplateResult {\n const loop = this.drive === 'loop';\n const over = this.controls === 'over' && !this.reduced;\n const controls = html`<div class=\"controls\" part=\"controls\">\n <slot name=\"controls\"></slot>\n ${loop && !this.reduced\n ? html`<button class=\"pause\" type=\"button\" aria-pressed=${this.paused ? 'true' : 'false'} @click=${this.togglePause}>\n ${this.paused ? say('Play {name}', { name: this.label }) : say('Pause {name}', { name: this.label })}\n </button>`\n : nothing}\n </div>`;\n const stage = html`<div class=\"stage\" part=\"stage\"><slot name=\"stage\"></slot>${over ? controls : nothing}</div>`;\n return html`\n <div class=\"frame\" part=\"frame\" role=\"region\" aria-label=${this.label}>\n ${this.layout === 'split'\n ? html`<div class=\"content\" part=\"content\"><slot></slot></div>${stage}`\n : html`${stage}<div class=\"content\" part=\"content\"><slot></slot></div>`}\n </div>\n ${over ? nothing : controls}\n `;\n }\n}\n\ncustomElements.define('impk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AACvB,UAAM,OAAO,KAAK,UAAU;AAC5B,UAAM,OAAO,KAAK,aAAa,UAAU,CAAC,KAAK;AAC/C,UAAM,WAAW;AAAA;AAAA,UAEX,QAAQ,CAAC,KAAK,UACZ,wDAAwD,KAAK,SAAS,SAAS,OAAO,WAAW,KAAK,WAAW;AAAA,gBAC7G,KAAK,SAAS,IAAI,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC,IAAI,IAAI,gBAAgB,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;AAAA,yBAEtG,OAAO;AAAA;AAEf,UAAM,QAAQ,iEAAiE,OAAO,WAAW,OAAO;AACxG,WAAO;AAAA,iEACsD,KAAK,KAAK;AAAA,UACjE,KAAK,WAAW,UACd,8DAA8D,KAAK,KACnE,OAAO,KAAK,yDAAyD;AAAA;AAAA,QAEzE,OAAO,UAAU,QAAQ;AAAA;AAAA,EAE/B;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NKMVICB5.js";
|
|
4
4
|
import {
|
|
5
5
|
ImpktElement,
|
|
6
6
|
focusRing,
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
spaceAround,
|
|
12
12
|
t,
|
|
13
13
|
targetSize,
|
|
14
|
+
touchTarget,
|
|
14
15
|
visuallyHidden
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3KO55PZK.js";
|
|
16
17
|
|
|
17
18
|
// packages/ui/src/components/blocks.ts
|
|
18
19
|
import { css, html, nothing } from "lit";
|
|
@@ -76,7 +77,8 @@ var ImpktTabs = class extends ImpktElement {
|
|
|
76
77
|
this.properties = {
|
|
77
78
|
items: { type: Array },
|
|
78
79
|
selected: { type: String, reflect: true },
|
|
79
|
-
label: { type: String }
|
|
80
|
+
label: { type: String },
|
|
81
|
+
twoRows: { type: Boolean, reflect: true, attribute: "two-rows" }
|
|
80
82
|
};
|
|
81
83
|
}
|
|
82
84
|
constructor() {
|
|
@@ -84,15 +86,24 @@ var ImpktTabs = class extends ImpktElement {
|
|
|
84
86
|
this.items = [];
|
|
85
87
|
this.selected = "";
|
|
86
88
|
this.label = "";
|
|
89
|
+
this.twoRows = false;
|
|
87
90
|
}
|
|
88
91
|
static {
|
|
89
|
-
this.styles = [...ImpktElement.styles, focusRing, css`
|
|
90
|
-
:host { display: block; }
|
|
91
|
-
[role='tablist'] { display: flex;
|
|
92
|
-
[role='tab'] { ${targetSize} padding: ${space(3)} ${space(4)}; font: inherit; font-weight: ${fontWeight("semibold")}; color: ${t.textMuted}; background: transparent; border: 0; border-block-end: 3px solid transparent; margin-block-end: -1px; cursor: pointer; border-radius: ${t.radius} ${t.radius} 0 0; }
|
|
92
|
+
this.styles = [...ImpktElement.styles, focusRing, touchTarget("[role='tab']"), css`
|
|
93
|
+
:host { display: block; container-type: inline-size; }
|
|
94
|
+
[role='tablist'] { display: flex; gap: ${space(1)}; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
95
|
+
[role='tab'] { ${targetSize} flex: none; padding: ${space(3)} ${space(4)}; font: inherit; font-weight: ${fontWeight("semibold")}; white-space: nowrap; color: ${t.textMuted}; background: transparent; border: 0; border-block-end: 3px solid transparent; margin-block-end: -1px; cursor: pointer; border-radius: ${t.radius} ${t.radius} 0 0; }
|
|
96
|
+
/* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */
|
|
97
|
+
[role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }
|
|
93
98
|
[role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
94
99
|
[role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
95
|
-
[role='tabpanel'] { padding-block: ${space(5)}; line-height: ${lineHeight("normal")};
|
|
100
|
+
[role='tabpanel'] { padding-block: ${space(5)}; line-height: ${lineHeight("normal")}; }
|
|
101
|
+
.body { white-space: pre-line; }
|
|
102
|
+
@container (max-width: 40rem) {
|
|
103
|
+
:host([two-rows]) [role='tablist'].many { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); overflow: visible; border-block-end: 0; gap: ${space(1)}; }
|
|
104
|
+
:host([two-rows]) .many [role='tab'] { white-space: normal; padding-inline: ${space(2)}; margin: 0; border-block-end-width: 3px; border-block-end-color: ${t.rule}; border-radius: ${t.radius}; }
|
|
105
|
+
:host([two-rows]) .many [role='tab'][aria-selected='true'] { border-block-end-color: currentColor; background: ${t.brandSubtle}; }
|
|
106
|
+
}
|
|
96
107
|
@media (forced-colors: active) { [role='tab'][aria-selected='true'] { border-block-end-color: Highlight; } }
|
|
97
108
|
`];
|
|
98
109
|
}
|
|
@@ -104,7 +115,7 @@ var ImpktTabs = class extends ImpktElement {
|
|
|
104
115
|
if (id === this.current()) return;
|
|
105
116
|
this.selected = id;
|
|
106
117
|
this.dispatchEvent(new CustomEvent("impkt-change", { detail: { value: id }, bubbles: true, composed: true }));
|
|
107
|
-
if (focus) void this.updateComplete.then(() => this.renderRoot.querySelector(`#${this.id_(`tab-${id}`)}`)?.focus());
|
|
118
|
+
if (focus) void this.updateComplete.then(() => this.renderRoot.querySelector(`#${this.id_(`tab-${id}`)}`)?.focus({ preventScroll: true }));
|
|
108
119
|
}
|
|
109
120
|
onKey(event) {
|
|
110
121
|
const items = this.items ?? [];
|
|
@@ -114,13 +125,31 @@ var ImpktTabs = class extends ImpktElement {
|
|
|
114
125
|
event.preventDefault();
|
|
115
126
|
this.choose(items[(to + items.length) % items.length].id, true);
|
|
116
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Bring the chosen tab into view inside the row of tabs. Only the row scrolls:
|
|
130
|
+
* `scrollIntoView` would scroll the page too, and move someone who is reading
|
|
131
|
+
* further down.
|
|
132
|
+
*/
|
|
133
|
+
reveal() {
|
|
134
|
+
const list = this.renderRoot.querySelector("[role='tablist']");
|
|
135
|
+
const tab = this.renderRoot.querySelector("[role='tab'][aria-selected='true']");
|
|
136
|
+
if (!list || !tab || list.scrollWidth <= list.clientWidth) return;
|
|
137
|
+
const start = tab.offsetLeft - list.offsetLeft;
|
|
138
|
+
const end = start + tab.offsetWidth;
|
|
139
|
+
if (start < list.scrollLeft) list.scrollLeft = start - 16;
|
|
140
|
+
else if (end > list.scrollLeft + list.clientWidth) list.scrollLeft = end - list.clientWidth + 16;
|
|
141
|
+
}
|
|
142
|
+
updated(changed) {
|
|
143
|
+
if (changed.has("selected") || changed.has("items")) this.reveal();
|
|
144
|
+
}
|
|
117
145
|
render() {
|
|
118
146
|
const items = this.items ?? [];
|
|
119
147
|
const current = this.current();
|
|
120
|
-
|
|
148
|
+
const many = items.length > 4;
|
|
149
|
+
return html`<div role="tablist" aria-label=${this.label || nothing} part="tabs" class=${many ? "many" : ""} style=${many ? `--columns:${Math.ceil(items.length / 2)}` : nothing} @keydown=${this.onKey}>
|
|
121
150
|
${items.map((item) => html`<button role="tab" type="button" id=${this.id_(`tab-${item.id}`)} aria-selected=${item.id === current ? "true" : "false"} aria-controls=${this.id_(`panel-${item.id}`)} tabindex=${item.id === current ? "0" : "-1"} @click=${() => this.choose(item.id, false)}>${item.label}</button>`)}
|
|
122
151
|
</div>
|
|
123
|
-
${items.map((item) => html`<div role="tabpanel" id=${this.id_(`panel-${item.id}`)} aria-labelledby=${this.id_(`tab-${item.id}`)} tabindex="0" ?hidden=${item.id !== current} part="panel">${item.body}</div>`)}`;
|
|
152
|
+
${items.map((item) => html`<div role="tabpanel" id=${this.id_(`panel-${item.id}`)} aria-labelledby=${this.id_(`tab-${item.id}`)} tabindex="0" ?hidden=${item.id !== current} part="panel"><slot name=${item.id}><span class="body">${item.body}</span></slot></div>`)}`;
|
|
124
153
|
}
|
|
125
154
|
};
|
|
126
155
|
var ImpktCardGrid = class extends ImpktElement {
|
|
@@ -161,7 +190,7 @@ var ImpktCardGrid = class extends ImpktElement {
|
|
|
161
190
|
.h a::after { content: ''; position: absolute; inset: 0; }
|
|
162
191
|
li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
163
192
|
.body { margin: 0; line-height: ${lineHeight("normal")}; }
|
|
164
|
-
.badge { align-self: flex-start; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; font-size: ${fontSize("
|
|
193
|
+
.badge { align-self: flex-start; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("medium")}; background: ${t.brandSubtle}; color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.hairline}; }
|
|
165
194
|
.more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight("semibold")}; }
|
|
166
195
|
@container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
167
196
|
@container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
|
|
@@ -192,4 +221,4 @@ export {
|
|
|
192
221
|
ImpktTabs,
|
|
193
222
|
ImpktCardGrid
|
|
194
223
|
};
|
|
195
|
-
//# sourceMappingURL=chunk-
|
|
224
|
+
//# sourceMappingURL=chunk-HXINWP3V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/blocks.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, touchTarget, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, lineHeight, space, spaceAround, t } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/**\n * A line between two parts of a page.\n *\n * It is decoration, so a screen reader passes over it. Where the change of\n * subject matters, a heading says so better.\n *\n * @category layout\n * @icon divider\n */\nexport class ImpktDivider extends ImpktElement {\n static properties = {\n spacing: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n };\n /** Space above and below the line. */\n declare spacing: 'sm' | 'md' | 'lg' | 'xl';\n declare tone: 'subtle' | 'strong';\n\n constructor() {\n super();\n this.spacing = 'md';\n this.tone = 'subtle';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: block; }\n hr { margin: ${space(4)} 0; border: 0; border-block-start: ${t.borderThin} solid ${t.border}; opacity: 0.5; }\n :host([tone='strong']) hr { opacity: 1; border-block-start-width: ${t.borderThick}; }\n :host([spacing='sm']) hr { margin-block: ${space(2)}; }\n :host([spacing='lg']) hr { margin-block: ${space(8)}; }\n :host([spacing='xl']) hr { margin-block: ${space(12)}; }\n `];\n\n render(): TemplateResult {\n return html`<hr aria-hidden=\"true\" part=\"line\" />`;\n }\n}\n\n/**\n * Empty space, from the spacing scale, for the rare place where the gaps of the\n * containers around it are not enough.\n *\n * @category layout\n * @icon spacer\n */\nexport class ImpktSpacer extends ImpktElement {\n static properties = { size: { type: String, reflect: true } };\n declare size: 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.size = 'md';\n }\n\n static styles = [...ImpktElement.styles, css`\n :host { display: block; block-size: ${space(4)}; }\n :host([size='sm']) { block-size: ${space(2)}; }\n :host([size='lg']) { block-size: ${space(8)}; }\n :host([size='xl']) { block-size: ${space(12)}; }\n :host([size='2xl']) { block-size: ${space(16)}; }\n `];\n\n render(): TemplateResult {\n return html``;\n }\n}\n\n/**\n * Words a screen reader says that are not shown: \"(opens a map)\" after a link\n * whose purpose is clear on screen from where it sits.\n *\n * @category typography\n * @icon hidden\n * @slot - The words to say.\n */\nexport class ImpktVisuallyHidden extends ImpktElement {\n static styles = [...ImpktElement.styles, css`:host { ${visuallyHidden} }`];\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/** One tab and what it shows. */\nexport interface TabItem {\n id: string;\n label: string;\n /** The panel's words. A child with `slot` set to the tab's id is shown instead, for anything richer. */\n body: string;\n}\n\n/**\n * Panels of content behind a row of tabs, one shown at a time: the floor plans\n * of three house types, or a case's summary, tasks and files.\n *\n * It follows the ARIA tabs pattern. The tabs are one stop in the tab order,\n * the arrow keys, Home and End move between them, and each panel is labelled\n * by its tab. Use an accordion instead when someone may want to compare panels.\n *\n * **The tabs stay on one row** and scroll sideways when they do not fit, as the\n * design guide sets, and the chosen tab is scrolled into view, so on a phone it\n * is never hidden off the edge. With `two-rows`, a set of more than four tabs is\n * laid out in two rows on a narrow screen instead, so every tab can be seen.\n *\n * **The chosen tab is kept** when the tabs are given again, as a React or Vue app\n * does on every render, so long as a tab with that id is still there.\n *\n * A panel shows its item's `body`, or a child whose `slot` is the item's id.\n *\n * @category content\n * @icon tabs\n * @slot - A child with `slot` set to a tab's id is that tab's panel.\n * @fires {CustomEvent<{ value: string }>} impkt-change - When another tab is chosen.\n */\nexport class ImpktTabs extends ImpktElement {\n static properties = {\n items: { type: Array },\n selected: { type: String, reflect: true },\n label: { type: String },\n twoRows: { type: Boolean, reflect: true, attribute: 'two-rows' },\n };\n declare items: TabItem[];\n /** The id of the tab shown first. The first tab when it is empty. */\n declare selected: string;\n /** What the set of tabs is about, for a screen reader. */\n declare label: string;\n /** On a narrow screen, lay more than four tabs out in two rows rather than scroll them. */\n declare twoRows: boolean;\n\n constructor() {\n super();\n this.items = [];\n this.selected = '';\n this.label = '';\n this.twoRows = false;\n }\n\n static styles = [...ImpktElement.styles, focusRing, touchTarget(\"[role='tab']\"), css`\n :host { display: block; container-type: inline-size; }\n [role='tablist'] { display: flex; gap: ${space(1)}; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }\n [role='tab'] { ${targetSize} flex: none; padding: ${space(3)} ${space(4)}; font: inherit; font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: ${t.textMuted}; background: transparent; border: 0; border-block-end: 3px solid transparent; margin-block-end: -1px; cursor: pointer; border-radius: ${t.radius} ${t.radius} 0 0; }\n /* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */\n [role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }\n [role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }\n [role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }\n [role='tabpanel'] { padding-block: ${space(5)}; line-height: ${lineHeight('normal')}; }\n .body { white-space: pre-line; }\n @container (max-width: 40rem) {\n :host([two-rows]) [role='tablist'].many { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); overflow: visible; border-block-end: 0; gap: ${space(1)}; }\n :host([two-rows]) .many [role='tab'] { white-space: normal; padding-inline: ${space(2)}; margin: 0; border-block-end-width: 3px; border-block-end-color: ${t.rule}; border-radius: ${t.radius}; }\n :host([two-rows]) .many [role='tab'][aria-selected='true'] { border-block-end-color: currentColor; background: ${t.brandSubtle}; }\n }\n @media (forced-colors: active) { [role='tab'][aria-selected='true'] { border-block-end-color: Highlight; } }\n `];\n\n private current(): string {\n const items = this.items ?? [];\n return items.some((i) => i.id === this.selected) ? this.selected : items[0]?.id ?? '';\n }\n\n private choose(id: string, focus: boolean): void {\n if (id === this.current()) return;\n this.selected = id;\n this.dispatchEvent(new CustomEvent('impkt-change', { detail: { value: id }, bubbles: true, composed: true }));\n if (focus) void this.updateComplete.then(() => this.renderRoot.querySelector<HTMLElement>(`#${this.id_(`tab-${id}`)}`)?.focus({ preventScroll: true }));\n }\n\n private onKey(event: KeyboardEvent): void {\n const items = this.items ?? [];\n const at = items.findIndex((i) => i.id === this.current());\n const to = { ArrowRight: at + 1, ArrowLeft: at - 1, Home: 0, End: items.length - 1 }[event.key];\n if (to === undefined || !items.length) return;\n event.preventDefault();\n this.choose(items[(to + items.length) % items.length]!.id, true);\n }\n\n /**\n * Bring the chosen tab into view inside the row of tabs. Only the row scrolls:\n * `scrollIntoView` would scroll the page too, and move someone who is reading\n * further down.\n */\n private reveal(): void {\n const list = this.renderRoot.querySelector<HTMLElement>(\"[role='tablist']\");\n const tab = this.renderRoot.querySelector<HTMLElement>(\"[role='tab'][aria-selected='true']\");\n if (!list || !tab || list.scrollWidth <= list.clientWidth) return;\n const start = tab.offsetLeft - list.offsetLeft;\n const end = start + tab.offsetWidth;\n if (start < list.scrollLeft) list.scrollLeft = start - 16;\n else if (end > list.scrollLeft + list.clientWidth) list.scrollLeft = end - list.clientWidth + 16;\n }\n\n updated(changed: Map<string, unknown>): void {\n if (changed.has('selected') || changed.has('items')) this.reveal();\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.current();\n const many = items.length > 4;\n return html`<div role=\"tablist\" aria-label=${this.label || nothing} part=\"tabs\" class=${many ? 'many' : ''} style=${many ? `--columns:${Math.ceil(items.length / 2)}` : nothing} @keydown=${this.onKey}>\n ${items.map((item) => html`<button role=\"tab\" type=\"button\" id=${this.id_(`tab-${item.id}`)} aria-selected=${item.id === current ? 'true' : 'false'} aria-controls=${this.id_(`panel-${item.id}`)} tabindex=${item.id === current ? '0' : '-1'} @click=${() => this.choose(item.id, false)}>${item.label}</button>`)}\n </div>\n ${items.map((item) => html`<div role=\"tabpanel\" id=${this.id_(`panel-${item.id}`)} aria-labelledby=${this.id_(`tab-${item.id}`)} tabindex=\"0\" ?hidden=${item.id !== current} part=\"panel\"><slot name=${item.id}><span class=\"body\">${item.body}</span></slot></div>`)}`;\n }\n}\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpktCardGrid extends ImpktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.hairline}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}; overflow: hidden; transition: box-shadow 150ms ease-in-out, transform 150ms ease-in-out; }\n li.linked:hover { box-shadow: ${t.shadowLg}; transform: translateY(-2px); }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n .badge { align-self: flex-start; padding: ${space(0.5)} ${space(2)}; border-radius: ${t.radius}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; background: ${t.brandSubtle}; color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.hairline}; }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map((card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`)}</ul>`;\n }\n}\n\ncustomElements.define('impkt-divider', ImpktDivider);\ncustomElements.define('impkt-spacer', ImpktSpacer);\ncustomElements.define('impkt-visually-hidden', ImpktVisuallyHidden);\ncustomElements.define('impkt-tabs', ImpktTabs);\ncustomElements.define('impkt-card-grid', ImpktCardGrid);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-divider': ImpktDivider; 'impkt-spacer': ImpktSpacer; 'impkt-visually-hidden': ImpktVisuallyHidden; 'impkt-tabs': ImpktTabs; 'impkt-card-grid': ImpktCardGrid;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAejD,IAAM,eAAN,cAA2B,aAAa;AAAA,EAC7C;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACvC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACtC;AAAA;AAAA,EAKA,cAAc;AACZ,UAAM;AACN,SAAK,UAAU;AACf,SAAK,OAAO;AAAA,EACd;AAAA,EAEA;AAAA,SAAO,SAAS,CAAC,GAAG,aAAa,QAAQ;AAAA;AAAA,mBAExB,MAAM,CAAC,CAAC,sCAAsC,EAAE,UAAU,UAAU,EAAE,MAAM;AAAA,wEACvB,EAAE,WAAW;AAAA,+CACtC,MAAM,CAAC,CAAC;AAAA,+CACR,MAAM,CAAC,CAAC;AAAA,+CACR,MAAM,EAAE,CAAC;AAAA,GACrD;AAAA;AAAA,EAED,SAAyB;AACvB,WAAO;AAAA,EACT;AACF;AASO,IAAM,cAAN,cAA0B,aAAa;AAAA,EAC5C;AAAA,SAAO,aAAa,EAAE,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK,EAAE;AAAA;AAAA,EAG5D,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AAAA,EACd;AAAA,EAEA;AAAA,SAAO,SAAS,CAAC,GAAG,aAAa,QAAQ;AAAA,0CACD,MAAM,CAAC,CAAC;AAAA,uCACX,MAAM,CAAC,CAAC;AAAA,uCACR,MAAM,CAAC,CAAC;AAAA,uCACR,MAAM,EAAE,CAAC;AAAA,wCACR,MAAM,EAAE,CAAC;AAAA,GAC9C;AAAA;AAAA,EAED,SAAyB;AACvB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AAS,CAAC,GAAG,IAAI,CAAC,SAAS,iBAAiB,KAAK,OAAO,WAAW,EAAE;AAAA,QACrG,KAAK,WAAW,gBAAgB,KAAK,QAAQ,QAAQ,KAAK,YAAY,EAAE,uBAAuB,OAAO;AAAA;AAAA,UAEpG,KAAK,QAAQ,2BAA2B,KAAK,KAAK,YAAY,OAAO;AAAA,mDAC5B,KAAK,YAAY,IAAI,KAAK,OAAO,eAAe,KAAK,IAAI,IAAI,KAAK,OAAO,SAAS,KAAK,OAAO;AAAA,UACvI,KAAK,OAAO,uBAAuB,KAAK,IAAI,SAAS,OAAO;AAAA,UAC5D,KAAK,OAAO,6CAA6C,QAAQ,eAAe,KAAK,CAAC,YAAY,OAAO;AAAA;AAAA,UAEzG,CAAC;AAAA,EACT;AACF;AAEA,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,yBAAyB,mBAAmB;AAClE,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,mBAAmB,aAAa;","names":[]}
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
space,
|
|
7
7
|
spaceAround,
|
|
8
8
|
t,
|
|
9
|
-
type
|
|
10
|
-
|
|
9
|
+
type,
|
|
10
|
+
visuallyHidden
|
|
11
|
+
} from "./chunk-3KO55PZK.js";
|
|
11
12
|
|
|
12
13
|
// packages/ui/src/components/layout.ts
|
|
13
14
|
import { html, css, nothing } from "lit";
|
|
@@ -72,6 +73,7 @@ var ImpktCard = class extends ImpktElement {
|
|
|
72
73
|
imageAlt: { type: String, attribute: "image-alt" },
|
|
73
74
|
ratio: { type: String, reflect: true },
|
|
74
75
|
badge: { type: String },
|
|
76
|
+
raised: { type: Boolean, reflect: true },
|
|
75
77
|
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
76
78
|
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
77
79
|
};
|
|
@@ -84,6 +86,7 @@ var ImpktCard = class extends ImpktElement {
|
|
|
84
86
|
this.imageAlt = "";
|
|
85
87
|
this.ratio = "16:9";
|
|
86
88
|
this.badge = "";
|
|
89
|
+
this.raised = false;
|
|
87
90
|
this.spaceAbove = "none";
|
|
88
91
|
this.spaceBelow = "none";
|
|
89
92
|
}
|
|
@@ -105,6 +108,7 @@ var ImpktCard = class extends ImpktElement {
|
|
|
105
108
|
:host([tone='subtle']) { background: ${t.surfaceSubtle}; border-color: transparent; box-shadow: none; }
|
|
106
109
|
:host([tone='brand']) { background: ${t.brand}; border-color: transparent; color: ${t.onBrand}; --impkt-eyebrow: ${t.onBrand}; --impkt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impkt-color-text-heading: ${t.onBrand}; --impkt-color-text-default: ${t.onBrand}; --impkt-color-text-muted: ${t.onBrand}; --impkt-color-text-link: ${t.onBrand}; }
|
|
107
110
|
:host([tone='outline']) { background: transparent; box-shadow: none; border-color: ${t.rule}; }
|
|
111
|
+
:host([raised]) { border-color: transparent; box-shadow: 0 24px 60px rgb(16 19 23 / 12%), 0 2px 6px rgb(16 19 23 / 6%); border-radius: ${t.radius2xl}; }
|
|
108
112
|
:host([tone='plain']) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }
|
|
109
113
|
:host([ratio='4:3']) { --ratio: 4 / 3; }
|
|
110
114
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
@@ -130,8 +134,9 @@ var ImpktHeading = class extends ImpktElement {
|
|
|
130
134
|
this.properties = {
|
|
131
135
|
level: { type: Number, reflect: true },
|
|
132
136
|
size: { type: String, reflect: true },
|
|
133
|
-
eyebrow: { type: String },
|
|
134
|
-
align: { type: String, reflect: true }
|
|
137
|
+
eyebrow: { type: String, reflect: true },
|
|
138
|
+
align: { type: String, reflect: true },
|
|
139
|
+
screenReaderOnly: { type: Boolean, reflect: true, attribute: "screen-reader-only" }
|
|
135
140
|
};
|
|
136
141
|
}
|
|
137
142
|
constructor() {
|
|
@@ -140,6 +145,7 @@ var ImpktHeading = class extends ImpktElement {
|
|
|
140
145
|
this.size = "xl";
|
|
141
146
|
this.eyebrow = "";
|
|
142
147
|
this.align = "start";
|
|
148
|
+
this.screenReaderOnly = false;
|
|
143
149
|
}
|
|
144
150
|
static {
|
|
145
151
|
this.styles = [
|
|
@@ -167,13 +173,16 @@ var ImpktHeading = class extends ImpktElement {
|
|
|
167
173
|
color: inherit;
|
|
168
174
|
}
|
|
169
175
|
:host([align='center']) { text-align: center; }
|
|
176
|
+
/* Only the words go: an eyebrow over a heading drawn as a picture still shows. */
|
|
177
|
+
:host([screen-reader-only]) .words { ${visuallyHidden} }
|
|
178
|
+
:host([screen-reader-only]:not([eyebrow])) { ${visuallyHidden} }
|
|
170
179
|
.eyebrow {
|
|
171
180
|
display: block;
|
|
172
181
|
margin-block-end: ${space(2)};
|
|
173
|
-
color: var(--impkt-eyebrow, ${t.brand});
|
|
174
|
-
font-family: ${t.fontBody};
|
|
175
|
-
font-size: ${fontSize("sm")};
|
|
176
|
-
font-weight: ${fontWeight("semibold")};
|
|
182
|
+
color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand}));
|
|
183
|
+
font-family: var(--impkt-font-family-eyebrow, ${t.fontBody});
|
|
184
|
+
font-size: var(--impkt-font-size-eyebrow, ${fontSize("sm")});
|
|
185
|
+
font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight("semibold")});
|
|
177
186
|
letter-spacing: 0.06em;
|
|
178
187
|
text-transform: uppercase;
|
|
179
188
|
}
|
|
@@ -182,7 +191,7 @@ var ImpktHeading = class extends ImpktElement {
|
|
|
182
191
|
}
|
|
183
192
|
render() {
|
|
184
193
|
return html`<div class="h" role="heading" aria-level=${this.level} part="heading">
|
|
185
|
-
${this.eyebrow ? html`<span class="eyebrow" part="eyebrow">${this.eyebrow}<span style="position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)">: </span></span>` : nothing}<slot></slot>
|
|
194
|
+
${this.eyebrow ? html`<span class="eyebrow" part="eyebrow">${this.eyebrow}<span style="position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)">: </span></span>` : nothing}<span class="words"><slot></slot></span>
|
|
186
195
|
</div>`;
|
|
187
196
|
}
|
|
188
197
|
};
|
|
@@ -191,7 +200,8 @@ var ImpktText = class extends ImpktElement {
|
|
|
191
200
|
this.properties = {
|
|
192
201
|
size: { type: String, reflect: true },
|
|
193
202
|
tone: { type: String, reflect: true },
|
|
194
|
-
align: { type: String, reflect: true }
|
|
203
|
+
align: { type: String, reflect: true },
|
|
204
|
+
look: { type: String, reflect: true }
|
|
195
205
|
};
|
|
196
206
|
}
|
|
197
207
|
constructor() {
|
|
@@ -199,6 +209,7 @@ var ImpktText = class extends ImpktElement {
|
|
|
199
209
|
this.size = "md";
|
|
200
210
|
this.tone = "default";
|
|
201
211
|
this.align = "start";
|
|
212
|
+
this.look = "prose";
|
|
202
213
|
}
|
|
203
214
|
static {
|
|
204
215
|
this.styles = [
|
|
@@ -221,6 +232,7 @@ var ImpktText = class extends ImpktElement {
|
|
|
221
232
|
p { text-wrap: pretty; }
|
|
222
233
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
223
234
|
:host([align='center']) { text-align: center; margin-inline: auto; }
|
|
235
|
+
:host([look='code']) { font-family: ${t.fontMono}; ${type("sm")} padding: ${space(2)} ${space(3)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 6%, transparent); max-inline-size: none; }
|
|
224
236
|
p {
|
|
225
237
|
margin: 0;
|
|
226
238
|
}
|
|
@@ -242,4 +254,4 @@ export {
|
|
|
242
254
|
ImpktHeading,
|
|
243
255
|
ImpktText
|
|
244
256
|
};
|
|
245
|
-
//# sourceMappingURL=chunk-
|
|
257
|
+
//# sourceMappingURL=chunk-IOBSIAHB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/layout.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { visuallyHidden as hiddenStyle } from '../base/styles';\nimport { fontSize, fontWeight, lineHeight, space, spaceAround, t, type } from '../base/tokens';\n\n/**\n * Layout and typography primitives.\n *\n * These are the components a composition is mostly made of, and they are\n * deliberately dull. Their one job is that spacing, type and colour come from\n * tokens, so that a page built in the CMS cannot contain a hard-coded 13px.\n */\n\n/** Vertical rhythm. Every gap is a spacing token, never a number.\n *\n * @category layout\n * @icon stack\n * @slot - The things being stacked.\n */\nexport class ImpktStack extends ImpktElement {\n static properties = {\n gap: { type: String, reflect: true },\n align: { type: String, reflect: true },\n direction: { type: String, reflect: true },\n justify: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /** How the items line up across the stack. */\n declare align: 'stretch' | 'start' | 'center' | 'end';\n /** Down the page, or along a row that wraps when it runs out of room, such as a row of buttons. */\n declare direction: 'vertical' | 'horizontal';\n /** Where the items sit along a row. */\n declare justify: 'start' | 'center' | 'end' | 'between';\n /** Space before the stack, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Space after the stack, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.gap = 'md';\n this.align = 'stretch';\n this.direction = 'vertical';\n this.justify = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpktElement.styles,\n spaceAround,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n :host([gap='none']) { gap: 0; }\n :host([gap='xs']) { gap: ${space(1)}; }\n :host([align='start']) { align-items: flex-start; }\n :host([align='center']) { align-items: center; text-align: center; }\n :host([align='end']) { align-items: flex-end; }\n :host([direction='horizontal']) { flex-direction: row; flex-wrap: wrap; align-items: center; }\n :host([direction='horizontal'][align='start']) { align-items: flex-start; }\n :host([direction='horizontal'][align='end']) { align-items: flex-end; }\n :host([direction='horizontal'][align='center']) { text-align: start; }\n :host([justify='center']) { justify-content: center; }\n :host([justify='end']) { justify-content: flex-end; }\n :host([justify='between']) { justify-content: space-between; }\n :host([gap='sm']) { gap: ${space(2)}; }\n :host([gap='md']) { gap: ${space(4)}; }\n :host([gap='lg']) { gap: ${space(6)}; }\n :host([gap='xl']) { gap: ${space(8)}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/** A surface. What text is read against, and what contrast is measured from.\n *\n * @category layout\n * @icon card\n * @slot - What sits on the card.\n */\nexport class ImpktCard extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n padding: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n ratio: { type: String, reflect: true },\n badge: { type: String },\n raised: { type: Boolean, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The card's surface. Text on a brand card takes the brand's text colour. */\n declare tone: 'default' | 'subtle' | 'brand' | 'outline' | 'plain';\n /** Space inside the card. */\n declare padding: 'none' | 'sm' | 'md' | 'lg';\n /** A picture across the top of the card. */\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A short label on the picture, such as \"3 left\". */\n declare badge: string;\n /** The picture's shape. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n /** Lifted off the page with a soft shadow and no edge, as a form that floats beside its words is. */\n declare raised: boolean;\n /** Space before the card, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Space after the card, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.tone = 'default';\n this.padding = 'lg';\n this.imageSrc = '';\n this.imageAlt = '';\n this.ratio = '16:9';\n this.badge = '';\n this.raised = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpktElement.styles,\n spaceAround,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.hairline};\n border-radius: ${t.radiusXl};\n box-shadow: ${t.shadowSm};\n overflow: hidden;\n --ratio: 16 / 9;\n }\n :host([tone='subtle']) { background: ${t.surfaceSubtle}; border-color: transparent; box-shadow: none; }\n :host([tone='brand']) { background: ${t.brand}; border-color: transparent; color: ${t.onBrand}; --impkt-eyebrow: ${t.onBrand}; --impkt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impkt-color-text-heading: ${t.onBrand}; --impkt-color-text-default: ${t.onBrand}; --impkt-color-text-muted: ${t.onBrand}; --impkt-color-text-link: ${t.onBrand}; }\n :host([tone='outline']) { background: transparent; box-shadow: none; border-color: ${t.rule}; }\n :host([raised]) { border-color: transparent; box-shadow: 0 24px 60px rgb(16 19 23 / 12%), 0 2px 6px rgb(16 19 23 / 6%); border-radius: ${t.radius2xl}; }\n :host([tone='plain']) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }\n :host([ratio='4:3']) { --ratio: 4 / 3; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n .body { padding: ${space(6)}; flex: 1; display: flex; flex-direction: column; }\n :host([padding='none']) .body { padding: 0; }\n :host([padding='sm']) .body { padding: ${space(3)}; }\n :host([padding='md']) .body { padding: ${space(4)}; }\n :host([tone='plain']) .body { padding-inline: 0; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .picture { position: relative; }\n .tag { position: absolute; inset-block-start: ${space(4)}; inset-inline-start: ${space(4)}; padding: ${space(1.5)} ${space(3)}; font-size: ${fontSize('sm')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; }\n @media (forced-colors: active) { :host { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.imageSrc ? html`<div class=\"picture\"><img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />${this.badge ? html`<span class=\"tag\">${this.badge}</span>` : nothing}</div>` : nothing}<div class=\"body\" part=\"body\"><slot></slot></div>`;\n }\n}\n\n/**\n * A heading.\n *\n * `level` is required and renders the matching `<h1>`–`<h6>`, because heading\n * level is document structure rather than appearance: a screen-reader user\n * navigates by it, and a page whose levels skip is a page they cannot skim.\n * Size is a separate property, so a visually small `<h2>` needs no lie about\n * its level — which is the usual reason levels end up wrong.\n\n *\n * @category typography\n * @icon heading\n * @role heading\n * @slot - The heading text.\n */\nexport class ImpktHeading extends ImpktElement {\n static properties = {\n level: { type: Number, reflect: true },\n size: { type: String, reflect: true },\n eyebrow: { type: String, reflect: true },\n align: { type: String, reflect: true },\n screenReaderOnly: { type: Boolean, reflect: true, attribute: 'screen-reader-only' },\n };\n\n declare level: 1 | 2 | 3 | 4 | 5 | 6;\n declare size: '5xl' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md' | 'sm';\n /** A short label above the heading, such as \"Why Larkfield\". Part of the heading, read before it. */\n declare eyebrow: string;\n declare align: 'start' | 'center';\n /**\n * Read by screen readers and search engines, but not drawn: for a heading\n * whose words are already in a picture, such as a hero drawn as artwork.\n * The page still has its heading; nobody sees it twice. An eyebrow still shows.\n */\n declare screenReaderOnly: boolean;\n\n constructor() {\n super();\n this.level = 2;\n this.size = 'xl';\n this.eyebrow = '';\n this.align = 'start';\n this.screenReaderOnly = false;\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n color: ${t.textHeading};\n font-family: ${t.fontHeading};\n font-weight: ${fontWeight('bold')};\n line-height: ${lineHeight('tight')};\n }\n :host([size='5xl']) { ${type('5xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='4xl']) { ${type('4xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='3xl']) { ${type('3xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='2xl']) { ${type('2xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='xl']) { ${type('xl')} }\n :host([size='lg']) { ${type('lg')} }\n :host([size='md']) { ${type('md')} }\n :host([size='sm']) { ${type('sm')} }\n .h { text-wrap: balance; }\n .h {\n margin: 0;\n font: inherit;\n color: inherit;\n }\n :host([align='center']) { text-align: center; }\n /* Only the words go: an eyebrow over a heading drawn as a picture still shows. */\n :host([screen-reader-only]) .words { ${hiddenStyle} }\n :host([screen-reader-only]:not([eyebrow])) { ${hiddenStyle} }\n .eyebrow {\n display: block;\n margin-block-end: ${space(2)};\n color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand}));\n font-family: var(--impkt-font-family-eyebrow, ${t.fontBody});\n font-size: var(--impkt-font-size-eyebrow, ${fontSize('sm')});\n font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight('semibold')});\n letter-spacing: 0.06em;\n text-transform: uppercase;\n }\n `,\n ];\n\n render(): TemplateResult {\n // A `role=\"heading\"` with `aria-level` rather than six branches of\n // template. The native element would be marginally better; this is the one\n // place where Lit's lack of a dynamic tag makes the explicit role the\n // honest trade, and the role is fully supported.\n return html`<div class=\"h\" role=\"heading\" aria-level=${this.level} part=\"heading\">\n ${this.eyebrow ? html`<span class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}<span style=\"position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)\">: </span></span>` : nothing}<span class=\"words\"><slot></slot></span>\n </div>`;\n }\n}\n\n/** A paragraph.\n *\n * @category typography\n * @icon text\n * @slot - The paragraph text.\n */\nexport class ImpktText extends ImpktElement {\n static properties = {\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n look: { type: String, reflect: true },\n };\n\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n declare tone: 'default' | 'muted';\n declare align: 'start' | 'center';\n /** `code` sets the words in the brand's monospace face on a faint panel, for a line like \"base: main ← compare: you/idea\". */\n declare look: 'prose' | 'code';\n\n constructor() {\n super();\n this.size = 'md';\n this.tone = 'default';\n this.align = 'start';\n this.look = 'prose';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n /* 1.4.8 asks for 1.5 within a paragraph, and it is the default here\n rather than an option, because body text is what it is about. */\n line-height: ${lineHeight('normal')};\n /* 1.4.12 Text Spacing: a user stylesheet must be able to widen this\n without clipping, which a max-width in ch units survives and a\n fixed pixel height does not. */\n max-inline-size: 70ch;\n }\n :host([size='sm']) { ${type('sm')} }\n :host([size='md']) { ${type('md')} }\n :host([size='lg']) { ${type('lg')} }\n :host([size='xl']) { ${type('xl')} }\n p { text-wrap: pretty; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n :host([align='center']) { text-align: center; margin-inline: auto; }\n :host([look='code']) { font-family: ${t.fontMono}; ${type('sm')} padding: ${space(2)} ${space(3)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 6%, transparent); max-inline-size: none; }\n p {\n margin: 0;\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<p part=\"text\"><slot></slot></p>`;\n }\n}\n\ncustomElements.define('impkt-stack', ImpktStack);\ncustomElements.define('impkt-card', ImpktCard);\ncustomElements.define('impkt-heading', ImpktHeading);\ncustomElements.define('impkt-text', ImpktText);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-stack': ImpktStack;\n 'impkt-card': ImpktCard;\n 'impkt-heading': ImpktHeading;\n 'impkt-text': ImpktText;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAmBjD,IAAM,aAAN,cAAyB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACnC,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;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