@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
69 lines (68 loc) • 1.68 kB
JavaScript
import { BREADCRUMB_ITEM_SELECTED_MODIFIER as r } from "./breadcrumbs-constants.js";
import { n } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
import a from "../link/link.js";
import { MUTED as i } from "../link/link-constants.js";
const d = {
name: "DtBreadcrumbItem",
components: {
DtLink: a
},
inheritAttrs: !1,
props: {
/**
* Passed through to link. If true, applies inverted styles to the link.
*/
inverted: {
type: Boolean,
default: !1
},
/**
* Applies selected styles to the breadcrumb
*/
selected: {
type: Boolean,
default: !1
},
/**
* Describes the breadcrumb. Overridden by default slot
*/
label: {
type: String,
default: ""
}
},
data() {
return {
BREADCRUMB_ITEM_SELECTED_MODIFIER: r
};
},
computed: {
linkKind() {
return this.inverted ? "" : i;
},
linkInverted() {
return !!this.inverted;
},
ariaCurrent() {
return this.selected ? "location" : void 0;
}
}
};
var s = function() {
var e = this, t = e._self._c;
return t("li", { class: [
"d-breadcrumbs__item",
{ [e.BREADCRUMB_ITEM_SELECTED_MODIFIER]: e.selected }
], attrs: { "data-qa": "dt-breadcrumb-item" } }, [t("dt-link", e._b({ attrs: { kind: e.linkKind, inverted: e.linkInverted, "aria-current": e.ariaCurrent, "data-qa": "breadcrumb-item" } }, "dt-link", e.$attrs, !1), [e._t("default", function() {
return [e._v(" " + e._s(e.label) + " ")];
})], 2)], 1);
}, l = [], o = /* @__PURE__ */ n(
d,
s,
l
);
const p = o.exports;
export {
p as default
};
//# sourceMappingURL=breadcrumb-item.js.map