Remove with Text
Remove GetEngineeringSpcReview Better error message EnforceCodeStyleInBuild NginxFileSystem Remove Reactors and Working Directory AppSettings Delete self contained Thunder Tests Back to .net8.0 api/v4/InfinityQS ApiExplorerSettings Wafer Counter
This commit is contained in:
49
Server/wwwroot/package/dist/collection/components/breadcrumb/breadcrumb.js
vendored
Normal file
49
Server/wwwroot/package/dist/collection/components/breadcrumb/breadcrumb.js
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
import { h } from "@stencil/core";
|
||||
export class Breadcrumb {
|
||||
componentDidLoad() {
|
||||
const element = this.el.shadowRoot.firstChild;
|
||||
this.addEventListenersToHandleCustomFocusState(element);
|
||||
}
|
||||
addEventListenersToHandleCustomFocusState(element) {
|
||||
if (!element) {
|
||||
console.error('element not found');
|
||||
return;
|
||||
}
|
||||
element.tabIndex = -1;
|
||||
const slot = element.querySelector('slot');
|
||||
if (slot) {
|
||||
const assignedNodes = slot.assignedNodes();
|
||||
for (let i = 0; i < assignedNodes.length; i++) {
|
||||
const node = assignedNodes[i];
|
||||
if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {
|
||||
const breadcrumbLabel = node;
|
||||
if (!breadcrumbLabel.hasAttribute('url')) {
|
||||
breadcrumbLabel.tabIndex = -1;
|
||||
breadcrumbLabel.addEventListener('focus', () => {
|
||||
if (breadcrumbLabel.hasAttribute('url')) {
|
||||
breadcrumbLabel.blur();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (h("nav", { "aria-label": "Page navigation breadcrumb" }, h("ol", { class: "breadcrumb" }, h("slot", null))));
|
||||
}
|
||||
static get is() { return "ifx-breadcrumb"; }
|
||||
static get encapsulation() { return "shadow"; }
|
||||
static get originalStyleUrls() {
|
||||
return {
|
||||
"$": ["breadcrumb.scss"]
|
||||
};
|
||||
}
|
||||
static get styleUrls() {
|
||||
return {
|
||||
"$": ["breadcrumb.css"]
|
||||
};
|
||||
}
|
||||
static get elementRef() { return "el"; }
|
||||
}
|
||||
//# sourceMappingURL=breadcrumb.js.map
|
Reference in New Issue
Block a user