@esri/calcite-components 1.0.0-next.408 → 1.0.0-next.410
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/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-8f93be14.system.js +1 -1
- package/dist/calcite/p-a6261f6b.system.entry.js +5 -0
- package/dist/calcite/p-d2a1cbbf.entry.js +5 -0
- package/dist/calcite/{p-bac18793.system.entry.js → p-eb43eb28.system.entry.js} +1 -1
- package/dist/calcite/p-fad60503.entry.js +5 -0
- package/dist/cjs/calcite-graph_2.cjs.entry.js +26 -26
- package/dist/cjs/calcite-tree_2.cjs.entry.js +55 -55
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/slider/slider.js +26 -26
- package/dist/collection/components/tree/tree.js +61 -0
- package/dist/collection/components/tree-item/tree-item.js +0 -55
- package/dist/components/calcite-slider.js +26 -26
- package/dist/components/calcite-tree-item.js +0 -55
- package/dist/components/calcite-tree.js +56 -1
- package/dist/custom-elements/index.js +82 -82
- package/dist/esm/calcite-graph_2.entry.js +26 -26
- package/dist/esm/calcite-tree_2.entry.js +55 -55
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/extras/docs-json.json +6 -1
- package/dist/types/components/slider/slider.d.ts +2 -2
- package/dist/types/components/tree/tree.d.ts +1 -0
- package/hydrate/index.js +82 -82
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/calcite/p-03a6680c.entry.js +0 -5
- package/dist/calcite/p-38c4fbab.system.entry.js +0 -5
- package/dist/calcite/p-5ea8668d.entry.js +0 -5
|
@@ -156,106 +156,106 @@ export class Slider {
|
|
|
156
156
|
const mirror = this.shouldMirror();
|
|
157
157
|
const leftThumbOffset = `${mirror ? 100 - minInterval : minInterval}%`;
|
|
158
158
|
const rightThumbOffset = `${mirror ? maxInterval : 100 - maxInterval}%`;
|
|
159
|
-
const handle = (h("
|
|
159
|
+
const handle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
160
160
|
thumb: true,
|
|
161
161
|
"thumb--value": true,
|
|
162
162
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
|
|
163
|
-
},
|
|
163
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
164
164
|
h("div", { class: "handle" })));
|
|
165
|
-
const labeledHandle = (h("
|
|
165
|
+
const labeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
166
166
|
thumb: true,
|
|
167
167
|
"thumb--value": true,
|
|
168
168
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
|
|
169
|
-
},
|
|
169
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
170
170
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value),
|
|
171
171
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value),
|
|
172
172
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value),
|
|
173
173
|
h("div", { class: "handle" })));
|
|
174
|
-
const histogramLabeledHandle = (h("
|
|
174
|
+
const histogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
175
175
|
thumb: true,
|
|
176
176
|
"thumb--value": true,
|
|
177
177
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
|
|
178
|
-
},
|
|
178
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
179
179
|
h("div", { class: "handle" }),
|
|
180
180
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value),
|
|
181
181
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value),
|
|
182
182
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value)));
|
|
183
|
-
const preciseHandle = (h("
|
|
183
|
+
const preciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
184
184
|
thumb: true,
|
|
185
185
|
"thumb--value": true,
|
|
186
186
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
187
187
|
"thumb--precise": true
|
|
188
|
-
},
|
|
188
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
189
189
|
h("div", { class: "handle" }),
|
|
190
190
|
h("div", { class: "handle-extension" })));
|
|
191
|
-
const histogramPreciseHandle = (h("
|
|
191
|
+
const histogramPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
192
192
|
thumb: true,
|
|
193
193
|
"thumb--value": true,
|
|
194
194
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
195
195
|
"thumb--precise": true
|
|
196
|
-
},
|
|
196
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
197
197
|
h("div", { class: "handle-extension" }),
|
|
198
198
|
h("div", { class: "handle" })));
|
|
199
|
-
const labeledPreciseHandle = (h("
|
|
199
|
+
const labeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
200
200
|
thumb: true,
|
|
201
201
|
"thumb--value": true,
|
|
202
202
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
203
203
|
"thumb--precise": true
|
|
204
|
-
},
|
|
204
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
205
205
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value),
|
|
206
206
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value),
|
|
207
207
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value),
|
|
208
208
|
h("div", { class: "handle" }),
|
|
209
209
|
h("div", { class: "handle-extension" })));
|
|
210
|
-
const histogramLabeledPreciseHandle = (h("
|
|
210
|
+
const histogramLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
211
211
|
thumb: true,
|
|
212
212
|
"thumb--value": true,
|
|
213
213
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
214
214
|
"thumb--precise": true
|
|
215
|
-
},
|
|
215
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 },
|
|
216
216
|
h("div", { class: "handle-extension" }),
|
|
217
217
|
h("div", { class: "handle" }),
|
|
218
218
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value),
|
|
219
219
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value),
|
|
220
220
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value)));
|
|
221
|
-
const minHandle = (h("
|
|
221
|
+
const minHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
222
222
|
thumb: true,
|
|
223
223
|
"thumb--minValue": true,
|
|
224
224
|
"thumb--active": this.dragProp === "minValue"
|
|
225
|
-
},
|
|
225
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 },
|
|
226
226
|
h("div", { class: "handle" })));
|
|
227
|
-
const minLabeledHandle = (h("
|
|
227
|
+
const minLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
228
228
|
thumb: true,
|
|
229
229
|
"thumb--minValue": true,
|
|
230
230
|
"thumb--active": this.dragProp === "minValue"
|
|
231
|
-
},
|
|
231
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 },
|
|
232
232
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue" }, this.minValue && this.minValue.toLocaleString()),
|
|
233
233
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue static" }, this.minValue && this.minValue.toLocaleString()),
|
|
234
234
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue transformed" }, this.minValue && this.minValue.toLocaleString()),
|
|
235
235
|
h("div", { class: "handle" })));
|
|
236
|
-
const minHistogramLabeledHandle = (h("
|
|
236
|
+
const minHistogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
237
237
|
thumb: true,
|
|
238
238
|
"thumb--minValue": true,
|
|
239
239
|
"thumb--active": this.dragProp === "minValue"
|
|
240
|
-
},
|
|
240
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 },
|
|
241
241
|
h("div", { class: "handle" }),
|
|
242
242
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue" }, this.minValue && this.minValue.toLocaleString()),
|
|
243
243
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue static" }, this.minValue && this.minValue.toLocaleString()),
|
|
244
244
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue transformed" }, this.minValue && this.minValue.toLocaleString())));
|
|
245
|
-
const minPreciseHandle = (h("
|
|
245
|
+
const minPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
246
246
|
thumb: true,
|
|
247
247
|
"thumb--minValue": true,
|
|
248
248
|
"thumb--active": this.dragProp === "minValue",
|
|
249
249
|
"thumb--precise": true
|
|
250
|
-
},
|
|
250
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 },
|
|
251
251
|
h("div", { class: "handle-extension" }),
|
|
252
252
|
h("div", { class: "handle" })));
|
|
253
|
-
const minLabeledPreciseHandle = (h("
|
|
253
|
+
const minLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
254
254
|
thumb: true,
|
|
255
255
|
"thumb--minValue": true,
|
|
256
256
|
"thumb--active": this.dragProp === "minValue",
|
|
257
257
|
"thumb--precise": true
|
|
258
|
-
},
|
|
258
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 },
|
|
259
259
|
h("div", { class: "handle-extension" }),
|
|
260
260
|
h("div", { class: "handle" }),
|
|
261
261
|
h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue" }, this.minValue && this.minValue.toLocaleString()),
|
|
@@ -753,7 +753,7 @@ export class Slider {
|
|
|
753
753
|
return Math.max(rangeLabelOverlap, 0);
|
|
754
754
|
}
|
|
755
755
|
/**
|
|
756
|
-
* Returns a boolean value representing if the minLabel span element is obscured (being overlapped) by the given handle
|
|
756
|
+
* Returns a boolean value representing if the minLabel span element is obscured (being overlapped) by the given handle div element.
|
|
757
757
|
* @param minLabel
|
|
758
758
|
* @param handle
|
|
759
759
|
*/
|
|
@@ -763,7 +763,7 @@ export class Slider {
|
|
|
763
763
|
return intersects(minLabelBounds, handleBounds);
|
|
764
764
|
}
|
|
765
765
|
/**
|
|
766
|
-
* Returns a boolean value representing if the maxLabel span element is obscured (being overlapped) by the given handle
|
|
766
|
+
* Returns a boolean value representing if the maxLabel span element is obscured (being overlapped) by the given handle div element.
|
|
767
767
|
* @param maxLabel
|
|
768
768
|
* @param handle
|
|
769
769
|
*/
|
|
@@ -145,6 +145,61 @@ export class Tree {
|
|
|
145
145
|
selected: nodeListToArray(this.el.querySelectorAll("calcite-tree-item")).filter((i) => i.selected)
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
+
keyDownHandler(event) {
|
|
149
|
+
var _a;
|
|
150
|
+
const root = this.el.closest("calcite-tree:not([child])");
|
|
151
|
+
const target = event.target;
|
|
152
|
+
if (root === this.el && target.tagName === "CALCITE-TREE-ITEM" && this.el.contains(target)) {
|
|
153
|
+
switch (event.key) {
|
|
154
|
+
case "ArrowDown":
|
|
155
|
+
const next = target.nextElementSibling;
|
|
156
|
+
if (next && next.matches("calcite-tree-item")) {
|
|
157
|
+
next.focus();
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
}
|
|
160
|
+
break;
|
|
161
|
+
case "ArrowLeft":
|
|
162
|
+
// When focus is on an open node, closes the node.
|
|
163
|
+
if (target.hasChildren && target.expanded) {
|
|
164
|
+
target.expanded = false;
|
|
165
|
+
event.preventDefault();
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
// When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.
|
|
169
|
+
const parentItem = target.parentElement.closest("calcite-tree-item");
|
|
170
|
+
if (parentItem && (!target.hasChildren || target.expanded === false)) {
|
|
171
|
+
parentItem.focus();
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
// When focus is on a root node that is also either an end node or a closed node, does nothing.
|
|
176
|
+
break;
|
|
177
|
+
case "ArrowRight":
|
|
178
|
+
if (!target.hasChildren) {
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
if (target.expanded && document.activeElement === target) {
|
|
182
|
+
// When focus is on an open node, moves focus to the first child node.
|
|
183
|
+
(_a = target.querySelector("calcite-tree-item")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
// When focus is on a closed node, opens the node; focus does not move.
|
|
188
|
+
target.expanded = true;
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
}
|
|
191
|
+
// When focus is on an end node, does nothing.
|
|
192
|
+
break;
|
|
193
|
+
case "ArrowUp":
|
|
194
|
+
const previous = target.previousElementSibling;
|
|
195
|
+
if (previous && previous.matches("calcite-tree-item")) {
|
|
196
|
+
previous.focus();
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
148
203
|
updateAncestorTree(e) {
|
|
149
204
|
const item = e.target;
|
|
150
205
|
const children = item.querySelectorAll("calcite-tree-item");
|
|
@@ -358,5 +413,11 @@ export class Tree {
|
|
|
358
413
|
"target": undefined,
|
|
359
414
|
"capture": false,
|
|
360
415
|
"passive": false
|
|
416
|
+
}, {
|
|
417
|
+
"name": "keydown",
|
|
418
|
+
"method": "keyDownHandler",
|
|
419
|
+
"target": undefined,
|
|
420
|
+
"capture": false,
|
|
421
|
+
"passive": false
|
|
361
422
|
}]; }
|
|
362
423
|
}
|
|
@@ -32,12 +32,6 @@ export class TreeItem {
|
|
|
32
32
|
this.iconClickHandler = (event) => {
|
|
33
33
|
event.stopPropagation();
|
|
34
34
|
this.expanded = !this.expanded;
|
|
35
|
-
if (this.selectionMode !== TreeSelectionMode.Ancestors) {
|
|
36
|
-
this.calciteTreeItemSelect.emit({
|
|
37
|
-
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
38
|
-
forceToggle: true
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
35
|
};
|
|
42
36
|
this.childrenClickHandler = (event) => event.stopPropagation();
|
|
43
37
|
//--------------------------------------------------------------------------
|
|
@@ -172,7 +166,6 @@ export class TreeItem {
|
|
|
172
166
|
});
|
|
173
167
|
}
|
|
174
168
|
keyDownHandler(e) {
|
|
175
|
-
var _a;
|
|
176
169
|
let root;
|
|
177
170
|
switch (e.key) {
|
|
178
171
|
case " ":
|
|
@@ -181,7 +174,6 @@ export class TreeItem {
|
|
|
181
174
|
forceToggle: false
|
|
182
175
|
});
|
|
183
176
|
e.preventDefault();
|
|
184
|
-
e.stopPropagation();
|
|
185
177
|
break;
|
|
186
178
|
case "Enter":
|
|
187
179
|
// activates a node, i.e., performs its default action. For parent nodes, one possible default action is to open or close the node. In single-select trees where selection does not follow focus (see note below), the default action is typically to select the focused node.
|
|
@@ -197,53 +189,6 @@ export class TreeItem {
|
|
|
197
189
|
});
|
|
198
190
|
}
|
|
199
191
|
e.preventDefault();
|
|
200
|
-
e.stopPropagation();
|
|
201
|
-
break;
|
|
202
|
-
case "ArrowLeft":
|
|
203
|
-
// When focus is on an open node, closes the node.
|
|
204
|
-
if (this.hasChildren && this.expanded) {
|
|
205
|
-
this.expanded = false;
|
|
206
|
-
e.preventDefault();
|
|
207
|
-
e.stopPropagation();
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
// When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.
|
|
211
|
-
const parentItem = this.parentTreeItem;
|
|
212
|
-
if (parentItem && (!this.hasChildren || this.expanded === false)) {
|
|
213
|
-
parentItem.focus();
|
|
214
|
-
e.preventDefault();
|
|
215
|
-
e.stopPropagation();
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
// When focus is on a root node that is also either an end node or a closed node, does nothing.
|
|
219
|
-
break;
|
|
220
|
-
case "ArrowRight":
|
|
221
|
-
// When focus is on a closed node, opens the node; focus does not move.
|
|
222
|
-
if (this.hasChildren && this.expanded === false) {
|
|
223
|
-
this.expanded = true;
|
|
224
|
-
e.preventDefault();
|
|
225
|
-
e.stopPropagation();
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
// When focus is on a open node, moves focus to the first child node.
|
|
229
|
-
if (this.hasChildren && this.expanded) {
|
|
230
|
-
(_a = this.el.querySelector("calcite-tree-item")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
231
|
-
e.stopPropagation();
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
// When focus is on an end node, does nothing.
|
|
235
|
-
break;
|
|
236
|
-
case "ArrowUp":
|
|
237
|
-
const previous = this.el.previousElementSibling;
|
|
238
|
-
if (previous && previous.matches("calcite-tree-item")) {
|
|
239
|
-
previous.focus();
|
|
240
|
-
}
|
|
241
|
-
break;
|
|
242
|
-
case "ArrowDown":
|
|
243
|
-
const next = this.el.nextElementSibling;
|
|
244
|
-
if (next && next.matches("calcite-tree-item")) {
|
|
245
|
-
next.focus();
|
|
246
|
-
}
|
|
247
192
|
break;
|
|
248
193
|
case "Home":
|
|
249
194
|
root = this.el.closest("calcite-tree:not([child])");
|
|
@@ -166,72 +166,72 @@ let Slider = class extends HTMLElement {
|
|
|
166
166
|
const mirror = this.shouldMirror();
|
|
167
167
|
const leftThumbOffset = `${mirror ? 100 - minInterval : minInterval}%`;
|
|
168
168
|
const rightThumbOffset = `${mirror ? maxInterval : 100 - maxInterval}%`;
|
|
169
|
-
const handle = (h("
|
|
169
|
+
const handle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
170
170
|
thumb: true,
|
|
171
171
|
"thumb--value": true,
|
|
172
172
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
|
|
173
|
-
},
|
|
174
|
-
const labeledHandle = (h("
|
|
173
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" })));
|
|
174
|
+
const labeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
175
175
|
thumb: true,
|
|
176
176
|
"thumb--value": true,
|
|
177
177
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
|
|
178
|
-
},
|
|
179
|
-
const histogramLabeledHandle = (h("
|
|
178
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value), h("div", { class: "handle" })));
|
|
179
|
+
const histogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
180
180
|
thumb: true,
|
|
181
181
|
"thumb--value": true,
|
|
182
182
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
|
|
183
|
-
},
|
|
184
|
-
const preciseHandle = (h("
|
|
183
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value)));
|
|
184
|
+
const preciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
185
185
|
thumb: true,
|
|
186
186
|
"thumb--value": true,
|
|
187
187
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
188
188
|
"thumb--precise": true
|
|
189
|
-
},
|
|
190
|
-
const histogramPreciseHandle = (h("
|
|
189
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" }), h("div", { class: "handle-extension" })));
|
|
190
|
+
const histogramPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
191
191
|
thumb: true,
|
|
192
192
|
"thumb--value": true,
|
|
193
193
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
194
194
|
"thumb--precise": true
|
|
195
|
-
},
|
|
196
|
-
const labeledPreciseHandle = (h("
|
|
195
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" })));
|
|
196
|
+
const labeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
197
197
|
thumb: true,
|
|
198
198
|
"thumb--value": true,
|
|
199
199
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
200
200
|
"thumb--precise": true
|
|
201
|
-
},
|
|
202
|
-
const histogramLabeledPreciseHandle = (h("
|
|
201
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value), h("div", { class: "handle" }), h("div", { class: "handle-extension" })));
|
|
202
|
+
const histogramLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.isRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
|
|
203
203
|
thumb: true,
|
|
204
204
|
"thumb--value": true,
|
|
205
205
|
"thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
|
|
206
206
|
"thumb--precise": true
|
|
207
|
-
},
|
|
208
|
-
const minHandle = (h("
|
|
207
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: () => this.dragStart(maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value static" }, value ? value.toLocaleString() : value), h("span", { "aria-hidden": "true", class: "handle__label handle__label--value transformed" }, value ? value.toLocaleString() : value)));
|
|
208
|
+
const minHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
209
209
|
thumb: true,
|
|
210
210
|
"thumb--minValue": true,
|
|
211
211
|
"thumb--active": this.dragProp === "minValue"
|
|
212
|
-
},
|
|
213
|
-
const minLabeledHandle = (h("
|
|
212
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" })));
|
|
213
|
+
const minLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
214
214
|
thumb: true,
|
|
215
215
|
"thumb--minValue": true,
|
|
216
216
|
"thumb--active": this.dragProp === "minValue"
|
|
217
|
-
},
|
|
218
|
-
const minHistogramLabeledHandle = (h("
|
|
217
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue" }, this.minValue && this.minValue.toLocaleString()), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue static" }, this.minValue && this.minValue.toLocaleString()), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue transformed" }, this.minValue && this.minValue.toLocaleString()), h("div", { class: "handle" })));
|
|
218
|
+
const minHistogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
219
219
|
thumb: true,
|
|
220
220
|
"thumb--minValue": true,
|
|
221
221
|
"thumb--active": this.dragProp === "minValue"
|
|
222
|
-
},
|
|
223
|
-
const minPreciseHandle = (h("
|
|
222
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue" }, this.minValue && this.minValue.toLocaleString()), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue static" }, this.minValue && this.minValue.toLocaleString()), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue transformed" }, this.minValue && this.minValue.toLocaleString())));
|
|
223
|
+
const minPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
224
224
|
thumb: true,
|
|
225
225
|
"thumb--minValue": true,
|
|
226
226
|
"thumb--active": this.dragProp === "minValue",
|
|
227
227
|
"thumb--precise": true
|
|
228
|
-
},
|
|
229
|
-
const minLabeledPreciseHandle = (h("
|
|
228
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" })));
|
|
229
|
+
const minLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": this.minValue, class: {
|
|
230
230
|
thumb: true,
|
|
231
231
|
"thumb--minValue": true,
|
|
232
232
|
"thumb--active": this.dragProp === "minValue",
|
|
233
233
|
"thumb--precise": true
|
|
234
|
-
},
|
|
234
|
+
}, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: () => this.dragStart("minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue" }, this.minValue && this.minValue.toLocaleString()), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue static" }, this.minValue && this.minValue.toLocaleString()), h("span", { "aria-hidden": "true", class: "handle__label handle__label--minValue transformed" }, this.minValue && this.minValue.toLocaleString())));
|
|
235
235
|
return (h(Host, { id: id, onTouchStart: this.handleTouchStart }, h("div", { class: {
|
|
236
236
|
["container"]: true,
|
|
237
237
|
["container--range"]: this.isRange,
|
|
@@ -703,7 +703,7 @@ let Slider = class extends HTMLElement {
|
|
|
703
703
|
return Math.max(rangeLabelOverlap, 0);
|
|
704
704
|
}
|
|
705
705
|
/**
|
|
706
|
-
* Returns a boolean value representing if the minLabel span element is obscured (being overlapped) by the given handle
|
|
706
|
+
* Returns a boolean value representing if the minLabel span element is obscured (being overlapped) by the given handle div element.
|
|
707
707
|
* @param minLabel
|
|
708
708
|
* @param handle
|
|
709
709
|
*/
|
|
@@ -713,7 +713,7 @@ let Slider = class extends HTMLElement {
|
|
|
713
713
|
return intersects(minLabelBounds, handleBounds);
|
|
714
714
|
}
|
|
715
715
|
/**
|
|
716
|
-
* Returns a boolean value representing if the maxLabel span element is obscured (being overlapped) by the given handle
|
|
716
|
+
* Returns a boolean value representing if the maxLabel span element is obscured (being overlapped) by the given handle div element.
|
|
717
717
|
* @param maxLabel
|
|
718
718
|
* @param handle
|
|
719
719
|
*/
|
|
@@ -53,12 +53,6 @@ let TreeItem = class extends HTMLElement {
|
|
|
53
53
|
this.iconClickHandler = (event) => {
|
|
54
54
|
event.stopPropagation();
|
|
55
55
|
this.expanded = !this.expanded;
|
|
56
|
-
if (this.selectionMode !== TreeSelectionMode.Ancestors) {
|
|
57
|
-
this.calciteTreeItemSelect.emit({
|
|
58
|
-
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
59
|
-
forceToggle: true
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
56
|
};
|
|
63
57
|
this.childrenClickHandler = (event) => event.stopPropagation();
|
|
64
58
|
//--------------------------------------------------------------------------
|
|
@@ -185,7 +179,6 @@ let TreeItem = class extends HTMLElement {
|
|
|
185
179
|
});
|
|
186
180
|
}
|
|
187
181
|
keyDownHandler(e) {
|
|
188
|
-
var _a;
|
|
189
182
|
let root;
|
|
190
183
|
switch (e.key) {
|
|
191
184
|
case " ":
|
|
@@ -194,7 +187,6 @@ let TreeItem = class extends HTMLElement {
|
|
|
194
187
|
forceToggle: false
|
|
195
188
|
});
|
|
196
189
|
e.preventDefault();
|
|
197
|
-
e.stopPropagation();
|
|
198
190
|
break;
|
|
199
191
|
case "Enter":
|
|
200
192
|
// activates a node, i.e., performs its default action. For parent nodes, one possible default action is to open or close the node. In single-select trees where selection does not follow focus (see note below), the default action is typically to select the focused node.
|
|
@@ -210,53 +202,6 @@ let TreeItem = class extends HTMLElement {
|
|
|
210
202
|
});
|
|
211
203
|
}
|
|
212
204
|
e.preventDefault();
|
|
213
|
-
e.stopPropagation();
|
|
214
|
-
break;
|
|
215
|
-
case "ArrowLeft":
|
|
216
|
-
// When focus is on an open node, closes the node.
|
|
217
|
-
if (this.hasChildren && this.expanded) {
|
|
218
|
-
this.expanded = false;
|
|
219
|
-
e.preventDefault();
|
|
220
|
-
e.stopPropagation();
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
// When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.
|
|
224
|
-
const parentItem = this.parentTreeItem;
|
|
225
|
-
if (parentItem && (!this.hasChildren || this.expanded === false)) {
|
|
226
|
-
parentItem.focus();
|
|
227
|
-
e.preventDefault();
|
|
228
|
-
e.stopPropagation();
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
// When focus is on a root node that is also either an end node or a closed node, does nothing.
|
|
232
|
-
break;
|
|
233
|
-
case "ArrowRight":
|
|
234
|
-
// When focus is on a closed node, opens the node; focus does not move.
|
|
235
|
-
if (this.hasChildren && this.expanded === false) {
|
|
236
|
-
this.expanded = true;
|
|
237
|
-
e.preventDefault();
|
|
238
|
-
e.stopPropagation();
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
// When focus is on a open node, moves focus to the first child node.
|
|
242
|
-
if (this.hasChildren && this.expanded) {
|
|
243
|
-
(_a = this.el.querySelector("calcite-tree-item")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
244
|
-
e.stopPropagation();
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
// When focus is on an end node, does nothing.
|
|
248
|
-
break;
|
|
249
|
-
case "ArrowUp":
|
|
250
|
-
const previous = this.el.previousElementSibling;
|
|
251
|
-
if (previous && previous.matches("calcite-tree-item")) {
|
|
252
|
-
previous.focus();
|
|
253
|
-
}
|
|
254
|
-
break;
|
|
255
|
-
case "ArrowDown":
|
|
256
|
-
const next = this.el.nextElementSibling;
|
|
257
|
-
if (next && next.matches("calcite-tree-item")) {
|
|
258
|
-
next.focus();
|
|
259
|
-
}
|
|
260
205
|
break;
|
|
261
206
|
case "Home":
|
|
262
207
|
root = this.el.closest("calcite-tree:not([child])");
|
|
@@ -148,6 +148,61 @@ let Tree = class extends HTMLElement {
|
|
|
148
148
|
selected: nodeListToArray(this.el.querySelectorAll("calcite-tree-item")).filter((i) => i.selected)
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
+
keyDownHandler(event) {
|
|
152
|
+
var _a;
|
|
153
|
+
const root = this.el.closest("calcite-tree:not([child])");
|
|
154
|
+
const target = event.target;
|
|
155
|
+
if (root === this.el && target.tagName === "CALCITE-TREE-ITEM" && this.el.contains(target)) {
|
|
156
|
+
switch (event.key) {
|
|
157
|
+
case "ArrowDown":
|
|
158
|
+
const next = target.nextElementSibling;
|
|
159
|
+
if (next && next.matches("calcite-tree-item")) {
|
|
160
|
+
next.focus();
|
|
161
|
+
event.preventDefault();
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
case "ArrowLeft":
|
|
165
|
+
// When focus is on an open node, closes the node.
|
|
166
|
+
if (target.hasChildren && target.expanded) {
|
|
167
|
+
target.expanded = false;
|
|
168
|
+
event.preventDefault();
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
// When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.
|
|
172
|
+
const parentItem = target.parentElement.closest("calcite-tree-item");
|
|
173
|
+
if (parentItem && (!target.hasChildren || target.expanded === false)) {
|
|
174
|
+
parentItem.focus();
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
// When focus is on a root node that is also either an end node or a closed node, does nothing.
|
|
179
|
+
break;
|
|
180
|
+
case "ArrowRight":
|
|
181
|
+
if (!target.hasChildren) {
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
if (target.expanded && document.activeElement === target) {
|
|
185
|
+
// When focus is on an open node, moves focus to the first child node.
|
|
186
|
+
(_a = target.querySelector("calcite-tree-item")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
// When focus is on a closed node, opens the node; focus does not move.
|
|
191
|
+
target.expanded = true;
|
|
192
|
+
event.preventDefault();
|
|
193
|
+
}
|
|
194
|
+
// When focus is on an end node, does nothing.
|
|
195
|
+
break;
|
|
196
|
+
case "ArrowUp":
|
|
197
|
+
const previous = target.previousElementSibling;
|
|
198
|
+
if (previous && previous.matches("calcite-tree-item")) {
|
|
199
|
+
previous.focus();
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
151
206
|
updateAncestorTree(e) {
|
|
152
207
|
const item = e.target;
|
|
153
208
|
const children = item.querySelectorAll("calcite-tree-item");
|
|
@@ -200,7 +255,7 @@ Tree = /*@__PURE__*/ proxyCustomElement(Tree, [1, "calcite-tree", {
|
|
|
200
255
|
"child": [1540],
|
|
201
256
|
"scale": [1537],
|
|
202
257
|
"selectionMode": [1537, "selection-mode"]
|
|
203
|
-
}, [[0, "focus", "onFocus"], [0, "focusin", "onFocusIn"], [0, "focusout", "onFocusOut"], [0, "calciteTreeItemSelect", "onClick"]]]);
|
|
258
|
+
}, [[0, "focus", "onFocus"], [0, "focusin", "onFocusIn"], [0, "focusout", "onFocusOut"], [0, "calciteTreeItemSelect", "onClick"], [0, "keydown", "keyDownHandler"]]]);
|
|
204
259
|
function defineCustomElement$1() {
|
|
205
260
|
if (typeof customElements === "undefined") {
|
|
206
261
|
return;
|