Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/chunks/chunk.P345UJNN.js

87 lines
2.2 KiB
JavaScript
Raw Permalink Normal View History

2024-01-30 10:59:28 -05:00
import {
breadcrumb_item_styles_default
} from "./chunk.5A6GCI7W.js";
import {
o
} from "./chunk.2URMUHDY.js";
import {
HasSlotController
} from "./chunk.NYIIDP5N.js";
import {
e
} from "./chunk.UZVKBFXH.js";
import {
ShoelaceElement,
n
} from "./chunk.SEXBCYCU.js";
import {
x
} from "./chunk.CXZZ2LVK.js";
import {
__decorateClass
} from "./chunk.KIILAQWQ.js";
// src/components/breadcrumb-item/breadcrumb-item.component.ts
var SlBreadcrumbItem = class extends ShoelaceElement {
constructor() {
super(...arguments);
this.hasSlotController = new HasSlotController(this, "prefix", "suffix");
this.rel = "noreferrer noopener";
}
render() {
const isLink = this.href ? true : false;
return x`
<div
part="base"
class=${e({
"breadcrumb-item": true,
"breadcrumb-item--has-prefix": this.hasSlotController.test("prefix"),
"breadcrumb-item--has-suffix": this.hasSlotController.test("suffix")
})}
>
<span part="prefix" class="breadcrumb-item__prefix">
<slot name="prefix"></slot>
</span>
${isLink ? x`
<a
part="label"
class="breadcrumb-item__label breadcrumb-item__label--link"
href="${this.href}"
target="${o(this.target ? this.target : void 0)}"
rel=${o(this.target ? this.rel : void 0)}
>
<slot></slot>
</a>
` : x`
<button part="label" type="button" class="breadcrumb-item__label breadcrumb-item__label--button">
<slot></slot>
</button>
`}
<span part="suffix" class="breadcrumb-item__suffix">
<slot name="suffix"></slot>
</span>
<span part="separator" class="breadcrumb-item__separator" aria-hidden="true">
<slot name="separator"></slot>
</span>
</div>
`;
}
};
SlBreadcrumbItem.styles = breadcrumb_item_styles_default;
__decorateClass([
n()
], SlBreadcrumbItem.prototype, "href", 2);
__decorateClass([
n()
], SlBreadcrumbItem.prototype, "target", 2);
__decorateClass([
n()
], SlBreadcrumbItem.prototype, "rel", 2);
export {
SlBreadcrumbItem
};