@sbb-esta/lyne-elements 0.52.1 → 0.53.0
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/checkbox.d.ts +3 -46
- package/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts +4 -2
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +26 -23
- package/checkbox/checkbox-panel/checkbox-panel.d.ts +41 -0
- package/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -0
- package/checkbox/checkbox-panel.d.ts +2 -0
- package/checkbox/checkbox-panel.d.ts.map +1 -0
- package/checkbox/checkbox-panel.js +67 -0
- package/checkbox/checkbox.js +27 -104
- package/checkbox/common/checkbox-common.d.ts +13 -0
- package/checkbox/common/checkbox-common.d.ts.map +1 -0
- package/checkbox/common.d.ts +2 -0
- package/checkbox/common.d.ts.map +1 -0
- package/checkbox/common.js +52 -0
- package/checkbox.d.ts +2 -0
- package/checkbox.d.ts.map +1 -1
- package/checkbox.js +2 -0
- 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/panel-mixin.d.ts +13 -0
- package/core/mixins/panel-mixin.d.ts.map +1 -0
- package/core/mixins.d.ts +1 -0
- package/core/mixins.d.ts.map +1 -1
- package/core/mixins.js +170 -139
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +1 -1
- package/core/testing.js +29 -29
- package/core.css +1 -1
- package/custom-elements.json +8862 -6904
- package/datepicker/common.js +55 -55
- package/datepicker/datepicker-toggle.js +94 -94
- package/datepicker/datepicker.js +144 -144
- package/development/checkbox/checkbox/checkbox.d.ts +3 -46
- package/development/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts +4 -2
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +43 -13
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts +41 -0
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -0
- package/development/checkbox/checkbox-panel.d.ts +2 -0
- package/development/checkbox/checkbox-panel.d.ts.map +1 -0
- package/development/checkbox/checkbox-panel.js +86 -0
- package/development/checkbox/checkbox.js +19 -239
- package/development/checkbox/common/checkbox-common.d.ts +13 -0
- package/development/checkbox/common/checkbox-common.d.ts.map +1 -0
- package/development/checkbox/common.d.ts +2 -0
- package/development/checkbox/common.d.ts.map +1 -0
- package/development/checkbox/common.js +156 -0
- package/development/checkbox.d.ts +2 -0
- package/development/checkbox.d.ts.map +1 -1
- package/development/checkbox.js +3 -1
- package/development/core/mixins/panel-mixin.d.ts +13 -0
- package/development/core/mixins/panel-mixin.d.ts.map +1 -0
- package/development/core/mixins.d.ts +1 -0
- package/development/core/mixins.d.ts.map +1 -1
- package/development/core/mixins.js +187 -31
- package/development/image.js +1 -1
- package/development/radio-button/common/radio-button-common.d.ts +22 -0
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -0
- package/development/radio-button/common.d.ts +2 -0
- package/development/radio-button/common.d.ts.map +1 -0
- package/development/radio-button/common.js +294 -0
- package/development/radio-button/radio-button/radio-button.d.ts +2 -81
- package/development/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +6 -4
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +55 -23
- package/development/radio-button/radio-button-panel/index.d.ts +2 -0
- package/development/radio-button/radio-button-panel/index.d.ts.map +1 -0
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +29 -0
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -0
- package/development/radio-button/radio-button-panel.d.ts +2 -0
- package/development/radio-button/radio-button-panel.d.ts.map +1 -0
- package/development/radio-button/radio-button-panel.js +69 -0
- package/development/radio-button/radio-button.js +10 -324
- package/development/radio-button.d.ts +2 -0
- package/development/radio-button.d.ts.map +1 -1
- package/development/radio-button.js +3 -1
- package/{selection-panel/selection-panel.d.ts → development/selection-expansion-panel/selection-expansion-panel.d.ts} +9 -7
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -0
- package/development/selection-expansion-panel.d.ts +2 -0
- package/development/selection-expansion-panel.d.ts.map +1 -0
- package/development/selection-expansion-panel.js +340 -0
- package/development/tabs/tab/index.d.ts +2 -0
- package/development/tabs/tab/index.d.ts.map +1 -0
- package/development/tabs/tab/tab.d.ts +24 -0
- package/development/tabs/tab/tab.d.ts.map +1 -0
- package/development/tabs/tab-group/tab-group.d.ts +20 -15
- package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/development/tabs/tab-group.js +24 -14
- package/development/tabs/{tab-title/tab-title.d.ts → tab-label/tab-label.d.ts} +4 -4
- package/development/tabs/{tab-title/tab-title.d.ts.map → tab-label/tab-label.d.ts.map} +1 -1
- package/development/tabs/tab-label.d.ts +2 -0
- package/development/tabs/tab-label.d.ts.map +1 -0
- package/development/tabs/{tab-title.js → tab-label.js} +86 -86
- package/development/tabs/tab.d.ts +2 -0
- package/development/tabs/tab.d.ts.map +1 -0
- package/development/tabs/tab.js +71 -0
- package/development/tabs.d.ts +2 -1
- package/development/tabs.d.ts.map +1 -1
- package/development/tabs.js +3 -2
- package/development/train/train-formation/train-formation.d.ts.map +1 -1
- package/development/train/train-formation.js +12 -12
- 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/index.d.ts +10 -8
- package/index.js +10 -8
- 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 +34 -19
- package/popover/popover.js +110 -110
- package/radio-button/common/radio-button-common.d.ts +22 -0
- package/radio-button/common/radio-button-common.d.ts.map +1 -0
- package/radio-button/common.d.ts +2 -0
- package/radio-button/common.d.ts.map +1 -0
- package/radio-button/common.js +105 -0
- package/radio-button/radio-button/radio-button.d.ts +2 -81
- package/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts +6 -4
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +86 -80
- package/radio-button/radio-button-panel/index.d.ts +2 -0
- package/radio-button/radio-button-panel/index.d.ts.map +1 -0
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +29 -0
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -0
- package/radio-button/radio-button-panel.d.ts +2 -0
- package/radio-button/radio-button-panel.d.ts.map +1 -0
- package/radio-button/radio-button-panel.js +59 -0
- package/radio-button/radio-button.js +20 -143
- package/radio-button.d.ts +2 -0
- package/radio-button.d.ts.map +1 -1
- package/radio-button.js +2 -0
- package/select.js +178 -178
- package/{development/selection-panel/selection-panel.d.ts → selection-expansion-panel/selection-expansion-panel.d.ts} +9 -7
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -0
- package/selection-expansion-panel.d.ts +2 -0
- package/selection-expansion-panel.d.ts.map +1 -0
- package/selection-expansion-panel.js +146 -0
- package/slider.js +58 -58
- package/standard-theme.css +1 -1
- 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/index.d.ts +2 -0
- package/tabs/tab/index.d.ts.map +1 -0
- package/tabs/tab/tab.d.ts +24 -0
- package/tabs/tab/tab.d.ts.map +1 -0
- package/tabs/tab-group/tab-group.d.ts +20 -15
- package/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/tabs/tab-group.js +85 -75
- package/tabs/{tab-title/tab-title.d.ts → tab-label/tab-label.d.ts} +4 -4
- package/tabs/{tab-title/tab-title.d.ts.map → tab-label/tab-label.d.ts.map} +1 -1
- package/tabs/tab-label.d.ts +2 -0
- package/tabs/tab-label.d.ts.map +1 -0
- package/tabs/tab-label.js +51 -0
- package/tabs/tab.d.ts +2 -0
- package/tabs/tab.d.ts.map +1 -0
- package/tabs/tab.js +41 -0
- package/tabs.d.ts +2 -1
- package/tabs.d.ts.map +1 -1
- package/tabs.js +2 -1
- package/tag/tag-group.js +8 -8
- package/tag/tag.js +27 -27
- 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/train-formation.d.ts.map +1 -1
- package/train/train-formation.js +51 -51
- package/train/train-wagon.js +30 -30
- package/train/train.js +13 -13
- package/development/selection-panel/selection-panel.d.ts.map +0 -1
- package/development/selection-panel.d.ts +0 -2
- package/development/selection-panel.d.ts.map +0 -1
- package/development/selection-panel.js +0 -376
- package/development/tabs/tab-title.d.ts +0 -2
- package/development/tabs/tab-title.d.ts.map +0 -1
- package/development/teaser-hero/teaser-hero.d.ts +0 -26
- package/development/teaser-hero/teaser-hero.d.ts.map +0 -1
- package/development/teaser-hero.d.ts +0 -2
- package/development/teaser-hero.d.ts.map +0 -1
- package/development/teaser-hero.js +0 -181
- package/development/teaser-paid/teaser-paid.d.ts +0 -20
- package/development/teaser-paid/teaser-paid.d.ts.map +0 -1
- package/development/teaser-paid.d.ts +0 -2
- package/development/teaser-paid.d.ts.map +0 -1
- package/development/teaser-paid.js +0 -91
- package/selection-panel/selection-panel.d.ts.map +0 -1
- package/selection-panel.d.ts +0 -2
- package/selection-panel.d.ts.map +0 -1
- package/selection-panel.js +0 -138
- package/tabs/tab-title.d.ts +0 -2
- package/tabs/tab-title.d.ts.map +0 -1
- package/tabs/tab-title.js +0 -51
- package/teaser-hero/teaser-hero.d.ts +0 -26
- package/teaser-hero/teaser-hero.d.ts.map +0 -1
- package/teaser-hero.d.ts +0 -2
- package/teaser-hero.d.ts.map +0 -1
- package/teaser-hero.js +0 -51
- package/teaser-paid/teaser-paid.d.ts +0 -20
- package/teaser-paid/teaser-paid.d.ts.map +0 -1
- package/teaser-paid.d.ts +0 -2
- package/teaser-paid.d.ts.map +0 -1
- package/teaser-paid.js +0 -28
package/time-input.js
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as p, LitElement as m, html as _ } from "lit";
|
|
2
|
+
import { property as d, state as c, customElement as E } from "lit/decorators.js";
|
|
3
3
|
import { ref as g } from "lit/directives/ref.js";
|
|
4
|
-
import { SbbLanguageController as
|
|
5
|
-
import { findInput as
|
|
6
|
-
import { EventEmitter as
|
|
7
|
-
import { i18nTimeInputChange as
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
for (var
|
|
11
|
-
(
|
|
12
|
-
return
|
|
4
|
+
import { SbbLanguageController as b } from "./core/controllers.js";
|
|
5
|
+
import { findInput as f } from "./core/dom.js";
|
|
6
|
+
import { EventEmitter as o, forwardEventToHost as h } from "./core/eventing.js";
|
|
7
|
+
import { i18nTimeInputChange as C } from "./core/i18n.js";
|
|
8
|
+
const w = p`:host{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;display:block}`;
|
|
9
|
+
var v = Object.defineProperty, A = Object.getOwnPropertyDescriptor, u = (t, e, i, n) => {
|
|
10
|
+
for (var s = n > 1 ? void 0 : n ? A(e, i) : e, a = t.length - 1, l; a >= 0; a--)
|
|
11
|
+
(l = t[a]) && (s = (n ? l(e, i, s) : l(s)) || s);
|
|
12
|
+
return n && s && v(e, i, s), s;
|
|
13
13
|
};
|
|
14
|
-
const
|
|
15
|
-
let r = class extends
|
|
14
|
+
const V = /[0-9.:,\-;_hH]/, y = /^([0-9]{1,2})([0-9]{2})$/, I = /^([0-9]{1,2})?[.:,\-;_hH]?([0-9]{1,2})?$/;
|
|
15
|
+
let r = class extends m {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(...arguments), this.
|
|
17
|
+
super(...arguments), this._input = null, this._inputElement = null, this._didChange = new o(this, r.events.didChange, {
|
|
18
18
|
bubbles: !0,
|
|
19
19
|
cancelable: !0
|
|
20
|
-
}), this.
|
|
20
|
+
}), this._validationChange = new o(
|
|
21
21
|
this,
|
|
22
22
|
r.events.validationChange,
|
|
23
23
|
{
|
|
24
24
|
bubbles: !0,
|
|
25
25
|
composed: !1
|
|
26
26
|
}
|
|
27
|
-
), this.
|
|
27
|
+
), this._abortController = new AbortController(), this._language = new b(this);
|
|
28
28
|
}
|
|
29
29
|
set input(t) {
|
|
30
|
-
this.
|
|
30
|
+
this._input = t, this._findInputElement();
|
|
31
31
|
}
|
|
32
32
|
get input() {
|
|
33
|
-
return this.
|
|
33
|
+
return this._input;
|
|
34
34
|
}
|
|
35
35
|
connectedCallback() {
|
|
36
|
-
super.connectedCallback(), this.
|
|
36
|
+
super.connectedCallback(), this._findInputElement(), this._inputElement && this._updateValue(this._inputElement.value);
|
|
37
37
|
}
|
|
38
38
|
disconnectedCallback() {
|
|
39
39
|
var t;
|
|
40
|
-
super.disconnectedCallback(), (t = this.
|
|
40
|
+
super.disconnectedCallback(), (t = this._abortController) == null || t.abort();
|
|
41
41
|
}
|
|
42
42
|
/** Gets the input value with the correct date format. */
|
|
43
43
|
// TODO: refactor this to be a get/set
|
|
44
44
|
getValueAsDate() {
|
|
45
45
|
var t;
|
|
46
|
-
return this.
|
|
46
|
+
return this._formatValueAsDate(this._parseInput((t = this._inputElement) == null ? void 0 : t.value));
|
|
47
47
|
}
|
|
48
48
|
/** Set the input value to the correctly formatted value. */
|
|
49
49
|
setValueAsDate(t) {
|
|
50
|
-
if (!t || !this.
|
|
50
|
+
if (!t || !this._inputElement)
|
|
51
51
|
return;
|
|
52
52
|
const e = t instanceof Date ? t : new Date(t);
|
|
53
|
-
this.
|
|
53
|
+
this._inputElement.value = this._formatValue({
|
|
54
54
|
hours: e.getHours(),
|
|
55
55
|
minutes: e.getMinutes()
|
|
56
|
-
}), this.
|
|
56
|
+
}), this._inputElement.dispatchEvent(new FocusEvent("blur", { composed: !0 }));
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
const t = this.
|
|
60
|
-
this.
|
|
58
|
+
_findInputElement() {
|
|
59
|
+
const t = this._inputElement;
|
|
60
|
+
this._inputElement = f(this, this.input), t !== this._inputElement && this._registerInputElement();
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
_registerInputElement() {
|
|
63
63
|
var t;
|
|
64
|
-
(t = this.
|
|
64
|
+
(t = this._abortController) == null || t.abort(), this._inputElement && (this._abortController = new AbortController(), this._inputElement.toggleAttribute("data-sbb-time-input", !0), this._inputElement.type = "text", this._inputElement.inputMode = "numeric", this._inputElement.maxLength = 5, this._inputElement.placeholder || (this._inputElement.placeholder = "HH:MM"), this._inputElement.addEventListener(
|
|
65
65
|
"input",
|
|
66
|
-
(e) =>
|
|
67
|
-
{ signal: this.
|
|
68
|
-
), this.
|
|
66
|
+
(e) => h(e, this),
|
|
67
|
+
{ signal: this._abortController.signal }
|
|
68
|
+
), this._inputElement.addEventListener(
|
|
69
69
|
"keydown",
|
|
70
|
-
(e) => this.
|
|
71
|
-
{ signal: this.
|
|
72
|
-
), this.
|
|
70
|
+
(e) => this._preventCharInsert(e),
|
|
71
|
+
{ signal: this._abortController.signal }
|
|
72
|
+
), this._inputElement.addEventListener(
|
|
73
73
|
"change",
|
|
74
|
-
(e) => this.
|
|
74
|
+
(e) => this._updateValueAndEmitChange(e),
|
|
75
75
|
{
|
|
76
|
-
signal: this.
|
|
76
|
+
signal: this._abortController.signal
|
|
77
77
|
}
|
|
78
78
|
));
|
|
79
79
|
}
|
|
80
80
|
/** Applies the correct format to values and triggers event dispatch. */
|
|
81
|
-
|
|
82
|
-
this.
|
|
81
|
+
_updateValueAndEmitChange(t) {
|
|
82
|
+
this._updateValue(t.target.value), this._emitChange(t), this._updateAccessibilityMessage();
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Updates `value` and `valueAsDate`. The direct update on the `_inputElement` is required
|
|
86
86
|
* to force the input change when the typed value is the same of the current one.
|
|
87
87
|
*/
|
|
88
|
-
|
|
89
|
-
if (this.
|
|
88
|
+
_updateValue(t) {
|
|
89
|
+
if (this._statusContainer && (this._statusContainer.innerText = ""), !this._inputElement)
|
|
90
90
|
return;
|
|
91
|
-
const e = this.
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
this.
|
|
91
|
+
const e = this._parseInput(t), i = !!e && this._isTimeValid(e), n = !t || t.trim() === "" || i;
|
|
92
|
+
n && e && (this._inputElement.value = this._formatValue(e));
|
|
93
|
+
const s = !this._inputElement.hasAttribute("data-sbb-invalid");
|
|
94
|
+
this._inputElement.toggleAttribute("data-sbb-invalid", !n), s !== n && this._validationChange.emit({ valid: n });
|
|
95
95
|
}
|
|
96
96
|
/** Emits the change event. */
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
_emitChange(t) {
|
|
98
|
+
h(t, this), this._didChange.emit();
|
|
99
99
|
}
|
|
100
100
|
/** Returns the right format for the `value` property. */
|
|
101
|
-
|
|
102
|
-
const e = String(t.hours).padStart(2, "0"),
|
|
103
|
-
return `${e}:${
|
|
101
|
+
_formatValue(t) {
|
|
102
|
+
const e = String(t.hours).padStart(2, "0"), i = String(t.minutes).padStart(2, "0");
|
|
103
|
+
return `${e}:${i}`;
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Returns the right format for the `valueAsDate` property:
|
|
107
107
|
* sets the start date at 01.01.1970, then adds the typed hours/minutes.
|
|
108
108
|
*/
|
|
109
|
-
|
|
110
|
-
return !t || !this.
|
|
109
|
+
_formatValueAsDate(t) {
|
|
110
|
+
return !t || !this._isTimeValid(t) ? null : new Date((/* @__PURE__ */ new Date(0)).setHours(t.hours, t.minutes, 0, 0));
|
|
111
111
|
}
|
|
112
112
|
/** Checks if values of hours and minutes are possible, to avoid non-existent times. */
|
|
113
|
-
|
|
113
|
+
_isTimeValid(t) {
|
|
114
114
|
return t.hours < 24 && t.minutes < 60;
|
|
115
115
|
}
|
|
116
116
|
/** Validate input against the defined RegExps. */
|
|
117
|
-
|
|
117
|
+
_parseInput(t) {
|
|
118
118
|
const e = t == null ? void 0 : t.trim();
|
|
119
119
|
if (!e)
|
|
120
120
|
return null;
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
return { hours: +
|
|
124
|
-
const
|
|
125
|
-
return
|
|
121
|
+
const i = e.match(y);
|
|
122
|
+
if (i)
|
|
123
|
+
return { hours: +i[1] || 0, minutes: +i[2] || 0 };
|
|
124
|
+
const n = e.match(I);
|
|
125
|
+
return n ? { hours: +n[1] || 0, minutes: +n[2] || 0 } : null;
|
|
126
126
|
}
|
|
127
127
|
/** Only allow typing numbers and separator keys. */
|
|
128
|
-
|
|
128
|
+
_preventCharInsert(t) {
|
|
129
129
|
const e = [
|
|
130
130
|
"Backspace",
|
|
131
131
|
"Tab",
|
|
@@ -140,36 +140,36 @@ let r = class extends p {
|
|
|
140
140
|
"PageDown",
|
|
141
141
|
"Delete"
|
|
142
142
|
];
|
|
143
|
-
!t.ctrlKey && !t.altKey && !t.metaKey && !e.includes(t.key) && !
|
|
143
|
+
!t.ctrlKey && !t.altKey && !t.metaKey && !e.includes(t.key) && !V.test(t.key) && t.preventDefault();
|
|
144
144
|
}
|
|
145
145
|
// We use a programmatic approach to avoid initial setting the message
|
|
146
146
|
// and to not immediately change output if language should change (no reason to read out message).
|
|
147
|
-
|
|
147
|
+
_updateAccessibilityMessage() {
|
|
148
148
|
var e;
|
|
149
|
-
this.
|
|
149
|
+
this._inputElement.hasAttribute("data-sbb-invalid") || (this._statusContainer.innerText = `${C[this._language.current]} ${(e = this._inputElement) == null ? void 0 : e.value}.`);
|
|
150
150
|
}
|
|
151
151
|
render() {
|
|
152
|
-
return
|
|
152
|
+
return _`
|
|
153
153
|
<p
|
|
154
154
|
role="status"
|
|
155
|
-
${g((t) => this.
|
|
155
|
+
${g((t) => this._statusContainer = t)}
|
|
156
156
|
></p>
|
|
157
157
|
`;
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
r.styles =
|
|
160
|
+
r.styles = w;
|
|
161
161
|
r.events = {
|
|
162
162
|
didChange: "didChange",
|
|
163
163
|
validationChange: "validationChange"
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
u([
|
|
166
|
+
d()
|
|
167
167
|
], r.prototype, "input", 1);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
], r.prototype, "
|
|
171
|
-
r =
|
|
172
|
-
|
|
168
|
+
u([
|
|
169
|
+
c()
|
|
170
|
+
], r.prototype, "_inputElement", 2);
|
|
171
|
+
r = u([
|
|
172
|
+
E("sbb-time-input")
|
|
173
173
|
], r);
|
|
174
174
|
export {
|
|
175
175
|
r as SbbTimeInputElement
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { property as h, customElement as
|
|
2
|
-
import { SbbConnectedAbortController as
|
|
1
|
+
import { property as h, customElement as m } from "lit/decorators.js";
|
|
2
|
+
import { SbbConnectedAbortController as b, SbbLanguageController as p } from "./core/controllers.js";
|
|
3
3
|
import { setOrRemoveAttribute as d } from "./core/dom.js";
|
|
4
4
|
import { i18nOccupancy as f } from "./core/i18n.js";
|
|
5
5
|
import { SbbNegativeMixin as u } from "./core/mixins.js";
|
|
6
6
|
import { SbbIconBase as n } from "./icon.js";
|
|
7
|
-
import { css as
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
for (var
|
|
11
|
-
(
|
|
12
|
-
return
|
|
7
|
+
import { css as g } from "lit";
|
|
8
|
+
const v = g`@media (forced-colors: active) and (prefers-color-scheme: light){:host svg{filter:invert(1)}}`;
|
|
9
|
+
var _ = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (e, t, i, r) => {
|
|
10
|
+
for (var a = r > 1 ? void 0 : r ? w(t, i) : t, c = e.length - 1, o; c >= 0; c--)
|
|
11
|
+
(o = e[c]) && (a = (r ? o(t, i, a) : o(a)) || a);
|
|
12
|
+
return r && a && _(t, i, a), a;
|
|
13
13
|
};
|
|
14
|
-
let
|
|
14
|
+
let s = class extends u(n) {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(...arguments), this.
|
|
16
|
+
super(...arguments), this._abort = new b(this), this._language = new p(this).withHandler(() => this._setAriaLabel());
|
|
17
17
|
}
|
|
18
|
-
async
|
|
18
|
+
async _setNameAndAriaLabel() {
|
|
19
19
|
var t, i;
|
|
20
20
|
if (!this.occupancy)
|
|
21
21
|
return;
|
|
@@ -23,31 +23,31 @@ let o = class extends u(n) {
|
|
|
23
23
|
(t = globalThis.window) != null && t.matchMedia("(forced-colors: active)").matches ? e += "-high-contrast" : (this.negative || (i = globalThis.window) != null && i.matchMedia("(prefer-color-scheme: dark)").matches) && (e += "-negative"), await this.loadSvgIcon(e);
|
|
24
24
|
}
|
|
25
25
|
async fetchSvgIcon(e, t) {
|
|
26
|
-
return this.
|
|
26
|
+
return this._setAriaLabel(), super.fetchSvgIcon(e, t);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
_setAriaLabel() {
|
|
29
29
|
var t;
|
|
30
|
-
const e = (t = f[this.occupancy]) == null ? void 0 : t[this.
|
|
30
|
+
const e = (t = f[this.occupancy]) == null ? void 0 : t[this._language.current];
|
|
31
31
|
d(this, "aria-label", e);
|
|
32
32
|
}
|
|
33
33
|
connectedCallback() {
|
|
34
|
-
super.connectedCallback(), window.matchMedia("(forced-colors: active)").addEventListener("change", () => this.
|
|
35
|
-
signal: this.
|
|
36
|
-
}), window.matchMedia("(prefer-color-scheme: dark)").addEventListener("change", () => this.
|
|
37
|
-
signal: this.
|
|
38
|
-
}), this.
|
|
34
|
+
super.connectedCallback(), window.matchMedia("(forced-colors: active)").addEventListener("change", () => this._setNameAndAriaLabel(), {
|
|
35
|
+
signal: this._abort.signal
|
|
36
|
+
}), window.matchMedia("(prefer-color-scheme: dark)").addEventListener("change", () => this._setNameAndAriaLabel(), {
|
|
37
|
+
signal: this._abort.signal
|
|
38
|
+
}), this._setNameAndAriaLabel();
|
|
39
39
|
}
|
|
40
40
|
willUpdate(e) {
|
|
41
|
-
super.willUpdate(e), (e.has("occupancy") || e.has("negative")) && this.
|
|
41
|
+
super.willUpdate(e), (e.has("occupancy") || e.has("negative")) && this._setNameAndAriaLabel();
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
s.styles = [n.styles, v];
|
|
45
45
|
l([
|
|
46
46
|
h()
|
|
47
|
-
],
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
],
|
|
47
|
+
], s.prototype, "occupancy", 2);
|
|
48
|
+
s = l([
|
|
49
|
+
m("sbb-timetable-occupancy-icon")
|
|
50
|
+
], s);
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
s as SbbTimetableOccupancyIconElement
|
|
53
53
|
};
|
package/timetable-occupancy.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { css as p, LitElement as m, html as r, nothing as y } from "lit";
|
|
2
|
-
import { property as
|
|
2
|
+
import { property as b, customElement as u } from "lit/decorators.js";
|
|
3
3
|
import { SbbLanguageController as f } from "./core/controllers.js";
|
|
4
4
|
import { i18nClass as h } from "./core/i18n.js";
|
|
5
5
|
import { SbbNegativeMixin as g } from "./core/mixins.js";
|
|
6
6
|
import "./screen-reader-only.js";
|
|
7
7
|
import "./timetable-occupancy-icon.js";
|
|
8
8
|
const v = p`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-occupancy-color: var(--sbb-color-charcoal);--sbb-icon-svg-width: .890625rem;--sbb-icon-svg-height: v0.75rem;display:inline-block}@media (min-width: 52.5rem){:host{--sbb-icon-svg-width: 1.1875rem;--sbb-icon-svg-height: v1rem}}:host([negative]){--sbb-timetable-occupancy-color: var(--sbb-color-white)}.sbb-timetable-occupancy__list{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;align-items:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-2x)}.sbb-timetable-occupancy__list-item{display:flex;align-items:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-1x)}.sbb-timetable-occupancy__list-item-class{--sbb-text-font-size: var(--sbb-font-size-text-s);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:1;color:var(--sbb-timetable-occupancy-color)}.sbb-timetable-occupancy__list-item-icon{display:flex}`;
|
|
9
|
-
var d = Object.defineProperty, _ = Object.getOwnPropertyDescriptor,
|
|
9
|
+
var d = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, l = (e, t, a, i) => {
|
|
10
10
|
for (var s = i > 1 ? void 0 : i ? _(t, a) : t, n = e.length - 1, o; n >= 0; n--)
|
|
11
11
|
(o = e[n]) && (s = (i ? o(t, a, s) : o(s)) || s);
|
|
12
12
|
return i && s && d(t, a, s), s;
|
|
13
13
|
};
|
|
14
14
|
let c = class extends g(m) {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(...arguments), this.
|
|
16
|
+
super(...arguments), this._language = new f(this);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
return r` ${(this.firstClassOccupancy || this.secondClassOccupancy) && r`
|
|
@@ -28,7 +28,7 @@ let c = class extends g(m) {
|
|
|
28
28
|
${this.firstClassOccupancy && t === 0 ? "1" : "2"}.
|
|
29
29
|
</span>
|
|
30
30
|
<sbb-screen-reader-only>
|
|
31
|
-
${`${h[this.firstClassOccupancy && t === 0 ? "first" : "second"][this.
|
|
31
|
+
${`${h[this.firstClassOccupancy && t === 0 ? "first" : "second"][this._language.current]}.`}
|
|
32
32
|
</sbb-screen-reader-only>
|
|
33
33
|
<sbb-timetable-occupancy-icon
|
|
34
34
|
class="sbb-timetable-occupancy__list-item-icon"
|
|
@@ -44,13 +44,13 @@ let c = class extends g(m) {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
c.styles = v;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
l([
|
|
48
|
+
b({ attribute: "first-class-occupancy" })
|
|
49
49
|
], c.prototype, "firstClassOccupancy", 2);
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
l([
|
|
51
|
+
b({ attribute: "second-class-occupancy" })
|
|
52
52
|
], c.prototype, "secondClassOccupancy", 2);
|
|
53
|
-
c =
|
|
53
|
+
c = l([
|
|
54
54
|
u("sbb-timetable-occupancy")
|
|
55
55
|
], c);
|
|
56
56
|
export {
|
package/toast.js
CHANGED
|
@@ -2,28 +2,28 @@ import { css as m, html as d, nothing as p } from "lit";
|
|
|
2
2
|
import { property as b, customElement as h } from "lit/decorators.js";
|
|
3
3
|
import { SbbOpenCloseBaseElement as f } from "./core/base-elements.js";
|
|
4
4
|
import { SbbConnectedAbortController as v, SbbLanguageController as g, SbbSlotStateController as u } from "./core/controllers.js";
|
|
5
|
-
import { isFirefox as
|
|
6
|
-
import { composedPathHasAttribute as
|
|
7
|
-
import { i18nCloseAlert as
|
|
8
|
-
import { SbbIconNameMixin as
|
|
5
|
+
import { isFirefox as _ } from "./core/dom.js";
|
|
6
|
+
import { composedPathHasAttribute as x } from "./core/eventing.js";
|
|
7
|
+
import { i18nCloseAlert as y } from "./core/i18n.js";
|
|
8
|
+
import { SbbIconNameMixin as T } from "./icon.js";
|
|
9
9
|
import "./button/transparent-button.js";
|
|
10
10
|
const k = m`*,:before,:after{box-sizing:border-box}:host{--sbb-toast-max-width: 25rem;--sbb-toast-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-6x) );--sbb-toast-animation-timing-function: ease;--sbb-toast-color: var(--sbb-color-white);--sbb-toast-text-color: var(--sbb-color-milk);--sbb-toast-background-color: var(--sbb-color-midnight);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-toast-margin: var(--sbb-spacing-responsive-s);--sbb-toast-padding-block: var(--sbb-spacing-responsive-xxxs);--sbb-toast-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-toast-border-radius: var(--sbb-border-radius-4x);--sbb-toast-container-display: flex;--sbb-toast-container-position: fixed;--sbb-toast-horizontal-position: initial;--sbb-toast-vertical-position: initial;display:block}:host(:not([data-state])),:host([data-state=closed]){--sbb-toast-container-display: none}:host([position=bottom-left]),:host([position=bottom-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-end}:host([position=bottom-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-end}:host([position=bottom-right]),:host([position=bottom-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-end}:host([position=top-left]),:host([position=top-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-start}:host([position=top-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-start}:host([position=top-right]),:host([position=top-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-start}.sbb-toast__overlay-container{position:var(--sbb-toast-container-position);pointer-events:none;top:0;right:0;bottom:0;left:0;display:var(--sbb-toast-container-display);justify-content:var(--sbb-toast-horizontal-position);align-items:var(--sbb-toast-vertical-position)}.sbb-toast{z-index:var(--sbb-toast-z-index, var(--sbb-overlay-default-z-index));pointer-events:auto;margin:var(--sbb-toast-margin);padding-block:var(--sbb-toast-padding-block);padding-inline:var(--sbb-toast-padding-inline);border-radius:var(--sbb-toast-border-radius);max-width:var(--sbb-toast-max-width);display:flex;color:var(--sbb-toast-color);background-color:var(--sbb-toast-background-color)}:host([data-state=opening]) .sbb-toast{animation-name:open;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}:host([data-state=closing]) .sbb-toast{animation-name:close;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}.sbb-toast__icon{margin-inline-end:var(--sbb-spacing-fixed-2x);line-height:initial}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-toast__icon{display:none}.sbb-toast__content{--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-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text);color:var(--sbb-toast-text-color);flex:1 1 0}.sbb-toast__action{position:relative;min-width:2.5rem}:host(:not([data-slot-names~=action],[dismissible])) .sbb-toast__action{display:none}::slotted([data-sbb-button]),.sbb-toast__action-button{margin-inline:var(--sbb-spacing-fixed-2x);position:absolute;top:-.625rem}::slotted(:is(sbb-link,sbb-link-button,sbb-link-static)){margin-inline-start:var(--sbb-spacing-fixed-4x)}@keyframes open{0%{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}to{visibility:visible;opacity:1;transform:translateY(0)}}@keyframes close{0%{visibility:visible;opacity:1;transform:translateY(0)}to{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}}`;
|
|
11
|
-
var
|
|
12
|
-
for (var t = a > 1 ? void 0 : a ?
|
|
13
|
-
(l =
|
|
14
|
-
return a && t &&
|
|
11
|
+
var N = Object.defineProperty, C = Object.getOwnPropertyDescriptor, n = (o, s, i, a) => {
|
|
12
|
+
for (var t = a > 1 ? void 0 : a ? C(s, i) : s, r = o.length - 1, l; r >= 0; r--)
|
|
13
|
+
(l = o[r]) && (t = (a ? l(s, i, t) : l(t)) || t);
|
|
14
|
+
return a && t && N(s, i, t), t;
|
|
15
15
|
};
|
|
16
16
|
const c = /* @__PURE__ */ new Set();
|
|
17
|
-
let e = class extends
|
|
17
|
+
let e = class extends T(f) {
|
|
18
18
|
constructor() {
|
|
19
|
-
super(), this.timeout = 6e3, this.position = "bottom-center", this.dismissible = !1, this.politeness = "polite", this.
|
|
19
|
+
super(), this.timeout = 6e3, this.position = "bottom-center", this.dismissible = !1, this.politeness = "polite", this._abort = new v(this), this._language = new g(this), new u(this);
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Role of the live region. This is only for Firefox as there is a known issue where Firefox +
|
|
23
23
|
* JAWS does not read out aria-live message.
|
|
24
24
|
*/
|
|
25
|
-
get
|
|
26
|
-
if (
|
|
25
|
+
get _role() {
|
|
26
|
+
if (_) {
|
|
27
27
|
if (this.politeness === "polite")
|
|
28
28
|
return "status";
|
|
29
29
|
if (this.politeness === "assertive")
|
|
@@ -35,46 +35,46 @@ let e = class extends N(f) {
|
|
|
35
35
|
* If there are other opened toasts in the page, close them first.
|
|
36
36
|
*/
|
|
37
37
|
open() {
|
|
38
|
-
this.state === "closed" && this.willOpen.emit() && (this.state = "opening", this.
|
|
38
|
+
this.state === "closed" && this.willOpen.emit() && (this.state = "opening", this._closeOtherToasts());
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Close the toast.
|
|
42
42
|
*/
|
|
43
43
|
close() {
|
|
44
|
-
this.state === "opened" && this.willClose.emit() && (clearTimeout(this.
|
|
44
|
+
this.state === "opened" && this.willClose.emit() && (clearTimeout(this._closeTimeout), this.state = "closing");
|
|
45
45
|
}
|
|
46
46
|
// Close the toast on click of any element that has the 'sbb-toast-close' attribute.
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
_onClick(o) {
|
|
48
|
+
const s = x(o, "sbb-toast-close", this);
|
|
49
|
+
s && !s.hasAttribute("disabled") && this.close();
|
|
50
50
|
}
|
|
51
51
|
connectedCallback() {
|
|
52
52
|
super.connectedCallback();
|
|
53
|
-
const
|
|
54
|
-
this.addEventListener("click", (
|
|
53
|
+
const o = this._abort.signal;
|
|
54
|
+
this.addEventListener("click", (s) => this._onClick(s), { signal: o }), c.add(this);
|
|
55
55
|
}
|
|
56
56
|
disconnectedCallback() {
|
|
57
|
-
super.disconnectedCallback(), clearTimeout(this.
|
|
57
|
+
super.disconnectedCallback(), clearTimeout(this._closeTimeout), c.delete(this);
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Slotted text nodes are not read correctly by screen readers on Chrome.
|
|
61
61
|
* To address the problem, if there is at least a root text node,
|
|
62
62
|
* we wrap the whole content in a <span> tag
|
|
63
63
|
*/
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
64
|
+
_onContentSlotChange(o) {
|
|
65
|
+
const s = o.target.assignedNodes();
|
|
66
|
+
if (s.some((i) => i.nodeType === Node.TEXT_NODE)) {
|
|
67
67
|
const i = document.createElement("span");
|
|
68
|
-
this.appendChild(i), i.append(...
|
|
68
|
+
this.appendChild(i), i.append(...s);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
71
|
+
_onActionSlotChange(o) {
|
|
72
|
+
const s = o.target.assignedNodes();
|
|
73
|
+
s.filter(
|
|
74
74
|
(t) => t.nodeName === "SBB-TRANSPARENT-BUTTON" || t.nodeName === "SBB-TRANSPARENT-BUTTON-LINK"
|
|
75
75
|
).forEach((t) => {
|
|
76
76
|
t.negative = !0, t.size = "m";
|
|
77
|
-
}),
|
|
77
|
+
}), s.filter(
|
|
78
78
|
(t) => ["SBB-LINK", "SBB-LINK-BUTTON", "SBB-LINK-STATIC"].includes(t.nodeName)
|
|
79
79
|
).forEach((t) => {
|
|
80
80
|
t.negative = !0;
|
|
@@ -82,15 +82,15 @@ let e = class extends N(f) {
|
|
|
82
82
|
}
|
|
83
83
|
// In rare cases it can be that the animationEnd event is triggered twice.
|
|
84
84
|
// To avoid entering a corrupt state, exit when state is not expected.
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
_onToastAnimationEnd(o) {
|
|
86
|
+
o.animationName === "open" && this.state === "opening" && (this.state = "opened", this.didOpen.emit(), this.timeout && (this._closeTimeout = setTimeout(() => this.close(), this.timeout))), o.animationName === "close" && this.state === "closing" && (this.state = "closed", this.didClose.emit());
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Since we do not stack toasts, we force the closing on other existing opened ones
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
|
-
c.forEach((
|
|
93
|
-
|
|
91
|
+
_closeOtherToasts() {
|
|
92
|
+
c.forEach((o) => {
|
|
93
|
+
o.getAttribute("data-state") === "opened" && o.close();
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
@@ -100,23 +100,23 @@ let e = class extends N(f) {
|
|
|
100
100
|
class="sbb-toast"
|
|
101
101
|
${/* Firefox needs 'role' to enable screen readers */
|
|
102
102
|
""}
|
|
103
|
-
role=${this.
|
|
104
|
-
@animationend=${this.
|
|
103
|
+
role=${this._role ?? p}
|
|
104
|
+
@animationend=${this._onToastAnimationEnd}
|
|
105
105
|
>
|
|
106
106
|
<div class="sbb-toast__icon">${this.renderIconSlot()}</div>
|
|
107
107
|
|
|
108
108
|
<div class="sbb-toast__content" aria-live=${this.politeness}>
|
|
109
|
-
<slot @slotchange=${this.
|
|
109
|
+
<slot @slotchange=${this._onContentSlotChange}></slot>
|
|
110
110
|
</div>
|
|
111
111
|
|
|
112
112
|
<div class="sbb-toast__action">
|
|
113
|
-
<slot name="action" @slotchange=${this.
|
|
113
|
+
<slot name="action" @slotchange=${this._onActionSlotChange}>
|
|
114
114
|
${this.dismissible ? d` <sbb-transparent-button
|
|
115
115
|
class="sbb-toast__action-button"
|
|
116
116
|
icon-name="cross-small"
|
|
117
117
|
negative
|
|
118
118
|
size="m"
|
|
119
|
-
aria-label=${
|
|
119
|
+
aria-label=${y[this._language.current]}
|
|
120
120
|
sbb-toast-close
|
|
121
121
|
></sbb-transparent-button>` : p}
|
|
122
122
|
</slot>
|