@sbb-esta/lyne-elements 0.52.1 → 0.52.2
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.js +60 -60
- 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 +86 -86
- package/core/controllers.js +40 -40
- package/core/datetime.js +32 -32
- package/core/dom.js +26 -26
- package/core/eventing.js +33 -33
- package/core/mixins.js +122 -122
- package/core/testing.js +29 -29
- package/datepicker/common.js +55 -55
- package/datepicker/datepicker-toggle.js +94 -94
- package/datepicker/datepicker.js +144 -144
- 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.js +87 -87
- 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.js +46 -46
- 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/train/train-formation.js +36 -36
- package/train/train-wagon.js +30 -30
- package/train/train.js +13 -13
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as l, customElement as
|
|
3
|
-
import { ref as
|
|
4
|
-
import { setModalityOnNextFocus as
|
|
5
|
-
import { SbbLanguageController as k, SbbSlotStateController as
|
|
6
|
-
import { hostAttributes as
|
|
7
|
-
import { setOrRemoveAttribute as
|
|
8
|
-
import { i18nGoBack as
|
|
1
|
+
import { css as _, LitElement as u, html as f, nothing as v } from "lit";
|
|
2
|
+
import { property as l, customElement as w } from "lit/decorators.js";
|
|
3
|
+
import { ref as d } from "lit/directives/ref.js";
|
|
4
|
+
import { setModalityOnNextFocus as h, getFirstFocusableElement as y, getFocusableElements as m } from "../core/a11y.js";
|
|
5
|
+
import { SbbLanguageController as k, SbbSlotStateController as E } from "../core/controllers.js";
|
|
6
|
+
import { hostAttributes as x } from "../core/decorators.js";
|
|
7
|
+
import { setOrRemoveAttribute as C, findReferencedElement as A, isBreakpoint as S } from "../core/dom.js";
|
|
8
|
+
import { i18nGoBack as N } from "../core/i18n.js";
|
|
9
9
|
import { SbbUpdateSchedulerMixin as L } from "../core/mixins.js";
|
|
10
|
-
import { removeAriaOverlayTriggerAttributes as
|
|
10
|
+
import { removeAriaOverlayTriggerAttributes as z, setAriaOverlayTriggerAttributes as T } from "../core/overlay.js";
|
|
11
11
|
import "../button/transparent-button.js";
|
|
12
12
|
import "../divider.js";
|
|
13
|
-
const F =
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
(r = t[
|
|
17
|
-
return
|
|
13
|
+
const F = _`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-section-display: none;--sbb-navigation-section-column: 1 / 5;--sbb-navigation-section-position: fixed;--sbb-navigation-section-pointer-events: none;--sbb-navigation-section-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-3x) );--sbb-navigation-section-animation-easing: ease-out;--sbb-navigation-section-padding-inline: var(--sbb-layout-base-offset-responsive);--sbb-navigation-section-padding-block: var(--sbb-spacing-responsive-l);--sbb-navigation-section-transform: translateX(100%);--sbb-navigation-section-content-padding-inline-start: var(--sbb-spacing-fixed-12x);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-navigation-section-width: 100vw;--sbb-navigation-section-height: 100vh;display:var(--sbb-navigation-section-display);position:var(--sbb-navigation-section-position);grid-column:var(--sbb-navigation-section-column);inset-inline-start:0;inset-block-start:0;width:var(--sbb-navigation-section-width);height:var(--sbb-navigation-section-height);z-index:var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index))}@supports (width: 100dvw){:host{--sbb-navigation-section-width: 100dvw}}@supports (height: 100dvh){:host{--sbb-navigation-section-height: 100dvh}}@media (min-width: 64rem){:host{--sbb-navigation-section-column: 5 / 9;--sbb-navigation-section-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-4x) );--sbb-navigation-section-padding-block: var(--sbb-spacing-responsive-xl);--sbb-navigation-section-padding-inline: var(--sbb-spacing-fixed-8x) var(--sbb-layout-base-offset-responsive);--sbb-navigation-section-position: relative;--sbb-navigation-section-transform: translateX(0%);--sbb-navigation-section-content-padding-inline-start: 0;--sbb-navigation-section-width: calc( 100% + var(--sbb-layout-base-offset-responsive) + var(--sbb-grid-base-gutter-responsive) );transform:translate(calc(var(--sbb-grid-base-gutter-responsive) * -1))}}@media (min-width: 80rem){:host{--sbb-navigation-section-column: 5 / 13}}@media (min-width: 90rem){:host{--sbb-navigation-section-column: 6 / 17;--sbb-navigation-section-padding-block: var(--sbb-spacing-responsive-xxl) var(--sbb-spacing-responsive-l)}}:host([data-state=opened]){--sbb-navigation-section-pointer-events: all}:host([data-state=opening]){--sbb-navigation-section-position: absolute}:host(:is([data-state=opening],[data-state=closing])){--sbb-navigation-section-pointer-events: none}:host([data-state]:not([data-state=closed])){--sbb-navigation-section-display: block}::slotted(*){padding-inline-start:var(--sbb-navigation-section-content-padding-inline-start)}::slotted([data-sbb-button]){grid-column-start:1}.sbb-navigation-section__container{pointer-events:var(--sbb-navigation-section-pointer-events);height:var(--sbb-navigation-section-height)}.sbb-navigation-section{display:none;border:none;margin:0;width:100%;height:100%;color:var(--sbb-color-white);background-color:transparent;padding:0;overflow:hidden}:host([data-state]:not([data-state=closed])) .sbb-navigation-section{display:block;animation-name:open;animation-duration:var(--sbb-navigation-section-animation-duration);animation-timing-function:var(--sbb-navigation-section-animation-easing)}:host([data-state][data-state=closing]) .sbb-navigation-section{animation-name:close}@media (forced-colors: active){.sbb-navigation-section{outline:var(--sbb-border-width-1x) solid CanvasText}}.sbb-navigation-section__wrapper{--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: var(--sbb-color-white-alpha-30);--sbb-scrollbar-color-hover: var(--sbb-color-white-alpha-60);--sbb-scrollbar-track-color: transparent;--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x);height:100%;padding-block:var(--sbb-navigation-section-padding-block);outline:none;overflow-y:auto}.sbb-navigation-section__wrapper::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation-section__wrapper::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation-section__wrapper::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-navigation-section__wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-navigation-section__wrapper::-webkit-scrollbar-button,.sbb-navigation-section__wrapper::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-navigation-section__wrapper{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}:host(:is([data-state=opening],[data-state=closing])) .sbb-navigation-section__wrapper{--sbb-scrollbar-color: transparent;scrollbar-color:transparent transparent}.sbb-navigation-section__header{position:relative;display:flex;align-items:center;gap:var(--sbb-spacing-fixed-1x);margin-block-start:var(--sbb-spacing-responsive-xxl);padding-inline-start:var(--sbb-navigation-section-content-padding-inline-start)}@media (min-width: 64rem){.sbb-navigation-section__header{margin-block-start:0;padding-inline-start:0}}@media (min-width: 80rem){.sbb-navigation-section__header{grid-column:1/4}}:host(:not([data-slot-names~=title],[title-content])) .sbb-navigation-section__header{display:none}.sbb-navigation-section__back{position:absolute;transform:translate(calc((100% + var(--sbb-spacing-fixed-1x)) * -1))}@media (min-width: 64rem){.sbb-navigation-section__back{display:none}}.sbb-navigation-section__title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-4)}@media (min-width: 64rem){.sbb-navigation-section__title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-2)}}.sbb-navigation-section__content{display:grid;grid-template-columns:1fr;grid-gap:var(--sbb-spacing-responsive-l) var(--sbb-grid-base-gutter-responsive);padding-inline:var(--sbb-navigation-section-padding-inline)}@media (min-width: 64rem){.sbb-navigation-section__content{opacity:0;transform:translateY(var(--sbb-spacing-fixed-3x));transition-duration:var(--sbb-navigation-section-animation-duration);transition-delay:var(--sbb-navigation-section-animation-duration);transition-timing-function:var(--sbb-navigation-section-animation-easing);transition-property:opacity,transform}:host([data-state=opened]) .sbb-navigation-section__content{opacity:1;transform:translateY(0)}}@media (min-width: 80rem){.sbb-navigation-section__content{grid-template-columns:repeat(3,1fr)}}:host([data-state=closing]) .sbb-navigation-section__content{transition-delay:0s}@keyframes open{0%{transform:var(--sbb-navigation-section-transform)}to{transform:translate(0)}}@keyframes close{0%{transform:translate(0)}to{transform:var(--sbb-navigation-section-transform)}}`;
|
|
14
|
+
var B = Object.defineProperty, O = Object.getOwnPropertyDescriptor, b = (t, i, n, a) => {
|
|
15
|
+
for (var e = a > 1 ? void 0 : a ? O(i, n) : i, s = t.length - 1, r; s >= 0; s--)
|
|
16
|
+
(r = t[s]) && (e = (a ? r(i, n, e) : r(e)) || e);
|
|
17
|
+
return a && e && B(i, n, e), e;
|
|
18
18
|
};
|
|
19
|
-
let
|
|
19
|
+
let P = 0, o = class extends L(u) {
|
|
20
20
|
constructor() {
|
|
21
|
-
super(), this.
|
|
22
|
-
t.composedPath().filter((
|
|
23
|
-
}, new
|
|
21
|
+
super(), this._trigger = null, this._firstLevelNavigation = null, this._triggerElement = null, this._language = new k(this), this._handleNavigationSectionClose = (t) => {
|
|
22
|
+
t.composedPath().filter((n) => n instanceof window.HTMLElement).some((n) => this._isCloseElement(n)) && this.close();
|
|
23
|
+
}, new E(this);
|
|
24
24
|
}
|
|
25
25
|
set trigger(t) {
|
|
26
|
-
const i = this.
|
|
27
|
-
this.
|
|
26
|
+
const i = this._trigger;
|
|
27
|
+
this._trigger = t, this._removeTriggerClickListener(this._trigger, i);
|
|
28
28
|
}
|
|
29
29
|
get trigger() {
|
|
30
|
-
return this.
|
|
30
|
+
return this._trigger;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* The state of the navigation section.
|
|
34
34
|
*/
|
|
35
|
-
set
|
|
36
|
-
this.setAttribute("data-state", t),
|
|
35
|
+
set _state(t) {
|
|
36
|
+
this.setAttribute("data-state", t), C(this, "aria-hidden", this._state !== "opened" ? "true" : null);
|
|
37
37
|
}
|
|
38
|
-
get
|
|
38
|
+
get _state() {
|
|
39
39
|
return this.getAttribute("data-state");
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -43,115 +43,115 @@ let $ = 0, e = class extends L(f) {
|
|
|
43
43
|
*/
|
|
44
44
|
open() {
|
|
45
45
|
var t;
|
|
46
|
-
this.
|
|
46
|
+
this._state !== "closed" || !this._navigationSection || (this._setActiveNavigationAction(), this._closePreviousNavigationSection(), this._state = "opening", this.startUpdate(), this.inert = !0, (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "true"));
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
_setActiveNavigationAction() {
|
|
49
49
|
var t, i;
|
|
50
|
-
(i = (t = this.
|
|
50
|
+
(i = (t = this._triggerElement) == null ? void 0 : t.marker) == null || i.select(this._triggerElement);
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
_closePreviousNavigationSection() {
|
|
53
53
|
var t, i;
|
|
54
|
-
(i = (t = this.
|
|
54
|
+
(i = (t = this._firstLevelNavigation) == null ? void 0 : t.activeNavigationSection) == null || i.close();
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Closes the navigation section.
|
|
58
58
|
*/
|
|
59
59
|
close() {
|
|
60
60
|
var t;
|
|
61
|
-
this.
|
|
61
|
+
this._state === "opened" && (this._state = "closing", this.startUpdate(), this.inert = !0, (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "false"));
|
|
62
62
|
}
|
|
63
63
|
// Removes trigger click listener on trigger change.
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
t !== i && ((
|
|
64
|
+
_removeTriggerClickListener(t, i) {
|
|
65
|
+
var n, a;
|
|
66
|
+
t !== i && ((n = this._navigationSectionController) == null || n.abort(), (a = this._windowEventsController) == null || a.abort(), this._configure(this.trigger));
|
|
67
67
|
}
|
|
68
68
|
// Check if the trigger is valid and attach click event listeners.
|
|
69
|
-
|
|
69
|
+
_configure(t) {
|
|
70
70
|
var i;
|
|
71
|
-
|
|
72
|
-
signal: this.
|
|
73
|
-
}), this.addEventListener("keydown", (
|
|
74
|
-
signal: this.
|
|
71
|
+
z(this._triggerElement), t && (this._triggerElement = A(t), this._triggerElement && (T(this._triggerElement, "menu", this.id, this._state), (i = this._navigationSectionController) == null || i.abort(), this._navigationSectionController = new AbortController(), this._triggerElement.connectedSection = this, this._triggerElement.addEventListener("click", () => this.open(), {
|
|
72
|
+
signal: this._navigationSectionController.signal
|
|
73
|
+
}), this.addEventListener("keydown", (n) => this._handleNavigationSectionFocus(n), {
|
|
74
|
+
signal: this._navigationSectionController.signal
|
|
75
75
|
})));
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
this.
|
|
77
|
+
_setNavigationInert() {
|
|
78
|
+
this._firstLevelNavigation && (this._firstLevelNavigation.shadowRoot.querySelector(
|
|
79
79
|
".sbb-navigation__content"
|
|
80
|
-
).inert = this.
|
|
80
|
+
).inert = this._isZeroToLargeBreakpoint() && this._state !== "closed");
|
|
81
81
|
}
|
|
82
82
|
// In rare cases it can be that the animationEnd event is triggered twice.
|
|
83
83
|
// To avoid entering a corrupt state, exit when state is not expected.
|
|
84
|
-
|
|
84
|
+
_onAnimationEnd(t) {
|
|
85
85
|
var i;
|
|
86
|
-
t.animationName === "open" && this.
|
|
86
|
+
t.animationName === "open" && this._state === "opening" ? (this._state = "opened", this.inert = !1, this._attachWindowEvents(), this._setNavigationInert(), this._setNavigationSectionFocus(), this._checkActiveAction()) : t.animationName === "close" && this._state === "closing" && (this._state = "closed", this._navigationSectionContainerElement.scrollTo(0, 0), (i = this._windowEventsController) == null || i.abort(), this._resetLists(), this._setNavigationInert(), this._isZeroToLargeBreakpoint() && this._triggerElement && (h(this._triggerElement), this._triggerElement.focus())), this.completeUpdate();
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
_resetLists() {
|
|
89
89
|
const t = Array.from(
|
|
90
90
|
this.querySelectorAll("[data-section-action][data-action-active]")
|
|
91
91
|
);
|
|
92
92
|
t == null || t.forEach((i) => i.removeAttribute("data-action-active"));
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
this.
|
|
96
|
-
signal: this.
|
|
97
|
-
}), window.addEventListener("click", this.
|
|
98
|
-
signal: this.
|
|
94
|
+
_attachWindowEvents() {
|
|
95
|
+
this._windowEventsController = new AbortController(), window.addEventListener("keydown", (t) => this._onKeydownEvent(t), {
|
|
96
|
+
signal: this._windowEventsController.signal
|
|
97
|
+
}), window.addEventListener("click", this._handleNavigationSectionClose, {
|
|
98
|
+
signal: this._windowEventsController.signal
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
_isCloseElement(t) {
|
|
102
102
|
return t.nodeName === "A" || !t.hasAttribute("disabled") && (t.hasAttribute("sbb-navigation-close") || t.hasAttribute("sbb-navigation-section-close"));
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
_isZeroToLargeBreakpoint() {
|
|
105
105
|
return S("zero", "large");
|
|
106
106
|
}
|
|
107
107
|
// Closes the navigation on "Esc" key pressed.
|
|
108
|
-
|
|
109
|
-
this.
|
|
108
|
+
_onKeydownEvent(t) {
|
|
109
|
+
this._state === "opened" && t.key === "Escape" && this.close();
|
|
110
110
|
}
|
|
111
111
|
// Set focus on the first focusable element.
|
|
112
|
-
|
|
113
|
-
const t =
|
|
112
|
+
_setNavigationSectionFocus() {
|
|
113
|
+
const t = y(
|
|
114
114
|
[this.shadowRoot.querySelector("#sbb-navigation-section-back-button")].concat(Array.from(this.children)).filter((i) => i instanceof window.HTMLElement)
|
|
115
115
|
);
|
|
116
|
-
t && (
|
|
116
|
+
t && (h(t), t.focus());
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
_checkActiveAction() {
|
|
119
119
|
var t;
|
|
120
120
|
(t = this.querySelector(
|
|
121
121
|
":is(sbb-navigation-button, sbb-navigation-link).sbb-active"
|
|
122
122
|
)) == null || t.toggleAttribute("data-action-active", !0);
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
if (t.key !== "Tab" || this.
|
|
124
|
+
_handleNavigationSectionFocus(t) {
|
|
125
|
+
if (t.key !== "Tab" || this._isZeroToLargeBreakpoint())
|
|
126
126
|
return;
|
|
127
127
|
const i = Array.from(
|
|
128
128
|
this.closest("sbb-navigation").shadowRoot.children
|
|
129
|
-
),
|
|
130
|
-
filter: (
|
|
131
|
-
}),
|
|
132
|
-
c && (
|
|
129
|
+
), n = m(i, {
|
|
130
|
+
filter: (p) => p.nodeName !== "SBB-NAVIGATION-SECTION"
|
|
131
|
+
}), a = Array.from(this.shadowRoot.children), e = m(a), s = e[0], r = e[e.length - 1], c = t.shiftKey ? this._triggerElement : n[n.indexOf(this._triggerElement) + 1], g = t.shiftKey ? s : r;
|
|
132
|
+
c && (s.getRootNode().activeElement === g || r.getRootNode().activeElement === g) && (c.focus(), t.preventDefault());
|
|
133
133
|
}
|
|
134
134
|
connectedCallback() {
|
|
135
135
|
var t, i;
|
|
136
|
-
super.connectedCallback(), this.id || (this.id = `sbb-navigation-section-${
|
|
136
|
+
super.connectedCallback(), this.id || (this.id = `sbb-navigation-section-${P++}`), this._state || (this._state = "closed"), this._configure(this.trigger), this._firstLevelNavigation = (i = (t = this._triggerElement) == null ? void 0 : t.closest) == null ? void 0 : i.call(t, "sbb-navigation");
|
|
137
137
|
}
|
|
138
138
|
disconnectedCallback() {
|
|
139
139
|
var t, i;
|
|
140
|
-
super.disconnectedCallback(), (t = this.
|
|
140
|
+
super.disconnectedCallback(), (t = this._navigationSectionController) == null || t.abort(), (i = this._windowEventsController) == null || i.abort();
|
|
141
141
|
}
|
|
142
142
|
render() {
|
|
143
|
-
return
|
|
143
|
+
return f`
|
|
144
144
|
<div
|
|
145
145
|
class="sbb-navigation-section__container"
|
|
146
|
-
${
|
|
146
|
+
${d((t) => this._navigationSectionContainerElement = t)}
|
|
147
147
|
>
|
|
148
148
|
<nav
|
|
149
|
-
@animationend=${(t) => this.
|
|
149
|
+
@animationend=${(t) => this._onAnimationEnd(t)}
|
|
150
150
|
class="sbb-navigation-section"
|
|
151
|
-
aria-labelledby=${this.accessibilityLabel ?
|
|
152
|
-
aria-label=${this.accessibilityLabel ? this.accessibilityLabel :
|
|
153
|
-
${
|
|
154
|
-
(t) => this.
|
|
151
|
+
aria-labelledby=${this.accessibilityLabel ? v : "title"}
|
|
152
|
+
aria-label=${this.accessibilityLabel ? this.accessibilityLabel : v}
|
|
153
|
+
${d(
|
|
154
|
+
(t) => this._navigationSection = t
|
|
155
155
|
)}
|
|
156
156
|
>
|
|
157
157
|
<div class="sbb-navigation-section__wrapper">
|
|
@@ -161,7 +161,7 @@ let $ = 0, e = class extends L(f) {
|
|
|
161
161
|
<sbb-transparent-button
|
|
162
162
|
id="sbb-navigation-section-back-button"
|
|
163
163
|
class="sbb-navigation-section__back"
|
|
164
|
-
aria-label=${this.accessibilityBackLabel ||
|
|
164
|
+
aria-label=${this.accessibilityBackLabel || N[this._language.current]}
|
|
165
165
|
negative
|
|
166
166
|
size="m"
|
|
167
167
|
type="button"
|
|
@@ -181,25 +181,25 @@ let $ = 0, e = class extends L(f) {
|
|
|
181
181
|
`;
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
o.styles = F;
|
|
185
185
|
b([
|
|
186
186
|
l({ attribute: "title-content", reflect: !0 })
|
|
187
|
-
],
|
|
187
|
+
], o.prototype, "titleContent", 2);
|
|
188
188
|
b([
|
|
189
189
|
l()
|
|
190
|
-
],
|
|
190
|
+
], o.prototype, "trigger", 1);
|
|
191
191
|
b([
|
|
192
192
|
l({ attribute: "accessibility-label" })
|
|
193
|
-
],
|
|
193
|
+
], o.prototype, "accessibilityLabel", 2);
|
|
194
194
|
b([
|
|
195
195
|
l({ attribute: "accessibility-back-label" })
|
|
196
|
-
],
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
], o.prototype, "accessibilityBackLabel", 2);
|
|
197
|
+
o = b([
|
|
198
|
+
w("sbb-navigation-section"),
|
|
199
|
+
x({
|
|
200
200
|
slot: "navigation-section"
|
|
201
201
|
})
|
|
202
|
-
],
|
|
202
|
+
], o);
|
|
203
203
|
export {
|
|
204
|
-
|
|
204
|
+
o as SbbNavigationSectionElement
|
|
205
205
|
};
|