@sbb-esta/lyne-elements 5.1.0 → 5.3.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 (91) hide show
  1. package/_index.scss +1 -0
  2. package/action-group.pure.js +1 -1
  3. package/alert.pure.js +14 -14
  4. package/breadcrumb.pure.js +3 -3
  5. package/calendar.pure.js +68 -68
  6. package/carousel/_carousel.global.scss +6 -0
  7. package/carousel.pure.js +1 -1
  8. package/chip.pure.js +1 -1
  9. package/clock.pure.js +1 -1
  10. package/core/styles/_theme.scss +6 -0
  11. package/core.js +17 -17
  12. package/custom-elements.json +1626 -221
  13. package/date-input.pure.js +1 -1
  14. package/development/action-group.pure.js +1 -1
  15. package/development/alert.pure.js +14 -14
  16. package/development/breadcrumb.pure.js +3 -3
  17. package/development/calendar.pure.js +67 -67
  18. package/development/carousel.pure.js +1 -1
  19. package/development/chip/chip-group/chip-group.component.d.ts +2 -1
  20. package/development/chip.pure.js +3 -0
  21. package/development/clock.pure.js +15 -17
  22. package/development/core/i18n/i18n.d.ts +2 -0
  23. package/development/core.js +15 -3
  24. package/development/date-input.pure.js +15 -7
  25. package/development/download/download/download.component.d.ts +51 -0
  26. package/development/download/download-info/download-info.component.d.ts +59 -0
  27. package/development/download.d.ts +1 -0
  28. package/development/download.js +10 -0
  29. package/development/download.pure.d.ts +3 -0
  30. package/development/download.pure.js +436 -0
  31. package/development/expansion-panel.pure.js +6 -6
  32. package/development/file-selector.pure.js +7 -3
  33. package/development/flip-card.pure.js +5 -4
  34. package/development/image.pure.js +8 -8
  35. package/development/map-container.pure.js +8 -8
  36. package/development/mini-calendar.pure.js +1 -1
  37. package/development/notification.pure.js +12 -9
  38. package/development/option.pure.js +11 -11
  39. package/development/overlay.pure.js +1 -1
  40. package/development/paginator.pure.js +18 -18
  41. package/development/popover.pure.js +1 -1
  42. package/development/signet.pure.js +17 -17
  43. package/development/stepper/step/step.component.d.ts +0 -2
  44. package/development/stepper/stepper/stepper.component.d.ts +2 -2
  45. package/development/stepper.pure.js +24 -17
  46. package/development/tabs.pure.js +4 -4
  47. package/development/teaser.pure.js +1 -1
  48. package/development/time-input.pure.js +10 -6
  49. package/development/timetable-form.pure.js +3 -3
  50. package/development/timetable-occupancy.pure.js +22 -22
  51. package/development/toast.pure.js +6 -6
  52. package/development/tooltip.pure.js +4 -2
  53. package/development/train.pure.js +29 -29
  54. package/development/visual-checkbox.pure.js +13 -13
  55. package/download/_download.global.scss +12 -0
  56. package/download.js +1 -0
  57. package/download.pure.js +21 -0
  58. package/expansion-panel.pure.js +6 -6
  59. package/file-selector.pure.js +2 -2
  60. package/flip-card.pure.js +1 -1
  61. package/image.pure.js +8 -8
  62. package/index.d.ts +3 -0
  63. package/index.js +3 -0
  64. package/lean-off-brand-theme.css +45 -5
  65. package/lean-safety-theme.css +45 -5
  66. package/lean-theme.css +45 -5
  67. package/map-container.pure.js +8 -8
  68. package/mini-calendar.pure.js +1 -1
  69. package/notification.pure.js +12 -9
  70. package/off-brand-theme.css +45 -5
  71. package/option.pure.js +11 -11
  72. package/overlay/_overlay.global.scss +0 -4
  73. package/overlay.pure.js +1 -1
  74. package/package.json +11 -1
  75. package/paginator.pure.js +18 -18
  76. package/popover.pure.js +2 -2
  77. package/safety-theme.css +45 -5
  78. package/signet.pure.js +17 -17
  79. package/standard-theme.css +45 -5
  80. package/stepper.pure.js +3 -3
  81. package/table/_table.global.scss +46 -1
  82. package/tabs.pure.js +4 -4
  83. package/teaser/_teaser.global.scss +4 -0
  84. package/teaser.pure.js +1 -1
  85. package/time-input.pure.js +1 -1
  86. package/timetable-form.pure.js +3 -3
  87. package/timetable-occupancy.pure.js +22 -22
  88. package/toast.pure.js +6 -6
  89. package/tooltip.pure.js +3 -3
  90. package/train.pure.js +29 -29
  91. package/visual-checkbox.pure.js +13 -13
@@ -1,2 +1,2 @@
1
1
  import{__esDecorate as e,__runInitializers as t}from"tslib";import{isServer as n,unsafeCSS as r}from"lit";import{property as i}from"lit/decorators.js";import{SbbElement as a,SbbFormAssociatedInputMixin as o,defaultDateAdapter as s,i18nDateInvalid as c,i18nDateMax as l,i18nDateMin as u,i18nDatePickerPlaceholder as d,plainDate as f,plainDateConverter as p,readConfig as m}from"./core.js";var h=`:host{cursor:text;align-items:center;min-width:9.375rem;max-width:100%;font-weight:400;display:inline-flex}@media (forced-colors:active){:host{color:fieldtext}}:host(:disabled){cursor:var(--sbb-cursor-default)}:host(:focus){text-overflow:initial!important}:host(:empty):after{content:attr(placeholder);color:var(--sbb-color-5);-webkit-text-fill-color:var(--sbb-color-5);opacity:1}@media (forced-colors:active){:host(:empty):after{color:graytext}}
2
- `;Object.assign(ValidityState.prototype,{get sbbDateFilter(){return!1}});let g=(()=>{let g=o(a),_=[],v,y,b=[],x=[],S,C=[],w=[],T,E,D=[],O=[];return class extends g{static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;v=[i({attribute:!1})],y=[f(),i({converter:p,reflect:!0})],S=[f(),i({converter:p,reflect:!0})],T=[i({attribute:!1})],E=[i({attribute:`weekday-style`})],e(this,null,v,{kind:`setter`,name:`valueAsDate`,static:!1,private:!1,access:{has:e=>`valueAsDate`in e,set:(e,t)=>{e.valueAsDate=t}},metadata:t},null,_),e(this,null,y,{kind:`accessor`,name:`min`,static:!1,private:!1,access:{has:e=>`min`in e,get:e=>e.min,set:(e,t)=>{e.min=t}},metadata:t},b,x),e(this,null,S,{kind:`accessor`,name:`max`,static:!1,private:!1,access:{has:e=>`max`in e,get:e=>e.max,set:(e,t)=>{e.max=t}},metadata:t},C,w),e(this,null,T,{kind:`setter`,name:`dateFilter`,static:!1,private:!1,access:{has:e=>`dateFilter`in e,set:(e,t)=>{e.dateFilter=t}},metadata:t},null,_),e(this,null,E,{kind:`accessor`,name:`weekdayStyle`,static:!1,private:!1,access:{has:e=>`weekdayStyle`in e,get:e=>e.weekdayStyle,set:(e,t)=>{e.weekdayStyle=t}},metadata:t},D,O),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.elementName=`sbb-date-input`}static{this.styles=[r(h)]}set value(e){this._tryParseValue(e),!n&&!this.isSelected()&&this.valueAsDate!==null&&(e=this._formatDate()),super.value=e}get value(){return super.value??``}set valueAsDate(e){if(e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),!(this.isSelected()&&(e===null||this._dateAdapter.sameDate(e,this._dateAdapter.parse(this.value))))){if(!e)this._valueAsDate=null,this._valueCache=[``,null],this.value=``;else if(!this._dateAdapter.isDateInstance(this._valueAsDate)||this._dateAdapter.compareDate(this._valueAsDate,e)!==0){this._valueAsDate=this._dateAdapter.createDate(this._dateAdapter.getYear(e),this._dateAdapter.getMonth(e),this._dateAdapter.getDate(e));let t=this._formatDate();this._valueCache=[t,this._valueAsDate],this.value=t}}}get valueAsDate(){return this._valueAsDate?this._dateAdapter.clone(this._valueAsDate):null}#e;get min(){return this.#e}set min(e){this.#e=e}#t;get max(){return this.#t}set max(e){this.#t=e}set dateFilter(e){this._dateFilter=e}get dateFilter(){return this._dateFilter}#n;get weekdayStyle(){return this.#n}set weekdayStyle(e){this.#n=e}get datepicker(){return this.parentElement.querySelector(`sbb-datepicker`)}constructor(){super(),this._valueAsDate=t(this,_),this.#e=t(this,b,null),this.#t=(t(this,x),t(this,C,null)),this.#n=(t(this,w),t(this,D,`short`)),this._valueCache=t(this,O),this._dateAdapter=m().datetime?.dateAdapter??s,this._placeholderMutable=!1,this._dateFilter=()=>!0,this.addEventListener?.(`change`,()=>this._updateValueDateFormat(),{capture:!0})}static resolveAssociation(e){if(e.hasAttribute(`input`)||e.input)return;let t=e.closest(`sbb-form-field`)?.querySelector(`sbb-date-input`);t&&(e.input=t)}connectedCallback(){super.connectedCallback(),this.placeholder||=(this._placeholderMutable=!0,d[this.language.current]);for(let e of Array.from(this.closest(`sbb-form-field`)?.children??[]))customElements.upgrade?.(e),e.constructor.sbbDateInputAssociated&&!e.hasAttribute(`input`)&&!e.input&&(e.input=this)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this.hasUpdated&&!e?(this._updateValueDateFormat(),this._placeholderMutable&&(this.placeholder=d[this.language.current])):e===`weekdayStyle`&&this._updateValueDateFormat(),this.isConnected&&this.dispatchEvent(new Event(`ɵchange`))}updateFormValue(){this._tryParseValue();let e=this.valueAsDate===null?null:this._dateAdapter.toIso8601(this.valueAsDate);this.internals.setFormValue(e,this.value)}_tryParseValue(e=this.value){this._valueCache?.[0]!==e&&(this._valueAsDate=this._dateAdapter.parse(e),this._valueCache=[e,this._valueAsDate])}_updateValueDateFormat(){if(this.valueAsDate){let e=this._formatDate();this.value!==e&&(super.value=e)}}_formatDate(){return this._dateAdapter.format(this.valueAsDate,{weekdayStyle:this.weekdayStyle})}shouldValidate(e){return super.shouldValidate(e)||[`valueAsDate`,`min`,`max`,`dateFilter`].includes(e)}validate(){super.validate(),this.value?this._dateAdapter.isValid(this.valueAsDate)?this._dateAdapter.isValid(this.min)&&this._dateAdapter.compareDate(this.min,this.valueAsDate)>0?this.setValidityFlag(`rangeUnderflow`,u(this._dateAdapter.format(this.min,{weekdayStyle:`none`}))[this.language.current]):this._dateAdapter.isValid(this.max)&&this._dateAdapter.compareDate(this.valueAsDate,this.max)>0?this.setValidityFlag(`rangeOverflow`,l(this._dateAdapter.format(this.max,{weekdayStyle:`none`}))[this.language.current]):this.dateFilter&&!this.dateFilter(this.valueAsDate)?this.setValidityFlag(`sbbDateFilter`,c[this.language.current]):this._removeValidityErrors():this.setValidityFlag(`badInput`,c[this.language.current]):this._removeValidityErrors()}_removeValidityErrors(){[`badInput`,`rangeUnderflow`,`rangeOverflow`,`sbbDateFilter`].forEach(e=>this.removeValidityFlag(e))}}})();export{g as SbbDateInputElement};
2
+ `;Object.assign(ValidityState.prototype,{get sbbDateFilter(){return!1}});let g=(()=>{let g=o(a),_=[],v,y,b=[],x=[],S,C=[],w=[],T,E,D=[],O=[];return class extends g{static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;v=[i({attribute:!1})],y=[f(),i({converter:p,reflect:!0})],S=[f(),i({converter:p,reflect:!0})],T=[i({attribute:!1})],E=[i({attribute:`weekday-style`})],e(this,null,v,{kind:`setter`,name:`valueAsDate`,static:!1,private:!1,access:{has:e=>`valueAsDate`in e,set:(e,t)=>{e.valueAsDate=t}},metadata:t},null,_),e(this,null,y,{kind:`accessor`,name:`min`,static:!1,private:!1,access:{has:e=>`min`in e,get:e=>e.min,set:(e,t)=>{e.min=t}},metadata:t},b,x),e(this,null,S,{kind:`accessor`,name:`max`,static:!1,private:!1,access:{has:e=>`max`in e,get:e=>e.max,set:(e,t)=>{e.max=t}},metadata:t},C,w),e(this,null,T,{kind:`setter`,name:`dateFilter`,static:!1,private:!1,access:{has:e=>`dateFilter`in e,set:(e,t)=>{e.dateFilter=t}},metadata:t},null,_),e(this,null,E,{kind:`accessor`,name:`weekdayStyle`,static:!1,private:!1,access:{has:e=>`weekdayStyle`in e,get:e=>e.weekdayStyle,set:(e,t)=>{e.weekdayStyle=t}},metadata:t},D,O),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.elementName=`sbb-date-input`}static{this.styles=[r(h)]}set value(e){this._tryParseValue(e),!n&&!this.isSelected()&&this.valueAsDate!==null&&(e=this._formatDate()),super.value=e}get value(){return super.value??``}set valueAsDate(e){if(e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),!(this.isSelected()&&(e===null||this._dateAdapter.sameDate(e,this._dateAdapter.parse(this.value))))){if(!e)this._valueAsDate=null,this._valueCache=[``,null],this.value=``;else if(!this._dateAdapter.isDateInstance(this._valueAsDate)||this._dateAdapter.compareDate(this._valueAsDate,e)!==0){this._valueAsDate=this._dateAdapter.createDate(this._dateAdapter.getYear(e),this._dateAdapter.getMonth(e),this._dateAdapter.getDate(e));let t=this._formatDate();this._valueCache=[t,this._valueAsDate],this.value=t}}}get valueAsDate(){return this._valueAsDate?this._dateAdapter.clone(this._valueAsDate):null}#e;get min(){return this.#e}set min(e){this.#e=e}#t;get max(){return this.#t}set max(e){this.#t=e}set dateFilter(e){this._dateFilter=e}get dateFilter(){return this._dateFilter}#n;get weekdayStyle(){return this.#n}set weekdayStyle(e){this.#n=e}get datepicker(){return this.parentElement.querySelector(`sbb-datepicker`)}constructor(){super(),this._valueAsDate=t(this,_),this.#e=t(this,b,null),this.#t=(t(this,x),t(this,C,null)),this.#n=(t(this,w),t(this,D,`short`)),this._valueCache=t(this,O),this._dateAdapter=m().datetime?.dateAdapter??s,this._placeholderMutable=!1,this._dateFilter=()=>!0,this.addEventListener?.(`change`,()=>this._updateValueDateFormat(),{capture:!0})}static resolveAssociation(e){if(e.hasAttribute(`input`)||e.input)return;let t=e.closest(`sbb-form-field`)?.querySelector(`sbb-date-input`);t&&(e.input=t)}connectedCallback(){super.connectedCallback(),this.placeholder||=(this._placeholderMutable=!0,d[this.language.current]);for(let e of Array.from(this.closest(`sbb-form-field`)?.children??[]))customElements.upgrade?.(e),e.constructor.sbbDateInputAssociated&&!e.hasAttribute(`input`)&&!e.input&&(e.input=this)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this.hasUpdated&&!e?(this._updateValueDateFormat(),this._placeholderMutable&&(this.placeholder=d[this.language.current])):e===`weekdayStyle`&&this._updateValueDateFormat(),this.isConnected&&this.dispatchEvent(new Event(`ɵchange`))}updateFormValue(){this._tryParseValue();let e=this.valueAsDate===null?null:this._dateAdapter.toIso8601(this.valueAsDate);this.internals.setFormValue(e,this.value)}_tryParseValue(e=this.value){this._valueCache?.[0]!==e&&(this._valueAsDate=this._dateAdapter.parse(e),this._valueCache=[e,this._valueAsDate])}_updateValueDateFormat(){if(this.valueAsDate){let e=this._formatDate();this.value!==e&&(super.value=e)}}_formatDate(){return this._dateAdapter.format(this.valueAsDate,{weekdayStyle:this.weekdayStyle})}shouldValidate(e){return super.shouldValidate(e)||[`valueAsDate`,`min`,`max`,`dateFilter`].includes(e)}validate(){super.validate(),this.value?this._dateAdapter.isValid(this.valueAsDate)?this._dateAdapter.isValid(this.min)&&this._dateAdapter.compareDate(this.min,this.valueAsDate)>0?(this._removeValidityErrors(`rangeUnderflow`),this.setValidityFlag(`rangeUnderflow`,u(this._dateAdapter.format(this.min,{weekdayStyle:`none`}))[this.language.current])):this._dateAdapter.isValid(this.max)&&this._dateAdapter.compareDate(this.valueAsDate,this.max)>0?(this._removeValidityErrors(`rangeOverflow`),this.setValidityFlag(`rangeOverflow`,l(this._dateAdapter.format(this.max,{weekdayStyle:`none`}))[this.language.current])):this.dateFilter&&!this.dateFilter(this.valueAsDate)?(this._removeValidityErrors(`sbbDateFilter`),this.setValidityFlag(`sbbDateFilter`,c[this.language.current])):this._removeValidityErrors():(this._removeValidityErrors(`badInput`),this.setValidityFlag(`badInput`,c[this.language.current])):this._removeValidityErrors()}_removeValidityErrors(e){[`badInput`,`rangeUnderflow`,`rangeOverflow`,`sbbDateFilter`].filter(t=>t!==e).forEach(e=>this.removeValidityFlag(e))}}})();export{g as SbbDateInputElement};
@@ -2,7 +2,7 @@ import { html, unsafeCSS } from "lit";
2
2
  import { SbbElement } from "./core.js";
3
3
 
4
4
  //#region src/elements/action-group/action-group.scss?inline
5
- var action_group_default = ":host {\n display: flex;\n align-items: center;\n justify-content: start;\n gap: var(--sbb-action-group-gap);\n}\n\n:host(.sbb-orientation-vertical-full-width) {\n flex-direction: column;\n align-items: stretch;\n}\n\n:host(:where(.sbb-orientation-vertical,\n.sbb-orientation-horizontal-from-small,\n.sbb-orientation-horizontal-from-large,\n.sbb-orientation-horizontal-from-ultra)) {\n align-items: start;\n}\n\n@media (min-width: calc(37.5rem)) {\n :host(.sbb-orientation-horizontal-from-small) {\n align-items: center;\n }\n}\n\n@media (min-width: calc(64rem)) {\n :host(.sbb-orientation-horizontal-from-large) {\n align-items: center;\n }\n}\n\n@media (min-width: calc(90rem)) {\n :host(.sbb-orientation-horizontal-from-ultra) {\n align-items: center;\n }\n}\n";
5
+ var action_group_default = ":host {\n display: flex;\n align-items: center;\n justify-content: start;\n gap: var(--sbb-action-group-gap);\n flex-wrap: wrap;\n}\n\n:host(.sbb-orientation-vertical-full-width) {\n flex-direction: column;\n align-items: stretch;\n}\n\n:host(:where(.sbb-orientation-vertical,\n.sbb-orientation-horizontal-from-small,\n.sbb-orientation-horizontal-from-large,\n.sbb-orientation-horizontal-from-ultra)) {\n align-items: start;\n}\n\n@media (min-width: calc(37.5rem)) {\n :host(.sbb-orientation-horizontal-from-small) {\n align-items: center;\n }\n}\n\n@media (min-width: calc(64rem)) {\n :host(.sbb-orientation-horizontal-from-large) {\n align-items: center;\n }\n}\n\n@media (min-width: calc(90rem)) {\n :host(.sbb-orientation-horizontal-from-ultra) {\n align-items: center;\n }\n}\n";
6
6
 
7
7
  //#endregion
8
8
  //#region src/elements/action-group/action-group.component.ts
@@ -369,20 +369,20 @@ let SbbAlertElement = (() => {
369
369
  </p>
370
370
  </span>
371
371
  ${!this.readOnly ? html`<span class="sbb-alert__close-button-wrapper">
372
- <sbb-divider
373
- orientation="vertical"
374
- ?negative=${this._isLightMode()}
375
- class="sbb-alert__close-button-divider"
376
- ></sbb-divider>
377
- <sbb-transparent-button
378
- ?negative=${this._isLightMode()}
379
- size=${this.size === "l" ? "m" : this.size || nothing}
380
- icon-name="cross-small"
381
- @click=${() => this.close()}
382
- aria-label=${i18nCloseAlert[this._language.current]}
383
- class="sbb-alert__close-button"
384
- ></sbb-transparent-button>
385
- </span>` : nothing}
372
+ <sbb-divider
373
+ orientation="vertical"
374
+ ?negative=${this._isLightMode()}
375
+ class="sbb-alert__close-button-divider"
376
+ ></sbb-divider>
377
+ <sbb-transparent-button
378
+ ?negative=${this._isLightMode()}
379
+ size=${this.size === "l" ? "m" : this.size || nothing}
380
+ icon-name="cross-small"
381
+ @click=${() => this.close()}
382
+ aria-label=${i18nCloseAlert[this._language.current]}
383
+ class="sbb-alert__close-button"
384
+ ></sbb-transparent-button>
385
+ </span>` : nothing}
386
386
  </div>
387
387
  </div>
388
388
  `;
@@ -178,9 +178,9 @@ let SbbBreadcrumbGroupElement = (() => {
178
178
  <li class="sbb-breadcrumb-group__item">
179
179
  <slot name=${slot.name}></slot>
180
180
  ${index !== array.length - 1 ? html`<sbb-icon
181
- name="chevron-small-right-small"
182
- class="sbb-breadcrumb-group__divider-icon"
183
- ></sbb-icon>` : nothing}
181
+ name="chevron-small-right-small"
182
+ class="sbb-breadcrumb-group__divider-icon"
183
+ ></sbb-icon>` : nothing}
184
184
  </li>
185
185
  `);
186
186
  }
@@ -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
@@ -1,5 +1,5 @@
1
1
  import { type CSSResultGroup, type PropertyValues, type TemplateResult } from 'lit';
2
- import { type FormRestoreReason, type FormRestoreState, SbbElement } from '../../core.ts';
2
+ import { type FormRestoreReason, type FormRestoreState, SbbElement, type SbbElementType } from '../../core.ts';
3
3
  export declare class SbbChipInputTokenEndEvent<T = string> extends Event {
4
4
  /** The element that triggered the chip creation */
5
5
  origin: 'input' | 'autocomplete';
@@ -26,6 +26,7 @@ declare const SbbChipGroupElement_base: import("../../core.ts").AbstractConstruc
26
26
  */
27
27
  export declare class SbbChipGroupElement<T = string> extends SbbChipGroupElement_base {
28
28
  static readonly elementName: string;
29
+ static elementDependencies: SbbElementType[];
29
30
  static readonly role = "listbox";
30
31
  static styles: CSSResultGroup;
31
32
  static readonly events: {
@@ -237,6 +237,9 @@ let SbbChipGroupElement = (() => {
237
237
  static {
238
238
  this.elementName = "sbb-chip-group";
239
239
  }
240
+ static {
241
+ this.elementDependencies = [SbbChipElement];
242
+ }
240
243
  static {
241
244
  this.role = "listbox";
242
245
  }
@@ -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() {
@@ -18,6 +18,8 @@ export declare const i18nRestaurantWagonLabel: Record<string, string>;
18
18
  export declare const i18nBlockedPassage: Record<string, Record<string, string>>;
19
19
  export declare const i18nAdditionalWagonInformationHeading: Record<string, string>;
20
20
  export declare const i18nDeparture: Record<string, string>;
21
+ export declare const i18nNonAccessible: Record<string, string>;
22
+ export declare const i18nDownload: Record<string, string>;
21
23
  export declare const i18nDurationMinute: Record<string, Record<string, Record<string, string>>>;
22
24
  export declare const i18nDurationHour: Record<string, Record<string, Record<string, string>>>;
23
25
  export declare const i18nDurationDay: Record<string, Record<string, Record<string, string>>>;
@@ -1817,6 +1817,18 @@ const i18nDeparture = {
1817
1817
  fr: "Départ",
1818
1818
  it: "Partenza"
1819
1819
  };
1820
+ const i18nNonAccessible = {
1821
+ de: "nicht barrierefrei",
1822
+ en: "not accessible",
1823
+ fr: "non accessible",
1824
+ it: "non accessibile"
1825
+ };
1826
+ const i18nDownload = {
1827
+ de: "herunterladen",
1828
+ en: "download",
1829
+ fr: "télécharger",
1830
+ it: "scaricare"
1831
+ };
1820
1832
  const i18nDurationMinute = {
1821
1833
  single: {
1822
1834
  long: {
@@ -2696,8 +2708,8 @@ let SbbLinkBaseElement = (() => {
2696
2708
  ${renderContent}
2697
2709
  </a>
2698
2710
  ${opensInNewWindow ? html`<span id="sbb-link-new-window" hidden
2699
- >${i18nTargetOpensInNewWindow[this.language.current]}</span
2700
- >` : nothing}
2711
+ >${i18nTargetOpensInNewWindow[this.language.current]}</span
2712
+ >` : nothing}
2701
2713
  `;
2702
2714
  }
2703
2715
  };
@@ -6148,4 +6160,4 @@ function removeAriaComboBoxAttributes(trigger) {
6148
6160
  }
6149
6161
 
6150
6162
  //#endregion
6151
- export { DateAdapter, FORMAT_DATE, FRIDAY, ISO8601_FORMAT_DATE, IS_FOCUSABLE_QUERY, InteractivityChecker, IsFocusableConfig, MONDAY, NativeDateAdapter, SATURDAY, SUNDAY, SbbActionBaseElement, SbbAnimationCompleteMixin, SbbButtonBaseElement, SbbButtonLikeBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbFocusVisibleWithinController, SbbFormAssociatedCheckboxMixin, SbbFormAssociatedInputMixin, SbbFormAssociatedMixin, SbbFormAssociatedRadioButtonMixin, SbbIdReferenceController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbLiveAnnouncer, SbbMediaMatcherController, SbbMediaQueryBreakpointLargeAndAbove, SbbMediaQueryBreakpointLargeAndBelow, SbbMediaQueryBreakpointSmallAndAbove, SbbMediaQueryBreakpointSmallAndBelow, SbbMediaQueryBreakpointUltraAndAbove, SbbMediaQueryBreakpointZeroAndAbove, SbbMediaQueryDarkMode, SbbMediaQueryForcedColors, SbbMediaQueryHover, SbbMediaQueryPointerCoarse, SbbNamedSlotListMixin, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbOverlayOutsidePointerEventListener, SbbOverlayPositionController, SbbPanelMixin, SbbPropertyWatcherController, SbbReadonlyMixin, SbbRequiredMixin, SbbScrollHandler, SbbSelectionGroupBaseElement, SbbSelectionPanelMixin, SbbSlottedChangeEvent, SbbUpdateSchedulerMixin, THURSDAY, TUESDAY, TemporalDateAdapter, WEDNESDAY, appendAriaElements, buttonResetStyles, containsPierceShadowDom, defaultDateAdapter, forceType, forwardEvent, getElementPosition, getElementPositionHorizontal, getElementRectangle, getEventTarget, getNextElementIndex, getOverride, handleDistinctChange, hostScrollbarStyles, i18nAdditionalWagonInformationHeading, i18nAnd, i18nArrival, i18nBlockedPassage, i18nBreadcrumbEllipsisButtonLabel, i18nCalendarDateSelection, i18nCalendarWeekNumber, i18nCarouselArrowsNavigationHint, i18nCarouselItemAriaLabel, i18nCheckboxRequired, i18nChipDelete, i18nChipGroupInputDescription, i18nClass, i18nClearInput, i18nCloseAlert, i18nCloseDialog, i18nCloseNavigation, i18nCloseNotification, i18nClosePopover, i18nCloseSidebar, i18nClosedCompartmentLabel, i18nCollapsed, i18nConnectionFrom, i18nConnectionRoundtrip, i18nConnectionTo, i18nCouchetteWagonLabel, i18nDateChangedTo, i18nDateInvalid, i18nDateMax, i18nDateMin, i18nDatePickerPlaceholder, i18nDeparture, i18nDialog, i18nDirection, i18nDurationDay, i18nDurationHour, i18nDurationMinute, i18nExpanded, i18nFileSelectorButtonLabel, i18nFileSelectorButtonLabelMultiple, i18nFileSelectorCurrentlySelected, i18nFileSelectorDeleteFile, i18nFileSelectorSubtitleLabel, i18nFileSelectorSubtitleLabelMultiple, i18nFlipCard, i18nFromPlatform, i18nGoBack, i18nInputRequired, i18nItemsPerPage, i18nLocomotiveLabel, i18nMapContainerButtonLabel, i18nMeansOfTransport, i18nNew, i18nNextDay, i18nNextMonth, i18nNextPage, i18nNextSlide, i18nNextYear, i18nNextYearRange, i18nOccupancy, i18nPage, i18nPaginatorOf, i18nPaginatorSelected, i18nPreviousDay, i18nPreviousMonth, i18nPreviousPage, i18nPreviousSlide, i18nPreviousYear, i18nPreviousYearRange, i18nRealTimeInfo, i18nRemainingCharacters, i18nRestaurantWagonLabel, i18nReverseCard, i18nSector, i18nSectorShort, i18nSelectNextDay, i18nSelectPreviousDay, i18nSelectionRequired, i18nShowCalendar, i18nSleepingWagonLabel, i18nSlide, i18nSupersaver, i18nTargetOpensInNewWindow, i18nTimeInputChange, i18nTimeInvalid, i18nTimeMax, i18nTimeMaxLength, i18nTimetableFormSwapButtonLabel, i18nToday, i18nTrain, i18nTrains, i18nTransferProcedure, i18nTransferProcedures, i18nTravelhints, i18nTripDuration, i18nTripQuayChange, i18nWagonLabel, i18nWagonLabelNumber, i18nWagonsLabel, i18nWalkingDistanceArrival, i18nWalkingDistanceDeparture, i18nYearMonthSelection, idReference, interactivityChecker, isAndroid, isArrowKeyOrPageKeysPressed, isArrowKeyPressed, isBlink, isChromium, isEdge, isEventOnElement, isEventPrevented, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, isFirefox, isIOS, isMacOS, isNextArrowKeyPressed, isNextjs, isPreviousArrowKeyPressed, isSafari, isTrident, isWebkit, isZeroAnimationDuration, listResetStyles, mergeConfig, omitEmptyConverter, pageScrollDisabled, plainDate, plainDateConverter, popoverResetStyles, preventScrollOnSpacebarPress, queueDomContentLoaded, radioButtonRegistry, readConfig, removeAriaComboBoxAttributes, removeAriaElements, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, sbbLiveAnnouncer, sbbOverlayOutsidePointerEventListener, screenReaderOnlyStyles, scrollbarStyles, setAriaComboBoxAttributes, setAriaOverlayTriggerProperties, setOrRemoveAttribute, setOverlayPosition, ɵstateController };
6163
+ export { DateAdapter, FORMAT_DATE, FRIDAY, ISO8601_FORMAT_DATE, IS_FOCUSABLE_QUERY, InteractivityChecker, IsFocusableConfig, MONDAY, NativeDateAdapter, SATURDAY, SUNDAY, SbbActionBaseElement, SbbAnimationCompleteMixin, SbbButtonBaseElement, SbbButtonLikeBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbFocusVisibleWithinController, SbbFormAssociatedCheckboxMixin, SbbFormAssociatedInputMixin, SbbFormAssociatedMixin, SbbFormAssociatedRadioButtonMixin, SbbIdReferenceController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbLiveAnnouncer, SbbMediaMatcherController, SbbMediaQueryBreakpointLargeAndAbove, SbbMediaQueryBreakpointLargeAndBelow, SbbMediaQueryBreakpointSmallAndAbove, SbbMediaQueryBreakpointSmallAndBelow, SbbMediaQueryBreakpointUltraAndAbove, SbbMediaQueryBreakpointZeroAndAbove, SbbMediaQueryDarkMode, SbbMediaQueryForcedColors, SbbMediaQueryHover, SbbMediaQueryPointerCoarse, SbbNamedSlotListMixin, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbOverlayOutsidePointerEventListener, SbbOverlayPositionController, SbbPanelMixin, SbbPropertyWatcherController, SbbReadonlyMixin, SbbRequiredMixin, SbbScrollHandler, SbbSelectionGroupBaseElement, SbbSelectionPanelMixin, SbbSlottedChangeEvent, SbbUpdateSchedulerMixin, THURSDAY, TUESDAY, TemporalDateAdapter, WEDNESDAY, appendAriaElements, buttonResetStyles, containsPierceShadowDom, defaultDateAdapter, forceType, forwardEvent, getElementPosition, getElementPositionHorizontal, getElementRectangle, getEventTarget, getNextElementIndex, getOverride, handleDistinctChange, hostScrollbarStyles, i18nAdditionalWagonInformationHeading, i18nAnd, i18nArrival, i18nBlockedPassage, i18nBreadcrumbEllipsisButtonLabel, i18nCalendarDateSelection, i18nCalendarWeekNumber, i18nCarouselArrowsNavigationHint, i18nCarouselItemAriaLabel, i18nCheckboxRequired, i18nChipDelete, i18nChipGroupInputDescription, i18nClass, i18nClearInput, i18nCloseAlert, i18nCloseDialog, i18nCloseNavigation, i18nCloseNotification, i18nClosePopover, i18nCloseSidebar, i18nClosedCompartmentLabel, i18nCollapsed, i18nConnectionFrom, i18nConnectionRoundtrip, i18nConnectionTo, i18nCouchetteWagonLabel, i18nDateChangedTo, i18nDateInvalid, i18nDateMax, i18nDateMin, i18nDatePickerPlaceholder, i18nDeparture, i18nDialog, i18nDirection, i18nDownload, i18nDurationDay, i18nDurationHour, i18nDurationMinute, i18nExpanded, i18nFileSelectorButtonLabel, i18nFileSelectorButtonLabelMultiple, i18nFileSelectorCurrentlySelected, i18nFileSelectorDeleteFile, i18nFileSelectorSubtitleLabel, i18nFileSelectorSubtitleLabelMultiple, i18nFlipCard, i18nFromPlatform, i18nGoBack, i18nInputRequired, i18nItemsPerPage, i18nLocomotiveLabel, i18nMapContainerButtonLabel, i18nMeansOfTransport, i18nNew, i18nNextDay, i18nNextMonth, i18nNextPage, i18nNextSlide, i18nNextYear, i18nNextYearRange, i18nNonAccessible, i18nOccupancy, i18nPage, i18nPaginatorOf, i18nPaginatorSelected, i18nPreviousDay, i18nPreviousMonth, i18nPreviousPage, i18nPreviousSlide, i18nPreviousYear, i18nPreviousYearRange, i18nRealTimeInfo, i18nRemainingCharacters, i18nRestaurantWagonLabel, i18nReverseCard, i18nSector, i18nSectorShort, i18nSelectNextDay, i18nSelectPreviousDay, i18nSelectionRequired, i18nShowCalendar, i18nSleepingWagonLabel, i18nSlide, i18nSupersaver, i18nTargetOpensInNewWindow, i18nTimeInputChange, i18nTimeInvalid, i18nTimeMax, i18nTimeMaxLength, i18nTimetableFormSwapButtonLabel, i18nToday, i18nTrain, i18nTrains, i18nTransferProcedure, i18nTransferProcedures, i18nTravelhints, i18nTripDuration, i18nTripQuayChange, i18nWagonLabel, i18nWagonLabelNumber, i18nWagonsLabel, i18nWalkingDistanceArrival, i18nWalkingDistanceDeparture, i18nYearMonthSelection, idReference, interactivityChecker, isAndroid, isArrowKeyOrPageKeysPressed, isArrowKeyPressed, isBlink, isChromium, isEdge, isEventOnElement, isEventPrevented, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, isFirefox, isIOS, isMacOS, isNextArrowKeyPressed, isNextjs, isPreviousArrowKeyPressed, isSafari, isTrident, isWebkit, isZeroAnimationDuration, listResetStyles, mergeConfig, omitEmptyConverter, pageScrollDisabled, plainDate, plainDateConverter, popoverResetStyles, preventScrollOnSpacebarPress, queueDomContentLoaded, radioButtonRegistry, readConfig, removeAriaComboBoxAttributes, removeAriaElements, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, sbbLiveAnnouncer, sbbOverlayOutsidePointerEventListener, screenReaderOnlyStyles, scrollbarStyles, setAriaComboBoxAttributes, setAriaOverlayTriggerProperties, setOrRemoveAttribute, setOverlayPosition, ɵstateController };
@@ -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
  })();
@@ -0,0 +1,51 @@
1
+ import { type CSSResultGroup, type PropertyValues, type TemplateResult } from 'lit';
2
+ import { type SbbElementType, SbbLinkBaseElement } from '../../core.ts';
3
+ declare const SbbDownloadElement_base: import("../../core.ts").AbstractConstructor<import("../../icon.pure.ts").SbbIconNameMixinType> & typeof SbbLinkBaseElement;
4
+ /**
5
+ * It displays a downloadable document, styled as a card.
6
+ *
7
+ * Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel`
8
+ * and `accessibilityLabel`. The download behavior is always enabled.
9
+ *
10
+ * @slot - Use the unnamed slot to add custom content. Optional.
11
+ * @slot info - Slot used to render a `sbb-download-info`. A `sbb-download-info`
12
+ * placed in the unnamed slot is automatically moved to this slot. Optional.
13
+ * @slot icon - Use this slot to display a custom icon, by providing a
14
+ * `sbb-icon` component. Optional.
15
+ */
16
+ export declare class SbbDownloadElement extends SbbDownloadElement_base {
17
+ static readonly elementName: string;
18
+ static elementDependencies: SbbElementType[];
19
+ static styles: CSSResultGroup;
20
+ /** Option to set the component's background color. */
21
+ accessor color: 'white' | 'milk';
22
+ /** The label of the download. Defaults to the file name of the `href`. */
23
+ accessor label: string;
24
+ /**
25
+ * The download behavior is always enabled and handled internally, therefore
26
+ * this property cannot be disabled and is not reflected to the host element.
27
+ * @default true
28
+ */
29
+ set download(_value: boolean);
30
+ get download(): boolean;
31
+ /** The file name extracted from the `href` (e.g. `report.pdf`). */
32
+ get fileName(): string;
33
+ /** The lower-cased file extension extracted from the `href` (e.g. `pdf`), if any. */
34
+ get fileExtension(): string;
35
+ private _languageController;
36
+ /**
37
+ * Provides a default icon based on the `href` extension, if no icon name is
38
+ * set.
39
+ */
40
+ protected renderIconName(): string;
41
+ protected firstUpdated(_changedProperties: PropertyValues): void;
42
+ private _updateDescribedByElements;
43
+ private _downloadInfoElements;
44
+ protected renderTemplate(): TemplateResult;
45
+ }
46
+ declare global {
47
+ interface HTMLElementTagNameMap {
48
+ 'sbb-download': SbbDownloadElement;
49
+ }
50
+ }
51
+ export {};
@@ -0,0 +1,59 @@
1
+ import { type CSSResultGroup, type PropertyValues, type TemplateResult } from 'lit';
2
+ import { SbbElement } from '../../core.ts';
3
+ /**
4
+ * It displays metadata of a document; used within a `sbb-download`.
5
+ */
6
+ export declare class SbbDownloadInfoElement extends SbbElement {
7
+ static readonly elementName: string;
8
+ static styles: CSSResultGroup;
9
+ /**
10
+ * The type of the document (e.g. `PDF`). Falls back to the extension of the
11
+ * parent `sbb-download`.
12
+ */
13
+ accessor type: string;
14
+ /**
15
+ * The size of the document. If the value contains non-numeric characters it
16
+ * is rendered as is, otherwise it is interpreted as a number of bytes and
17
+ * shortened to the closest unit.
18
+ */
19
+ accessor size: string;
20
+ /** The date of the latest change of the document, as an ISO 8601 string. */
21
+ accessor changed: string;
22
+ /** Whether the document is not accessible. */
23
+ accessor nonAccessible: boolean;
24
+ private _language;
25
+ private _dateAdapter;
26
+ private _resolvedType;
27
+ private _typeRedundant;
28
+ private _resolvedSize;
29
+ private _resolvedChanged;
30
+ constructor();
31
+ connectedCallback(): void;
32
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
33
+ /** Resolves the type, falling back to the extension of the parent download's
34
+ * href.
35
+ */
36
+ private _resolveType;
37
+ /**
38
+ * Whether the type is already conveyed by the parent download's label.
39
+ * When the parent download has no explicit `label`, it falls back to the file
40
+ * name (e.g. `some-file.pdf`), which already includes the extension. In that
41
+ * case the type is redundant for assistive technology.
42
+ */
43
+ private _isTypeRedundant;
44
+ /**
45
+ * Formats the size, shortening a pure number of bytes to the closest unit.
46
+ */
47
+ private _resolveSize;
48
+ /**
49
+ * Formats the ISO 8601 change date using the configured date adapter, or
50
+ * renders it as is if invalid.
51
+ */
52
+ private _resolveChanged;
53
+ protected render(): TemplateResult;
54
+ }
55
+ declare global {
56
+ interface HTMLElementTagNameMap {
57
+ 'sbb-download-info': SbbDownloadInfoElement;
58
+ }
59
+ }
@@ -0,0 +1 @@
1
+ export * from './download.pure.ts';
@@ -0,0 +1,10 @@
1
+ import { SbbDownloadElement, SbbDownloadInfoElement } from "./download.pure.js";
2
+
3
+ export * from "./download.pure.js"
4
+
5
+ //#region src/elements/download.ts
6
+ /** @entrypoint */
7
+ SbbDownloadElement.define();
8
+ SbbDownloadInfoElement.define();
9
+
10
+ //#endregion
@@ -0,0 +1,3 @@
1
+ /** @entrypoint */
2
+ export * from './download/download/download.component.ts';
3
+ export * from './download/download-info/download-info.component.ts';