@atomic-ui/ui 0.10.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9631 -6026
- package/dist/base/FieldElement.d.ts +10 -3
- package/dist/{chunk-YWP2Z3JN.js → chunk-2TNF7O43.js} +7 -5
- package/dist/{chunk-YWP2Z3JN.js.map → chunk-2TNF7O43.js.map} +1 -1
- package/dist/{chunk-FKUBEVCU.js → chunk-2WHOBIOY.js} +11 -9
- package/dist/{chunk-FKUBEVCU.js.map → chunk-2WHOBIOY.js.map} +1 -1
- package/dist/{chunk-26BO3W56.js → chunk-3BWCD5U5.js} +5 -3
- package/dist/{chunk-26BO3W56.js.map → chunk-3BWCD5U5.js.map} +1 -1
- package/dist/chunk-3GPGDERO.js +201 -0
- package/dist/chunk-3GPGDERO.js.map +1 -0
- package/dist/{chunk-3T7J66Z2.js → chunk-3KAFK24X.js} +13 -11
- package/dist/chunk-3KAFK24X.js.map +1 -0
- package/dist/chunk-4MMRBNW7.js +104 -0
- package/dist/chunk-4MMRBNW7.js.map +1 -0
- package/dist/{chunk-5OJAJA3U.js → chunk-5HCWL2YD.js} +6 -4
- package/dist/{chunk-5OJAJA3U.js.map → chunk-5HCWL2YD.js.map} +1 -1
- package/dist/{chunk-AG4EP3OY.js → chunk-5IGBH4GL.js} +8 -6
- package/dist/{chunk-AG4EP3OY.js.map → chunk-5IGBH4GL.js.map} +1 -1
- package/dist/{chunk-AL4IUSML.js → chunk-5OYQZWP2.js} +5 -3
- package/dist/{chunk-AL4IUSML.js.map → chunk-5OYQZWP2.js.map} +1 -1
- package/dist/chunk-5PRB7P7N.js +167 -0
- package/dist/chunk-5PRB7P7N.js.map +1 -0
- package/dist/chunk-6CDQSHVW.js +21 -0
- package/dist/chunk-6CDQSHVW.js.map +1 -0
- package/dist/{chunk-MLKNZL5J.js → chunk-6J22I7F6.js} +14 -12
- package/dist/chunk-6J22I7F6.js.map +1 -0
- package/dist/chunk-72WNCCDC.js +136 -0
- package/dist/chunk-72WNCCDC.js.map +1 -0
- package/dist/chunk-7UI3OBXL.js +104 -0
- package/dist/chunk-7UI3OBXL.js.map +1 -0
- package/dist/{chunk-D6NET2VB.js → chunk-ALFE35FS.js} +30 -3
- package/dist/chunk-ALFE35FS.js.map +1 -0
- package/dist/chunk-AYINRYNC.js +184 -0
- package/dist/chunk-AYINRYNC.js.map +1 -0
- package/dist/{chunk-2D2IMQII.js → chunk-BAYSDP44.js} +52 -30
- package/dist/chunk-BAYSDP44.js.map +1 -0
- package/dist/{chunk-2EP3IV3G.js → chunk-BGHAANTP.js} +22 -8
- package/dist/chunk-BGHAANTP.js.map +1 -0
- package/dist/{chunk-OJO62KRX.js → chunk-CFCFKLTN.js} +85 -10
- package/dist/chunk-CFCFKLTN.js.map +1 -0
- package/dist/{chunk-UFPI4I2Y.js → chunk-CQT3VPYK.js} +8 -29
- package/dist/chunk-CQT3VPYK.js.map +1 -0
- package/dist/{chunk-AURT72IC.js → chunk-DXLEYNID.js} +13 -7
- package/dist/chunk-DXLEYNID.js.map +1 -0
- package/dist/{chunk-L4CIBOGK.js → chunk-EKPTMRBG.js} +5 -3
- package/dist/{chunk-L4CIBOGK.js.map → chunk-EKPTMRBG.js.map} +1 -1
- package/dist/{chunk-Z2EWQMTR.js → chunk-F4IXELLK.js} +5 -3
- package/dist/{chunk-Z2EWQMTR.js.map → chunk-F4IXELLK.js.map} +1 -1
- package/dist/{chunk-APQEXM4I.js → chunk-FJHPGOGS.js} +5 -3
- package/dist/{chunk-APQEXM4I.js.map → chunk-FJHPGOGS.js.map} +1 -1
- package/dist/chunk-FLAUZU7Y.js +345 -0
- package/dist/chunk-FLAUZU7Y.js.map +1 -0
- package/dist/{chunk-3NEWOO2P.js → chunk-FZWUQC42.js} +7 -5
- package/dist/{chunk-3NEWOO2P.js.map → chunk-FZWUQC42.js.map} +1 -1
- package/dist/{chunk-ONED3PUB.js → chunk-HSXLSJVG.js} +54 -8
- package/dist/chunk-HSXLSJVG.js.map +1 -0
- package/dist/{chunk-V7EB7Q2M.js → chunk-JTCTQBAX.js} +2 -131
- package/dist/chunk-JTCTQBAX.js.map +1 -0
- package/dist/{chunk-ZL3JFUIE.js → chunk-K5QFVLCI.js} +7 -5
- package/dist/{chunk-ZL3JFUIE.js.map → chunk-K5QFVLCI.js.map} +1 -1
- package/dist/{chunk-DN5YZFSG.js → chunk-KE6WCXQP.js} +55 -9
- package/dist/chunk-KE6WCXQP.js.map +1 -0
- package/dist/chunk-LBHTXY7K.js +75 -0
- package/dist/chunk-LBHTXY7K.js.map +1 -0
- package/dist/{chunk-OZGKK3N5.js → chunk-LP4RTYTL.js} +88 -9
- package/dist/chunk-LP4RTYTL.js.map +1 -0
- package/dist/{chunk-MOO63SHZ.js → chunk-LXVPWTSY.js} +80 -23
- package/dist/chunk-LXVPWTSY.js.map +1 -0
- package/dist/{chunk-JNLKM3JT.js → chunk-N6EEW2GF.js} +6 -4
- package/dist/{chunk-JNLKM3JT.js.map → chunk-N6EEW2GF.js.map} +1 -1
- package/dist/chunk-NHEU5FT6.js +115 -0
- package/dist/chunk-NHEU5FT6.js.map +1 -0
- package/dist/chunk-QPOM7W3D.js +104 -0
- package/dist/chunk-QPOM7W3D.js.map +1 -0
- package/dist/{chunk-FU3CEHBS.js → chunk-R6PBY3YN.js} +6 -4
- package/dist/{chunk-FU3CEHBS.js.map → chunk-R6PBY3YN.js.map} +1 -1
- package/dist/{chunk-TJOYBDKS.js → chunk-R6YMSJR7.js} +65 -36
- package/dist/chunk-R6YMSJR7.js.map +1 -0
- package/dist/{chunk-ZEIV5X3U.js → chunk-SOYKSPPX.js} +73 -23
- package/dist/chunk-SOYKSPPX.js.map +1 -0
- package/dist/{chunk-NKMJMVZP.js → chunk-T52CUOCJ.js} +5 -3
- package/dist/{chunk-NKMJMVZP.js.map → chunk-T52CUOCJ.js.map} +1 -1
- package/dist/chunk-UBNCJROR.js +294 -0
- package/dist/chunk-UBNCJROR.js.map +1 -0
- package/dist/chunk-UFENSIWD.js +135 -0
- package/dist/chunk-UFENSIWD.js.map +1 -0
- package/dist/{chunk-A4M3A4SZ.js → chunk-UYTIJCCW.js} +10 -42
- package/dist/chunk-UYTIJCCW.js.map +1 -0
- package/dist/chunk-XX6JZW5N.js +36 -0
- package/dist/chunk-XX6JZW5N.js.map +1 -0
- package/dist/{chunk-2ZF3J7OO.js → chunk-XXSZL5CY.js} +17 -5
- package/dist/chunk-XXSZL5CY.js.map +1 -0
- package/dist/{chunk-6PMA6NHE.js → chunk-Y55FNQHS.js} +5 -3
- package/dist/{chunk-6PMA6NHE.js.map → chunk-Y55FNQHS.js.map} +1 -1
- package/dist/chunk-ZAWGJC4I.js +176 -0
- package/dist/chunk-ZAWGJC4I.js.map +1 -0
- package/dist/chunk-ZUQ3DOG2.js +110 -0
- package/dist/chunk-ZUQ3DOG2.js.map +1 -0
- package/dist/components/accordion.d.ts +22 -0
- package/dist/components/accordion.js +6 -2
- package/dist/components/alert.d.ts +22 -1
- package/dist/components/alert.js +3 -2
- package/dist/components/app-bar.d.ts +153 -0
- package/dist/components/app-bar.js +15 -0
- package/dist/components/app-bar.js.map +1 -0
- package/dist/components/app-ui.d.ts +29 -2
- package/dist/components/app-ui.js +5 -4
- package/dist/components/badge.d.ts +17 -1
- package/dist/components/badge.js +4 -3
- package/dist/components/blocks.js +5 -4
- package/dist/components/button.d.ts +18 -2
- package/dist/components/button.js +4 -3
- package/dist/components/checkbox-group.js +4 -3
- package/dist/components/checkbox.js +4 -3
- package/dist/components/checked.d.ts +77 -0
- package/dist/components/checked.js +10 -0
- package/dist/components/checked.js.map +1 -0
- package/dist/components/chip-group.d.ts +113 -0
- package/dist/components/chip-group.js +11 -0
- package/dist/components/chip-group.js.map +1 -0
- package/dist/components/chip.d.ts +11 -0
- package/dist/components/chip.js +3 -2
- package/dist/components/code-diff.d.ts +77 -0
- package/dist/components/code-diff.js +10 -0
- package/dist/components/code-diff.js.map +1 -0
- package/dist/components/date-input.js +4 -3
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.js +3 -2
- package/dist/components/fieldset.js +3 -2
- package/dist/components/grid.js +3 -2
- package/dist/components/help.js +3 -2
- package/dist/components/icon.js +3 -2
- package/dist/components/journey.js +4 -3
- package/dist/components/language-switch.d.ts +59 -0
- package/dist/components/language-switch.js +10 -0
- package/dist/components/language-switch.js.map +1 -0
- package/dist/components/layout.d.ts +8 -2
- package/dist/components/layout.js +3 -2
- package/dist/components/link.js +4 -3
- package/dist/components/list.js +3 -2
- package/dist/components/media.js +3 -2
- package/dist/components/meter.d.ts +112 -0
- package/dist/components/meter.js +13 -0
- package/dist/components/meter.js.map +1 -0
- package/dist/components/navigation.d.ts +52 -0
- package/dist/components/navigation.js +4 -3
- package/dist/components/page.d.ts +13 -8
- package/dist/components/page.js +3 -2
- package/dist/components/price.js +3 -2
- package/dist/components/progress.d.ts +16 -2
- package/dist/components/progress.js +3 -2
- package/dist/components/radio-group.js +4 -3
- package/dist/components/redaction.d.ts +51 -0
- package/dist/components/redaction.js +10 -0
- package/dist/components/redaction.js.map +1 -0
- package/dist/components/rows.d.ts +28 -0
- package/dist/components/rows.js +7 -3
- package/dist/components/select.d.ts +6 -0
- package/dist/components/select.js +4 -3
- package/dist/components/shell.js +4 -3
- package/dist/components/source.d.ts +68 -0
- package/dist/components/source.js +10 -0
- package/dist/components/source.js.map +1 -0
- package/dist/components/status-pill-style.d.ts +16 -0
- package/dist/components/status-pill-style.js +15 -0
- package/dist/components/status-pill-style.js.map +1 -0
- package/dist/components/status.d.ts +66 -0
- package/dist/components/status.js +10 -0
- package/dist/components/status.js.map +1 -0
- package/dist/components/summary-list.js +3 -2
- package/dist/components/switch.js +4 -3
- package/dist/components/table.d.ts +19 -0
- package/dist/components/table.js +4 -3
- package/dist/components/text-input.js +5 -4
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.js +4 -3
- package/dist/components/tool-card.d.ts +107 -0
- package/dist/components/tool-card.js +11 -0
- package/dist/components/tool-card.js.map +1 -0
- package/dist/components/tool-kit-tokens.d.ts +25 -0
- package/dist/components/tool-kit-tokens.js +8 -0
- package/dist/components/tool-kit-tokens.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +116 -70
- package/dist/standalone/atomic-ui.js +2030 -692
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/package.json +2 -2
- package/dist/chunk-2D2IMQII.js.map +0 -1
- package/dist/chunk-2EP3IV3G.js.map +0 -1
- package/dist/chunk-2ZF3J7OO.js.map +0 -1
- package/dist/chunk-3T7J66Z2.js.map +0 -1
- package/dist/chunk-7UWJXPR3.js +0 -97
- package/dist/chunk-7UWJXPR3.js.map +0 -1
- package/dist/chunk-A4M3A4SZ.js.map +0 -1
- package/dist/chunk-AURT72IC.js.map +0 -1
- package/dist/chunk-AYKYHZGQ.js +0 -108
- package/dist/chunk-AYKYHZGQ.js.map +0 -1
- package/dist/chunk-D6NET2VB.js.map +0 -1
- package/dist/chunk-DN5YZFSG.js.map +0 -1
- package/dist/chunk-MLKNZL5J.js.map +0 -1
- package/dist/chunk-MOO63SHZ.js.map +0 -1
- package/dist/chunk-OJO62KRX.js.map +0 -1
- package/dist/chunk-ONED3PUB.js.map +0 -1
- package/dist/chunk-OZGKK3N5.js.map +0 -1
- package/dist/chunk-QU3U2CS2.js +0 -144
- package/dist/chunk-QU3U2CS2.js.map +0 -1
- package/dist/chunk-TJOYBDKS.js.map +0 -1
- package/dist/chunk-UFPI4I2Y.js.map +0 -1
- package/dist/chunk-V7EB7Q2M.js.map +0 -1
- package/dist/chunk-ZEIV5X3U.js.map +0 -1
|
@@ -1,24 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
statusPill,
|
|
3
|
+
statusPillStyles
|
|
4
|
+
} from "./chunk-6CDQSHVW.js";
|
|
1
5
|
import {
|
|
2
6
|
pageLocale
|
|
3
7
|
} from "./chunk-UNGAG44M.js";
|
|
4
8
|
import {
|
|
5
9
|
iconSvg
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5OYQZWP2.js";
|
|
7
11
|
import {
|
|
8
12
|
ImpaktElement,
|
|
9
13
|
focusRing,
|
|
14
|
+
targetSize,
|
|
15
|
+
touchTarget,
|
|
16
|
+
visuallyHidden
|
|
17
|
+
} from "./chunk-72WNCCDC.js";
|
|
18
|
+
import {
|
|
10
19
|
fontSize,
|
|
11
20
|
fontWeight,
|
|
12
21
|
space,
|
|
13
22
|
t,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
touchTarget,
|
|
17
|
-
visuallyHidden
|
|
18
|
-
} from "./chunk-V7EB7Q2M.js";
|
|
23
|
+
token
|
|
24
|
+
} from "./chunk-JTCTQBAX.js";
|
|
19
25
|
|
|
20
26
|
// packages/ui/src/components/rows.ts
|
|
21
27
|
import { html, css, nothing } from "lit";
|
|
28
|
+
var INVERSE = token("color.text.inverse", "var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))");
|
|
22
29
|
var LIGHT = token("font.weight.light", "300");
|
|
23
30
|
var ImpaktStatTile = class extends ImpaktElement {
|
|
24
31
|
static {
|
|
@@ -28,7 +35,9 @@ var ImpaktStatTile = class extends ImpaktElement {
|
|
|
28
35
|
caption: { type: String },
|
|
29
36
|
href: { type: String },
|
|
30
37
|
tone: { type: String, reflect: true },
|
|
31
|
-
size: { type: String, reflect: true }
|
|
38
|
+
size: { type: String, reflect: true },
|
|
39
|
+
status: { type: String },
|
|
40
|
+
statusTone: { type: String, attribute: "status-tone" }
|
|
32
41
|
};
|
|
33
42
|
}
|
|
34
43
|
constructor() {
|
|
@@ -39,36 +48,41 @@ var ImpaktStatTile = class extends ImpaktElement {
|
|
|
39
48
|
this.href = "";
|
|
40
49
|
this.tone = "plain";
|
|
41
50
|
this.size = "md";
|
|
51
|
+
this.status = "";
|
|
52
|
+
this.statusTone = "neutral";
|
|
42
53
|
}
|
|
43
54
|
static {
|
|
44
55
|
this.styles = [
|
|
45
56
|
...ImpaktElement.styles,
|
|
46
57
|
focusRing,
|
|
58
|
+
statusPillStyles,
|
|
47
59
|
css`
|
|
48
60
|
:host { display: block; }
|
|
49
61
|
.tile {
|
|
50
62
|
box-sizing: border-box;
|
|
51
63
|
display: flex;
|
|
52
64
|
flex-direction: column;
|
|
53
|
-
|
|
65
|
+
align-items: flex-start;
|
|
66
|
+
gap: ${space(2.5)};
|
|
54
67
|
block-size: 100%;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
border-radius: ${t.
|
|
58
|
-
background: ${t.
|
|
68
|
+
padding: ${space(5)};
|
|
69
|
+
border: ${t.borderThin} solid ${t.text};
|
|
70
|
+
border-radius: ${t.radius};
|
|
71
|
+
background: ${t.surfaceCard};
|
|
59
72
|
color: ${t.text};
|
|
60
73
|
text-decoration: none;
|
|
61
74
|
}
|
|
62
|
-
a.tile:hover { background: color-mix(in srgb, ${t.
|
|
63
|
-
.label { font-
|
|
64
|
-
|
|
65
|
-
.
|
|
66
|
-
|
|
67
|
-
:host([size='lg']) .
|
|
68
|
-
:host([size='lg']) .value { font-size: 64px; line-height: 1; }
|
|
69
|
-
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; }
|
|
75
|
+
a.tile:hover { background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%); }
|
|
76
|
+
.label { font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("regular")}; color: ${t.textMuted}; }
|
|
77
|
+
/* G2: Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */
|
|
78
|
+
.value { font-size: var(--impakt-type-stat-size, 3.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: ${fontWeight("semibold")}; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
79
|
+
.caption { font-size: ${fontSize("sm")}; line-height: 1.45; color: ${t.textMuted}; }
|
|
80
|
+
:host([size='lg']) .tile { min-block-size: 200px; padding: ${space(6)}; }
|
|
81
|
+
:host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${LIGHT}; }
|
|
82
|
+
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }
|
|
70
83
|
:host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }
|
|
71
84
|
:host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }
|
|
85
|
+
@media (max-width: 40rem) { .value { font-size: 2.5rem; } }
|
|
72
86
|
@media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }
|
|
73
87
|
`
|
|
74
88
|
];
|
|
@@ -78,6 +92,7 @@ var ImpaktStatTile = class extends ImpaktElement {
|
|
|
78
92
|
<span class="label" part="label">${this.label}</span>
|
|
79
93
|
<span class="value" part="value">${this.value}</span>
|
|
80
94
|
${this.caption ? html`<span class="caption" part="caption">${this.caption}</span>` : nothing}
|
|
95
|
+
${statusPill(this.status, this.statusTone)}
|
|
81
96
|
`;
|
|
82
97
|
return this.href ? html`<a class="tile" href=${this.href} part="tile">${inner}</a>` : html`<div class="tile" part="tile">${inner}</div>`;
|
|
83
98
|
}
|
|
@@ -144,6 +159,7 @@ var ImpaktRow = class extends ImpaktElement {
|
|
|
144
159
|
constructor() {
|
|
145
160
|
super();
|
|
146
161
|
this.filled = { start: false, end: false };
|
|
162
|
+
this.selected = false;
|
|
147
163
|
this.heading = "";
|
|
148
164
|
this.meta = "";
|
|
149
165
|
this.href = "";
|
|
@@ -156,7 +172,8 @@ var ImpaktRow = class extends ImpaktElement {
|
|
|
156
172
|
meta: { type: String },
|
|
157
173
|
href: { type: String },
|
|
158
174
|
divided: { type: Boolean, reflect: true },
|
|
159
|
-
muted: { type: Boolean, reflect: true }
|
|
175
|
+
muted: { type: Boolean, reflect: true },
|
|
176
|
+
selected: { type: Boolean, reflect: true }
|
|
160
177
|
};
|
|
161
178
|
}
|
|
162
179
|
static {
|
|
@@ -170,7 +187,8 @@ var ImpaktRow = class extends ImpaktElement {
|
|
|
170
187
|
.text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(0.5)}; }
|
|
171
188
|
.title { font-size: ${fontSize("md")}; font-weight: ${fontWeight("medium")}; color: ${t.text}; }
|
|
172
189
|
:host([muted]) .title { color: ${t.textMuted}; font-weight: ${fontWeight("regular")}; }
|
|
173
|
-
|
|
190
|
+
/* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */
|
|
191
|
+
.meta { font-family: ${t.fontEyebrow}; font-size: ${fontSize("sm")}; color: ${t.textMuted}; }
|
|
174
192
|
a { color: inherit; text-decoration: none; }
|
|
175
193
|
/* The link is stretched over the row, so the row is one target. */
|
|
176
194
|
a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }
|
|
@@ -182,6 +200,10 @@ var ImpaktRow = class extends ImpaktElement {
|
|
|
182
200
|
/* Controls at the end stay pressable above the stretched link. */
|
|
183
201
|
.end { position: relative; z-index: 1; }
|
|
184
202
|
.chevron { flex: none; color: ${t.textMuted}; }
|
|
203
|
+
:host([selected]) .row { padding-inline: ${space(4)}; background: ${t.text}; --impakt-color-text-default: ${INVERSE}; --impakt-color-text-muted: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); --impakt-color-text-inverse: ${t.text}; }
|
|
204
|
+
:host([selected]) :is(.title, .meta, .chevron) { color: ${INVERSE}; }
|
|
205
|
+
:host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); }
|
|
206
|
+
@media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }
|
|
185
207
|
`
|
|
186
208
|
];
|
|
187
209
|
}
|
|
@@ -196,11 +218,11 @@ var ImpaktRow = class extends ImpaktElement {
|
|
|
196
218
|
}
|
|
197
219
|
render() {
|
|
198
220
|
const title = this.href ? html`<a class="title" href=${this.href} part="link">${this.heading}</a>` : html`<span class="title" part="title">${this.heading}</span>`;
|
|
199
|
-
return html`<div class="row" part="row">
|
|
221
|
+
return html`<div class="row" part="row" aria-current=${this.selected ? "true" : nothing}>
|
|
200
222
|
<div class="start ${this.filled.start ? "" : "empty"}"><slot name="start" @slotchange=${this.onSlot}></slot></div>
|
|
201
223
|
<div class="text">${title}${this.meta ? html`<span class="meta" part="meta">${this.meta}</span>` : nothing}</div>
|
|
202
224
|
<div class="end ${this.filled.end ? "" : "empty"}"><slot name="end" @slotchange=${this.onSlot}></slot></div>
|
|
203
|
-
${this.href ? html`<span class="chevron" aria-hidden="true">${iconSvg("chevron-right", "20px")}</span>` : nothing}
|
|
225
|
+
${this.href && !this.selected ? html`<span class="chevron" aria-hidden="true">${iconSvg("chevron-right", "20px")}</span>` : nothing}
|
|
204
226
|
</div>`;
|
|
205
227
|
}
|
|
206
228
|
};
|
|
@@ -236,20 +258,20 @@ var ImpaktFilterChip = class extends ImpaktElement {
|
|
|
236
258
|
display: inline-flex;
|
|
237
259
|
align-items: center;
|
|
238
260
|
gap: ${space(2)};
|
|
239
|
-
min-block-size:
|
|
261
|
+
min-block-size: 35px;
|
|
240
262
|
padding: 0 ${space(3.5)};
|
|
241
263
|
font: inherit;
|
|
242
264
|
font-size: ${fontSize("sm")};
|
|
243
|
-
font-weight: ${fontWeight("
|
|
265
|
+
font-weight: ${fontWeight("regular")};
|
|
244
266
|
color: ${t.text};
|
|
245
267
|
background: ${t.surfaceCard};
|
|
246
|
-
border: ${t.borderThin} solid ${t.
|
|
247
|
-
border-radius:
|
|
268
|
+
border: ${t.borderThin} solid ${t.text};
|
|
269
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
248
270
|
cursor: pointer;
|
|
249
271
|
white-space: nowrap;
|
|
250
272
|
}
|
|
251
273
|
button:hover:not(:disabled) { background: ${t.surfaceInset}; }
|
|
252
|
-
button[aria-pressed='true'] { background: ${t.text}; color: ${
|
|
274
|
+
button[aria-pressed='true'] { background: ${t.text}; color: ${INVERSE}; border-color: ${t.text}; }
|
|
253
275
|
button:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
254
276
|
.count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }
|
|
255
277
|
button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }
|
|
@@ -282,4 +304,4 @@ export {
|
|
|
282
304
|
ImpaktRow,
|
|
283
305
|
ImpaktFilterChip
|
|
284
306
|
};
|
|
285
|
-
//# sourceMappingURL=chunk-
|
|
307
|
+
//# sourceMappingURL=chunk-BAYSDP44.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/rows.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize, touchTarget, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { pageLocale } from '../base/locale';\nimport { iconSvg } from './icon';\nimport { statusPill, statusPillStyles, type StatusTone } from './status-pill-style';\n\n/** The colour that reads on the text colour, which a toned band sets; the card otherwise. */\nconst INVERSE = token('color.text.inverse', 'var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))');\n\n/** The light weight large numbers are set in, 300 when the theme does not say. */\nconst LIGHT = token('font.weight.light', '300');\n\n/**\n * A count with its name: \"UK 4\", \"Active import jobs 12\". A dashboard shows a\n * row of them.\n *\n * **The name comes before the number in the reading order.** A screen reader\n * says \"UK, 4\", which makes sense heard on its own; \"4, UK\" does not. With\n * `href` the whole tile is one link, named by the label, the value and the\n * caption together.\n *\n * **It is the G2 summary tile** (frames 33:451, 36:473, 37:469, 39:770): white,\n * a 1px ink border, the label in the code face, the figure large and tight\n * (a word works as the figure too, such as \"First audit\"), the note under it,\n * and under the note an optional status pill, such as \"All proven\". The\n * status is words, so it does not rest on its dot's colour.\n *\n * @category content\n * @icon badge\n */\nexport class ImpaktStatTile extends ImpaktElement {\n static properties = {\n label: { type: String },\n value: { type: String },\n caption: { type: String },\n href: { type: String },\n tone: { type: String, reflect: true },\n size: { type: String, reflect: true },\n status: { type: String },\n statusTone: { type: String, attribute: 'status-tone' },\n };\n /** What is counted, such as \"UK\" or \"Active import jobs\". */\n declare label: string;\n /** The count or figure, such as \"4\". */\n declare value: string;\n /** A line under the figure, such as \"3 arriving in the next two weeks\". */\n declare caption: string;\n /** Where the tile goes when it is pressed, such as the list it counts. */\n declare href: string;\n /** `plain` is a quiet tile on a card; `brand` is the one figure a screen leads with. */\n declare tone: 'plain' | 'brand';\n /** `lg` sets the figure larger, for the lead figure. */\n declare size: 'md' | 'lg';\n /** A status under the note, drawn as a pill, such as \"All proven\". */\n declare status: string;\n /** The status's tone. */\n declare statusTone: StatusTone;\n\n constructor() {\n super();\n this.label = '';\n this.value = '';\n this.caption = '';\n this.href = '';\n this.tone = 'plain';\n this.size = 'md';\n this.status = '';\n this.statusTone = 'neutral';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n statusPillStyles,\n css`\n :host { display: block; }\n .tile {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ${space(2.5)};\n block-size: 100%;\n padding: ${space(5)};\n border: ${t.borderThin} solid ${t.text};\n border-radius: ${t.radius};\n background: ${t.surfaceCard};\n color: ${t.text};\n text-decoration: none;\n }\n a.tile:hover { background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%); }\n .label { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n /* G2: Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */\n .value { font-size: var(--impakt-type-stat-size, 3.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: ${fontWeight('semibold')}; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }\n .caption { font-size: ${fontSize('sm')}; line-height: 1.45; color: ${t.textMuted}; }\n :host([size='lg']) .tile { min-block-size: 200px; padding: ${space(6)}; }\n :host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${LIGHT}; }\n :host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }\n :host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }\n :host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }\n @media (max-width: 40rem) { .value { font-size: 2.5rem; } }\n @media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const inner = html`\n <span class=\"label\" part=\"label\">${this.label}</span>\n <span class=\"value\" part=\"value\">${this.value}</span>\n ${this.caption ? html`<span class=\"caption\" part=\"caption\">${this.caption}</span>` : nothing}\n ${statusPill(this.status, this.statusTone)}\n `;\n return this.href ? html`<a class=\"tile\" href=${this.href} part=\"tile\">${inner}</a>` : html`<div class=\"tile\" part=\"tile\">${inner}</div>`;\n }\n}\n\n/**\n * A date as a small block of month and day: \"DEC 2\". It sits at the start of a\n * row, beside what happens on that date.\n *\n * **The full date is what a screen reader hears.** The short month and day are\n * hidden from it, and the date is read in full in the page's language, such as\n * \"2 December 2026\", because \"DEC 2\" said aloud is ambiguous.\n *\n * @category content\n * @icon calendar\n */\nexport class ImpaktDateTile extends ImpaktElement {\n static properties = {\n date: { type: String },\n tone: { type: String, reflect: true },\n };\n /** The date, as YYYY-MM-DD. */\n declare date: string;\n /** `brand` is filled with the brand colour; `plain` is a quiet tile. */\n declare tone: 'brand' | 'plain';\n\n constructor() {\n super();\n this.date = '';\n this.tone = 'brand';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; flex: none; }\n time {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n inline-size: 48px;\n block-size: 52px;\n border-radius: ${t.radiusLg};\n background: ${t.brand};\n color: ${t.onBrand};\n line-height: 1;\n }\n :host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }\n .month { font-size: 10px; font-weight: ${fontWeight('medium')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .day { margin-block-start: ${space(1)}; font-size: 20px; font-weight: ${fontWeight('medium')}; font-variant-numeric: tabular-nums; }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { time { border: 1px solid CanvasText; } }\n `,\n ];\n\n private parts(): { month: string; day: string; full: string } | null {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(this.date ?? '');\n if (!match) return null;\n // Noon UTC, so no time zone moves the date to the day before or after.\n const when = new Date(Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3]), 12));\n if (Number.isNaN(when.getTime())) return null;\n const locale = pageLocale(this);\n const say = (options: Intl.DateTimeFormatOptions) => new Intl.DateTimeFormat(locale, { ...options, timeZone: 'UTC' }).format(when);\n return { month: say({ month: 'short' }).replace('.', ''), day: say({ day: 'numeric' }), full: say({ day: 'numeric', month: 'long', year: 'numeric' }) };\n }\n\n render(): TemplateResult {\n const parts = this.parts();\n if (!parts) return html`${nothing}`;\n return html`<time datetime=${this.date} part=\"tile\">\n <span class=\"month\" aria-hidden=\"true\">${parts.month}</span>\n <span class=\"day\" aria-hidden=\"true\">${parts.day}</span>\n <span class=\"sr-only\">${parts.full}</span>\n </time>`;\n }\n}\n\n/**\n * One line in a list: a title, a line of detail under it, and room at the\n * start and the end. It is the task with its tick, the job that needs\n * attention, the delivery with its date, the setting with its arrow.\n *\n * **With `href` the whole row is one target, without nesting controls in a\n * link.** The title is the link, and it is stretched over the row, so the row\n * can be pressed anywhere. Anything in the `end` slot, such as a button, sits\n * above the stretched link and stays its own control, because a button inside\n * a link is two controls a screen reader cannot tell apart (4.1.2).\n *\n * A chevron is drawn at the end of a row that is a link, as the sign that it\n * goes somewhere. Put rows in an element with `role=\"list\"` and give each\n * `role=\"listitem\"` when they are a list, so a screen reader says how many\n * there are.\n *\n * @category content\n * @icon list\n * @slot start - Before the title: a dot, a date tile, a checkbox.\n * @slot end - After the title: a badge, a button.\n */\nexport class ImpaktRow extends ImpaktElement {\n static properties = {\n heading: { type: String },\n meta: { type: String },\n href: { type: String },\n divided: { type: Boolean, reflect: true },\n muted: { type: Boolean, reflect: true },\n selected: { type: Boolean, reflect: true },\n };\n /** The row's title. */\n declare heading: string;\n /** The line of detail under the title, such as \"CY-2026-00421 · Due 20 Nov 2026\". */\n declare meta: string;\n /** Where the row goes when it is pressed. */\n declare href: string;\n /** Draw a hairline above the row, for rows stacked on a card. */\n declare divided: boolean;\n /** Set the title quieter, for something finished, such as a done task. */\n declare muted: boolean;\n /**\n * The row being shown, such as the open case in a list beside it: an ink\n * fill with the words turned over (the paper in dark), and `aria-current`\n * on the row so it is not said by colour alone (frame 37:656).\n */\n declare selected: boolean;\n\n constructor() {\n super();\n this.selected = false;\n this.heading = '';\n this.meta = '';\n this.href = '';\n this.divided = false;\n this.muted = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n :host([divided]) .row { border-block-start: ${t.borderThin} solid ${t.hairline}; }\n .row { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block: ${space(3)}; }\n .text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(0.5)}; }\n .title { font-size: ${fontSize('md')}; font-weight: ${fontWeight('medium')}; color: ${t.text}; }\n :host([muted]) .title { color: ${t.textMuted}; font-weight: ${fontWeight('regular')}; }\n /* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */\n .meta { font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }\n a:focus-visible { outline: none; }\n a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .row:has(a):hover .title { text-decoration: underline; text-underline-offset: 0.2em; }\n .start, .end { flex: none; display: flex; align-items: center; gap: ${space(2)}; }\n .start.empty, .end.empty { display: none; }\n /* Controls at the end stay pressable above the stretched link. */\n .end { position: relative; z-index: 1; }\n .chevron { flex: none; color: ${t.textMuted}; }\n :host([selected]) .row { padding-inline: ${space(4)}; background: ${t.text}; --impakt-color-text-default: ${INVERSE}; --impakt-color-text-muted: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); --impakt-color-text-inverse: ${t.text}; }\n :host([selected]) :is(.title, .meta, .chevron) { color: ${INVERSE}; }\n :host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); }\n @media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }\n `,\n ];\n\n private filled = { start: false, end: false };\n\n private onSlot(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n const name = slot.name as 'start' | 'end';\n this.filled = {\n ...this.filled,\n [name]: slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || (n.textContent ?? '').trim() !== ''),\n };\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const title = this.href\n ? html`<a class=\"title\" href=${this.href} part=\"link\">${this.heading}</a>`\n : html`<span class=\"title\" part=\"title\">${this.heading}</span>`;\n return html`<div class=\"row\" part=\"row\" aria-current=${this.selected ? 'true' : nothing}>\n <div class=\"start ${this.filled.start ? '' : 'empty'}\"><slot name=\"start\" @slotchange=${this.onSlot}></slot></div>\n <div class=\"text\">${title}${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}</div>\n <div class=\"end ${this.filled.end ? '' : 'empty'}\"><slot name=\"end\" @slotchange=${this.onSlot}></slot></div>\n ${this.href && !this.selected ? html`<span class=\"chevron\" aria-hidden=\"true\">${iconSvg('chevron-right', '20px')}</span>` : nothing}\n </div>`;\n }\n}\n\n/**\n * A pressable filter: \"UK 4\", \"Completed 27\". A row of them narrows a list.\n *\n * **It is a toggle button.** It carries `aria-pressed`, so a screen reader says\n * whether the filter is on, and it is filled when it is on, so that does not\n * rest on colour alone (1.4.1). When only one filter in a row can be on, the\n * app turns the others off when it hears `impakt-change`.\n *\n * The count is read with the label. Set `count-label` when the number needs its\n * noun to make sense aloud, such as \"4 jobs\".\n *\n * @category action\n * @icon badge\n * @fires {CustomEvent<{ pressed: boolean }>} impakt-change - When the filter is turned on or off.\n */\nexport class ImpaktFilterChip extends ImpaktElement {\n static properties = {\n label: { type: String },\n count: { type: Number },\n countLabel: { type: String, attribute: 'count-label' },\n pressed: { type: Boolean, reflect: true },\n disabled: { type: Boolean, reflect: true },\n };\n declare label: string;\n /** How many things the filter would show. Left out when not set. */\n declare count: number | undefined;\n /** The count in words for a screen reader, such as \"4 jobs\". The number alone when empty. */\n declare countLabel: string;\n declare pressed: boolean;\n declare disabled: boolean;\n\n constructor() {\n super();\n this.label = '';\n this.count = undefined;\n this.countLabel = '';\n this.pressed = false;\n this.disabled = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n touchTarget('button'),\n css`\n :host { display: inline-block; }\n /* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */\n button {\n ${targetSize}\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: ${space(2)};\n min-block-size: 35px;\n padding: 0 ${space(3.5)};\n font: inherit;\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('regular')};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.text};\n border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));\n cursor: pointer;\n white-space: nowrap;\n }\n button:hover:not(:disabled) { background: ${t.surfaceInset}; }\n button[aria-pressed='true'] { background: ${t.text}; color: ${INVERSE}; border-color: ${t.text}; }\n button:disabled { cursor: not-allowed; opacity: 0.5; }\n .count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { button[aria-pressed='true'] { border: 2px solid Highlight; } }\n `,\n ];\n\n private toggle(): void {\n if (this.disabled) return;\n this.pressed = !this.pressed;\n this.dispatchEvent(new CustomEvent('impakt-change', { detail: { pressed: this.pressed }, bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const hasCount = typeof this.count === 'number' && !Number.isNaN(this.count);\n return html`<button type=\"button\" part=\"button\" aria-pressed=${this.pressed ? 'true' : 'false'} ?disabled=${this.disabled} @click=${this.toggle}>\n <span>${this.label}</span>\n ${\n hasCount\n ? this.countLabel\n ? html`<span class=\"count\" aria-hidden=\"true\">${this.count}</span><span class=\"sr-only\">${this.countLabel}</span>`\n : html`<span class=\"count\">${this.count}</span>`\n : nothing\n }\n </button>`;\n }\n}\n\ncustomElements.define('impakt-stat-tile', ImpaktStatTile);\ncustomElements.define('impakt-date-tile', ImpaktDateTile);\ncustomElements.define('impakt-row', ImpaktRow);\ncustomElements.define('impakt-filter-chip', ImpaktFilterChip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stat-tile': ImpaktStatTile;\n 'impakt-date-tile': ImpaktDateTile;\n 'impakt-row': ImpaktRow;\n 'impakt-filter-chip': ImpaktFilterChip;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AASxD,IAAM,UAAU,MAAM,sBAAsB,qEAAqE;AAGjH,IAAM,QAAQ,MAAM,qBAAqB,KAAK;AAoBvC,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,QAAQ,EAAE,MAAM,OAAO;AAAA,MACvB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,IACvD;AAAA;AAAA,EAkBA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ;AACb,SAA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E,WAAO,wDAAwD,KAAK,UAAU,SAAS,OAAO,cAAc,KAAK,QAAQ,WAAW,KAAK,MAAM;AAAA,cACrI,KAAK,KAAK;AAAA,QAEhB,WACI,KAAK,aACH,8CAA8C,KAAK,KAAK,gCAAgC,KAAK,UAAU,YACvG,2BAA2B,KAAK,KAAK,YACvC,OACN;AAAA;AAAA,EAEJ;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpaktElement,
|
|
3
|
+
hideOn
|
|
4
|
+
} from "./chunk-72WNCCDC.js";
|
|
5
|
+
import {
|
|
3
6
|
fontSize,
|
|
4
|
-
|
|
7
|
+
fontWeight,
|
|
5
8
|
space,
|
|
6
|
-
t
|
|
7
|
-
|
|
9
|
+
t,
|
|
10
|
+
token
|
|
11
|
+
} from "./chunk-JTCTQBAX.js";
|
|
8
12
|
|
|
9
13
|
// packages/ui/src/components/chip.ts
|
|
10
14
|
import { css, html, nothing } from "lit";
|
|
@@ -35,6 +39,7 @@ var ImpaktChip = class extends ImpaktElement {
|
|
|
35
39
|
icon: { type: String, reflect: true },
|
|
36
40
|
tone: { type: String },
|
|
37
41
|
look: { type: String, reflect: true },
|
|
42
|
+
size: { type: String, reflect: true },
|
|
38
43
|
hideOn: { type: String, reflect: true, attribute: "hide-on" }
|
|
39
44
|
};
|
|
40
45
|
}
|
|
@@ -45,6 +50,7 @@ var ImpaktChip = class extends ImpaktElement {
|
|
|
45
50
|
this.icon = "none";
|
|
46
51
|
this.tone = "success";
|
|
47
52
|
this.look = "filled";
|
|
53
|
+
this.size = "md";
|
|
48
54
|
this.hideOn = "never";
|
|
49
55
|
}
|
|
50
56
|
static {
|
|
@@ -53,11 +59,19 @@ var ImpaktChip = class extends ImpaktElement {
|
|
|
53
59
|
hideOn,
|
|
54
60
|
css`
|
|
55
61
|
:host { display: inline-flex; flex: none; }
|
|
56
|
-
span.chip { display: inline-flex; align-items: center; gap: ${space(1.5)}; padding: 3px ${space(2.5)}; border-radius:
|
|
62
|
+
span.chip { display: inline-flex; align-items: center; gap: ${space(1.5)}; padding: 3px ${space(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${MONO}; font-size: ${fontSize("xs")}; line-height: 1.2; white-space: nowrap; }
|
|
57
63
|
:host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
58
|
-
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.
|
|
64
|
+
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; }
|
|
65
|
+
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${fontWeight("medium")}; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
66
|
+
/* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */
|
|
67
|
+
:host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding: ${space(1.5)} ${space(3)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 14px; line-height: 1.2; }
|
|
68
|
+
:host([size='lg']) span.chip { box-sizing: border-box; min-block-size: 49px; gap: ${space(3)}; padding: ${space(2)} ${space(4)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 20px; line-height: 1.2; }
|
|
69
|
+
:host([size='lg']) .meta { font-family: ${MONO}; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }
|
|
59
70
|
:host([look='plain']) span.chip { padding: 0; }
|
|
60
|
-
.dot { inline-size:
|
|
71
|
+
.dot { flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--tone); }
|
|
72
|
+
/* Yellow means "needs your attention": the accent, with an ink stroke so it shows on white. */
|
|
73
|
+
.dot.warn { background: ${token("color.accent.default", "#ffd43b")}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
74
|
+
@media (forced-colors: active) { .dot, .dot.warn { background: CanvasText; } }
|
|
61
75
|
svg { inline-size: 12px; block-size: 12px; }
|
|
62
76
|
.meta { opacity: 0.72; text-transform: none; }
|
|
63
77
|
:host([look='plain']) .label { opacity: 0.72; }
|
|
@@ -65,7 +79,7 @@ var ImpaktChip = class extends ImpaktElement {
|
|
|
65
79
|
];
|
|
66
80
|
}
|
|
67
81
|
render() {
|
|
68
|
-
const icon = this.icon === "dot" ? html`<span class="dot" aria-hidden="true"></span>` : this.icon === "branch" ? html`<svg viewBox="0 0 14 14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="3.5" cy="3" r="1.5"/><circle cx="3.5" cy="11" r="1.5"/><circle cx="10.5" cy="4.5" r="1.5"/><path d="M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4"/></svg>` : nothing;
|
|
82
|
+
const icon = this.icon === "dot" ? html`<span class="dot ${this.tone === "warning" ? "warn" : ""}" aria-hidden="true"></span>` : this.icon === "branch" ? html`<svg viewBox="0 0 14 14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="3.5" cy="3" r="1.5"/><circle cx="3.5" cy="11" r="1.5"/><circle cx="10.5" cy="4.5" r="1.5"/><path d="M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4"/></svg>` : nothing;
|
|
69
83
|
return html`<span class="chip" part="chip" style=${`--tone:${toneOf(this.tone, 0)}`}>${icon}<span class="label">${this.label}</span>${this.meta ? html` <span class="meta">${this.meta}</span>` : nothing}</span>`;
|
|
70
84
|
}
|
|
71
85
|
};
|
|
@@ -77,4 +91,4 @@ export {
|
|
|
77
91
|
toneOf,
|
|
78
92
|
ImpaktChip
|
|
79
93
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
94
|
+
//# sourceMappingURL=chunk-BGHAANTP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chip.ts","../src/base/tone.ts"],"sourcesContent":["/**\n * A short label: a branch, a status with its dot, or a code such as a commit\n * hash.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { hideOn } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { toneOf, type Tone } from '../base/tone';\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n/**\n * A short label: a branch name with its icon, a status with its dot, or a\n * code such as a commit hash. It says something; it does nothing.\n *\n * @category content\n * @icon badge\n */\nexport class ImpaktChip extends ImpaktElement {\n static properties = {\n label: { type: String },\n meta: { type: String },\n icon: { type: String, reflect: true },\n tone: { type: String },\n look: { type: String, reflect: true },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n declare label: string;\n /** A code after the label, quieter, such as a hash. */\n declare meta: string;\n /** A coloured dot, a branch, or nothing before the label. */\n declare icon: 'none' | 'dot' | 'branch';\n /** The dot's colour: a named tone, or 1 to 5 for the brand's chart colours. */\n declare tone: Tone;\n /** `outlined` on the card colour, `filled` with a faint wash, or `plain` words in the code face. */\n declare look: 'outlined' | 'filled' | 'plain';\n /**\n * `md` is the chip in a line of text. `marketing` sets the words in\n * capitals at 11px with 6% tracking, as the site's labels are. `lg` is a\n * studio tool tag: a square 49px box with an ink border, the label in\n * Archivo at 20px and the meta in capitals in the code face (frame 21:1152).\n */\n declare size: 'md' | 'marketing' | 'body' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.label = '';\n this.meta = '';\n this.icon = 'none';\n this.tone = 'success';\n this.look = 'filled';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n hideOn,\n css`\n :host { display: inline-flex; flex: none; }\n span.chip { display: inline-flex; align-items: center; gap: ${space(1.5)}; padding: 3px ${space(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${MONO}; font-size: ${fontSize('xs')}; line-height: 1.2; white-space: nowrap; }\n :host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }\n :host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; }\n :host([size='marketing']) span.chip { font-size: 11px; font-weight: ${fontWeight('medium')}; text-transform: uppercase; letter-spacing: 0.06em; }\n /* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */\n :host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding: ${space(1.5)} ${space(3)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 14px; line-height: 1.2; }\n :host([size='lg']) span.chip { box-sizing: border-box; min-block-size: 49px; gap: ${space(3)}; padding: ${space(2)} ${space(4)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 20px; line-height: 1.2; }\n :host([size='lg']) .meta { font-family: ${MONO}; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }\n :host([look='plain']) span.chip { padding: 0; }\n .dot { flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--tone); }\n /* Yellow means \"needs your attention\": the accent, with an ink stroke so it shows on white. */\n .dot.warn { background: ${token('color.accent.default', '#ffd43b')}; box-shadow: 0 0 0 1px ${t.text}; }\n @media (forced-colors: active) { .dot, .dot.warn { background: CanvasText; } }\n svg { inline-size: 12px; block-size: 12px; }\n .meta { opacity: 0.72; text-transform: none; }\n :host([look='plain']) .label { opacity: 0.72; }\n `,\n ];\n\n render(): TemplateResult {\n const icon =\n this.icon === 'dot'\n ? html`<span class=\"dot ${this.tone === 'warning' ? 'warn' : ''}\" aria-hidden=\"true\"></span>`\n : this.icon === 'branch'\n ? html`<svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>`\n : nothing;\n return html`<span class=\"chip\" part=\"chip\" style=${`--tone:${toneOf(this.tone, 0)}`}>${icon}<span class=\"label\">${this.label}</span>${this.meta ? html` <span class=\"meta\">${this.meta}</span>` : nothing}</span>`;\n }\n}\n\ncustomElements.define('impakt-chip', ImpaktChip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-chip': ImpaktChip;\n }\n}\n","/**\n * Colours named by what they are in the brand, for a line, a lane, a dot or a\n * stripe. A tone is a brand token, never a hex value, so a partner's brand\n * restyles everything drawn with one.\n *\n * It is shared: `impakt-chip` here and the changelog, site and estimator blocks\n * in `@atomic-ui/blocks` all colour themselves with it.\n */\n\n/** A colour for a line or a lane, named by what it is in the brand. */\nexport type NamedTone = 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger';\n/** A named tone, or 1 to 5 for the brand's chart colours in order. */\nexport type Tone = NamedTone | 1 | 2 | 3 | 4 | 5;\nexport const TONE: Record<NamedTone, string> = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n};\n/** When an item names no tone, lanes take these in turn. */\nexport const CYCLE: NamedTone[] = ['success', 'info', 'warning', 'accent', 'danger', 'brand'];\n/**\n * A named tone, or for an item that names none, the brand's chart colour for its\n * place (color.chart.1 to 5), falling back to the status colours in turn.\n */\nexport const toneOf = (tone: Tone | undefined, i: number): string => {\n if (typeof tone === 'number') return `var(--impakt-color-chart-${tone}, ${TONE[CYCLE[(tone - 1) % CYCLE.length]!]})`;\n if (tone && tone in TONE) return TONE[tone];\n return `var(--impakt-color-chart-${(i % 5) + 1}, ${TONE[CYCLE[i % CYCLE.length]!]})`;\n};\n"],"mappings":";;;;;;;;;;;;;AAIA,SAAS,KAAK,MAAM,eAAoC;;;ACSjD,IAAM,OAAkC;AAAA,EAC7C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,IAAM,QAAqB,CAAC,WAAW,QAAQ,WAAW,UAAU,UAAU,OAAO;AAKrF,IAAM,SAAS,CAAC,MAAwB,MAAsB;AACnE,MAAI,OAAO,SAAS,SAAU,QAAO,4BAA4B,IAAI,KAAK,KAAK,OAAO,OAAO,KAAK,MAAM,MAAM,CAAE,CAAC;AACjH,MAAI,QAAQ,QAAQ,KAAM,QAAO,KAAK,IAAI;AAC1C,SAAO,4BAA6B,IAAI,IAAK,CAAC,KAAK,KAAK,MAAM,IAAI,MAAM,MAAM,CAAE,CAAC;AACnF;;;ADpBA,IAAM,OAAO,EAAE;AASR,IAAM,aAAN,cAAyB,cAAc;AAAA,EAC5C;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,QAAQ,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,UAAU;AAAA,IAC9D;AAAA;AAAA,EAmBA,cAAc;AACZ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,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5OYQZWP2.js";
|
|
4
4
|
import {
|
|
5
5
|
ImpaktElement,
|
|
6
6
|
focusRing,
|
|
7
|
+
say,
|
|
8
|
+
targetSize,
|
|
9
|
+
visuallyHidden
|
|
10
|
+
} from "./chunk-72WNCCDC.js";
|
|
11
|
+
import {
|
|
7
12
|
fontSize,
|
|
8
13
|
fontWeight,
|
|
9
14
|
space,
|
|
10
|
-
t
|
|
11
|
-
|
|
12
|
-
visuallyHidden
|
|
13
|
-
} from "./chunk-V7EB7Q2M.js";
|
|
15
|
+
t
|
|
16
|
+
} from "./chunk-JTCTQBAX.js";
|
|
14
17
|
|
|
15
18
|
// packages/ui/src/components/navigation.ts
|
|
16
19
|
import { css, html, nothing } from "lit";
|
|
@@ -41,6 +44,11 @@ var ImpaktNav = class extends ImpaktElement {
|
|
|
41
44
|
this.menuLook = "button";
|
|
42
45
|
this.size = "md";
|
|
43
46
|
this.align = "end";
|
|
47
|
+
this.fold = "measure";
|
|
48
|
+
this.actionText = "";
|
|
49
|
+
this.actionHref = "";
|
|
50
|
+
this.look = "links";
|
|
51
|
+
this.current = "";
|
|
44
52
|
}
|
|
45
53
|
static {
|
|
46
54
|
this.properties = {
|
|
@@ -49,7 +57,12 @@ var ImpaktNav = class extends ImpaktElement {
|
|
|
49
57
|
menuText: { type: String, attribute: "menu-text" },
|
|
50
58
|
menuLook: { type: String, reflect: true, attribute: "menu-look" },
|
|
51
59
|
size: { type: String, reflect: true },
|
|
52
|
-
align: { type: String, reflect: true }
|
|
60
|
+
align: { type: String, reflect: true },
|
|
61
|
+
fold: { type: String, reflect: true },
|
|
62
|
+
actionText: { type: String, attribute: "action-text" },
|
|
63
|
+
actionHref: { type: String, attribute: "action-href" },
|
|
64
|
+
look: { type: String, reflect: true },
|
|
65
|
+
current: { type: String }
|
|
53
66
|
};
|
|
54
67
|
}
|
|
55
68
|
get open() {
|
|
@@ -87,13 +100,45 @@ var ImpaktNav = class extends ImpaktElement {
|
|
|
87
100
|
:host([folded]) ul.open { display: flex; }
|
|
88
101
|
:host([folded]) li { text-align: start; }
|
|
89
102
|
:host([folded]) a { display: flex; padding: ${space(3)} ${space(3)}; }
|
|
103
|
+
/* Tabs: a bordered group on the soft surface; the current tab is white with a dot before it. */
|
|
104
|
+
:host([look='tabs']) ul { gap: 0; padding: 3px; background: ${t.surfaceSubtle}; border: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8); }
|
|
105
|
+
:host([look='tabs']) a { min-block-size: 42px; gap: ${space(2)}; padding: 0 ${space(4)}; font-size: ${fontSize("sm")}; font-weight: ${fontWeight("regular")}; border-radius: 0; }
|
|
106
|
+
:host([look='tabs']) a:hover { text-decoration: none; background: ${t.wash}; }
|
|
107
|
+
:host([look='tabs']) a[aria-current] { text-decoration: none; background: ${t.surfaceCard}; box-shadow: inset 0 0 0 1px var(--impakt-color-line-soft, #dcdcd8); }
|
|
108
|
+
:host([look='tabs']) a[aria-current]::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
|
|
109
|
+
@media (forced-colors: active) { :host([look='tabs']) a[aria-current] { outline: 1px solid CanvasText; } }
|
|
110
|
+
:host([look='tabs'][folded]) ul { padding: ${space(2)}; }
|
|
90
111
|
/* With no script the element is never defined, so it cannot measure itself and fold. The links
|
|
91
112
|
wrap onto more lines instead, so they are never cut off or drawn over what is beside them. */
|
|
92
113
|
:host(:not(:defined)) ul { flex-wrap: wrap; row-gap: 0; }
|
|
114
|
+
/*
|
|
115
|
+
* fold="narrow": the fold is decided here, by the width of the container around the nav, so it
|
|
116
|
+
* is the same before the script runs, after it, and without it. The Menu button opens the
|
|
117
|
+
* panel as a popover, which the browser does by itself. On a wide screen the panel is not a box
|
|
118
|
+
* at all, and its links sit in the row as they always did.
|
|
119
|
+
*/
|
|
120
|
+
:host([fold='narrow']) .panel { display: contents; color: inherit; }
|
|
121
|
+
:host([fold='narrow']) .close, :host([fold='narrow']) .action { display: none; }
|
|
122
|
+
@container (max-width: 40rem) {
|
|
123
|
+
:host([fold='narrow']) { flex: 0 0 auto; }
|
|
124
|
+
:host([fold='narrow']) .toggle { display: inline-flex; }
|
|
125
|
+
:host([fold='narrow']) .panel { display: none; }
|
|
126
|
+
:host([fold='narrow']) .panel:popover-open { display: flex; flex-direction: column; gap: ${space(6)}; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: ${space(3)} ${space(4)} calc(${space(6)} + env(safe-area-inset-bottom)); border: 0; overflow: auto; overscroll-behavior: contain; background: ${t.text}; color: ${t.surfaceCard}; }
|
|
127
|
+
:host([fold='narrow']) .close { display: inline-flex; ${targetSize} align-items: center; gap: ${space(2)}; align-self: flex-end; padding: ${space(2)} ${space(3)}; font: inherit; font-weight: ${fontWeight("semibold")}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }
|
|
128
|
+
:host([fold='narrow']) ul { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
|
|
129
|
+
:host([fold='narrow']) li { border-block-end: ${t.borderThin} solid color-mix(in srgb, currentColor 22%, transparent); }
|
|
130
|
+
:host([fold='narrow']) li a { display: flex; padding: ${space(4)} 0; font-family: ${t.fontHeading}; font-size: ${fontSize("2xl")}; font-weight: ${fontWeight("semibold")}; letter-spacing: -0.02em; }
|
|
131
|
+
:host([fold='narrow']) .action { display: flex; ${targetSize} align-items: center; justify-content: center; margin-block-start: auto; padding: ${space(3)} ${space(4)}; background: ${t.surfaceCard}; color: ${t.text}; font-weight: ${fontWeight("semibold")}; text-decoration: none; border-radius: ${t.radius}; }
|
|
132
|
+
:host([fold='narrow']) .action:hover { text-decoration: underline; }
|
|
133
|
+
}
|
|
93
134
|
`
|
|
94
135
|
];
|
|
95
136
|
}
|
|
96
137
|
fit() {
|
|
138
|
+
if (this.fold === "narrow") {
|
|
139
|
+
this.removeAttribute("folded");
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
97
142
|
if (!this.hasUpdated) return;
|
|
98
143
|
const room = this.getBoundingClientRect().width;
|
|
99
144
|
if (room <= 0) return;
|
|
@@ -108,7 +153,7 @@ var ImpaktNav = class extends ImpaktElement {
|
|
|
108
153
|
if (!fold && this.menuOpen) this.open = false;
|
|
109
154
|
}
|
|
110
155
|
updated(changed) {
|
|
111
|
-
if (changed.has("links")) {
|
|
156
|
+
if (changed.has("links") || changed.has("fold")) {
|
|
112
157
|
this.needs = 0;
|
|
113
158
|
this.fit();
|
|
114
159
|
}
|
|
@@ -132,13 +177,35 @@ var ImpaktNav = class extends ImpaktElement {
|
|
|
132
177
|
this.open = false;
|
|
133
178
|
this.renderRoot.querySelector(".toggle")?.focus();
|
|
134
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* fold="narrow": the Menu button and the panel are tied by `popovertarget`, so the browser opens
|
|
182
|
+
* and closes the panel, moves on to it with Tab, and closes it on Escape, with no script. The
|
|
183
|
+
* browser also tells a screen reader whether it is open.
|
|
184
|
+
*/
|
|
185
|
+
renderNarrow() {
|
|
186
|
+
const panel = this.id_("panel");
|
|
187
|
+
return html`<nav aria-label=${this.label || nothing} part="nav">
|
|
188
|
+
<button class="toggle" type="button" popovertarget=${panel}>${iconSvg(this.menuLook === "icon" ? "menu-two" : "menu")}<span class="words">${this.menuText}</span></button>
|
|
189
|
+
<div id=${panel} class="panel" popover="auto" part="panel">
|
|
190
|
+
<button class="close" type="button" popovertarget=${panel} popovertargetaction="hide">${iconSvg("close")}<span>${say("Close")}</span></button>
|
|
191
|
+
<ul part="list">
|
|
192
|
+
${(this.links ?? []).map((link) => {
|
|
193
|
+
const current = this.current ? link.href === this.current ? "page" : null : where(link.href);
|
|
194
|
+
return html`<li><a href=${link.href} aria-current=${current === "page" ? "page" : current === "section" ? "true" : nothing} part="link">${link.label}</a></li>`;
|
|
195
|
+
})}
|
|
196
|
+
</ul>
|
|
197
|
+
${this.actionText ? html`<a class="action" href=${this.actionHref || "#"} part="action">${this.actionText}</a>` : nothing}
|
|
198
|
+
</div>
|
|
199
|
+
</nav>`;
|
|
200
|
+
}
|
|
135
201
|
render() {
|
|
202
|
+
if (this.fold === "narrow") return this.renderNarrow();
|
|
136
203
|
const list = this.id_("links");
|
|
137
204
|
return html`<nav aria-label=${this.label || nothing} part="nav" @keydown=${this.onKey}>
|
|
138
205
|
<button class="toggle" type="button" aria-expanded=${this.open ? "true" : "false"} aria-controls=${list} @click=${this.toggle}>${iconSvg(this.open ? "close" : this.menuLook === "icon" ? "menu-two" : "menu")}<span class="words">${this.menuText}</span></button>
|
|
139
206
|
<ul id=${list} class=${this.open ? "open" : ""} part="list">
|
|
140
207
|
${(this.links ?? []).map((link) => {
|
|
141
|
-
const current = where(link.href);
|
|
208
|
+
const current = this.current ? link.href === this.current ? "page" : null : where(link.href);
|
|
142
209
|
return html`<li><a href=${link.href} aria-current=${current === "page" ? "page" : current === "section" ? "true" : nothing} part="link">${link.label}</a></li>`;
|
|
143
210
|
})}
|
|
144
211
|
</ul>
|
|
@@ -149,13 +216,15 @@ var ImpaktBreadcrumbs = class extends ImpaktElement {
|
|
|
149
216
|
static {
|
|
150
217
|
this.properties = {
|
|
151
218
|
items: { type: Array },
|
|
152
|
-
label: { type: String }
|
|
219
|
+
label: { type: String },
|
|
220
|
+
look: { type: String, reflect: true }
|
|
153
221
|
};
|
|
154
222
|
}
|
|
155
223
|
constructor() {
|
|
156
224
|
super();
|
|
157
225
|
this.items = [];
|
|
158
226
|
this.label = "Breadcrumb";
|
|
227
|
+
this.look = "default";
|
|
159
228
|
}
|
|
160
229
|
static {
|
|
161
230
|
this.styles = [
|
|
@@ -169,6 +238,12 @@ var ImpaktBreadcrumbs = class extends ImpaktElement {
|
|
|
169
238
|
a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }
|
|
170
239
|
a:hover { color: ${t.linkHover}; }
|
|
171
240
|
[aria-current] { color: ${t.textMuted}; }
|
|
241
|
+
:host([look='mono']) { font-family: ${t.fontMono}; font-size: ${fontSize("sm")}; color: ${t.textMuted}; }
|
|
242
|
+
/* The G2 trail (34:602): "Home / Tools / Accessibility", a slash between, the links underlined only on hover. A trail is its own list, not a link in a sentence, so it needs no underline to be told apart (1.4.1). */
|
|
243
|
+
:host([look='mono']) a { color: ${t.textMuted}; text-decoration: none; }
|
|
244
|
+
:host([look='mono']) a:hover { color: ${t.text}; text-decoration: underline; text-decoration-thickness: 1px; }
|
|
245
|
+
:host([look='mono']) [aria-current] { color: ${t.text}; }
|
|
246
|
+
:host([look='mono']) li + li::before { content: '/'; inline-size: auto; block-size: auto; border: 0; transform: none; margin-inline: ${space(1)}; color: ${t.textMuted}; }
|
|
172
247
|
.sr-only { ${visuallyHidden} }
|
|
173
248
|
`
|
|
174
249
|
];
|
|
@@ -189,4 +264,4 @@ export {
|
|
|
189
264
|
ImpaktNav,
|
|
190
265
|
ImpaktBreadcrumbs
|
|
191
266
|
};
|
|
192
|
-
//# sourceMappingURL=chunk-
|
|
267
|
+
//# sourceMappingURL=chunk-CFCFKLTN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { say } from '../base/say';\nimport { focusRing, targetSize, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/** One link in a navigation or a trail. */\nexport interface NavLink {\n label: string;\n href: string;\n}\n\n/** Whether a link is the page the visitor is on, or a page above it. */\nfunction where(href: string): 'page' | 'section' | null {\n // A link to a place on this page, or to nowhere yet (\"#\"), is not where the reader is.\n if (typeof location === 'undefined' || !href || href.startsWith('#')) return null;\n let path: string;\n try {\n const url = new URL(href, location.href);\n // A link to another site is never where the reader is, even when its path matches, as a\n // product at app.example.com linking back to example.com/ would otherwise mark that link.\n if (url.origin !== location.origin) return null;\n path = url.pathname.replace(/\\/$/, '') || '/';\n } catch {\n return null;\n }\n const here = location.pathname.replace(/\\/$/, '') || '/';\n if (path === here) return 'page';\n return path !== '/' && here.startsWith(`${path}/`) ? 'section' : null;\n}\n\n/**\n * The site's main navigation: a row of links that folds into a Menu button\n * when there is not room for all of them, whatever the screen.\n *\n * **The page you are on is marked in words as well as colour.** Its link\n * carries `aria-current=\"page\"`, which a screen reader announces, and an\n * underline, so it does not rely on colour alone (1.4.1).\n *\n * **The menu is a disclosure, not a pop-up.** The Menu button says whether the\n * list is open (`aria-expanded`), the links follow it in the reading order, and\n * Escape closes it and returns focus to the button.\n *\n * @category action\n * @icon menu\n */\nexport class ImpaktNav extends ImpaktElement {\n static properties = {\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n menuLook: { type: String, reflect: true, attribute: 'menu-look' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n fold: { type: String, reflect: true },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n look: { type: String, reflect: true },\n current: { type: String },\n };\n /** The links, in order. */\n declare links: NavLink[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /**\n * The Menu button: `button` with its words, or `icon`, a round button with\n * only the icon, the words kept as its name for screen readers.\n */\n declare menuLook: 'button' | 'icon';\n /** `sm` sets the links a step smaller and closer, as a site header's are. */\n declare size: 'md' | 'sm';\n /** Where the links sit along the row. */\n declare align: 'start' | 'center' | 'end';\n /**\n * How the links fold behind the Menu button. `measure` folds them when they do not fit, which\n * needs script. `narrow` folds them when the container around the nav is 40rem wide or less,\n * which is decided in CSS, and the Menu button then opens a whole-screen menu with no script at\n * all. `narrow` is for a page that may be drawn on a server and shown without script. It needs a\n * size container around the nav, and `impakt-site-header` is one.\n */\n declare fold: 'measure' | 'narrow';\n /** With `fold=\"narrow\"`: an action shown at the foot of the whole-screen menu, for a header that hides its own button on a narrow screen. */\n declare actionText: string;\n /** Where that action goes. */\n declare actionHref: string;\n /**\n * `links` is a row of words. `tabs` is the G2 site header's file tabs: a\n * bordered group on the soft surface, each tab 42px tall, and the page you\n * are on a white tab with a dot before it (frame 9:264). The current tab is\n * still `aria-current`, so it is not said by colour alone.\n */\n declare look: 'links' | 'tabs';\n /** The href of the link to mark as the page you are on, for when the page's address cannot say it (a preview, or `#` links). Unset, it is worked out from the address. */\n declare current: string;\n /** Whether the menu is open on a narrow screen. Not a setting: it is the visitor's. */\n private menuOpen = false;\n private get open(): boolean {\n return this.menuOpen;\n }\n private set open(next: boolean) {\n this.menuOpen = next;\n this.requestUpdate();\n }\n\n constructor() {\n super();\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.menuLook = 'button';\n this.size = 'md';\n this.align = 'end';\n this.fold = 'measure';\n this.actionText = '';\n this.actionHref = '';\n this.look = 'links';\n this.current = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* It grows to fill a row it sits in, because it measures itself to decide when to fold. */\n :host { display: block; flex: 1 1 8rem; min-inline-size: 0; }\n nav { display: flex; flex-direction: column; position: relative; }\n li { flex: none; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${space(1)} ${space(6)}; align-items: center; justify-content: flex-end; }\n :host([align='start']) ul { justify-content: flex-start; }\n :host([align='center']) ul { justify-content: center; }\n a { ${targetSize} display: inline-flex; align-items: center; padding: ${space(2)} ${space(1)}; color: inherit; font-weight: ${fontWeight('semibold')}; text-decoration: none; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }\n .toggle { display: none; ${targetSize} align-items: center; gap: ${space(2)}; align-self: flex-end; padding: ${space(2)} ${space(3)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }\n /* When they do not fit, the links fold behind a Menu button and open as a panel under it. */\n :host([folded]) { flex: 0 0 auto; }\n :host([folded]) .toggle { display: inline-flex; }\n :host([menu-look='icon']) .toggle { inline-size: 44px; block-size: 44px; padding: 0; justify-content: center; border: 0; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; }\n :host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n :host([size='sm']) ul { column-gap: ${space(6)}; }\n :host([size='sm']) a { padding-inline: 0; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; }\n :host([size='sm'][folded]) a { padding-inline: ${space(3)}; }\n :host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${space(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${space(2)}; background: ${t.surfaceCard}; color: ${t.text}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }\n :host([folded]) ul.open { display: flex; }\n :host([folded]) li { text-align: start; }\n :host([folded]) a { display: flex; padding: ${space(3)} ${space(3)}; }\n /* Tabs: a bordered group on the soft surface; the current tab is white with a dot before it. */\n :host([look='tabs']) ul { gap: 0; padding: 3px; background: ${t.surfaceSubtle}; border: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8); }\n :host([look='tabs']) a { min-block-size: 42px; gap: ${space(2)}; padding: 0 ${space(4)}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; border-radius: 0; }\n :host([look='tabs']) a:hover { text-decoration: none; background: ${t.wash}; }\n :host([look='tabs']) a[aria-current] { text-decoration: none; background: ${t.surfaceCard}; box-shadow: inset 0 0 0 1px var(--impakt-color-line-soft, #dcdcd8); }\n :host([look='tabs']) a[aria-current]::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }\n @media (forced-colors: active) { :host([look='tabs']) a[aria-current] { outline: 1px solid CanvasText; } }\n :host([look='tabs'][folded]) ul { padding: ${space(2)}; }\n /* With no script the element is never defined, so it cannot measure itself and fold. The links\n wrap onto more lines instead, so they are never cut off or drawn over what is beside them. */\n :host(:not(:defined)) ul { flex-wrap: wrap; row-gap: 0; }\n /*\n * fold=\"narrow\": the fold is decided here, by the width of the container around the nav, so it\n * is the same before the script runs, after it, and without it. The Menu button opens the\n * panel as a popover, which the browser does by itself. On a wide screen the panel is not a box\n * at all, and its links sit in the row as they always did.\n */\n :host([fold='narrow']) .panel { display: contents; color: inherit; }\n :host([fold='narrow']) .close, :host([fold='narrow']) .action { display: none; }\n @container (max-width: 40rem) {\n :host([fold='narrow']) { flex: 0 0 auto; }\n :host([fold='narrow']) .toggle { display: inline-flex; }\n :host([fold='narrow']) .panel { display: none; }\n :host([fold='narrow']) .panel:popover-open { display: flex; flex-direction: column; gap: ${space(6)}; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: ${space(3)} ${space(4)} calc(${space(6)} + env(safe-area-inset-bottom)); border: 0; overflow: auto; overscroll-behavior: contain; background: ${t.text}; color: ${t.surfaceCard}; }\n :host([fold='narrow']) .close { display: inline-flex; ${targetSize} align-items: center; gap: ${space(2)}; align-self: flex-end; padding: ${space(2)} ${space(3)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }\n :host([fold='narrow']) ul { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }\n :host([fold='narrow']) li { border-block-end: ${t.borderThin} solid color-mix(in srgb, currentColor 22%, transparent); }\n :host([fold='narrow']) li a { display: flex; padding: ${space(4)} 0; font-family: ${t.fontHeading}; font-size: ${fontSize('2xl')}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; }\n :host([fold='narrow']) .action { display: flex; ${targetSize} align-items: center; justify-content: center; margin-block-start: auto; padding: ${space(3)} ${space(4)}; background: ${t.surfaceCard}; color: ${t.text}; font-weight: ${fontWeight('semibold')}; text-decoration: none; border-radius: ${t.radius}; }\n :host([fold='narrow']) .action:hover { text-decoration: underline; }\n }\n `,\n ];\n\n /** The width the links need in one row. Measured once for each set of links, and again while folded it cannot be read. */\n private needs = 0;\n private resize?: ResizeObserver;\n\n private fit(): void {\n // With fold=\"narrow\" the fold is CSS's to decide, and nothing is measured.\n if (this.fold === 'narrow') {\n this.removeAttribute('folded');\n return;\n }\n // An element the server drew waits for the element around it before it draws here, and the\n // screen can report a size in that wait. There is nothing to measure until it has drawn.\n if (!this.hasUpdated) return;\n const room = this.getBoundingClientRect().width;\n if (room <= 0) return;\n if (!this.needs) {\n this.removeAttribute('folded');\n const items = Array.from(this.renderRoot.querySelectorAll('li'));\n const gap = Number.parseFloat(getComputedStyle(this.renderRoot.querySelector('ul')!).columnGap) || 0;\n this.needs = items.reduce((total, item) => total + item.getBoundingClientRect().width, 0) + gap * Math.max(0, items.length - 1);\n }\n const fold = this.needs > room;\n this.toggleAttribute('folded', fold);\n if (!fold && this.menuOpen) this.open = false;\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('links') || changed.has('fold')) {\n this.needs = 0;\n this.fit();\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (typeof ResizeObserver === 'function') {\n this.resize = new ResizeObserver(() => this.fit());\n this.resize.observe(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resize?.disconnect();\n }\n\n private toggle(): void {\n this.open = !this.open;\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.open) return;\n this.open = false;\n this.renderRoot.querySelector<HTMLButtonElement>('.toggle')?.focus();\n }\n\n /**\n * fold=\"narrow\": the Menu button and the panel are tied by `popovertarget`, so the browser opens\n * and closes the panel, moves on to it with Tab, and closes it on Escape, with no script. The\n * browser also tells a screen reader whether it is open.\n */\n private renderNarrow(): TemplateResult {\n const panel = this.id_('panel');\n return html`<nav aria-label=${this.label || nothing} part=\"nav\">\n <button class=\"toggle\" type=\"button\" popovertarget=${panel}>${iconSvg(this.menuLook === 'icon' ? 'menu-two' : 'menu')}<span class=\"words\">${this.menuText}</span></button>\n <div id=${panel} class=\"panel\" popover=\"auto\" part=\"panel\">\n <button class=\"close\" type=\"button\" popovertarget=${panel} popovertargetaction=\"hide\">${iconSvg('close')}<span>${say('Close')}</span></button>\n <ul part=\"list\">\n ${(this.links ?? []).map((link) => {\n const current = this.current ? (link.href === this.current ? 'page' : null) : where(link.href);\n return html`<li><a href=${link.href} aria-current=${current === 'page' ? 'page' : current === 'section' ? 'true' : nothing} part=\"link\">${link.label}</a></li>`;\n })}\n </ul>\n ${this.actionText ? html`<a class=\"action\" href=${this.actionHref || '#'} part=\"action\">${this.actionText}</a>` : nothing}\n </div>\n </nav>`;\n }\n\n render(): TemplateResult {\n if (this.fold === 'narrow') return this.renderNarrow();\n const list = this.id_('links');\n return html`<nav aria-label=${this.label || nothing} part=\"nav\" @keydown=${this.onKey}>\n <button class=\"toggle\" type=\"button\" aria-expanded=${this.open ? 'true' : 'false'} aria-controls=${list} @click=${this.toggle}>${iconSvg(this.open ? 'close' : this.menuLook === 'icon' ? 'menu-two' : 'menu')}<span class=\"words\">${this.menuText}</span></button>\n <ul id=${list} class=${this.open ? 'open' : ''} part=\"list\">\n ${(this.links ?? []).map((link) => {\n const current = this.current ? (link.href === this.current ? 'page' : null) : where(link.href);\n return html`<li><a href=${link.href} aria-current=${current === 'page' ? 'page' : current === 'section' ? 'true' : nothing} part=\"link\">${link.label}</a></li>`;\n })}\n </ul>\n </nav>`;\n }\n}\n\n/**\n * Where the page sits in the site, as a trail of links back to the top: Home,\n * then Developments, then this page.\n *\n * The last item is the page itself. It is not a link, and it carries\n * `aria-current=\"page\"`. The separators are drawn, not written, so a screen\n * reader reads the trail as a list rather than a string of slashes.\n *\n * @category action\n * @icon breadcrumbs\n */\nexport class ImpaktBreadcrumbs extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n look: { type: String, reflect: true },\n };\n /** `default` is the body face with links. `mono` is the code face at 14px, muted, as the G2 tools' trail is (frame 34:602). */\n declare look: 'default' | 'mono';\n /** The trail, from the top of the site down to this page. */\n declare items: NavLink[];\n /** What the trail is called for a screen reader. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Breadcrumb';\n this.look = 'default';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; font-size: ${fontSize('sm')}; }\n ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${space(1)}; }\n li { display: inline-flex; align-items: center; gap: ${space(1)}; }\n li + li::before { content: ''; inline-size: 0.45em; block-size: 0.45em; border-block-start: 1.5px solid ${t.textMuted}; border-inline-end: 1.5px solid ${t.textMuted}; transform: rotate(45deg); margin-inline: ${space(1)} ${space(2)}; }\n a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }\n a:hover { color: ${t.linkHover}; }\n [aria-current] { color: ${t.textMuted}; }\n :host([look='mono']) { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n /* The G2 trail (34:602): \"Home / Tools / Accessibility\", a slash between, the links underlined only on hover. A trail is its own list, not a link in a sentence, so it needs no underline to be told apart (1.4.1). */\n :host([look='mono']) a { color: ${t.textMuted}; text-decoration: none; }\n :host([look='mono']) a:hover { color: ${t.text}; text-decoration: underline; text-decoration-thickness: 1px; }\n :host([look='mono']) [aria-current] { color: ${t.text}; }\n :host([look='mono']) li + li::before { content: '/'; inline-size: auto; block-size: auto; border: 0; transform: none; margin-inline: ${space(1)}; color: ${t.textMuted}; }\n .sr-only { ${visuallyHidden} }\n `,\n ];\n\n render(): TemplateResult {\n const items = this.items ?? [];\n return html`<nav aria-label=${this.label} part=\"nav\"><ol>\n ${items.map(\n (item, i) =>\n html`<li>${\n i === items.length - 1 ? html`<span aria-current=\"page\">${item.label}</span>` : html`<a href=${item.href} part=\"link\">${item.label}</a>`\n }</li>`,\n )}\n </ol></nav>`;\n }\n}\n\ncustomElements.define('impakt-nav', ImpaktNav);\ncustomElements.define('impakt-breadcrumbs', ImpaktBreadcrumbs);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-nav': ImpaktNav;\n 'impakt-breadcrumbs': ImpaktBreadcrumbs;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAcxD,SAAS,MAAM,MAAyC;AAEtD,MAAI,OAAO,aAAa,eAAe,CAAC,QAAQ,KAAK,WAAW,GAAG,EAAG,QAAO;AAC7E,MAAI;AACJ,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,MAAM,SAAS,IAAI;AAGvC,QAAI,IAAI,WAAW,SAAS,OAAQ,QAAO;AAC3C,WAAO,IAAI,SAAS,QAAQ,OAAO,EAAE,KAAK;AAAA,EAC5C,QAAQ;AACN,WAAO;AAAA,EACT;AACA,QAAM,OAAO,SAAS,SAAS,QAAQ,OAAO,EAAE,KAAK;AACrD,MAAI,SAAS,KAAM,QAAO;AAC1B,SAAO,SAAS,OAAO,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,YAAY;AACnE;AAiBO,IAAM,YAAN,cAAwB,cAAc;AAAA,EA4D3C,cAAc;AACZ,UAAM;AAVR;AAAA,SAAQ,WAAW;AAsFnB;AAAA,SAAQ,QAAQ;AA3Ed,SAAK,QAAQ,CAAC;AACd,SAAK,QAAQ;AACb,SAAK,WAAW;AAChB,SAAK,WAAW;AAChB,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,aAAa;A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