@sbb-esta/lyne-elements 0.52.0 → 0.52.1
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/accordion.js +54 -54
- package/action-group.js +3 -3
- package/alert/alert-group.js +22 -22
- package/alert/alert.js +22 -22
- package/autocomplete.js +126 -126
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/breadcrumb/breadcrumb-group.js +70 -69
- package/breadcrumb/breadcrumb.js +17 -17
- package/calendar.js +423 -423
- package/card/card-badge.js +17 -17
- package/card/card.js +2 -2
- package/card/common.js +30 -30
- package/checkbox/checkbox-group.js +17 -17
- package/checkbox/checkbox.js +34 -34
- package/clock.js +83 -83
- package/container/sticky-bar.js +16 -16
- package/core/a11y.js +91 -91
- package/core/base-elements.js +87 -88
- package/core/controllers.js +40 -40
- package/core/datetime.js +34 -36
- package/core/dom.js +26 -26
- package/core/eventing.js +33 -33
- package/core/mixins.js +122 -122
- package/core/overlay/overlay.d.ts.map +1 -1
- package/core/overlay.js +55 -50
- package/core/testing/event-spy.d.ts +1 -1
- package/core/testing/wait-for-image-ready.d.ts +4 -0
- package/core/testing/wait-for-image-ready.d.ts.map +1 -0
- package/core/testing.d.ts +1 -0
- package/core/testing.d.ts.map +1 -1
- package/core/testing.js +42 -31
- package/custom-elements.json +70 -4
- package/datepicker/common.js +55 -55
- package/datepicker/datepicker-toggle.js +94 -94
- package/datepicker/datepicker.js +144 -144
- package/development/accordion.js +2 -3
- package/development/action-group.js +2 -3
- package/development/alert/alert-group.js +2 -3
- package/development/alert/alert.js +2 -3
- package/development/autocomplete.js +2 -3
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/development/breadcrumb/breadcrumb-group.js +5 -5
- package/development/breadcrumb/breadcrumb.js +2 -3
- package/development/button/button-link.js +2 -3
- package/development/button/button-static.js +2 -3
- package/development/button/button.js +2 -3
- package/development/button/common.js +2 -3
- package/development/button/mini-button.js +2 -3
- package/development/button/secondary-button-link.js +2 -3
- package/development/button/secondary-button-static.js +2 -3
- package/development/button/secondary-button.js +2 -3
- package/development/button/tertiary-button-link.js +2 -3
- package/development/button/tertiary-button-static.js +2 -3
- package/development/button/tertiary-button.js +2 -3
- package/development/button/transparent-button-link.js +2 -3
- package/development/button/transparent-button-static.js +2 -3
- package/development/button/transparent-button.js +2 -3
- package/development/calendar.js +2 -3
- package/development/card/card-badge.js +2 -3
- package/development/card/card-button.js +2 -3
- package/development/card/card-link.js +2 -3
- package/development/card/card.js +2 -3
- package/development/card/common.js +2 -3
- package/development/checkbox/checkbox-group.js +2 -3
- package/development/checkbox/checkbox.js +2 -3
- package/development/chip.js +2 -3
- package/development/clock.js +2 -3
- package/development/container/container.js +2 -3
- package/development/container/sticky-bar.js +2 -3
- package/development/core/base-elements.js +4 -7
- package/development/core/mixins.js +7 -13
- package/development/core/overlay/overlay.d.ts.map +1 -1
- package/development/core/overlay.js +9 -3
- package/development/core/testing/event-spy.d.ts +1 -1
- package/development/core/testing/wait-for-image-ready.d.ts +4 -0
- package/development/core/testing/wait-for-image-ready.d.ts.map +1 -0
- package/development/core/testing.d.ts +1 -0
- package/development/core/testing.d.ts.map +1 -1
- package/development/core/testing.js +17 -1
- package/development/datepicker/common.js +2 -3
- package/development/datepicker/datepicker-next-day.js +2 -3
- package/development/datepicker/datepicker-previous-day.js +2 -3
- package/development/datepicker/datepicker-toggle.js +2 -3
- package/development/datepicker/datepicker.js +2 -3
- package/development/dialog/dialog-actions.js +2 -3
- package/development/dialog/dialog-content.js +2 -3
- package/development/dialog/dialog-title.js +2 -3
- package/development/dialog/dialog.js +2 -3
- package/development/divider.js +2 -3
- package/development/expansion-panel/expansion-panel-content.js +2 -3
- package/development/expansion-panel/expansion-panel-header.js +2 -3
- package/development/expansion-panel/expansion-panel.js +2 -3
- package/development/file-selector.js +2 -3
- package/development/footer.js +2 -3
- package/development/form-error.js +2 -3
- package/development/form-field/form-field-clear.js +2 -3
- package/development/form-field/form-field.js +2 -3
- package/development/header/common.js +2 -3
- package/development/header/header-button.js +2 -3
- package/development/header/header-link.js +2 -3
- package/development/header/header.js +2 -3
- package/development/icon.js +4 -7
- package/development/image/image.d.ts +12 -3
- package/development/image/image.d.ts.map +1 -1
- package/development/image.js +41 -24
- package/development/journey-header.js +2 -3
- package/development/lead-container.js +2 -3
- package/development/link/block-link-button.js +2 -3
- package/development/link/block-link-static.js +2 -3
- package/development/link/block-link.js +2 -3
- package/development/link/common.js +3 -5
- package/development/link/link-button.js +2 -3
- package/development/link/link-static.js +2 -3
- package/development/link/link.js +2 -3
- package/development/link-list.js +2 -3
- package/development/loading-indicator.js +2 -3
- package/development/logo.js +2 -3
- package/development/map-container.js +2 -3
- package/development/menu/common.js +2 -3
- package/development/menu/menu-button.js +2 -3
- package/development/menu/menu-link.js +2 -3
- package/development/menu/menu.js +2 -3
- package/development/message.js +2 -3
- package/development/navigation/common.js +2 -3
- package/development/navigation/navigation-button.js +2 -3
- package/development/navigation/navigation-link.js +2 -3
- package/development/navigation/navigation-list.js +2 -3
- package/development/navigation/navigation-marker.js +2 -3
- package/development/navigation/navigation-section.js +2 -3
- package/development/navigation/navigation.js +2 -3
- package/development/notification.js +2 -3
- package/development/option/optgroup.js +2 -3
- package/development/option/option.js +2 -3
- package/development/overlay.js +3 -5
- package/development/popover/popover-trigger.js +2 -3
- package/development/popover/popover.js +2 -3
- package/development/radio-button/radio-button-group.js +2 -3
- package/development/radio-button/radio-button.js +2 -3
- package/development/screen-reader-only.js +2 -3
- package/development/select.js +2 -3
- package/development/selection-panel.js +2 -3
- package/development/signet.js +2 -3
- package/development/skiplink-list.js +2 -3
- package/development/slider.js +2 -3
- package/development/status.js +2 -3
- package/development/stepper/step-label.js +2 -3
- package/development/stepper/step.js +2 -3
- package/development/stepper/stepper/stepper.d.ts +1 -1
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +5 -6
- package/development/tabs/tab-group.js +2 -3
- package/development/tabs/tab-title.js +2 -3
- package/development/tag/tag-group.js +2 -3
- package/development/tag/tag.js +2 -3
- package/development/teaser-hero.js +2 -3
- package/development/teaser-paid.js +2 -3
- package/development/teaser.js +2 -3
- package/development/time-input.js +2 -3
- package/development/timetable-occupancy-icon.js +2 -3
- package/development/timetable-occupancy.js +2 -3
- package/development/title.js +3 -5
- package/development/toast.js +2 -3
- package/development/toggle/toggle-option.js +3 -5
- package/development/toggle/toggle.js +2 -3
- package/development/toggle-check.js +10 -3
- package/development/train/train-blocked-passage.js +2 -3
- package/development/train/train-formation.js +2 -3
- package/development/train/train-wagon.js +2 -3
- package/development/train/train.js +2 -3
- package/development/visual-checkbox.js +2 -3
- package/dialog/dialog-title.js +20 -20
- package/dialog/dialog.js +66 -66
- package/expansion-panel/expansion-panel-header.js +20 -20
- package/expansion-panel/expansion-panel.js +60 -60
- package/file-selector.js +91 -91
- package/form-field/form-field-clear.js +12 -12
- package/form-field/form-field.js +111 -111
- package/header/header.js +53 -53
- package/icon.js +107 -107
- package/image/image.d.ts +12 -3
- package/image/image.d.ts.map +1 -1
- package/image.js +118 -105
- package/journey-header.js +29 -29
- package/map-container.js +23 -23
- package/menu/menu.js +91 -91
- package/navigation/common.js +16 -16
- package/navigation/navigation-marker.js +34 -34
- package/navigation/navigation-section.js +83 -83
- package/navigation/navigation.js +87 -87
- package/notification.js +52 -52
- package/option/optgroup.js +45 -45
- package/option/option.js +108 -108
- package/overlay.js +5 -5
- package/package.json +1 -1
- package/popover/popover.js +110 -110
- package/radio-button/radio-button-group.js +93 -93
- package/radio-button/radio-button.js +84 -84
- package/select.js +178 -178
- package/selection-panel.js +44 -44
- package/slider.js +58 -58
- package/status.js +6 -6
- package/stepper/step-label.js +19 -19
- package/stepper/step.js +31 -31
- package/stepper/stepper/stepper.d.ts +1 -1
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +48 -48
- package/tabs/tab-group.js +67 -67
- package/tag/tag-group.js +8 -8
- package/tag/tag.js +27 -27
- package/teaser-paid.js +12 -12
- package/time-input.js +73 -73
- package/timetable-occupancy-icon.js +26 -26
- package/timetable-occupancy.js +9 -9
- package/toast.js +38 -38
- package/toggle/toggle-option.js +33 -33
- package/toggle/toggle.js +46 -46
- package/toggle-check.js +14 -14
- package/train/train-formation.js +36 -37
- package/train/train-wagon.js +30 -30
- package/train/train.js +13 -13
|
@@ -1,91 +1,92 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { state as p, customElement as
|
|
3
|
-
import { isArrowKeyPressed as
|
|
4
|
-
import { SbbConnectedAbortController as
|
|
5
|
-
import { hostAttributes as
|
|
6
|
-
import { setOrRemoveAttribute as
|
|
7
|
-
import { i18nBreadcrumbEllipsisButtonLabel as
|
|
8
|
-
import { SbbNamedSlotListMixin as
|
|
9
|
-
import { AgnosticResizeObserver as
|
|
1
|
+
import { css as c, LitElement as u, html as o, nothing as h } from "lit";
|
|
2
|
+
import { state as p, customElement as m } from "lit/decorators.js";
|
|
3
|
+
import { isArrowKeyPressed as g, sbbInputModalityDetector as f, getNextElementIndex as v } from "../core/a11y.js";
|
|
4
|
+
import { SbbConnectedAbortController as x, SbbLanguageController as y } from "../core/controllers.js";
|
|
5
|
+
import { hostAttributes as w } from "../core/decorators.js";
|
|
6
|
+
import { setOrRemoveAttribute as C } from "../core/dom.js";
|
|
7
|
+
import { i18nBreadcrumbEllipsisButtonLabel as _ } from "../core/i18n.js";
|
|
8
|
+
import { SbbNamedSlotListMixin as k } from "../core/mixins.js";
|
|
9
|
+
import { AgnosticResizeObserver as A } from "../core/observers.js";
|
|
10
10
|
import "../icon.js";
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
for (var
|
|
14
|
-
(
|
|
15
|
-
return
|
|
11
|
+
const E = c`*,:before,:after{box-sizing:border-box}:host{--sbb-breadcrumb-group-wrap: nowrap;--sbb-breadcrumb-group-visibility: hidden;display:block}:host([data-loaded]){--sbb-breadcrumb-group-visibility: visible}:host([data-state]){--sbb-breadcrumb-group-wrap: wrap}.sbb-breadcrumb-group{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;flex-wrap:var(--sbb-breadcrumb-group-wrap);column-gap:var(--sbb-spacing-fixed-1x);visibility:var(--sbb-breadcrumb-group-visibility)}.sbb-breadcrumb-group__item{flex:0 0 auto;display:flex;column-gap:var(--sbb-spacing-fixed-1x)}.sbb-breadcrumb-group__divider-icon{color:var(--sbb-color-granite)}#sbb-breadcrumb-ellipsis{--sbb-breadcrumb-group-ellipsis-color: var(--sbb-color-granite);--sbb-breadcrumb-group-ellipsis-background-color: transparent;--sbb-breadcrumb-group-ellipsis-border-width: var(--sbb-border-width-1x);--sbb-breadcrumb-group-ellipsis-border-color: var(--sbb-color-silver);-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;--sbb-text-font-size: var(--sbb-font-size-text-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);line-height:0;letter-spacing:.01em;width:var(--sbb-size-icon-ui-small);height:var(--sbb-size-icon-ui-small);border:var(--sbb-breadcrumb-group-ellipsis-border-width) solid var(--sbb-breadcrumb-group-ellipsis-border-color);border-radius:50%;padding-block-end:.5em;cursor:pointer;color:var(--sbb-breadcrumb-group-ellipsis-color);background-color:var(--sbb-breadcrumb-group-ellipsis-background-color);overflow:hidden}@media (forced-colors: active){#sbb-breadcrumb-ellipsis{--sbb-breadcrumb-group-ellipsis-border-width: var(--sbb-border-width-2x);--sbb-breadcrumb-group-ellipsis-border-color: CanvasText}}@media (any-hover: hover){#sbb-breadcrumb-ellipsis:hover{--sbb-breadcrumb-group-ellipsis-color: var(--sbb-color-charcoal);--sbb-breadcrumb-group-ellipsis-background-color: var(--sbb-color-milk)}}@media (any-hover: hover) and (forced-colors: active){#sbb-breadcrumb-ellipsis:hover{--sbb-breadcrumb-group-ellipsis-border-color: Highlight}}#sbb-breadcrumb-ellipsis:focus-visible:not([data-focus-origin=mouse],[data-focus-origin=touch]){outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}`;
|
|
12
|
+
var z = Object.defineProperty, S = Object.getOwnPropertyDescriptor, d = (r, e, s, t) => {
|
|
13
|
+
for (var i = t > 1 ? void 0 : t ? S(e, s) : e, b = r.length - 1, a; b >= 0; b--)
|
|
14
|
+
(a = r[b]) && (i = (t ? a(e, s, i) : a(i)) || i);
|
|
15
|
+
return t && i && z(e, s, i), i;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
const n = 3;
|
|
18
|
+
let l = class extends k(u) {
|
|
18
19
|
constructor() {
|
|
19
|
-
super(...arguments), this.listChildLocalNames = ["sbb-breadcrumb"], this.
|
|
20
|
+
super(...arguments), this.listChildLocalNames = ["sbb-breadcrumb"], this.b = new A(() => this.d()), this.f = new x(this), this.g = new y(this), this.c = !1;
|
|
20
21
|
}
|
|
21
|
-
set
|
|
22
|
-
|
|
22
|
+
set a(r) {
|
|
23
|
+
C(this, "data-state", r);
|
|
23
24
|
}
|
|
24
|
-
get
|
|
25
|
+
get a() {
|
|
25
26
|
return this.getAttribute("data-state");
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
h(r) {
|
|
28
29
|
if (!(!this.listChildren.length || // don't trap nested handling
|
|
29
|
-
|
|
30
|
-
if (this.
|
|
31
|
-
return this.
|
|
32
|
-
this.
|
|
30
|
+
r.target !== this && r.target.parentElement !== this) && g(r)) {
|
|
31
|
+
if (this.a === "collapsed")
|
|
32
|
+
return this.i(r);
|
|
33
|
+
this.e(r);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
connectedCallback() {
|
|
36
37
|
super.connectedCallback();
|
|
37
|
-
const
|
|
38
|
-
this.addEventListener("keydown", (
|
|
38
|
+
const r = this.f.signal;
|
|
39
|
+
this.addEventListener("keydown", (e) => this.h(e), { signal: r });
|
|
39
40
|
}
|
|
40
|
-
firstUpdated(
|
|
41
|
-
super.firstUpdated(
|
|
41
|
+
firstUpdated(r) {
|
|
42
|
+
super.firstUpdated(r), this.b.observe(this), this.toggleAttribute("data-loaded", !0);
|
|
42
43
|
}
|
|
43
44
|
disconnectedCallback() {
|
|
44
|
-
super.disconnectedCallback(), this.
|
|
45
|
+
super.disconnectedCallback(), this.b.disconnect();
|
|
45
46
|
}
|
|
46
|
-
willUpdate(
|
|
47
|
-
super.willUpdate(
|
|
47
|
+
willUpdate(r) {
|
|
48
|
+
super.willUpdate(r), r.has("listChildren") && this.j();
|
|
48
49
|
}
|
|
49
|
-
updated(
|
|
50
|
-
var
|
|
51
|
-
super.updated(
|
|
50
|
+
updated(r) {
|
|
51
|
+
var e;
|
|
52
|
+
super.updated(r), r.has("listChildren") && Promise.resolve().then(() => this.d()), this.c && f.mostRecentModality === "keyboard" && ((e = this.listChildren[1]) == null || e.focus(), this.c = !1);
|
|
52
53
|
}
|
|
53
54
|
/** Apply the aria-current attribute to the last sbb-breadcrumb element. */
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
this.listChildren.slice(0, -1).filter((
|
|
55
|
+
j() {
|
|
56
|
+
var r;
|
|
57
|
+
this.listChildren.slice(0, -1).filter((e) => e.hasAttribute("aria-current")).forEach((e) => e.removeAttribute("aria-current")), (r = this.listChildren[this.listChildren.length - 1]) == null || r.setAttribute("aria-current", "page"), this.listChildren.length < n && (this.a = null);
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
59
60
|
* Sets the focus on the correct element when the ellipsis breadcrumb is displayed and the user is navigating with keyboard's arrows.
|
|
60
61
|
*/
|
|
61
|
-
|
|
62
|
-
const
|
|
62
|
+
i(r) {
|
|
63
|
+
const e = [
|
|
63
64
|
this.listChildren[0],
|
|
64
65
|
this.shadowRoot.querySelector("#sbb-breadcrumb-ellipsis"),
|
|
65
66
|
this.listChildren[this.listChildren.length - 1]
|
|
66
67
|
];
|
|
67
|
-
this.
|
|
68
|
+
this.e(r, e);
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
const
|
|
72
|
-
(
|
|
73
|
-
),
|
|
74
|
-
(
|
|
70
|
+
e(r, e = this.listChildren) {
|
|
71
|
+
var i;
|
|
72
|
+
const s = e.findIndex(
|
|
73
|
+
(b) => b === document.activeElement || b === this.shadowRoot.activeElement
|
|
74
|
+
), t = v(r, s, e.length);
|
|
75
|
+
(i = e[t]) == null || i.focus(), r.preventDefault();
|
|
75
76
|
}
|
|
76
77
|
/**
|
|
77
78
|
* Note: due to @State annotation on _state, this method triggers a new render; as a consequence, the focus is moved
|
|
78
79
|
* to the `body`, so if the ellipsis element has focus, it's asynchronously forced to the first element.
|
|
79
80
|
*/
|
|
80
|
-
|
|
81
|
-
this.
|
|
81
|
+
k() {
|
|
82
|
+
this.a = "manually-expanded", this.c = !0;
|
|
82
83
|
}
|
|
83
84
|
/** Evaluate if the expanded breadcrumb element fits in page width, otherwise it needs ellipsis */
|
|
84
|
-
|
|
85
|
-
!this.
|
|
85
|
+
d() {
|
|
86
|
+
!this.a && this.scrollWidth > this.offsetWidth && this.listChildren.length >= n && (this.a = "collapsed", this.b.disconnect());
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
return
|
|
88
|
+
l() {
|
|
89
|
+
return o`
|
|
89
90
|
<li class="sbb-breadcrumb-group__item">
|
|
90
91
|
<slot name="li-0"></slot>
|
|
91
92
|
</li>
|
|
@@ -97,9 +98,9 @@ let a = class extends w(c) {
|
|
|
97
98
|
<button
|
|
98
99
|
type="button"
|
|
99
100
|
id="sbb-breadcrumb-ellipsis"
|
|
100
|
-
aria-label=${
|
|
101
|
+
aria-label=${_[this.g.current]}
|
|
101
102
|
aria-expanded="false"
|
|
102
|
-
@click=${() => this.
|
|
103
|
+
@click=${() => this.k()}
|
|
103
104
|
>
|
|
104
105
|
...
|
|
105
106
|
</button>
|
|
@@ -113,38 +114,38 @@ let a = class extends w(c) {
|
|
|
113
114
|
</li>
|
|
114
115
|
`;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
m() {
|
|
117
118
|
return this.listSlotNames().map(
|
|
118
|
-
(
|
|
119
|
+
(r, e, s) => o`
|
|
119
120
|
<li class="sbb-breadcrumb-group__item">
|
|
120
|
-
<slot name=${
|
|
121
|
-
${
|
|
121
|
+
<slot name=${r}></slot>
|
|
122
|
+
${e !== s.length - 1 ? o`<sbb-icon
|
|
122
123
|
name="chevron-small-right-small"
|
|
123
124
|
class="sbb-breadcrumb-group__divider-icon"
|
|
124
|
-
></sbb-icon>` :
|
|
125
|
+
></sbb-icon>` : h}
|
|
125
126
|
</li>
|
|
126
127
|
`
|
|
127
128
|
);
|
|
128
129
|
}
|
|
129
130
|
render() {
|
|
130
|
-
return
|
|
131
|
+
return o`
|
|
131
132
|
<ol class="sbb-breadcrumb-group">
|
|
132
|
-
${this.
|
|
133
|
+
${this.a === "collapsed" ? this.l() : this.m()}
|
|
133
134
|
</ol>
|
|
134
135
|
${this.renderHiddenSlot()}
|
|
135
136
|
`;
|
|
136
137
|
}
|
|
137
138
|
};
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
l.styles = E;
|
|
140
|
+
d([
|
|
140
141
|
p()
|
|
141
|
-
],
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
], l.prototype, "a", 1);
|
|
143
|
+
l = d([
|
|
144
|
+
m("sbb-breadcrumb-group"),
|
|
145
|
+
w({
|
|
145
146
|
role: "navigation"
|
|
146
147
|
})
|
|
147
|
-
],
|
|
148
|
+
], l);
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
l as SbbBreadcrumbGroupElement
|
|
150
151
|
};
|
package/breadcrumb/breadcrumb.js
CHANGED
|
@@ -3,19 +3,19 @@ import { html as d } from "lit/static-html.js";
|
|
|
3
3
|
import { SbbLinkBaseElement as m } from "../core/base-elements.js";
|
|
4
4
|
import { SbbHydrationMixin as u } from "../core/mixins.js";
|
|
5
5
|
import { SbbIconNameMixin as f } from "../icon.js";
|
|
6
|
-
import { css as
|
|
7
|
-
const
|
|
8
|
-
var p = Object.defineProperty, x = Object.getOwnPropertyDescriptor, n = (r, e,
|
|
9
|
-
for (var o = t > 1 ? void 0 : t ? x(e,
|
|
10
|
-
(i = r[a]) && (o = (t ? i(e,
|
|
11
|
-
return t && o && p(e,
|
|
6
|
+
import { css as v } from "lit";
|
|
7
|
+
const h = v`*,:before,:after{box-sizing:border-box}:host{display:flex;--sbb-breadcrumb-color: var(--sbb-color-granite)}@media (any-hover: hover){:host(:hover){--sbb-breadcrumb-color: var(--sbb-color-charcoal)}}:host(:is(:active,[data-active])){--sbb-breadcrumb-color: var(--sbb-color-anthracite)}.sbb-breadcrumb{--sbb-link-text-decoration: none;--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-link-color-normal);text-decoration:var(--sbb-link-text-decoration, underline);-webkit-user-select:none;user-select:none;display:flex;cursor:pointer;gap:var(--sbb-spacing-fixed-2x);color:var(--sbb-breadcrumb-color);align-items:center;overflow:hidden;outline:none}@media (forced-colors: active){.sbb-breadcrumb{text-decoration:underline}}@media (forced-colors: active){.sbb-breadcrumb{--sbb-breadcrumb-color: ButtonText}}:host(:not([data-focus-origin=mouse],[data-focus-origin=touch])) .sbb-breadcrumb:focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width);border-radius:var(--sbb-border-radius-2x)}.sbb-breadcrumb__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}slot[name=icon] .sbb-breadcrumb__icon,slot[name=icon] ::slotted(*){flex-shrink:0}`;
|
|
8
|
+
var p = Object.defineProperty, x = Object.getOwnPropertyDescriptor, n = (r, e, s, t) => {
|
|
9
|
+
for (var o = t > 1 ? void 0 : t ? x(e, s) : e, a = r.length - 1, i; a >= 0; a--)
|
|
10
|
+
(i = r[a]) && (o = (t ? i(e, s, o) : i(o)) || o);
|
|
11
|
+
return t && o && p(e, s, o), o;
|
|
12
12
|
};
|
|
13
|
-
let
|
|
13
|
+
let b = class extends f(u(m)) {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.
|
|
15
|
+
super(...arguments), this.a = !1;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
this.
|
|
17
|
+
b() {
|
|
18
|
+
this.a = Array.from(this.childNodes ?? []).some(
|
|
19
19
|
(r) => {
|
|
20
20
|
var e;
|
|
21
21
|
return !r.slot && ((e = r.textContent) == null ? void 0 : e.trim());
|
|
@@ -25,19 +25,19 @@ let s = class extends f(u(m)) {
|
|
|
25
25
|
renderTemplate() {
|
|
26
26
|
return d`
|
|
27
27
|
${this.renderIconSlot("sbb-breadcrumb__icon")}
|
|
28
|
-
<span class="sbb-breadcrumb__label" ?hidden=${!this.
|
|
29
|
-
<slot @slotchange=${this.
|
|
28
|
+
<span class="sbb-breadcrumb__label" ?hidden=${!this.a}>
|
|
29
|
+
<slot @slotchange=${this.b}></slot>
|
|
30
30
|
</span>
|
|
31
31
|
`;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
b.styles = h;
|
|
35
35
|
n([
|
|
36
36
|
l()
|
|
37
|
-
],
|
|
38
|
-
|
|
37
|
+
], b.prototype, "a", 2);
|
|
38
|
+
b = n([
|
|
39
39
|
c("sbb-breadcrumb")
|
|
40
|
-
],
|
|
40
|
+
], b);
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
b as SbbBreadcrumbElement
|
|
43
43
|
};
|