contour-ds 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/build-manifest.json +57 -57
- package/dist/contour-wc.esm.js +53 -19
- package/dist/contour-wc.esm.min.js +1 -1
- package/dist/contour-wc.js +53 -19
- package/dist/contour-wc.min.js +1 -1
- package/dist/contour.components.json +832 -177
- package/dist/contour.css +988 -349
- package/dist/contour.min.css +1 -1
- package/dist/docs/actions.md +1 -1
- package/dist/docs/affordances.md +3 -1
- package/dist/docs/apireference.md +1 -1
- package/dist/docs/colour.md +1 -1
- package/dist/docs/componentindex.md +1 -1
- package/dist/docs/data.md +1 -1
- package/dist/docs/docs.md +1 -1
- package/dist/docs/feedback.md +1 -1
- package/dist/docs/field.md +1 -1
- package/dist/docs/forms.md +1 -1
- package/dist/docs/index.json +2 -2
- package/dist/docs/install.md +1 -1
- package/dist/docs/landing.md +1 -1
- package/dist/docs/mapengine.md +1 -1
- package/dist/docs/motion.md +1 -1
- package/dist/docs/navigation.md +1 -1
- package/dist/docs/overlays.md +1 -1
- package/dist/docs/overview.md +1 -1
- package/dist/docs/patterns.md +1 -1
- package/dist/docs/playground.md +1 -1
- package/dist/docs/principles.md +1 -1
- package/dist/docs/recipes.md +1 -1
- package/dist/docs/space.md +1 -1
- package/dist/docs/status.md +1 -1
- package/dist/docs/surfaces.md +1 -1
- package/dist/docs/theming.md +1 -1
- package/dist/docs/type.md +1 -1
- package/dist/docs/webcomponents.md +1 -1
- package/dist/registry/items/contour-core.json +2 -2
- package/dist/registry/items/contour-data.json +2 -2
- package/dist/registry/items/contour-docs.json +2 -2
- package/dist/registry/items/contour-landing.json +2 -2
- package/dist/registry/registry.json +8 -8
- package/dist/surfaces/contour-core.min.css +1 -1
- package/dist/surfaces/contour-data.min.css +1 -1
- package/dist/surfaces/contour-docs.min.css +1 -1
- package/dist/surfaces/contour-landing.min.css +1 -1
- package/dist/wc/content.mjs +1 -0
- package/dist/wc/data.mjs +32 -11
- package/dist/wc/forms.mjs +6 -2
- package/dist/wc/interaction.mjs +3 -1
- package/dist/wc/layout.mjs +2 -2
- package/dist/wc/navigation.mjs +1 -0
- package/dist/wc/ui.mjs +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
A token-driven design system for **spatial interfaces** — routing engines, pedestrian
|
|
7
7
|
simulators, map tooling and geospatial dashboards.
|
|
8
8
|
|
|
9
|
-
<!-- ds:components-line -->
|
|
9
|
+
<!-- ds:components-line -->225 components, 301 design tokens<!-- /ds:components-line -->, dark and light themes, zero runtime dependencies, no build step.
|
|
10
10
|
|
|
11
11
|
The [style guide](index.html) is the specification and the test suite.
|
|
12
12
|
|
package/dist/build-manifest.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"builtAt": "2026-11-
|
|
3
|
-
"sourceRevision": "
|
|
2
|
+
"builtAt": "2026-11-08T11:26:04.405Z",
|
|
3
|
+
"sourceRevision": "03589aa8e35c4e3165dee0f47b0438428592fcbf",
|
|
4
4
|
"sources": {
|
|
5
5
|
"src/css/base.css": {
|
|
6
|
-
"bytes":
|
|
7
|
-
"mtimeMs":
|
|
8
|
-
"sha256": "
|
|
6
|
+
"bytes": 12014,
|
|
7
|
+
"mtimeMs": 1794066800586.4963,
|
|
8
|
+
"sha256": "016f695235a92d35"
|
|
9
9
|
},
|
|
10
10
|
"src/css/components-data.css": {
|
|
11
|
-
"bytes":
|
|
12
|
-
"mtimeMs":
|
|
13
|
-
"sha256": "
|
|
11
|
+
"bytes": 89207,
|
|
12
|
+
"mtimeMs": 1794133716160.2607,
|
|
13
|
+
"sha256": "8c3eca7b3cc35142"
|
|
14
14
|
},
|
|
15
15
|
"src/css/components-docs.css": {
|
|
16
|
-
"bytes":
|
|
17
|
-
"mtimeMs":
|
|
18
|
-
"sha256": "
|
|
16
|
+
"bytes": 25540,
|
|
17
|
+
"mtimeMs": 1794070214344.0266,
|
|
18
|
+
"sha256": "b7f828d796273450"
|
|
19
19
|
},
|
|
20
20
|
"src/css/components-landing.css": {
|
|
21
|
-
"bytes":
|
|
22
|
-
"mtimeMs":
|
|
23
|
-
"sha256": "
|
|
21
|
+
"bytes": 13346,
|
|
22
|
+
"mtimeMs": 1794069203260.5918,
|
|
23
|
+
"sha256": "4340aabc7a122498"
|
|
24
24
|
},
|
|
25
25
|
"src/css/components-shell.css": {
|
|
26
|
-
"bytes":
|
|
27
|
-
"mtimeMs":
|
|
28
|
-
"sha256": "
|
|
26
|
+
"bytes": 18390,
|
|
27
|
+
"mtimeMs": 1794068752508.9558,
|
|
28
|
+
"sha256": "ab65a3d0c80fd6ed"
|
|
29
29
|
},
|
|
30
30
|
"src/css/components.css": {
|
|
31
|
-
"bytes":
|
|
32
|
-
"mtimeMs":
|
|
33
|
-
"sha256": "
|
|
31
|
+
"bytes": 132060,
|
|
32
|
+
"mtimeMs": 1794133716160.6199,
|
|
33
|
+
"sha256": "aef17aba75a84f0d"
|
|
34
34
|
},
|
|
35
35
|
"src/css/ds.css": {
|
|
36
36
|
"bytes": 2463,
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"sha256": "ae1f4a637a45c654"
|
|
59
59
|
},
|
|
60
60
|
"src/css/patterns.css": {
|
|
61
|
-
"bytes":
|
|
62
|
-
"mtimeMs":
|
|
63
|
-
"sha256": "
|
|
61
|
+
"bytes": 11600,
|
|
62
|
+
"mtimeMs": 1794069577637.285,
|
|
63
|
+
"sha256": "5be454a1a62e5d69"
|
|
64
64
|
},
|
|
65
65
|
"src/css/tokens.css": {
|
|
66
66
|
"bytes": 32375,
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"sha256": "d3a2ec049fe800cc"
|
|
69
69
|
},
|
|
70
70
|
"src/css/utilities.css": {
|
|
71
|
-
"bytes":
|
|
72
|
-
"mtimeMs":
|
|
73
|
-
"sha256": "
|
|
71
|
+
"bytes": 18339,
|
|
72
|
+
"mtimeMs": 1794068232641.1895,
|
|
73
|
+
"sha256": "08a9513d95959f73"
|
|
74
74
|
},
|
|
75
75
|
"src/css/fonts/OFL.txt": {
|
|
76
76
|
"bytes": 4360,
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
"sha256": "4a7c08eb750ba3ae"
|
|
124
124
|
},
|
|
125
125
|
"src/js/wc/content.mjs": {
|
|
126
|
-
"bytes":
|
|
127
|
-
"mtimeMs":
|
|
128
|
-
"sha256": "
|
|
126
|
+
"bytes": 47142,
|
|
127
|
+
"mtimeMs": 1794060378226.52,
|
|
128
|
+
"sha256": "9b8eec69bd6a4ecc"
|
|
129
129
|
},
|
|
130
130
|
"src/js/wc/core.mjs": {
|
|
131
131
|
"bytes": 56836,
|
|
@@ -138,9 +138,9 @@
|
|
|
138
138
|
"sha256": "4358e4e821859c8a"
|
|
139
139
|
},
|
|
140
140
|
"src/js/wc/data.mjs": {
|
|
141
|
-
"bytes":
|
|
142
|
-
"mtimeMs":
|
|
143
|
-
"sha256": "
|
|
141
|
+
"bytes": 194662,
|
|
142
|
+
"mtimeMs": 1794135461198.3801,
|
|
143
|
+
"sha256": "ac465b1fedb6873f"
|
|
144
144
|
},
|
|
145
145
|
"src/js/wc/docs.mjs": {
|
|
146
146
|
"bytes": 12380,
|
|
@@ -153,9 +153,9 @@
|
|
|
153
153
|
"sha256": "8b72bcd369a96757"
|
|
154
154
|
},
|
|
155
155
|
"src/js/wc/forms.mjs": {
|
|
156
|
-
"bytes":
|
|
157
|
-
"mtimeMs":
|
|
158
|
-
"sha256": "
|
|
156
|
+
"bytes": 60048,
|
|
157
|
+
"mtimeMs": 1794133980569.3723,
|
|
158
|
+
"sha256": "ffc2eb6cdfe62fb4"
|
|
159
159
|
},
|
|
160
160
|
"src/js/wc/index.mjs": {
|
|
161
161
|
"bytes": 2474,
|
|
@@ -163,14 +163,14 @@
|
|
|
163
163
|
"sha256": "3edffe7c30be7b0c"
|
|
164
164
|
},
|
|
165
165
|
"src/js/wc/interaction.mjs": {
|
|
166
|
-
"bytes":
|
|
167
|
-
"mtimeMs":
|
|
168
|
-
"sha256": "
|
|
166
|
+
"bytes": 25540,
|
|
167
|
+
"mtimeMs": 1794055717157.0818,
|
|
168
|
+
"sha256": "18a0b60ff1b2d3e6"
|
|
169
169
|
},
|
|
170
170
|
"src/js/wc/layout.mjs": {
|
|
171
|
-
"bytes":
|
|
172
|
-
"mtimeMs":
|
|
173
|
-
"sha256": "
|
|
171
|
+
"bytes": 8037,
|
|
172
|
+
"mtimeMs": 1794045343076.4202,
|
|
173
|
+
"sha256": "ed37e769dcb4bf4b"
|
|
174
174
|
},
|
|
175
175
|
"src/js/wc/map.mjs": {
|
|
176
176
|
"bytes": 65345,
|
|
@@ -183,9 +183,9 @@
|
|
|
183
183
|
"sha256": "636f9341019a702b"
|
|
184
184
|
},
|
|
185
185
|
"src/js/wc/navigation.mjs": {
|
|
186
|
-
"bytes":
|
|
187
|
-
"mtimeMs":
|
|
188
|
-
"sha256": "
|
|
186
|
+
"bytes": 81394,
|
|
187
|
+
"mtimeMs": 1794060378240.52,
|
|
188
|
+
"sha256": "927853eff17ba1ca"
|
|
189
189
|
},
|
|
190
190
|
"src/js/wc/registration.mjs": {
|
|
191
191
|
"bytes": 876,
|
|
@@ -208,9 +208,9 @@
|
|
|
208
208
|
"sha256": "e7a7fce22d5518f1"
|
|
209
209
|
},
|
|
210
210
|
"src/js/wc/ui.mjs": {
|
|
211
|
-
"bytes":
|
|
212
|
-
"mtimeMs":
|
|
213
|
-
"sha256": "
|
|
211
|
+
"bytes": 190814,
|
|
212
|
+
"mtimeMs": 1794060378253.6572,
|
|
213
|
+
"sha256": "9ff57f1d44334ce3"
|
|
214
214
|
},
|
|
215
215
|
"src/svg/contour-mark.svg": {
|
|
216
216
|
"bytes": 1727,
|
|
@@ -218,25 +218,25 @@
|
|
|
218
218
|
"sha256": "e3c004dac0dd251e"
|
|
219
219
|
},
|
|
220
220
|
"index.html": {
|
|
221
|
-
"bytes":
|
|
222
|
-
"mtimeMs":
|
|
223
|
-
"sha256": "
|
|
221
|
+
"bytes": 1389189,
|
|
222
|
+
"mtimeMs": 1794134938804.84,
|
|
223
|
+
"sha256": "1beb0033376e73f1"
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
"outputs": {
|
|
227
|
-
"contour.css":
|
|
228
|
-
"contour.min.css":
|
|
227
|
+
"contour.css": 384079,
|
|
228
|
+
"contour.min.css": 242990,
|
|
229
229
|
"contour.js": 64118,
|
|
230
230
|
"contour.min.js": 38957,
|
|
231
231
|
"contour.tokens.json": 51941,
|
|
232
232
|
"contour.themes.json": 23019,
|
|
233
|
-
"contour.components.json":
|
|
233
|
+
"contour.components.json": 284480,
|
|
234
234
|
"docs/index.json": 6965,
|
|
235
235
|
"registry/registry.json": 8952,
|
|
236
236
|
"svg/contour-mark.svg": 1727,
|
|
237
|
-
"surfaces/contour-core.min.css":
|
|
238
|
-
"surfaces/contour-docs.min.css":
|
|
239
|
-
"surfaces/contour-data.min.css":
|
|
240
|
-
"surfaces/contour-landing.min.css":
|
|
237
|
+
"surfaces/contour-core.min.css": 162908,
|
|
238
|
+
"surfaces/contour-docs.min.css": 179584,
|
|
239
|
+
"surfaces/contour-data.min.css": 217357,
|
|
240
|
+
"surfaces/contour-landing.min.css": 171665
|
|
241
241
|
}
|
|
242
242
|
}
|
package/dist/contour-wc.esm.js
CHANGED
|
@@ -3436,6 +3436,7 @@ class ContourShowcaseFull extends ContourBase {
|
|
|
3436
3436
|
static get properties() { return { title: { attribute: "title" }, text: { attribute: "text" }, media: { attribute: "media" }, reverse: { attribute: "reverse" }, items: { attribute: "items" }, src: { attribute: "src" } }; }
|
|
3437
3437
|
render() {
|
|
3438
3438
|
this.classList.add("c-showcase");
|
|
3439
|
+
this.setAttribute("role", "list");
|
|
3439
3440
|
if (this.hasAttribute("reverse")) this.classList.add("c-showcase--reverse"); else this.classList.remove("c-showcase--reverse");
|
|
3440
3441
|
const title = this.getAttribute("title");
|
|
3441
3442
|
if (title) this.setAttribute("aria-label", title);
|
|
@@ -4424,7 +4425,7 @@ class ContourTable extends ContourBase {
|
|
|
4424
4425
|
btn.className = "c-btn c-btn--ghost c-btn--sm";
|
|
4425
4426
|
btn.type = "button";
|
|
4426
4427
|
btn.textContent = this.getAttribute("retry") || "Retry";
|
|
4427
|
-
btn.
|
|
4428
|
+
btn.classList.add("u-ms-sm");
|
|
4428
4429
|
btn.dataset.action = "retry";
|
|
4429
4430
|
td.appendChild(btn);
|
|
4430
4431
|
}
|
|
@@ -4900,7 +4901,7 @@ class ContourChart extends ContourBase {
|
|
|
4900
4901
|
btn.type = "button";
|
|
4901
4902
|
btn.textContent = this.getAttribute("retry") || "Retry";
|
|
4902
4903
|
btn.dataset.action = "retry";
|
|
4903
|
-
btn.
|
|
4904
|
+
btn.classList.add("u-mbs-sm");
|
|
4904
4905
|
err.appendChild(btn);
|
|
4905
4906
|
}
|
|
4906
4907
|
plot.appendChild(err);
|
|
@@ -4921,7 +4922,7 @@ class ContourChart extends ContourBase {
|
|
|
4921
4922
|
sk.style.display = "block";
|
|
4922
4923
|
sk.style.inlineSize = "100%";
|
|
4923
4924
|
sk.style.blockSize = "0.6rem";
|
|
4924
|
-
sk.
|
|
4925
|
+
sk.classList.add("u-mbe-2xs");
|
|
4925
4926
|
plot.appendChild(sk);
|
|
4926
4927
|
}
|
|
4927
4928
|
const axis = this.getAttribute("axis");
|
|
@@ -6242,9 +6243,11 @@ class ContourDonut extends ContourBase {
|
|
|
6242
6243
|
// text list
|
|
6243
6244
|
const list = document.createElement("div");
|
|
6244
6245
|
list.className = "c-donut__list";
|
|
6246
|
+
list.setAttribute("role", "list");
|
|
6245
6247
|
items.forEach((it, i) => {
|
|
6246
6248
|
const row = document.createElement("div");
|
|
6247
6249
|
row.className = "c-donut__item";
|
|
6250
|
+
row.setAttribute("role", "listitem");
|
|
6248
6251
|
const sw = document.createElement("span");
|
|
6249
6252
|
sw.className = "c-donut__swatch";
|
|
6250
6253
|
sw.style.background = (typeof it === "object" && it.color) ? it.color : "var(--chart-" + ((i % 8) + 1) + ")";
|
|
@@ -6429,8 +6432,6 @@ class ContourPivot extends ContourBase {
|
|
|
6429
6432
|
const toolbar = document.createElement("div");
|
|
6430
6433
|
toolbar.className = "c-pivot__toolbar";
|
|
6431
6434
|
toolbar.style.display = "flex";
|
|
6432
|
-
toolbar.style.gap = "0.5rem";
|
|
6433
|
-
toolbar.style.marginBlockEnd = "0.5rem";
|
|
6434
6435
|
const filterInput = document.createElement("input");
|
|
6435
6436
|
filterInput.type = "search";
|
|
6436
6437
|
filterInput.className = "c-input c-pivot__filter";
|
|
@@ -6868,6 +6869,7 @@ class ContourMetricsFull extends ContourBase {
|
|
|
6868
6869
|
static get properties() { return { items: { attribute: "items" }, src: { attribute: "src" } }; }
|
|
6869
6870
|
render() {
|
|
6870
6871
|
this.classList.add("c-metrics");
|
|
6872
|
+
this.setAttribute("role", "list");
|
|
6871
6873
|
wireStates(this);
|
|
6872
6874
|
loadRemote(this, "items");
|
|
6873
6875
|
if (renderStates(this, "metrics")) return;
|
|
@@ -6880,6 +6882,7 @@ class ContourMetricsFull extends ContourBase {
|
|
|
6880
6882
|
parsed.forEach((it) => {
|
|
6881
6883
|
const item = document.createElement("div");
|
|
6882
6884
|
item.className = "c-metrics__item";
|
|
6885
|
+
item.setAttribute("role", "listitem");
|
|
6883
6886
|
const v = document.createElement("div");
|
|
6884
6887
|
v.className = "c-metrics__value";
|
|
6885
6888
|
v.textContent = (typeof it === "object" && it !== null) ? (it.value ?? it.v ?? "") : String(it);
|
|
@@ -6906,6 +6909,12 @@ class ContourLegend extends ContourBase {
|
|
|
6906
6909
|
static get properties() { return { title: { attribute: "title" }, ramp: { attribute: "ramp" }, scale: { attribute: "scale" }, items: { attribute: "items" }, method: { attribute: "method" }, norm: { attribute: "norm" }, selectable: { attribute: "selectable", type: Boolean }, src: { attribute: "src" } }; }
|
|
6907
6910
|
render() {
|
|
6908
6911
|
this.classList.add("c-legend");
|
|
6912
|
+
const continuous = this.hasAttribute("continuous");
|
|
6913
|
+
if (continuous || this.hasAttribute("selectable")) {
|
|
6914
|
+
this.setAttribute("role", "group");
|
|
6915
|
+
} else {
|
|
6916
|
+
this.setAttribute("role", "list");
|
|
6917
|
+
}
|
|
6909
6918
|
wireStates(this);
|
|
6910
6919
|
loadRemote(this, "items");
|
|
6911
6920
|
if (renderStates(this, "legend")) return;
|
|
@@ -6937,7 +6946,11 @@ class ContourLegend extends ContourBase {
|
|
|
6937
6946
|
try {
|
|
6938
6947
|
const parsed = JSON.parse(items);
|
|
6939
6948
|
const list = this.ensure(".c-legend__items", () => { const el = document.createElement("div"); el.className = "c-legend__items"; return el; });
|
|
6940
|
-
|
|
6949
|
+
if (this.hasAttribute("selectable")) {
|
|
6950
|
+
list.setAttribute("role", "group");
|
|
6951
|
+
} else {
|
|
6952
|
+
list.setAttribute("role", "listbox");
|
|
6953
|
+
}
|
|
6941
6954
|
if (title) list.setAttribute("aria-label", title);
|
|
6942
6955
|
list.innerHTML = "";
|
|
6943
6956
|
parsed.forEach((it) => {
|
|
@@ -6947,8 +6960,8 @@ class ContourLegend extends ContourBase {
|
|
|
6947
6960
|
item.className = "c-legend__item";
|
|
6948
6961
|
item.setAttribute("tabindex", "-1");
|
|
6949
6962
|
if (selectable) {
|
|
6950
|
-
item.setAttribute("role", "
|
|
6951
|
-
item.setAttribute("aria-
|
|
6963
|
+
item.setAttribute("role", "button");
|
|
6964
|
+
item.setAttribute("aria-pressed", "true");
|
|
6952
6965
|
item.dataset.key = key;
|
|
6953
6966
|
} else {
|
|
6954
6967
|
item.setAttribute("role", "option");
|
|
@@ -7166,8 +7179,17 @@ class ContourLegend extends ContourBase {
|
|
|
7166
7179
|
this.addEventListener("click", (e) => {
|
|
7167
7180
|
const btn = e.target && e.target.closest ? e.target.closest(".c-legend__item") : null;
|
|
7168
7181
|
if (!btn || !this.contains(btn)) return;
|
|
7169
|
-
|
|
7170
|
-
btn.
|
|
7182
|
+
let selected;
|
|
7183
|
+
const isPressed = btn.getAttribute("aria-pressed");
|
|
7184
|
+
if (btn.getAttribute("aria-pressed") !== null) {
|
|
7185
|
+
const pressed = btn.getAttribute("aria-pressed") !== "true";
|
|
7186
|
+
btn.setAttribute("aria-pressed", String(pressed));
|
|
7187
|
+
selected = pressed;
|
|
7188
|
+
} else {
|
|
7189
|
+
const selected2 = btn.getAttribute("aria-selected") !== "true";
|
|
7190
|
+
btn.setAttribute("aria-selected", String(selected2));
|
|
7191
|
+
selected = selected2;
|
|
7192
|
+
}
|
|
7171
7193
|
this.dispatchEvent(new CustomEvent("contour:legend-toggle", {
|
|
7172
7194
|
detail: { label: btn.textContent.trim(), key: btn.dataset.key || btn.textContent.trim(), pressed: selected },
|
|
7173
7195
|
bubbles: true,
|
|
@@ -7540,7 +7562,7 @@ class ContourCompare extends ContourBase {
|
|
|
7540
7562
|
this.classList.add("c-compare");
|
|
7541
7563
|
this.setAttribute("role", "group");
|
|
7542
7564
|
this.setAttribute("aria-label", "Comparison");
|
|
7543
|
-
|
|
7565
|
+
|
|
7544
7566
|
wireStates(this);
|
|
7545
7567
|
loadRemote(this, ["no", "text", "yes"]);
|
|
7546
7568
|
if (renderStates(this, "compare")) return;
|
|
@@ -9987,9 +10009,13 @@ class ContourInputFull extends ContourBase {
|
|
|
9987
10009
|
input.className = "c-input";
|
|
9988
10010
|
input.type = this.getAttribute("type") || "text";
|
|
9989
10011
|
input.placeholder = this.getAttribute("placeholder") || "";
|
|
9990
|
-
|
|
10012
|
+
let label = this.getAttribute("label");
|
|
10013
|
+
if (!label) {
|
|
10014
|
+
const field = this.closest("contour-field");
|
|
10015
|
+
if (field) label = field.getAttribute("label");
|
|
10016
|
+
}
|
|
9991
10017
|
if (label) input.setAttribute("aria-label", label);
|
|
9992
|
-
|
|
10018
|
+
else if (!input.getAttribute("aria-label")) input.setAttribute("aria-label", "Input");
|
|
9993
10019
|
if (this.hasAttribute("value")) input.value = this.getAttribute("value");
|
|
9994
10020
|
if (this.hasAttribute("required")) input.setAttribute("required", "");
|
|
9995
10021
|
else input.removeAttribute("required");
|
|
@@ -10236,6 +10262,7 @@ class ContourShortcutListFull extends ContourBase {
|
|
|
10236
10262
|
static get properties() { return { title: { attribute: "title" } }; }
|
|
10237
10263
|
render() {
|
|
10238
10264
|
this.classList.add("c-shortcut-list");
|
|
10265
|
+
this.setAttribute("role", "list");
|
|
10239
10266
|
const title = this.getAttribute("title");
|
|
10240
10267
|
if (title) {
|
|
10241
10268
|
const t = this.ensure(".c-shortcut-list__title", () => { const el = document.createElement("div"); el.className = "c-shortcut-list__title"; el.style.padding = "var(--space-sm)"; el.style.fontWeight = "var(--weight-semibold)"; return el; });
|
|
@@ -10249,6 +10276,7 @@ class ContourShortcutRowFull extends ContourBase {
|
|
|
10249
10276
|
static get properties() { return { desc: { attribute: "desc" }, key: { attribute: "key" } }; }
|
|
10250
10277
|
render() {
|
|
10251
10278
|
this.classList.add("c-shortcut-row");
|
|
10279
|
+
this.setAttribute("role", "listitem");
|
|
10252
10280
|
const key = this.getAttribute("key");
|
|
10253
10281
|
const desc = this.getAttribute("desc");
|
|
10254
10282
|
if (key) {
|
|
@@ -10293,7 +10321,7 @@ class ContourShortcutPanelFull extends ContourBase {
|
|
|
10293
10321
|
this.classList.add("c-shortcut-overlay");
|
|
10294
10322
|
const title = this.getAttribute("title");
|
|
10295
10323
|
if (title) {
|
|
10296
|
-
const t = this.ensure(".c-shortcut-overlay__title", () => { const el = document.createElement("div"); el.className = "c-shortcut-overlay__title";
|
|
10324
|
+
const t = this.ensure(".c-shortcut-overlay__title", () => { const el = document.createElement("div"); el.className = "c-shortcut-overlay__title"; return el; });
|
|
10297
10325
|
t.textContent = title;
|
|
10298
10326
|
}
|
|
10299
10327
|
if (this.hasAttribute("open")) this.removeAttribute("hidden");
|
|
@@ -10677,7 +10705,7 @@ class ContourBtn extends ContourBase {
|
|
|
10677
10705
|
const header = this.ensure(".c-app__header", () => { const el = document.createElement("header"); el.className = "c-app__header"; return el; });
|
|
10678
10706
|
const title = this.getAttribute("title");
|
|
10679
10707
|
if (title) {
|
|
10680
|
-
const t = this.ensure(".c-app__title", () => { const el = document.createElement("div"); el.className = "c-app__title";
|
|
10708
|
+
const t = this.ensure(".c-app__title", () => { const el = document.createElement("div"); el.className = "c-app__title"; return el; });
|
|
10681
10709
|
t.textContent = title;
|
|
10682
10710
|
if (t.parentNode !== header) header.appendChild(t);
|
|
10683
10711
|
}
|
|
@@ -10695,7 +10723,7 @@ class ContourBtn extends ContourBase {
|
|
|
10695
10723
|
const main = this.ensure(".c-app-body__main", () => { const el = document.createElement("main"); el.className = "c-app-body__main"; return el; });
|
|
10696
10724
|
const title = this.getAttribute("title");
|
|
10697
10725
|
if (title) {
|
|
10698
|
-
const t = this.ensure(".c-app-body__title", () => { const el = document.createElement("div"); el.className = "c-app-body__title";
|
|
10726
|
+
const t = this.ensure(".c-app-body__title", () => { const el = document.createElement("div"); el.className = "c-app-body__title"; return el; });
|
|
10699
10727
|
t.textContent = title;
|
|
10700
10728
|
if (t.parentNode !== main) main.appendChild(t);
|
|
10701
10729
|
}
|
|
@@ -13181,6 +13209,7 @@ class ContourTocFull extends ContourBase {
|
|
|
13181
13209
|
static get properties() { return { title: { attribute: "title" }, items: { attribute: "items" }, src: { attribute: "src" } }; }
|
|
13182
13210
|
render() {
|
|
13183
13211
|
this.classList.add("c-toc");
|
|
13212
|
+
this.setAttribute("role", "list");
|
|
13184
13213
|
wireStates(this);
|
|
13185
13214
|
loadRemote(this, "items");
|
|
13186
13215
|
if (renderStates(this, "toc")) return;
|
|
@@ -13934,6 +13963,8 @@ class ContourAvatar extends ContourBase {
|
|
|
13934
13963
|
img.className = "c-avatar__img";
|
|
13935
13964
|
img.src = src;
|
|
13936
13965
|
img.alt = name || "";
|
|
13966
|
+
img.loading = "lazy";
|
|
13967
|
+
img.decoding = "async";
|
|
13937
13968
|
this.appendChild(img);
|
|
13938
13969
|
} else if (name) {
|
|
13939
13970
|
const initials = name.split(" ").map((w) => w[0]).join("").toUpperCase().slice(0, 2);
|
|
@@ -15020,7 +15051,7 @@ class ContourStylePanel extends ContourBase {
|
|
|
15020
15051
|
body.appendChild(list);
|
|
15021
15052
|
}
|
|
15022
15053
|
// Apply/Revert buttons
|
|
15023
|
-
const actions = document.createElement("div"); actions.className = "c-style-panel__actions";
|
|
15054
|
+
const actions = document.createElement("div"); actions.className = "c-style-panel__actions c-btn-group";
|
|
15024
15055
|
const applyBtn = document.createElement("button"); applyBtn.type = "button"; applyBtn.className = "c-btn c-btn--primary"; applyBtn.textContent = "Apply";
|
|
15025
15056
|
const revertBtn = document.createElement("button"); revertBtn.type = "button"; revertBtn.className = "c-btn"; revertBtn.textContent = "Revert";
|
|
15026
15057
|
actions.appendChild(applyBtn); actions.appendChild(revertBtn);
|
|
@@ -16095,6 +16126,8 @@ class ContourFileUpload extends ContourBase {
|
|
|
16095
16126
|
const img = document.createElement("img");
|
|
16096
16127
|
img.className = "c-file-upload__preview-thumb";
|
|
16097
16128
|
img.alt = f.name;
|
|
16129
|
+
img.loading = "lazy";
|
|
16130
|
+
img.decoding = "async";
|
|
16098
16131
|
try { img.src = URL.createObjectURL(f); } catch (e) {}
|
|
16099
16132
|
item.appendChild(img);
|
|
16100
16133
|
} else {
|
|
@@ -16124,6 +16157,7 @@ class ContourNotificationCenter extends ContourBase {
|
|
|
16124
16157
|
static get properties() { return { count: { attribute: "count" }, items: { attribute: "items" }, color: { attribute: "color" } }; }
|
|
16125
16158
|
render() {
|
|
16126
16159
|
this.classList.add("c-notification-center");
|
|
16160
|
+
this.setAttribute("role", "list");
|
|
16127
16161
|
const btn = this.ensure(".c-notification-center__trigger", () => { const el = document.createElement("button"); el.className = "c-btn c-btn--sm c-notification-center__trigger"; el.type = "button"; el.innerHTML = '<span class="c-notification-center__bullet" aria-hidden="true"></span>'; el.setAttribute("aria-haspopup", "dialog"); el.setAttribute("aria-expanded", "false"); return el; });
|
|
16128
16162
|
const color = this.getAttribute("color");
|
|
16129
16163
|
const bullet = btn.querySelector(".c-notification-center__bullet");
|
|
@@ -16227,7 +16261,7 @@ class ContourStepper extends ContourBase {
|
|
|
16227
16261
|
li.textContent = typeof s === "string" ? s : (s.title || s.label || "");
|
|
16228
16262
|
list.appendChild(li);
|
|
16229
16263
|
});
|
|
16230
|
-
const nav = this.ensure(".c-stepper__nav", () => { const el = document.createElement("div"); el.className = "c-stepper__nav"; return el; });
|
|
16264
|
+
const nav = this.ensure(".c-stepper__nav", () => { const el = document.createElement("div"); el.className = "c-stepper__nav c-btn-group"; return el; });
|
|
16231
16265
|
const prev = this.ensure(".c-stepper__prev", () => { const el = document.createElement("button"); el.className = "c-btn c-btn--sm c-stepper__prev"; el.type = "button"; el.textContent = "Back"; return el; });
|
|
16232
16266
|
const next = this.ensure(".c-stepper__next", () => { const el = document.createElement("button"); el.className = "c-btn c-btn--sm c-stepper__next"; el.type = "button"; el.textContent = "Next"; return el; });
|
|
16233
16267
|
if (!nav.contains(prev)) nav.appendChild(prev);
|
|
@@ -16625,7 +16659,7 @@ class ContourTour extends ContourBase {
|
|
|
16625
16659
|
const step = parsed[current] || {};
|
|
16626
16660
|
const tip = this.ensure(".c-tour__tip", () => { const el = document.createElement("div"); el.className = "c-tour__tip"; return el; });
|
|
16627
16661
|
tip.textContent = typeof step === "string" ? step : (step.text || step.title || "");
|
|
16628
|
-
const nav = this.ensure(".c-tour__nav", () => { const el = document.createElement("div"); el.className = "c-tour__nav"; return el; });
|
|
16662
|
+
const nav = this.ensure(".c-tour__nav", () => { const el = document.createElement("div"); el.className = "c-tour__nav c-btn-group"; return el; });
|
|
16629
16663
|
const next = this.ensure(".c-tour__next", () => { const el = document.createElement("button"); el.className = "c-btn c-btn--sm c-tour__next"; el.type = "button"; el.textContent = "Next"; return el; });
|
|
16630
16664
|
if (!nav.contains(next)) nav.appendChild(next);
|
|
16631
16665
|
}
|