@sbb-esta/lyne-elements 5.1.0 → 5.2.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.
Files changed (68) hide show
  1. package/action-group.pure.js +1 -1
  2. package/alert.pure.js +14 -14
  3. package/breadcrumb.pure.js +3 -3
  4. package/calendar.pure.js +67 -67
  5. package/carousel/_carousel.global.scss +6 -0
  6. package/carousel.pure.js +1 -1
  7. package/clock.pure.js +1 -1
  8. package/core/styles/_theme.scss +1 -0
  9. package/core.js +2 -2
  10. package/custom-elements.json +99 -67
  11. package/date-input.pure.js +1 -1
  12. package/development/action-group.pure.js +1 -1
  13. package/development/alert.pure.js +14 -14
  14. package/development/breadcrumb.pure.js +3 -3
  15. package/development/calendar.pure.js +67 -67
  16. package/development/carousel.pure.js +1 -1
  17. package/development/clock.pure.js +15 -17
  18. package/development/core.js +2 -2
  19. package/development/date-input.pure.js +15 -7
  20. package/development/expansion-panel.pure.js +6 -6
  21. package/development/file-selector.pure.js +7 -3
  22. package/development/image.pure.js +8 -8
  23. package/development/map-container.pure.js +8 -8
  24. package/development/mini-calendar.pure.js +1 -1
  25. package/development/notification.pure.js +12 -9
  26. package/development/option.pure.js +11 -11
  27. package/development/paginator.pure.js +18 -18
  28. package/development/signet.pure.js +17 -17
  29. package/development/stepper/step/step.component.d.ts +0 -2
  30. package/development/stepper/stepper/stepper.component.d.ts +2 -2
  31. package/development/stepper.pure.js +24 -17
  32. package/development/tabs.pure.js +4 -4
  33. package/development/teaser.pure.js +1 -1
  34. package/development/time-input.pure.js +10 -6
  35. package/development/timetable-form.pure.js +3 -3
  36. package/development/timetable-occupancy.pure.js +22 -22
  37. package/development/toast.pure.js +6 -6
  38. package/development/tooltip.pure.js +4 -2
  39. package/development/train.pure.js +29 -29
  40. package/development/visual-checkbox.pure.js +13 -13
  41. package/expansion-panel.pure.js +6 -6
  42. package/file-selector.pure.js +2 -2
  43. package/image.pure.js +8 -8
  44. package/lean-off-brand-theme.css +39 -1
  45. package/lean-safety-theme.css +39 -1
  46. package/lean-theme.css +39 -1
  47. package/map-container.pure.js +8 -8
  48. package/mini-calendar.pure.js +1 -1
  49. package/notification.pure.js +12 -9
  50. package/off-brand-theme.css +39 -1
  51. package/option.pure.js +11 -11
  52. package/package.json +1 -1
  53. package/paginator.pure.js +18 -18
  54. package/safety-theme.css +39 -1
  55. package/signet.pure.js +17 -17
  56. package/standard-theme.css +39 -1
  57. package/stepper.pure.js +3 -3
  58. package/table/_table.global.scss +46 -1
  59. package/tabs.pure.js +4 -4
  60. package/teaser/_teaser.global.scss +4 -0
  61. package/teaser.pure.js +1 -1
  62. package/time-input.pure.js +1 -1
  63. package/timetable-form.pure.js +3 -3
  64. package/timetable-occupancy.pure.js +22 -22
  65. package/toast.pure.js +6 -6
  66. package/tooltip.pure.js +3 -3
  67. package/train.pure.js +29 -29
  68. package/visual-checkbox.pure.js +13 -13
@@ -1604,17 +1604,17 @@ let SbbCalendarElement = (() => {
1604
1604
  ${this._weekdays.map((weekDay, index) => html`
1605
1605
  <th class="sbb-calendar__table-header-cell">
1606
1606
  ${this.multiple ? html`
1607
- <sbb-calendar-weekday
1608
- .value=${weekDay}
1609
- @click=${() => {
1607
+ <sbb-calendar-weekday
1608
+ .value=${weekDay}
1609
+ @click=${() => {
1610
1610
  const days = weeksForSelectMultipleWeekDays.filter((day) => day.weekDayValue === (index + 1) % 7);
1611
1611
  this._selectMultipleDates(days);
1612
1612
  }}
1613
- ></sbb-calendar-weekday>
1614
- ` : html`
1615
- <span class="sbb-screen-reader-only">${weekDay.long}</span>
1616
- <span aria-hidden="true">${weekDay.narrow}</span>
1617
- `}
1613
+ ></sbb-calendar-weekday>
1614
+ ` : html`
1615
+ <span class="sbb-screen-reader-only">${weekDay.long}</span>
1616
+ <span aria-hidden="true">${weekDay.narrow}</span>
1617
+ `}
1618
1618
  </th>
1619
1619
  `)}
1620
1620
  </tr>
@@ -1625,23 +1625,23 @@ let SbbCalendarElement = (() => {
1625
1625
  if (rowIndex === 0 && firstRowOffset) return html`
1626
1626
  <tr>
1627
1627
  ${this.weekNumbers ? html`
1628
- <td class="sbb-calendar__table-header-cell-vertical">
1629
- ${this.multiple ? html`
1630
- <sbb-calendar-weeknumber
1631
- .value=${weekNumbers[0]}
1632
- @click=${() => {
1628
+ <td class="sbb-calendar__table-header-cell-vertical">
1629
+ ${this.multiple ? html`
1630
+ <sbb-calendar-weeknumber
1631
+ .value=${weekNumbers[0]}
1632
+ @click=${() => {
1633
1633
  const days = weeksForSelectMultipleWeekNumbers.filter((day) => day.weekValue === weekNumbers[0]);
1634
1634
  this._selectMultipleDates(days);
1635
1635
  }}
1636
- ></sbb-calendar-weeknumber>
1637
- ` : html`
1638
- <span class="sbb-screen-reader-only"
1639
- >${`${i18nCalendarWeekNumber[this._language.current]} ${weekNumbers[0]}`}</span
1640
- >
1641
- <span aria-hidden="true">${weekNumbers[0]}</span>
1642
- `}
1643
- </td>
1644
- ` : nothing}
1636
+ ></sbb-calendar-weeknumber>
1637
+ ` : html`
1638
+ <span class="sbb-screen-reader-only"
1639
+ >${`${i18nCalendarWeekNumber[this._language.current]} ${weekNumbers[0]}`}</span
1640
+ >
1641
+ <span aria-hidden="true">${weekNumbers[0]}</span>
1642
+ `}
1643
+ </td>
1644
+ ` : nothing}
1645
1645
  ${[...Array(firstRowOffset).keys()].map(() => html`<td class="sbb-calendar__table-data"></td>`)}
1646
1646
  ${this._createDayCells(week)}
1647
1647
  </tr>
@@ -1649,23 +1649,23 @@ let SbbCalendarElement = (() => {
1649
1649
  return html`
1650
1650
  <tr>
1651
1651
  ${this.weekNumbers ? html`
1652
- <td class="sbb-calendar__table-header-cell-vertical">
1653
- ${this.multiple ? html`
1654
- <sbb-calendar-weeknumber
1655
- .value=${weekNumbers[rowIndex]}
1656
- @click=${() => {
1652
+ <td class="sbb-calendar__table-header-cell-vertical">
1653
+ ${this.multiple ? html`
1654
+ <sbb-calendar-weeknumber
1655
+ .value=${weekNumbers[rowIndex]}
1656
+ @click=${() => {
1657
1657
  const days = weeksForSelectMultipleWeekNumbers.filter((day) => day.weekValue === weekNumbers[rowIndex]);
1658
1658
  this._selectMultipleDates(days);
1659
1659
  }}
1660
- ></sbb-calendar-weeknumber>
1661
- ` : html`
1662
- <span class="sbb-screen-reader-only"
1663
- >${`${i18nCalendarWeekNumber[this._language.current]} ${weekNumbers[rowIndex]}`}</span
1664
- >
1665
- <span aria-hidden="true">${weekNumbers[rowIndex]}</span>
1666
- `}
1667
- </td>
1668
- ` : nothing}
1660
+ ></sbb-calendar-weeknumber>
1661
+ ` : html`
1662
+ <span class="sbb-screen-reader-only"
1663
+ >${`${i18nCalendarWeekNumber[this._language.current]} ${weekNumbers[rowIndex]}`}</span
1664
+ >
1665
+ <span aria-hidden="true">${weekNumbers[rowIndex]}</span>
1666
+ `}
1667
+ </td>
1668
+ ` : nothing}
1669
1669
  ${this._createDayCells(week)}
1670
1670
  </tr>
1671
1671
  `;
@@ -1692,30 +1692,30 @@ let SbbCalendarElement = (() => {
1692
1692
  @focusout=${(event) => this._handleTableBlur(event.relatedTarget)}
1693
1693
  >
1694
1694
  ${this.weekNumbers ? html`
1695
- <thead>
1696
- <tr>
1697
- <th class="sbb-calendar__table-data"></th>
1698
- ${weekNumbers.map((weekNumber) => html`
1699
- <th class="sbb-calendar__table-header-cell">
1700
- ${this.multiple ? html`
1701
- <sbb-calendar-weeknumber
1702
- .value=${weekNumber}
1703
- @click=${() => {
1695
+ <thead>
1696
+ <tr>
1697
+ <th class="sbb-calendar__table-data"></th>
1698
+ ${weekNumbers.map((weekNumber) => html`
1699
+ <th class="sbb-calendar__table-header-cell">
1700
+ ${this.multiple ? html`
1701
+ <sbb-calendar-weeknumber
1702
+ .value=${weekNumber}
1703
+ @click=${() => {
1704
1704
  const days = weeksForSelectMultipleWeekNumbers.filter((day) => day.weekValue === weekNumber);
1705
1705
  this._selectMultipleDates(days);
1706
1706
  }}
1707
- ></sbb-calendar-weeknumber>
1708
- ` : html`
1709
- <span class="sbb-screen-reader-only"
1710
- >${`${i18nCalendarWeekNumber[this._language.current]} ${weekNumber}`}</span
1711
- >
1712
- <span aria-hidden="true">${weekNumber}</span>
1713
- `}
1714
- </th>
1715
- `)}
1716
- </tr>
1717
- </thead>
1718
- ` : nothing}
1707
+ ></sbb-calendar-weeknumber>
1708
+ ` : html`
1709
+ <span class="sbb-screen-reader-only"
1710
+ >${`${i18nCalendarWeekNumber[this._language.current]} ${weekNumber}`}</span
1711
+ >
1712
+ <span aria-hidden="true">${weekNumber}</span>
1713
+ `}
1714
+ </th>
1715
+ `)}
1716
+ </tr>
1717
+ </thead>
1718
+ ` : nothing}
1719
1719
  <tbody>
1720
1720
  ${weeks.map((week, rowIndex) => {
1721
1721
  const weekday = this._weekdays[rowIndex];
@@ -1723,16 +1723,16 @@ let SbbCalendarElement = (() => {
1723
1723
  <tr>
1724
1724
  <td class="sbb-calendar__table-header-cell-vertical">
1725
1725
  ${this.multiple ? html`
1726
- <sbb-calendar-weekday
1727
- .value=${weekday}
1728
- @click=${() => this._selectMultipleDates(week)}
1729
- >
1730
- ${weekday.narrow}
1731
- </sbb-calendar-weekday>
1732
- ` : html`
1733
- <span class="sbb-screen-reader-only">${weekday.long}</span>
1734
- <span aria-hidden="true">${weekday.narrow}</span>
1735
- `}
1726
+ <sbb-calendar-weekday
1727
+ .value=${weekday}
1728
+ @click=${() => this._selectMultipleDates(week)}
1729
+ >
1730
+ ${weekday.narrow}
1731
+ </sbb-calendar-weekday>
1732
+ ` : html`
1733
+ <span class="sbb-screen-reader-only">${weekday.long}</span>
1734
+ <span aria-hidden="true">${weekday.narrow}</span>
1735
+ `}
1736
1736
  </td>
1737
1737
  ${rowIndex < weekOffset ? html`<td class="sbb-calendar__table-data"></td>` : nothing}
1738
1738
  ${this._createDayCells(week)}
@@ -6,7 +6,7 @@ import { __esDecorate, __runInitializers } from "tslib";
6
6
  import { property } from "lit/decorators.js";
7
7
 
8
8
  //#region src/elements/carousel/carousel-item/carousel-item.scss?inline
9
- var carousel_item_default = ":host {\n display: flex;\n scroll-snap-align: start;\n flex-shrink: 0;\n}\n\n::slotted(sbb-image) {\n border-radius: unset;\n}\n";
9
+ var carousel_item_default = ":host {\n display: flex;\n scroll-snap-align: start;\n flex-shrink: 0;\n}\n";
10
10
 
11
11
  //#endregion
12
12
  //#region src/elements/carousel/carousel-item/carousel-item.component.ts
@@ -69,10 +69,10 @@ let SbbClockElement = (() => {
69
69
  this._moveHoursHandFn = () => this._moveHoursHand();
70
70
  /** Callback function for minutes hand. */
71
71
  this._moveMinutesHandFn = () => this._moveMinutesHand();
72
- this._handlePageVisibilityChange = async () => {
72
+ this._handlePageVisibilityChange = () => {
73
73
  if (this.now) return;
74
- if (document.visibilityState === "hidden") await this._stopClock();
75
- else await this._startClock();
74
+ if (document.visibilityState === "hidden") this._stopClock();
75
+ else this._startClock();
76
76
  };
77
77
  }
78
78
  static {
@@ -122,7 +122,8 @@ let SbbClockElement = (() => {
122
122
  }
123
123
  willUpdate(changedProperties) {
124
124
  super.willUpdate(changedProperties);
125
- if (!isServer && changedProperties.has("now")) this._startOrConfigureClock();
125
+ if (isServer || !this.hasUpdated) return;
126
+ if (changedProperties.has("now")) this._startOrConfigureClock();
126
127
  }
127
128
  firstUpdated(changedProperties) {
128
129
  super.firstUpdated(changedProperties);
@@ -136,26 +137,23 @@ let SbbClockElement = (() => {
136
137
  this._removeEventListeners();
137
138
  clearInterval(this._resetIntervalId);
138
139
  }
139
- async _startOrConfigureClock() {
140
+ _startOrConfigureClock() {
140
141
  if (this.now) {
141
- await this._stopClock();
142
+ this._stopClock();
142
143
  this._resetSecondsHandAnimation();
143
144
  this._setHandsStartingPosition();
144
- } else await this._startClock();
145
+ } else this._startClock();
145
146
  }
146
147
  /** Starts the clock by defining the hands starting position then starting the animations. */
147
- async _startClock() {
148
+ _startClock() {
148
149
  this._clockHandHours?.addEventListener("animationend", this._moveHoursHandFn, ADD_EVENT_LISTENER_OPTIONS);
149
150
  this._clockHandSeconds?.addEventListener("animationend", this._moveMinutesHandFn, ADD_EVENT_LISTENER_OPTIONS);
150
- await new Promise((resolve) => setTimeout(() => {
151
- this._setHandsStartingPosition();
152
- this.style?.setProperty("--sbb-clock-animation-play-state", "running");
153
- this._state = "running";
154
- resolve();
155
- }, INITIAL_TIMEOUT_DURATION));
151
+ this._setHandsStartingPosition();
152
+ this.style?.setProperty("--sbb-clock-animation-play-state", "running");
153
+ this._state = "running";
156
154
  }
157
155
  /** Stops the clock by removing all the animations. */
158
- async _stopClock() {
156
+ _stopClock() {
159
157
  clearInterval(this._handMovement);
160
158
  this._removeSecondsAnimationStyles();
161
159
  this._removeHoursAnimationStyles();
@@ -170,8 +168,8 @@ let SbbClockElement = (() => {
170
168
  */
171
169
  async _resetClock() {
172
170
  if (this._state !== "running") return;
173
- await this._stopClock();
174
- await this._startClock();
171
+ this._stopClock();
172
+ setTimeout(() => this._startClock(), INITIAL_TIMEOUT_DURATION);
175
173
  }
176
174
  /** Set the starting position for the three hands on the clock face. */
177
175
  _setHandsStartingPosition() {
@@ -2696,8 +2696,8 @@ let SbbLinkBaseElement = (() => {
2696
2696
  ${renderContent}
2697
2697
  </a>
2698
2698
  ${opensInNewWindow ? html`<span id="sbb-link-new-window" hidden
2699
- >${i18nTargetOpensInNewWindow[this.language.current]}</span
2700
- >` : nothing}
2699
+ >${i18nTargetOpensInNewWindow[this.language.current]}</span
2700
+ >` : nothing}
2701
2701
  `;
2702
2702
  }
2703
2703
  };
@@ -282,19 +282,27 @@ let SbbDateInputElement = (() => {
282
282
  validate() {
283
283
  super.validate();
284
284
  if (!this.value) this._removeValidityErrors();
285
- else if (!this._dateAdapter.isValid(this.valueAsDate)) this.setValidityFlag("badInput", i18nDateInvalid[this.language.current]);
286
- else if (this._dateAdapter.isValid(this.min) && this._dateAdapter.compareDate(this.min, this.valueAsDate) > 0) this.setValidityFlag("rangeUnderflow", i18nDateMin(this._dateAdapter.format(this.min, { weekdayStyle: "none" }))[this.language.current]);
287
- else if (this._dateAdapter.isValid(this.max) && this._dateAdapter.compareDate(this.valueAsDate, this.max) > 0) this.setValidityFlag("rangeOverflow", i18nDateMax(this._dateAdapter.format(this.max, { weekdayStyle: "none" }))[this.language.current]);
288
- else if (this.dateFilter && !this.dateFilter(this.valueAsDate)) this.setValidityFlag("sbbDateFilter", i18nDateInvalid[this.language.current]);
289
- else this._removeValidityErrors();
285
+ else if (!this._dateAdapter.isValid(this.valueAsDate)) {
286
+ this._removeValidityErrors("badInput");
287
+ this.setValidityFlag("badInput", i18nDateInvalid[this.language.current]);
288
+ } else if (this._dateAdapter.isValid(this.min) && this._dateAdapter.compareDate(this.min, this.valueAsDate) > 0) {
289
+ this._removeValidityErrors("rangeUnderflow");
290
+ this.setValidityFlag("rangeUnderflow", i18nDateMin(this._dateAdapter.format(this.min, { weekdayStyle: "none" }))[this.language.current]);
291
+ } else if (this._dateAdapter.isValid(this.max) && this._dateAdapter.compareDate(this.valueAsDate, this.max) > 0) {
292
+ this._removeValidityErrors("rangeOverflow");
293
+ this.setValidityFlag("rangeOverflow", i18nDateMax(this._dateAdapter.format(this.max, { weekdayStyle: "none" }))[this.language.current]);
294
+ } else if (this.dateFilter && !this.dateFilter(this.valueAsDate)) {
295
+ this._removeValidityErrors("sbbDateFilter");
296
+ this.setValidityFlag("sbbDateFilter", i18nDateInvalid[this.language.current]);
297
+ } else this._removeValidityErrors();
290
298
  }
291
- _removeValidityErrors() {
299
+ _removeValidityErrors(except) {
292
300
  [
293
301
  "badInput",
294
302
  "rangeUnderflow",
295
303
  "rangeOverflow",
296
304
  "sbbDateFilter"
297
- ].forEach((f) => this.removeValidityFlag(f));
305
+ ].filter((v) => v !== except).forEach((f) => this.removeValidityFlag(f));
298
306
  }
299
307
  };
300
308
  })();
@@ -111,12 +111,12 @@ var SbbExpansionPanelHeaderElement = class extends SbbDisabledTabIndexActionMixi
111
111
  <slot></slot>
112
112
  </span>
113
113
  ${!this.disabled ? html`<span class="sbb-expansion-panel-header__toggle">
114
- <sbb-icon
115
- name="chevron-small-down-medium"
116
- class="sbb-expansion-panel-header__toggle-icon"
117
- >
118
- </sbb-icon>
119
- </span>` : nothing}
114
+ <sbb-icon
115
+ name="chevron-small-down-medium"
116
+ class="sbb-expansion-panel-header__toggle-icon"
117
+ >
118
+ </sbb-icon>
119
+ </span>` : nothing}
120
120
  `;
121
121
  }
122
122
  };
@@ -279,13 +279,14 @@ const SbbFileSelectorCommonElementMixin = (superclass) => {
279
279
  if (fileInput.files) this.createFileList(fileInput.files);
280
280
  forwardEvent(event, this);
281
281
  }
282
- createFileList(files) {
282
+ createFileList(files, emitNativeEvents = false) {
283
283
  const fileArray = Array.from(files);
284
284
  if (!this.multiple && files.length > 1 || this.accept && fileArray.some((file) => !this.accept.split(",").some((a) => file.name.endsWith(a.trim())))) return;
285
285
  if (!this.multiple || this.multipleMode !== "persistent" || this.files.length === 0) this.files = fileArray;
286
286
  else this.files = fileArray.filter((newFile) => this.files.findIndex((oldFile) => this._checkFileEquality(newFile, oldFile)) === -1).concat(this.files);
287
287
  this._updateA11yLiveRegion();
288
288
  this._dispatchFileChangedEvent();
289
+ if (emitNativeEvents) this._dispatchNativeEvents();
289
290
  }
290
291
  getButtonLabel() {
291
292
  return this.multiple ? i18nFileSelectorButtonLabelMultiple[this.language.current] : i18nFileSelectorButtonLabel[this.language.current];
@@ -293,6 +294,10 @@ const SbbFileSelectorCommonElementMixin = (superclass) => {
293
294
  _removeFile(file) {
294
295
  this.files = this.files.filter((f) => !this._checkFileEquality(file, f));
295
296
  this._updateA11yLiveRegion();
297
+ this._dispatchNativeEvents();
298
+ this._dispatchFileChangedEvent();
299
+ }
300
+ _dispatchNativeEvents() {
296
301
  /** The input event fires when the value has been changed as a direct result of a user action. */
297
302
  this.dispatchEvent(new InputEvent("input", {
298
303
  bubbles: true,
@@ -304,7 +309,6 @@ const SbbFileSelectorCommonElementMixin = (superclass) => {
304
309
  * for each alteration to an element's value.
305
310
  */
306
311
  this.dispatchEvent(new Event("change", { bubbles: true }));
307
- this._dispatchFileChangedEvent();
308
312
  }
309
313
  _dispatchFileChangedEvent() {
310
314
  const filechanged = this.files;
@@ -367,7 +371,7 @@ const SbbFileSelectorCommonElementMixin = (superclass) => {
367
371
  if (!this.disabled && !this.formDisabled) {
368
372
  this._setDragState();
369
373
  this._blockEvent(event);
370
- this.createFileList(event.dataTransfer.files);
374
+ this.createFileList(event.dataTransfer.files, true);
371
375
  }
372
376
  }
373
377
  _blockEvent(event) {
@@ -715,14 +715,14 @@ let SbbImageElement = (() => {
715
715
  return html`
716
716
  <div class="sbb-image__wrapper">
717
717
  ${!this.skipLqip ? html`<img
718
- alt=""
719
- class="sbb-image__blurred"
720
- src=${imageUrlLQIP}
721
- width="1000"
722
- height="562"
723
- loading=${this.loading ?? nothing}
724
- decoding=${this.decoding ?? nothing}
725
- />` : nothing}
718
+ alt=""
719
+ class="sbb-image__blurred"
720
+ src=${imageUrlLQIP}
721
+ width="1000"
722
+ height="562"
723
+ loading=${this.loading ?? nothing}
724
+ decoding=${this.decoding ?? nothing}
725
+ />` : nothing}
726
726
 
727
727
  <picture>
728
728
  <!-- render picture element sources -->
@@ -159,14 +159,14 @@ let SbbMapContainerElement = (() => {
159
159
  <slot></slot>
160
160
 
161
161
  ${!this.hideScrollUpButton ? html`<sbb-accent-button
162
- class="sbb-map-container__sidebar-button"
163
- size="l"
164
- icon-name="location-pin-map-small"
165
- @click=${() => this._onScrollButtonClick()}
166
- ?inert=${!this._scrollUpButtonVisible}
167
- >
168
- ${i18nMapContainerButtonLabel[this._language.current]}
169
- </sbb-accent-button>` : nothing}
162
+ class="sbb-map-container__sidebar-button"
163
+ size="l"
164
+ icon-name="location-pin-map-small"
165
+ @click=${() => this._onScrollButtonClick()}
166
+ ?inert=${!this._scrollUpButtonVisible}
167
+ >
168
+ ${i18nMapContainerButtonLabel[this._language.current]}
169
+ </sbb-accent-button>` : nothing}
170
170
  </div>
171
171
  `;
172
172
  }
@@ -5,7 +5,7 @@ import { SbbButtonBaseElement, SbbElement, SbbPropertyWatcherController, default
5
5
  import { MutationController } from "@lit-labs/observers/mutation-controller.js";
6
6
 
7
7
  //#region src/elements/mini-calendar/mini-calendar-day/mini-calendar-day.scss?inline
8
- var mini_calendar_day_default = ":host {\n --sbb-mini-calendar-day-animation-duration: var(\n --sbb-disable-animation-duration,\n var(--sbb-animation-duration-2x)\n );\n display: block;\n height: var(--sbb-mini-calendar-day-dimensions);\n width: var(--sbb-mini-calendar-day-dimensions);\n margin: 0.0625rem;\n border-radius: var(--sbb-border-radius-infinity);\n color: var(--sbb-color-storm);\n color: light-dark(var(--sbb-color-storm), var(--sbb-color-smoke));\n background-color: currentcolor;\n}\n\n@media (any-hover: hover) {\n :host(:hover) {\n scale: var(--sbb-mini-calendar-day-scale);\n transition: scale var(--sbb-mini-calendar-day-animation-easing) var(--sbb-mini-calendar-day-animation-duration);\n }\n}\n\n:host(:focus-visible) {\n outline-offset: var(--sbb-focus-outline-offset);\n outline: var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);\n outline-offset: 0.125rem;\n}\n\n:host([color=charcoal]) {\n color: var(--sbb-background-color-2-inverted);\n}\n\n:host([color=cloud]) {\n color: var(--sbb-background-color-4-inverted);\n}\n\n:host([color=orange]) {\n color: var(--sbb-color-orange-light);\n}\n\n:host([color=red]) {\n color: var(--sbb-color-error);\n}\n\n:host([color=sky]) {\n color: var(--sbb-color-sky-light);\n}\n\n:host([marker=circle]) {\n background-color: var(--sbb-color-1-inverted);\n border: 0.0625rem solid currentcolor;\n}\n\n:host([marker=target]) {\n background: radial-gradient(circle, currentcolor 0%, currentcolor 25%, var(--sbb-color-1-inverted) 25%, var(--sbb-color-1-inverted) 50%, currentcolor 50%, currentcolor 100%);\n}\n\n:host([marker=slash]) {\n position: relative;\n}\n:host([marker=slash])::before {\n content: \"\";\n position: absolute;\n inset: 0;\n background-image: linear-gradient(-45deg, transparent 45%, var(--sbb-color-1-inverted) 45%, var(--sbb-color-1-inverted) 55%, transparent 55%);\n}\n\n:host([marker=cross]) {\n position: relative;\n}\n:host([marker=cross])::before {\n content: \"\";\n position: absolute;\n inset: 0;\n background-image: linear-gradient(-45deg, transparent 45%, var(--sbb-color-1-inverted) 45%, var(--sbb-color-1-inverted) 55%, transparent 55%), linear-gradient(45deg, transparent 45%, var(--sbb-color-1-inverted) 45%, var(--sbb-color-1-inverted) 55%, transparent 55%);\n}\n";
8
+ var mini_calendar_day_default = ":host {\n --sbb-mini-calendar-day-animation-duration: var(\n --sbb-disable-animation-duration,\n var(--sbb-animation-duration-2x)\n );\n display: block;\n height: var(--sbb-mini-calendar-day-dimensions);\n width: var(--sbb-mini-calendar-day-dimensions);\n margin: 0.0625rem;\n border-radius: var(--sbb-border-radius-infinity);\n color: var(--sbb-color-storm);\n color: light-dark(var(--sbb-color-storm), var(--sbb-color-smoke));\n background-color: currentcolor;\n}\n\n@media (any-hover: hover) {\n :host(:hover) {\n scale: var(--sbb-mini-calendar-day-scale);\n transition: scale var(--sbb-mini-calendar-day-animation-easing) var(--sbb-mini-calendar-day-animation-duration);\n }\n}\n\n:host(:focus-visible) {\n outline-offset: var(--sbb-focus-outline-offset);\n outline: var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);\n outline-offset: 0.125rem;\n}\n\n:host([color=charcoal]) {\n color: var(--sbb-background-color-2-inverted);\n}\n\n:host([color=cloud]) {\n color: var(--sbb-background-color-4);\n}\n\n:host([color=orange]) {\n color: var(--sbb-color-orange-light);\n}\n\n:host([color=red]) {\n color: var(--sbb-color-error);\n}\n\n:host([color=sky]) {\n color: var(--sbb-color-sky-light);\n}\n\n:host([marker=circle]) {\n background-color: var(--sbb-color-1-inverted);\n border: 0.0625rem solid currentcolor;\n}\n\n:host([marker=target]) {\n background: radial-gradient(circle, currentcolor 0%, currentcolor 25%, var(--sbb-color-1-inverted) 25%, var(--sbb-color-1-inverted) 50%, currentcolor 50%, currentcolor 100%);\n}\n\n:host([marker=slash]) {\n position: relative;\n}\n:host([marker=slash])::before {\n content: \"\";\n position: absolute;\n inset: 0;\n background-image: linear-gradient(-45deg, transparent 45%, var(--sbb-color-1-inverted) 45%, var(--sbb-color-1-inverted) 55%, transparent 55%);\n}\n\n:host([marker=cross]) {\n position: relative;\n}\n:host([marker=cross])::before {\n content: \"\";\n position: absolute;\n inset: 0;\n background-image: linear-gradient(-45deg, transparent 45%, var(--sbb-color-1-inverted) 45%, var(--sbb-color-1-inverted) 55%, transparent 55%), linear-gradient(45deg, transparent 45%, var(--sbb-color-1-inverted) 45%, var(--sbb-color-1-inverted) 55%, transparent 55%);\n}\n";
9
9
 
10
10
  //#endregion
11
11
  //#region src/elements/mini-calendar/mini-calendar-day/mini-calendar-day.component.ts
@@ -240,15 +240,18 @@ let SbbNotificationElement = (() => {
240
240
  </span>
241
241
 
242
242
  ${!this.readOnly ? html`
243
- <sbb-divider class="sbb-notification__divider" orientation="vertical"></sbb-divider>
244
- <sbb-secondary-button
245
- size=${this.size || nothing}
246
- icon-name="cross-small"
247
- @click=${() => this.close()}
248
- aria-label=${i18nCloseNotification[this._language.current]}
249
- class="sbb-notification__close"
250
- ></sbb-secondary-button>
251
- ` : nothing}
243
+ <sbb-divider
244
+ class="sbb-notification__divider"
245
+ orientation="vertical"
246
+ ></sbb-divider>
247
+ <sbb-secondary-button
248
+ size=${this.size || nothing}
249
+ icon-name="cross-small"
250
+ @click=${() => this.close()}
251
+ aria-label=${i18nCloseNotification[this._language.current]}
252
+ class="sbb-notification__close"
253
+ ></sbb-secondary-button>
254
+ ` : nothing}
252
255
  </div>
253
256
  </div>
254
257
  `;
@@ -129,11 +129,11 @@ let SbbOptgroupBaseElement = (() => {
129
129
  render() {
130
130
  return html`
131
131
  ${this.label ? html`
132
- <div class="sbb-optgroup__label" aria-hidden="true">
133
- <div class="sbb-optgroup__icon-space"></div>
134
- <span>${this.label}</span>
135
- </div>
136
- ` : nothing}
132
+ <div class="sbb-optgroup__label" aria-hidden="true">
133
+ <div class="sbb-optgroup__icon-space"></div>
134
+ <span>${this.label}</span>
135
+ </div>
136
+ ` : nothing}
137
137
  <slot @slotchange=${this._handleSlotchange}></slot>
138
138
  `;
139
139
  }
@@ -698,12 +698,12 @@ var SbbOptionElement = class extends SbbOptionBaseElement {
698
698
 
699
699
  <!-- Checkbox -->
700
700
  ${this._isMultiple() ? html`
701
- <sbb-visual-checkbox
702
- ?checked=${this.selected}
703
- ?disabled=${this.disabled || this.disabledFromGroup}
704
- ?negative=${this.matches?.(":is(:state(negative),[state--negative])")}
705
- ></sbb-visual-checkbox>
706
- ` : nothing}
701
+ <sbb-visual-checkbox
702
+ ?checked=${this.selected}
703
+ ?disabled=${this.disabled || this.disabledFromGroup}
704
+ ?negative=${this.matches?.(":is(:state(negative),[state--negative])")}
705
+ ></sbb-visual-checkbox>
706
+ ` : nothing}
707
707
  `;
708
708
  }
709
709
  renderLabel() {
@@ -695,24 +695,24 @@ let SbbPaginatorElement = (() => {
695
695
  return html`
696
696
  <ul class="sbb-paginator__pages">
697
697
  ${repeat(this._getVisiblePagesIndex(), (item) => item === "ellipsis" ? html`
698
- <li class="sbb-paginator__page--ellipsis">
699
- <span class="sbb-paginator__page--ellipsis-item">…</span>
700
- </li>
701
- ` : html`
702
- <li class="sbb-paginator__page--number">
703
- <button
704
- ?data-selected=${this.pageIndex === item}
705
- ?disabled=${this.disabled}
706
- class="sbb-paginator__page--number-item"
707
- data-index=${item}
708
- aria-label="${this.accessibilityPageLabel ? this.accessibilityPageLabel : i18nPage[this.language.current]} ${item + 1}"
709
- aria-current=${this.pageIndex === item ? "true" : nothing}
710
- @click=${() => this._onPageNumberClick(item)}
711
- >
712
- <span class="sbb-paginator__page--number-item-label">${item + 1}</span>
713
- </button>
714
- </li>
715
- `)}
698
+ <li class="sbb-paginator__page--ellipsis">
699
+ <span class="sbb-paginator__page--ellipsis-item">…</span>
700
+ </li>
701
+ ` : html`
702
+ <li class="sbb-paginator__page--number">
703
+ <button
704
+ ?data-selected=${this.pageIndex === item}
705
+ ?disabled=${this.disabled}
706
+ class="sbb-paginator__page--number-item"
707
+ data-index=${item}
708
+ aria-label="${this.accessibilityPageLabel ? this.accessibilityPageLabel : i18nPage[this.language.current]} ${item + 1}"
709
+ aria-current=${this.pageIndex === item ? "true" : nothing}
710
+ @click=${() => this._onPageNumberClick(item)}
711
+ >
712
+ <span class="sbb-paginator__page--number-item-label">${item + 1}</span>
713
+ </button>
714
+ </li>
715
+ `)}
716
716
  </ul>
717
717
  `;
718
718
  }
@@ -90,23 +90,23 @@ let SbbSignetElement = (() => {
90
90
  return html`
91
91
  <span class="sbb-signet__svg-container">
92
92
  ${this.protectiveRoom === "panel" ? html`
93
- <svg focusable="false" viewBox="0 0 143 48" xmlns="http://www.w3.org/2000/svg">
94
- <title .textContent=${this.accessibilityLabel}></title>
95
- <path id="sbb-signet__panel" stroke-width="1" d="M1 47h141V1H1v46z"></path>
96
- <path
97
- id="sbb-signet__icon"
98
- d="M87 40h9.3L83.8 27.7h15.5V40h7.4V27.7h15.6L109.7 40h9.3l16-16-15.9-16h-9.3l12.5 12.3h-15.6V8h-7.4v12.3H83.8L96.3 8H87L71 24l16 16z"
99
- ></path>
100
- </svg>
101
- ` : html`
102
- <svg focusable="false" viewBox="0 0 80 40" xmlns="http://www.w3.org/2000/svg">
103
- <title .textContent=${this.accessibilityLabel}></title>
104
- <path
105
- id="sbb-signet__icon"
106
- d="M20.0265 40H31.6821L16 24.6154H35.3907V40H44.6093V24.6154H64.106L48.4238 40H60.0795L80 20.0531L60.0795 0H48.4238L64.106 15.3846H44.6093V0H35.3907V15.3846H16L31.6821 0H20.0265L0 20.0531L20.0265 40Z"
107
- ></path>
108
- </svg>
109
- `}
93
+ <svg focusable="false" viewBox="0 0 143 48" xmlns="http://www.w3.org/2000/svg">
94
+ <title .textContent=${this.accessibilityLabel}></title>
95
+ <path id="sbb-signet__panel" stroke-width="1" d="M1 47h141V1H1v46z"></path>
96
+ <path
97
+ id="sbb-signet__icon"
98
+ d="M87 40h9.3L83.8 27.7h15.5V40h7.4V27.7h15.6L109.7 40h9.3l16-16-15.9-16h-9.3l12.5 12.3h-15.6V8h-7.4v12.3H83.8L96.3 8H87L71 24l16 16z"
99
+ ></path>
100
+ </svg>
101
+ ` : html`
102
+ <svg focusable="false" viewBox="0 0 80 40" xmlns="http://www.w3.org/2000/svg">
103
+ <title .textContent=${this.accessibilityLabel}></title>
104
+ <path
105
+ id="sbb-signet__icon"
106
+ d="M20.0265 40H31.6821L16 24.6154H35.3907V40H44.6093V24.6154H64.106L48.4238 40H60.0795L80 20.0531L60.0795 0H48.4238L64.106 15.3846H44.6093V0H35.3907V15.3846H16L31.6821 0H20.0265L0 20.0531L20.0265 40Z"
107
+ ></path>
108
+ </svg>
109
+ `}
110
110
  </span>
111
111
  `;
112
112
  }
@@ -58,8 +58,6 @@ export declare class SbbStepElement extends SbbElement {
58
58
  protected configure(stepperLoaded: boolean): void;
59
59
  /** Watches for clicked elements with `sbb-stepper-next` or `sbb-stepper-previous` attributes. */
60
60
  private _handleClick;
61
- private _isGoNextElement;
62
- private _isGoPreviousElement;
63
61
  private _onStepElementResize;
64
62
  connectedCallback(): void;
65
63
  protected firstUpdated(changedProperties: PropertyValues<this>): void;
@@ -64,9 +64,9 @@ export declare class SbbStepperElement extends SbbElement {
64
64
  private _resizeObserverTimeout;
65
65
  private _mediaMatcher;
66
66
  constructor();
67
- /** Selects the next step. */
67
+ /** Selects the next enabled step. If no available step is found, it simply exits. */
68
68
  next(): void;
69
- /** Selects the previous step. */
69
+ /** Selects the previous enabled step. If no available step is found, it simply exits. */
70
70
  previous(): void;
71
71
  /** Resets the form in which the stepper is nested or every form of each step, if any. */
72
72
  reset(): void;