@sbb-esta/lyne-elements-dev 5.8.0-dev.1788844741 → 5.8.0-dev.1788874314
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/core.js +5 -5
- package/custom-elements.json +312 -31
- package/development/core/base-elements/link-base-element.d.ts +5 -0
- package/development/core.js +13 -5
- package/development/download/download/download.component.d.ts +12 -10
- package/development/download.pure.js +30 -36
- package/download/_download.global.scss +6 -0
- package/download.pure.js +9 -4
- package/lean-off-brand-theme.css +3 -0
- package/lean-safety-theme.css +3 -0
- package/lean-theme.css +3 -0
- package/off-brand-theme.css +3 -0
- package/package.json +2 -2
- package/safety-theme.css +3 -0
- package/standard-theme.css +3 -0
package/core.js
CHANGED
|
@@ -17,23 +17,23 @@ var le=class{constructor(){this.ignoreVisibility=!1}},ue=class{isDisabled(e){ret
|
|
|
17
17
|
let Se=0;var Ce=class{constructor(){r||(document.body?this._liveElement=this._createLiveElement():document.addEventListener(`DOMContentLoaded`,()=>{this._liveElement=this._createLiveElement()}))}announce(e,...t){if(!this._liveElement)return Promise.resolve();let n={},r,i;return t.length===1&&typeof t[0]==`number`?i=t[0]:[r,i]=t,this.clear(),clearTimeout(this._previousTimeout),r??=n?.politeness??`polite`,i??=n?.duration,this._liveElement.setAttribute(`aria-live`,r),this._currentPromise??=new Promise(e=>this._currentResolve=e),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof i==`number`&&(this._previousTimeout=setTimeout(()=>this.clear(),i)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise}clear(){this._liveElement&&(this._liveElement.textContent=``)}destroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e=`sbb-live-announcer-element`,t=document.getElementsByClassName(e),n=document.createElement(`div`);for(let e=0;e<t.length;e++)t[e].remove();return n.classList.add(e),n.classList.add(`sbb-screen-reader-only`),n.setAttribute(`aria-atomic`,`true`),n.setAttribute(`aria-live`,`polite`),n.id=`sbb-live-announcer-${Se++}`,document.body.appendChild(n),n}};const we=new Ce;var Te=`*,:before,:after{box-sizing:border-box}
|
|
18
18
|
`;const Ee=r||!CSS.supports(`selector(:state(loading))`)?class extends Set{constructor(e){super(),this._host=e,this._applied=r,this._host.addController(this),r||Promise.resolve().then(()=>this._applyStates())}add(e){return this._applied&&this._toggleState(e,!0),super.add(e)}delete(e){return this._toggleState(e,!1),super.delete(e)}clear(){this.forEach(e=>this.delete(e))}hostConnected(){this._applyStates()}_toggleState(e,t){this._host.toggleAttribute(`state--${e}`,t)}_applyStates(){this._applied||(this._applied=!0,this.forEach(e=>this._toggleState(e,!0)))}}:null;if(!r){let e=0,t=e=>e.shadowRoot?.host??(e instanceof Element?e:(()=>{throw Error(`Unable to resolve related element! This should never happen.`)})()),n={attributes:!0,attributeFilter:[`id`]},r=(t,n,r)=>{let i=r[Element.name]??r[ElementInternals.name];t.setAttribute(n,i.id||=`aria-ref-${e++}`)},i=(t,n,r)=>{t.setAttribute(n,Object.values(r).reduce((e,t)=>e.concat(t)).filter((e,t,n)=>n.indexOf(e)===t).map(t=>t.id||=`aria-ref-${e++}`).join(` `))};for(let e of[ElementInternals,Element]){let a=e.prototype;if(!(`ariaActiveDescendantElement`in a)){let i=`aria-activedescendant`,o=new WeakMap;Object.defineProperty(a,"ariaActiveDescendantElement",{enumerable:!0,configurable:!0,get(){let e=t(this),n=e.getAttribute(i)?.split(/\s+/)[0]??null;return n?e.getRootNode().getElementById?.(n)??null:null},set(a){if(a!==null&&!(a instanceof Element))throw TypeError(`Failed to set the 'ariaActiveDescendantElement' property on '${e.name}': Failed to convert value to 'Element'.`);let s=t(this),c=o.get(s);if(c?.observer?.disconnect(),a===null)c&&(delete c.elements[e.name],Object.keys(c).length?c.observer.observe(Object.values(c.elements)[0],n):(o.delete(s),s.removeAttribute(i)));else if(c)c.elements[e.name]=a,r(s,i,c.elements),Object.values(c.elements).forEach(e=>c.observer.observe(e,n));else{let t={[e.name]:a};r(s,i,t);let c=new MutationObserver(()=>r(s,i,t));c.observe(a,n),o.set(s,{elements:t,observer:c})}}})}for(let r of[`ariaControlsElements`,`ariaDescribedByElements`,`ariaDetailsElements`,`ariaErrorMessageElements`,`ariaLabelledByElements`,`ariaOwnsElements`])if(!(r in a)){let o=new WeakMap,s=`aria-${r.slice(4,-8).toLowerCase()}`;Object.defineProperty(a,r,{enumerable:!0,configurable:!0,get(){let e=t(this),n=e.getAttribute(s)?.split(/\s+/).filter((e,t,n)=>n.indexOf(e)===t).map(t=>e.getRootNode().getElementById?.(t)).filter(e=>e instanceof Element);return n?.length?Object.freeze(n):null},set(a){if(a!==null&&(!Array.isArray(a)||a.some(e=>!(e instanceof Element))))throw TypeError(`Failed to set the '${r}' property on '${e.name}': Failed to convert value to 'Element'.`);let c=t(this);a=a?.filter((e,t,n)=>n.indexOf(e)===t)??null;let l=o.get(c);if(l?.observer?.disconnect(),a===null)l&&(delete l.elements[e.name],Object.keys(l.elements).length?Object.values(l.elements).reduce((e,t)=>e.concat(t)).forEach(e=>l.observer.observe(e,n)):o.delete(c));else if(l)l.elements[e.name]=a,i(c,s,l.elements),Object.values(l.elements).reduce((e,t)=>e.concat(t)).forEach(e=>l.observer.observe(e,n));else{let t={[e.name]:a};i(c,s,t);let r=new MutationObserver(()=>i(c,s,t));a.forEach(e=>r.observe(e,n)),o.set(c,{elements:t,observer:r})}}})}}}const De=new WeakMap;function Oe(e){if(!e)return null;let t=De.get(e)?.states,n=function(e,t){t||t!==!1&&!this.has(e)?this.add(e):this.delete(e)};return t?{add(e){return t.add(e),this},delete:e=>t.delete(e),has:e=>t.has(e),toggle:n}:{add(t){return e.toggleAttribute(`state--${t}`,!0),this},delete:t=>e.toggleAttribute(`state--${t}`,!1),has:t=>e.hasAttribute(`state--${t}`),toggle:n}}var M=class extends Event{constructor(e){super(`slottedchange`,{composed:!0}),this.slot=e}};const ke=(e,...t)=>{let n=t.filter(e=>!!e);return e?.length?e.concat(n):t.length?n:null},Ae=(e,...t)=>{t=t.filter(e=>!!e);let n=e?.filter(e=>!t.includes(e))??null;return n?.length?n:null};var N=class extends e{static{this._$sbbElement$=!0}static{this.styles=[a(Te)]}get hydrationComplete(){return this._hydrationComplete}get hydrationRequired(){return this._hydrationRequired}constructor(){if(super(),this.internals=this.attachInternals(),this._hydrationComplete=new Promise(e=>this._resolveHydration=e),De.set(this,this.internals),Ee)Object.defineProperty(this.internals,"states",{value:new Ee(this),writable:!1,configurable:!1,enumerable:!1});else for(let e of this.getAttributeNames().filter(e=>e.startsWith(`state--`)))this.internals.states.add(e.slice(7)),this.removeAttribute(e);let e=this.constructor.role;if(e&&(this.internals.role=e),this._hydrationRequired=!!this.shadowRoot,!this._hydrationRequired)this._resolveHydration(!1);else{let e=e=>{this._hydrationRequired&&e.stopImmediatePropagation()},t={capture:!0},n=this.shadowRoot?.querySelectorAll(`slot`);n?.length&&(n.forEach(n=>n.addEventListener(`slotchange`,e,t)),this.hydrationComplete.then(()=>n.forEach(n=>{n.removeEventListener(`slotchange`,e,t),n.assignedNodes().length&&n.dispatchEvent(new Event(`slotchange`,{bubbles:!0}))})))}}static define(){if(!this.elementName)throw Error(`The static property "elementName" is not defined on ${this.name}. Please define it to register the custom element.`);if(!customElements.get(this.elementName)){customElements.define(this.elementName,this);let e=[],t=this;for(;t._$sbbElement$;)Array.isArray(t.elementDependencies)&&e.push(...t.elementDependencies),t=Object.getPrototypeOf(t);new Set(e).forEach(e=>e.define())}}static finalizeStyles(t){let n=[],r=this;for(;r&&r!==e;)Object.hasOwn(r,`styles`)&&r.styles&&n.unshift(r.styles),r=Object.getPrototypeOf(r);return super.finalizeStyles(n)}createRenderRoot(){let e=super.createRenderRoot();return this.shadowRoot?.addEventListener(`slotchange`,e=>this._slotchangeHandler(e,e.target)),this.shadowRoot?.addEventListener(`slottedchange`,e=>this._slotchangeHandler(e,e.slot),{capture:!0}),this.shadowRoot?.querySelectorAll?.(`slot`).forEach(e=>this._handleSlotChangeForSlottedState(e)),e}addController(e){super.addController(e),(this._controllers??=new Set).add(e)}removeController(e){super.removeController(e),this._controllers?.delete(e)}requestUpdate(e,t,n,r,i){if(super.requestUpdate(e,t,n,r,i),e){let a={oldValue:t,value:r?i:this[e]};this._controllers?.forEach(t=>t.hostPropertyUpdate?.(e,a,n))}}update(e){super.update(e),this._hydrationRequired&&(this._hydrationRequired=!1,this._resolveHydration(!0))}toggleState(e,t){t||t!==!1&&!this.internals.states.has(e)?this.internals.states.add(e):this.internals.states.delete(e)}_slotchangeHandler(e,t){let n=this.shadowRoot.contains(t)?t:e.composedPath().find(e=>e instanceof HTMLSlotElement&&this.shadowRoot.contains(e));n&&this._handleSlotChangeForSlottedState(n)}_handleSlotChangeForSlottedState(e){this._updateSlottedState(e),e.name||this._observeTextNodesInSlot(e)}_updateSlottedState(e){let t=e.name?`slotted-${e.name}`:`slotted`,n=this._hasSlottedContent(e);n&&!this.internals.states.has(t)?(this.internals.states.add(t),this.dispatchEvent(new M(e))):!n&&this.internals.states.has(t)&&(this.internals.states.delete(t),this.dispatchEvent(new M(e)))}_observeTextNodesInSlot(e){this._textObserver?.disconnect(),this._textObserver??=new MutationObserver(()=>{let e=this.shadowRoot.querySelector(`slot:not([name])`);e?this._updateSlottedState(e):this._textObserver.disconnect()}),e.assignedNodes().filter(e=>e.nodeType===e.TEXT_NODE).forEach(e=>this._textObserver.observe(e,{characterData:!0}))}_hasSlottedContent(e){return e.name?e.assignedElements().some(e=>!(e instanceof HTMLSlotElement)||this._hasSlottedContent(e)):e.assignedNodes().some(e=>e instanceof HTMLSlotElement?this._hasSlottedContent(e):e.nodeType!==e.TEXT_NODE||!!e.textContent?.trim())}},P=class extends N{get maybeDisabled(){let e=this;return e.disabled||e.formDisabled}get maybeDisabledInteractive(){return this.disabledInteractive}constructor(){super(),this.internals.states.add(`action`)}connectedCallback(){super.connectedCallback()}setupBaseEventHandlers(){this.addEventListener(`click`,e=>{this.maybeDisabled&&!this.maybeDisabledInteractive&&(e.preventDefault(),e.stopImmediatePropagation())},{capture:!0})}renderTemplate(){throw Error(`Implementation needed!`)}render(){return n`<span class="sbb-action-base ${this.localName}">${this.renderTemplate()}</span>`}};const F=e=>(t,n)=>{let{kind:r,metadata:i,name:a}=n,o=globalThis.litPropertyMetadata.get(i)?.get(a)?.type??String;if(e??=o,e===String?e=e=>e==null?``:String(e):e===Number&&(e=e=>e==null?NaN:Number(e)),r===`accessor`)return{set(n){t.set.call(this,e(n))}};if(r===`setter`)return function(n){t.call(this,e(n))};throw Error(`Unsupported decorator location: ${r}`)};async function je(e){return await new Promise(e=>setTimeout(e)),e.defaultPrevented}const Me={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1};if(typeof ValidityState>`u`){let e=class{get valid(){return!0}constructor(){throw TypeError(`Illegal constructor`)}};Object.entries(Me).forEach(([t,n])=>Object.assign(e.prototype,{get[t](){return n}})),globalThis.ValidityState=e}const I=e=>(()=>{let t=e,n=[],r,i,a=[],c=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l()],i=[u()],o(this,null,r,{kind:`setter`,name:`name`,static:!1,private:!1,access:{has:e=>`name`in e,set:(e,t)=>{e.name=t}},metadata:e},null,n),o(this,null,i,{kind:`accessor`,name:`formDisabled`,static:!1,private:!1,access:{has:e=>`formDisabled`in e,get:e=>e.formDisabled,set:(e,t)=>{e.formDisabled=t}},metadata:e},a,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.formAssociated=!0}get form(){return this.internals.form}set name(e){this.setAttribute(`name`,`${e}`),this.updateFormValue()}get name(){return this.getAttribute(`name`)??``}get type(){return this.localName}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}#e;get formDisabled(){return this.#e}set formDisabled(e){this.#e=e}constructor(...e){super(...e),this._validityStates=(s(this,n),new Map),this.#e=s(this,a,!1),s(this,c),this.addEventListener?.(`invalid`,e=>e.preventDefault())}attributeChangedCallback(e,t,n){(e!==`name`||t!==n)&&super.attributeChangedCallback(e,t,n)}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}setCustomValidity(e){e?this.setValidityFlag(`customError`,e):this.removeValidityFlag(`customError`)}formDisabledCallback(e){this.formDisabled=this._hasDisabledAncestor()}_hasDisabledAncestor(){let e=this.parentElement;for(;e;){if(e.localName===`fieldset`&&e.hasAttribute(`disabled`))return!0;e=e.parentElement}return!1}requestUpdate(e,t,n){super.requestUpdate(e,t,n),e===`value`&&this.updateFormValue(),this.hasUpdated&&this.shouldValidate(e)&&this.validate()}firstUpdated(e){super.firstUpdated(e),this.validate()}updateFormValue(){let e,t=this.name??this.getAttribute(`name`);typeof this.value==`string`||this.value==null?e=this.value:Array.isArray(this.value)?(e=new FormData,this.value.forEach(n=>{e.append(t,typeof n==`string`?n:new Blob([JSON.stringify(n)],{type:`application/json`}))})):(e=new FormData,e.append(t,new Blob([JSON.stringify(this.value)],{type:`application/json`}))),this.internals.setFormValue(e,this.formState?.())}setValidityFlag(e,t,n){n??=!0;let r=this._validityStates.get(e);(!r||r.message!==t||r.flagValue!==n)&&(this._validityStates.set(e,{flagValue:n,message:t}),this._setInternalValidity())}removeValidityFlag(e){this._validityStates.has(e)&&(this._validityStates.delete(e),this._setInternalValidity())}validate(){}shouldValidate(e){return!e}_setInternalValidity(){let e=this._validityStates.get(`customError`)?.message,t={};this._validityStates.forEach(({flagValue:n,message:r},i)=>{t[i]=n,e||=r});let n=Object.keys(ValidityState.prototype).filter(e=>!(e in Me)&&e!==`valid`);for(let e of n){let n=e in t&&t[e];Object.defineProperty(this.internals.validity,e,{value:n,configurable:!0}),n&&(t.customError=!0)}this.internals.setValidity(t,e),k&&Object.defineProperty(this.internals.validity,"customError",{value:this._validityStates.has(`customError`)||!!t.customError,configurable:!0}),this.dispatchEvent(new Event(`validity`))}}})();var Ne=class extends I(P){static{this.role=`button`}constructor(){if(super(),this._preventScrollOnSpaceKeydown=e=>{e.key===` `&&(e.preventDefault(),this.internals.states.add(`active`))},this._removeActiveMarker=()=>{this.internals.states.delete(`active`)},this._dispatchClickEventOnSpaceKeyup=e=>{e.key===` `&&(this._removeActiveMarker(),this._dispatchClickEvent(e))},this._dispatchClickEvent=e=>{let{altKey:t,ctrlKey:n,metaKey:r,shiftKey:i}=e;e.target.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,pointerId:-1,pointerType:``,altKey:t,ctrlKey:n,metaKey:r,shiftKey:i}))},this.internals.states.add(`button`),!r){this.setupBaseEventHandlers();let e={passive:!0};this.addEventListener(`keydown`,this._preventScrollOnSpaceKeydown),this.addEventListener(`keyup`,this._dispatchClickEventOnSpaceKeyup,e),this.addEventListener(`blur`,this._removeActiveMarker,e),this.addEventListener(`keypress`,e=>{(e.key===`Enter`||e.key===`
|
|
19
19
|
`)&&this._dispatchClickEvent(e)},e)}}connectedCallback(){super.connectedCallback(),this.tabIndex=0}attributeChangedCallback(e,t,n){(![`name`,`value`].includes(e)||t!==n)&&super.attributeChangedCallback(e,t,n)}};let Pe=(()=>{let e=Ne,t=[],n,r=[],i=[],a,c;return class extends e{static{let s=typeof Symbol==`function`&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;n=[F(),l()],a=[l()],c=[l()],o(this,null,n,{kind:`accessor`,name:`value`,static:!1,private:!1,access:{has:e=>`value`in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:s},r,i),o(this,null,a,{kind:`setter`,name:`type`,static:!1,private:!1,access:{has:e=>`type`in e,set:(e,t)=>{e.type=t}},metadata:s},null,t),o(this,null,c,{kind:`setter`,name:`form`,static:!1,private:!1,access:{has:e=>`form`in e,set:(e,t)=>{e.form=t}},metadata:s},null,t),s&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})}#e;get value(){return this.#e}set value(e){this.#e=e}set type(e){this.setAttribute(`type`,`${e}`)}get type(){return this.getAttribute(`type`)??`button`}set form(e){this._formId=e,this.form?.addEventListener(`keydown`,this._formKeyDown,{capture:!0})}get form(){return this._formId?this.getRootNode?.()?.getElementById?.(this._formId)??null:this.internals.form}constructor(){super(),this._elementsOnWhichEnterPressTriggersSubmit=(s(this,t),[`input`,`sbb-date-input`,`sbb-time-input`]),this.#e=s(this,r,``),this._formId=(s(this,i),``),this._handleButtonClick=async e=>{if(this.type===`button`||await je(e))return;let t=this.form;if(t)this.type===`submit`?this._requestSubmit(t):this.type===`reset`&&t.reset();else return},this._formKeyDown=e=>{let t=this.form;this.type===`submit`&&t&&(e.key===`Enter`||e.key===`
|
|
20
|
-
`)&&this._elementsOnWhichEnterPressTriggersSubmit.includes(e.target?.localName)&&e.isTrusted&&(e.stopImmediatePropagation(),e.preventDefault(),e.composedPath()[0].dispatchEvent(new KeyboardEvent(e.type,e))&&!this.matches(`:disabled`)&&this._requestSubmit(t))},this.addEventListener(`click`,this._handleButtonClick)}connectedCallback(){super.connectedCallback(),this.form?.addEventListener(`keydown`,this._formKeyDown,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.form?.removeEventListener(`keydown`,this._formKeyDown,{capture:!0})}_requestSubmit(e){let t=document.createElement(`button`);t.inert=!0,t.hidden=!0,t.name=this.name,t.value=this.value??``,e.append(t),e.requestSubmit(t),t.remove()}formResetCallback(){}formStateRestoreCallback(e,t){}updateFormValue(){}}})();function L(){return`sbbConfig`in globalThis||(globalThis.sbbConfig={}),globalThis.sbbConfig}function Fe(e){let t=L();Object.assign(t,e)}var R=class e{static{this._defaultLanguage=`en`}static{this._supportedLocales=[`en`,`de`,`fr`,`it`]}static{this._listeners=new Set}static{this._observer=r?null:new MutationObserver(t=>{t[0].oldValue!==document.documentElement.getAttribute(`lang`)&&e._listeners.forEach(e=>e._callHandlers())})}static{this._observerConfig={attributeFilter:[`lang`],attributeOldValue:!0}}static get current(){let t=((L().language??(r?e._defaultLanguage:document.documentElement.getAttribute(`lang`)))||e._defaultLanguage).split(`-`)[0];return e._supportedLocales.includes(t)?t:e._defaultLanguage}get current(){return e.current}constructor(e){this._host=e,this._handlers=[],this._host.addController(this)}withHandler(e){return this._handlers.unshift(e),this}hostConnected(){r||(e._listeners.size||e._observer.observe(document.documentElement,e._observerConfig),e._listeners.add(this),this._previousLanguage!==this.current&&this._callHandlers(this._previousLanguage!==void 0))}hostDisconnected(){r||(this._previousLanguage=this.current,e._listeners.delete(this),e._listeners.size||e._observer.disconnect())}_callHandlers(e=!0){this._handlers.forEach(e=>e()),e&&this._host.requestUpdate()}};const z={toAttribute(e,n){return(n===String||n===void 0)&&e===``||n===Number&&isNaN(e)?null:t.toAttribute(e,n)}},Ie={de:`Richtung`,en:`Direction`,fr:`Direction`,it:`Direzione`},Le={de:`Ankunft`,en:`Arrival`,fr:`Arrivée`,it:`Arrivo`},Re={de:`Sektor`,en:`Sector`,fr:`Secteur`,it:`Settore`},ze={de:`Skt.`,en:`Sec.`,fr:`Sect.`,it:`Set.`},Be={de:`und`,en:`and`,fr:`et`,it:`e`},Ve={first:{de:`Erste Klasse`,en:`First Class`,fr:`Première classe`,it:`Prima classe`},second:{de:`Zweite Klasse`,en:`Second Class`,fr:`Deuxième classe`,it:`Seconda classe`}},He={de:`Zug`,en:`Train`,fr:`Train`,it:`Treno`},Ue={de:`Züge`,en:`Trains`,fr:`Trains`,it:`Treni`},We={de:`Wagen des Zuges`,en:`Coaches of the train`,fr:`Wagons du train`,it:`Carrozze del treno`},Ge={de:`Wagen`,en:`Train coach`,fr:`Wagon`,it:`Carrozza del treno`},Ke={de:`Nummer`,en:`Number`,fr:`Numéro`,it:`Numero`},qe={de:`Geschlossener Zugwaggon`,en:`Closed train coach`,fr:`Wagon du train fermé`,it:`Carrozza del treno chiuso`},Je={de:`Lokomotive`,en:`Locomotive`,fr:`Locomotive`,it:`Locomotiva`},Ye={de:`Schlafwagen`,en:`Sleeping car`,fr:`Voiture-lits`,it:`Carrozza letti`},Xe={de:`Liegewagen`,en:`Couchette car`,fr:`Voiture-couchettes`,it:`Carrozza cuccette`},Ze={de:`Speisewagen`,en:`Dining car`,fr:`Voiture-restaurant`,it:`Carrozza ristorante`},Qe={previous:{de:`Kein Durchgang zum vorherigen Wagen`,en:`No passage to the previous train coach`,fr:`Pas de passage au wagon du train précédent`,it:`Nessun passaggio alla carrozza del treno precedente`},next:{de:`Kein Durchgang zum nächsten Wagen`,en:`No passage to the next train coach`,fr:`Pas de passage au wagon du train suivant`,it:`Nessun passaggio alla carrozza del treno successivo`},both:{de:`Kein Durchgang zum nächsten und vorherigen Wagen`,en:`No passage to the next and previous train coach`,fr:`Pas de passage au wagon du train suivant et précédent`,it:`Nessun passaggio alla carrozza del treno successivo e precedente`}},$e={de:`Zusätzliche Wageninformation`,en:`Additional wagon information`,fr:`Informations supplémentaires sur les wagons`,it:`Informazioni aggiuntive sulla carrozza del treno`},et={de:`Abfahrt`,en:`Departure`,fr:`Départ`,it:`Partenza`},tt={de:`nicht barrierefrei`,en:`not accessible`,fr:`non accessible`,it:`non accessibile`},nt={de:`herunterladen`,en:`download`,fr:`télécharger`,it:`scaricare`},rt={single:{long:{de:`Minute`,en:`Minute`,fr:`Minute`,it:`Minuto`},short:{de:`m`,en:`m`,fr:`m`,it:`m`}},multiple:{long:{de:`Minuten`,en:`Minutes`,fr:`Minutes`,it:`Minuti`},short:{de:`Min`,en:`min`,fr:`min.`,it:`mins`}}},it={single:{long:{de:`Stunde`,en:`Hour`,fr:`Heure`,it:`Ora`},short:{de:`Std.`,en:`h`,fr:`ore`,it:`hrs`}},multiple:{long:{de:`Stunden`,en:`Hours`,fr:`Heures`,it:`Ore`},short:{de:`Std.`,en:`h`,fr:`ore`,it:`hrs`}}},at={single:{long:{de:`Tag`,en:`Day`,fr:`Jour`,it:`Giorno`}},multiple:{long:{de:`Tage`,en:`Days`,fr:`Jours`,it:`Giorni`}}},ot={de:`Gleisänderung im Verlauf dieser Verbindung`,en:`Track change in the course of this connection`,fr:`Changement de voie sur le parcours de cette connexion`,it:`Cambiamento di binario nel corso di questa connessione`},st={de:`Reisedauer`,en:`Travel time`,fr:`Durée du voyage`,it:`Durata del viaggio`},ct={de:`Reisehinweise`,en:`Travelhints`,fr:`Indications sur le voyage`,it:`Indicazioni di viaggio`},lt={de:`Echtzeitinformationen`,en:`Real time information`,fr:`Informations en temps réel`,it:`Informazioni in tempo reale`},ut={de:`mal umsteigen`,en:`change`,fr:`changement de train`,it:`cambio`},dt={de:`mal umsteigen`,en:`changes`,fr:`changements de train`,it:`cambi`},ft={de:`neu`,en:`new`,fr:`nouveau`,it:`nuovo`},pt={de:`Auf`,en:`on`,fr:`sur`,it:`su`},mt={de:`Sparbillette`,en:`Supersaver tickets`,fr:`Billets dégriffés`,it:`Biglietti risparmio`},ht={none:{de:`Keine Belegungsprognose verfügbar`,en:`No occupancy forecast available`,fr:`Aucune prévision d'occupation disponible`,it:`Nessuna previsione di occupazione disponibile`},low:{de:`Tiefe bis mittlere Belegung erwartet`,en:`Low to average occupancy expected`,fr:`Taux d’occupation faible à moyen prévu`,it:`È prevista un’occupazione medio-bassa`},medium:{de:`Hohe Belegung erwartet`,en:`High occupancy expected`,fr:`Taux d’occupation élevé prévu`,it:`È prevista un’occupazione elevata`},high:{de:`Sehr hohe Belegung erwartet`,en:`Very high occupancy expected`,fr:`Taux d’occupation très élevé prévu`,it:`È prevista un’occupazione molto elevata`}},gt={funicular:{de:`Seilbahn/Zahnradbahn`,en:`Funicular/Cog railway`,fr:`Funiculaire/Chemin de fer à crémaillère`,it:`Funivia/Ferrovia a cremagliera`},ec_id:{de:`EC/IC`,en:`EC/IC`,fr:`EC/IC`,it:`EC/IC`},bus:{de:`Bus`,en:`Bus`,fr:`Bus`,it:`Bus`},re:{de:`RE`,en:`RE`,fr:`RE`,it:`RE`},arz_ext:{de:`ARZ/EXT`,en:`ARZ/EXT`,fr:`ARZ/EXT`,it:`ARZ/EXT`},ice_tgv_rjx:{de:`ICE/TGV/RJX`,en:`ICE/TGV/RJX`,fr:`ICE/TGV/RJX`,it:`ICE/TGV/RJX`},ir_pe:{de:`IR/PE`,en:`IR/PE`,fr:`IR/PE`,it:`IR/PE`},s_sn_r:{de:`S/SN/R`,en:`S/SN/R`,fr:`S/SN/R`,it:`S/SN/R`},tramway:{de:`Tram/Metro`,en:`Tramway/Underground`,fr:`Tram/Métro`,it:`Tram/Metro`},ship:{de:`Schiff`,en:`Ship`,fr:`Bateau`,it:`Battello`},train:{de:`Zug`,en:`Train`,fr:`Train`,it:`Treno`}},_t={de:`Linkziel öffnet in neuem Fenster.`,en:`Link target opens in a new window.`,fr:`Le lien s'ouvre dans une nouvelle fenêtre.`,it:`Il link si apre in una nuova finestra.`},vt={de:`Minuten Fussweg nach Ankunft:`,en:`minutes of walking time after arrival:`,fr:`minutes de trajet à pied après l’arrivée:`,it:`minuti a piedi all’arrivo:`},yt={de:`Minuten Fussweg vor Abfahrt:`,en:`minutes of walking time before departure:`,fr:`minutes de trajet à pied avant le départ:`,it:`minuti a piedi prima della partenza:`},bt={de:`Meldung schliessen`,en:`Close message`,fr:`Fermer le message`,it:`Chiudere il messaggio`},xt={de:`Nachricht schliessen`,en:`Close message`,fr:`Fermer le message`,it:`Chiudere il messaggio`},St={de:`Dialog`,en:`Dialog`,fr:`Dialogue`,it:`Dialogo`},Ct={de:`Übergelagertes Fenster schliessen`,en:`Close secondary window`,fr:`Fermer la fenêtre superposée`,it:`Chiudere la finestra sovrapposta`},wt={de:`Navigation schliessen`,en:`Close navigation`,fr:`Fermer la navigation`,it:`Chiudere la navigazione`},Tt={de:`Seitenleiste schliessen`,en:`Close sidebar`,fr:`Fermer la barre latérale`,it:`Chiudere la barra laterale`},Et={de:`Hinweis schliessen`,en:`Close note`,fr:`Fermer la note`,it:`Chiudere la nota`},Dt={de:`Zurück`,en:`Go back`,fr:`Retourner`,it:`Indietro`},Ot={de:`Heute`,en:`Today`,fr:`Aujourd’hui`,it:`Oggi`},kt={de:`Zum nächsten Monat wechseln`,en:`Change to the next month`,fr:`Passer au mois suivant`,it:`Passare al mese successivo`},At={de:`Zum letzten Monat wechseln`,en:`Change to the previous month`,fr:`Passer au mois précédent`,it:`Passare al mese precedente`},jt={de:`Nächster Tag`,en:`Next day`,fr:`Jour suivant`,it:`Giorno successivo`},Mt={de:`Vorheriger Tag`,en:`Previous day`,fr:`Jour précédent`,it:`Giorno precedente`},Nt={de:`Jahr und Monat auswählen`,en:`Choose year and month`,fr:`Choisir l’année et le mois`,it:`Seleziona anno e mese`},Pt={de:`Wechsel zur Datumsauswahl`,en:`Change to date selection`,fr:`Passer à la sélection de date`,it:`Passare alla selezione della data`},Ft=e=>({de:`Wechsel zu den nächsten ${e} Jahren`,en:`Change to the next ${e} years`,fr:`Passer aux ${e} prochaines années`,it:`Passare ai successivi ${e} anni`}),It=e=>({de:`Wechsel zu den vorherigen ${e} Jahren`,en:`Change to the previous ${e} years`,fr:`Passage aux ${e} précédentes années`,it:`Passare ai precedenti ${e} anni`}),Lt={de:`Zum nächsten Jahr wechseln`,en:`Change to the next year`,fr:`Passer à l'année suivante`,it:`Passare all'anno successivo`},Rt={de:`Zum letzten Jahr wechseln`,en:`Change to the previous year`,fr:`Passer à l'année précédent`,it:`Passare all'anno precedente`},zt=e=>({de:`Zum nächsten Tag wechseln, derzeit ausgewählt ${e}.`,en:`Change to the next day, currently selected ${e}.`,fr:`Passer au jour suivant, actuellement sélectionné ${e}.`,it:`Passare al giorno successivo, attualmente selezionato ${e}.`}),Bt=e=>({de:`Zum vorherigen Tag wechseln, derzeit ausgewählt ${e}.`,en:`Change to the previous day, currently selected ${e}.`,fr:`Passer au jour précédent, actuellement sélectionné ${e}.`,it:`Passare al giorno precedente, attualmente selezionato ${e}.`}),Vt={de:`Kalender anzeigen`,en:`Show calendar`,fr:`Afficher le calendrier`,it:`Visualizza il calendario`},Ht={de:`TT.MM.JJJJ`,en:`DD.MM.YYYY`,fr:`JJ.MM.AAAA`,it:`GG.MM.AAAA`},Ut={de:`Datum geändert auf`,en:`Date changed to`,fr:`Date modifiée au`,it:`Data modificata in`},Wt={de:`Verbindung von`,en:`Connection from`,fr:`Liaison de`,it:`Collegamento da`},Gt={de:`nach`,en:`to`,fr:`à`,it:`a`},Kt=e=>({de:`und zurück nach ${e}.`,en:`and back to ${e}.`,fr:`et retour à ${e}.`,it:`e ritorno a ${e}.`}),qt={de:`erweitert`,en:`expanded`,fr:`étendu`,it:`espanso`},Jt={de:`reduziert`,en:`collapsed`,fr:`condensé`,it:`compresso`},Yt={de:`Karte zeigen`,en:`Show map`,fr:`Afficher la carte`,it:`Mostra la mappa`},Xt={de:`Mehr Breadcrumbs anzeigen`,en:`Show more breadcrumbs`,fr:`Afficher plus de fils d’Ariane`,it:`Mostra più breadcrumbs`},Zt={de:`Feldinhalt löschen`,en:`Clear input value`,fr:`Effacer la valeur d’entrée`,it:`Cancella il valore dell’input`},Qt={de:`Klicken Sie auf diese Karte für Details`,en:`Click on this card for details`,fr:`Cliquez sur cette carte pour plus de détails`,it:`Clicca su questa scheda per i dettagli`},$t={de:`Klicken Sie auf diese Karte, um zurück zur Zusammenfassung zu gelangen`,en:`Click on this card to go back to the summary`,fr:`Cliquez sur cette carte pour revenir au résumé`,it:`Clicca su questa scheda per tornare al sommario`},en={de:`Datei auswählen`,en:`Choose a file`,fr:`Choisissez un fichier`,it:`Scegli un file`},tn={de:`Dateien auswählen`,en:`Choose files`,fr:`Choisissez des fichiers`,it:`Scegli file`},nn={de:`Ziehen Sie Ihre Datei hier hin (Drag & Drop)`,en:`Drag & Drop your file here`,fr:`Faites glisser et déposez votre fichier ici`,it:`Trascina e rilascia il file qui`},rn={de:`Ziehen Sie Ihre Dateien hier hin (Drag & Drop)`,en:`Drag & Drop your files here`,fr:`Faites glisser et déposez vos fichiers ici`,it:`Trascina e rilascia i file qui`},an={de:`Datei entfernen`,en:`Remove file`,fr:`Effacer le fichier`,it:`Rimuovi il file`},on=e=>e&&e.length>0?{de:`Aktuell ausgewählte Datei: ${e.join(`, `)}.`,en:`Currently selected files: ${e.join(`, `)}.`,fr:`Fichier actuellement sélectionné: ${e.join(`, `)}.`,it:`File attualmente selezionato: ${e.join(`, `)}.`}:{de:`Keine Datei ausgewählt.`,en:`No files selected.`,fr:`Nessun fichier sélectionné.`,it:`Nessun file selezionato.`},sn={de:`Nächste Seite`,en:`Next page`,fr:`Page suivante`,it:`Pagina successiva`},cn={de:`Vorherige Seite`,en:`Previous page`,fr:`Page précédente`,it:`Pagina precedente`},ln={de:`Seite`,en:`Page`,fr:`Page`,it:`Pagina`},un={de:`Einträge pro Seite`,en:`Items per page`,fr:`Entrées par page`,it:`Elementi per pagina`},dn={de:`ausgewählt`,en:`selected`,fr:`sélectionnée`,it:`selezionata`},fn={de:`von`,en:`of`,fr:`sur`,it:`di`},pn={de:`Muss gesetzt sein.`,en:`Must be checked.`,fr:`Doit être cochée.`,it:`Deve essere impostato.`},mn={de:`Auswahl erforderlich.`,en:`Selection required.`,fr:`Sélection requise.`,it:`Selezione necessaria.`},hn={de:`Eingabe erforderlich.`,en:`Input required.`,fr:`Entrée obligatoire.`,it:`Inserimento necessario.`},gn={de:`Bitte gültiges Datum eingeben.`,en:`Please provide a valid date.`,fr:`Veuillez saisir une date valide.`,it:`Inserire una data valida.`},_n=e=>({de:`Datum darf nicht vor ${e} sein.`,en:`Date must not be before ${e}.`,fr:`La date ne doit pas être antérieure au ${e}.`,it:`La data non deve essere anteriore al ${e}.`}),vn=e=>({de:`Datum darf nicht nach ${e} sein.`,en:`Date must not be after ${e}.`,fr:`La date ne doit pas être postérieure au ${e}.`,it:`La data non deve essere successiva al ${e}.`}),yn=e=>({de:`Zeit geändert zu ${e}.`,en:`Time changed to ${e}.`,fr:`Heure modifiée: ${e}.`,it:`Orario modificata alle ${e}.`}),bn={de:`Bitte gültige Zeit eingeben.`,en:`Please provide a valid time.`,fr:`Veuillez saisir une heure valide.`,it:`Inserisci un orario valido.`},xn={de:`Zeit darf nicht nach 23:59 sein.`,en:`Time must not be after 23:59.`,fr:`L’heure ne doit pas être postérieure à 23h59.`,it:`L’orario non può essere successivo alle 23.59.`},Sn={de:`Die Zeiteingabe darf nicht mehr als fünf Zeichen haben.`,en:`The time input must not exceed five characters.`,fr:`La saisie de l’heure ne doit pas comporter plus de cinq caractères.`,it:`L’indicazione temporale non può contenere più di cinque caratteri.`},Cn={de:`Drücken Sie die Entfernen-Taste um den Chip zu löschen`,en:`Press the Delete button to remove the chip`,fr:`Appuyez sur la touche Del pour supprimer cette puce`,it:`Premi il tasto Canc per rimuovere questa chip`},wn={de:`Ausgewählte Elemente:`,en:`Selected elements:`,fr:`Éléments sélectionnés:`,it:`Elementi selezionati:`},Tn={de:`Woche`,en:`Week`,fr:`Semaine`,it:`Settimana`},En={de:`Von und Nach tauschen`,en:`Swap from and to`,fr:`Échanger de et à`,it:`Inverti Da e A`},Dn=(e,t)=>({de:`${e} von ${t}`,en:`${e} of ${t}`,fr:`${e} sur ${t}`,it:`${e} di ${t}`}),On={de:`Karussell – Benutzen Sie die Pfeiltasten im Interaktionsmodus, um durch die Folien zu navigieren`,en:`Carousel - Use the arrow keys in interaction mode to navigate through the slides`,fr:`Carrousel – Utilisez les touches fléchées en mode interaction pour naviguer dans les diapositives`,it:`Carosello – Utilizzare i tasti freccia in modalità interazione per navigare tra le slide`},kn={de:`Nächste Folie`,en:`Next slide`,fr:`Diapositive suivante`,it:`Slide successiva`},An={de:`Vorherige Folie`,en:`Previous slide`,fr:`Diapositive précédente`,it:`Slide precedente`},jn={de:`Folie`,en:`Slide`,fr:`Diapositive`,it:`Slide`},Mn={de:`Zeichen übrig`,en:`characters remaining`,fr:`caractères restants`,it:`caratteri rimanenti`};let Nn=(()=>{let e=P,t,a=[],c=[],u,d=[],f=[],p,m=[],h=[],g,_=[],v=[],y,b=[],x=[],S,C=[],w=[];return class extends e{static{let n=typeof Symbol==`function`&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;t=[F(),l({reflect:!0,converter:z})],u=[F(),l({reflect:!0,converter:z})],p=[F(),l({reflect:!0,converter:z})],g=[F(),l({type:Boolean,reflect:!0})],y=[F(),l({attribute:`accessibility-label`})],S=[F(),l({attribute:`accessibility-current`})],o(this,null,t,{kind:`accessor`,name:`href`,static:!1,private:!1,access:{has:e=>`href`in e,get:e=>e.href,set:(e,t)=>{e.href=t}},metadata:n},a,c),o(this,null,u,{kind:`accessor`,name:`target`,static:!1,private:!1,access:{has:e=>`target`in e,get:e=>e.target,set:(e,t)=>{e.target=t}},metadata:n},d,f),o(this,null,p,{kind:`accessor`,name:`rel`,static:!1,private:!1,access:{has:e=>`rel`in e,get:e=>e.rel,set:(e,t)=>{e.rel=t}},metadata:n},m,h),o(this,null,g,{kind:`accessor`,name:`download`,static:!1,private:!1,access:{has:e=>`download`in e,get:e=>e.download,set:(e,t)=>{e.download=t}},metadata:n},_,v),o(this,null,y,{kind:`accessor`,name:`accessibilityLabel`,static:!1,private:!1,access:{has:e=>`accessibilityLabel`in e,get:e=>e.accessibilityLabel,set:(e,t)=>{e.accessibilityLabel=t}},metadata:n},b,x),o(this,null,S,{kind:`accessor`,name:`accessibilityCurrent`,static:!1,private:!1,access:{has:e=>`accessibilityCurrent`in e,get:e=>e.accessibilityCurrent,set:(e,t)=>{e.accessibilityCurrent=t}},metadata:n},C,w),n&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}#e;get href(){return this.#e}set href(e){this.#e=e}#t;get target(){return this.#t}set target(e){this.#t=e}#n;get rel(){return this.#n}set rel(e){this.#n=e}#r;get download(){return this.#r}set download(e){this.#r=e}#i;get accessibilityLabel(){return this.#i}set accessibilityLabel(e){this.#i=e}#a;get accessibilityCurrent(){return this.#a}set accessibilityCurrent(e){this.#a=e}constructor(){super(),this.#e=s(this,a,``),this.#t=(s(this,c),s(this,d,``)),this.#n=(s(this,f),s(this,m,``)),this.#r=(s(this,h),s(this,_,!1)),this.#i=(s(this,v),s(this,b,``)),this.#a=(s(this,x),s(this,C,``)),this.language=(s(this,w),new R(this)),this.anchorRole=null,this._evaluateRelAttribute=()=>this.rel?this.rel:this.target===`_blank`?`external noopener nofollow`:i,this.internals.states.add(`link`),r||this.setupBaseEventHandlers()}focus(e){this.shadowRoot.querySelector(`a`)?.focus(e)}blur(){this.shadowRoot.querySelector(`a`)?.blur()}click(){this.shadowRoot.querySelector(`a`)?.click()}render(){return this.renderLink(this.renderTemplate())}renderLink(e){let t=!!this.href&&this.target===`_blank`;return n`
|
|
20
|
+
`)&&this._elementsOnWhichEnterPressTriggersSubmit.includes(e.target?.localName)&&e.isTrusted&&(e.stopImmediatePropagation(),e.preventDefault(),e.composedPath()[0].dispatchEvent(new KeyboardEvent(e.type,e))&&!this.matches(`:disabled`)&&this._requestSubmit(t))},this.addEventListener(`click`,this._handleButtonClick)}connectedCallback(){super.connectedCallback(),this.form?.addEventListener(`keydown`,this._formKeyDown,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.form?.removeEventListener(`keydown`,this._formKeyDown,{capture:!0})}_requestSubmit(e){let t=document.createElement(`button`);t.inert=!0,t.hidden=!0,t.name=this.name,t.value=this.value??``,e.append(t),e.requestSubmit(t),t.remove()}formResetCallback(){}formStateRestoreCallback(e,t){}updateFormValue(){}}})();function L(){return`sbbConfig`in globalThis||(globalThis.sbbConfig={}),globalThis.sbbConfig}function Fe(e){let t=L();Object.assign(t,e)}var R=class e{static{this._defaultLanguage=`en`}static{this._supportedLocales=[`en`,`de`,`fr`,`it`]}static{this._listeners=new Set}static{this._observer=r?null:new MutationObserver(t=>{t[0].oldValue!==document.documentElement.getAttribute(`lang`)&&e._listeners.forEach(e=>e._callHandlers())})}static{this._observerConfig={attributeFilter:[`lang`],attributeOldValue:!0}}static get current(){let t=((L().language??(r?e._defaultLanguage:document.documentElement.getAttribute(`lang`)))||e._defaultLanguage).split(`-`)[0];return e._supportedLocales.includes(t)?t:e._defaultLanguage}get current(){return e.current}constructor(e){this._host=e,this._handlers=[],this._host.addController(this)}withHandler(e){return this._handlers.unshift(e),this}hostConnected(){r||(e._listeners.size||e._observer.observe(document.documentElement,e._observerConfig),e._listeners.add(this),this._previousLanguage!==this.current&&this._callHandlers(this._previousLanguage!==void 0))}hostDisconnected(){r||(this._previousLanguage=this.current,e._listeners.delete(this),e._listeners.size||e._observer.disconnect())}_callHandlers(e=!0){this._handlers.forEach(e=>e()),e&&this._host.requestUpdate()}};const z={toAttribute(e,n){return(n===String||n===void 0)&&e===``||n===Number&&isNaN(e)?null:t.toAttribute(e,n)}},Ie={de:`Richtung`,en:`Direction`,fr:`Direction`,it:`Direzione`},Le={de:`Ankunft`,en:`Arrival`,fr:`Arrivée`,it:`Arrivo`},Re={de:`Sektor`,en:`Sector`,fr:`Secteur`,it:`Settore`},ze={de:`Skt.`,en:`Sec.`,fr:`Sect.`,it:`Set.`},Be={de:`und`,en:`and`,fr:`et`,it:`e`},Ve={first:{de:`Erste Klasse`,en:`First Class`,fr:`Première classe`,it:`Prima classe`},second:{de:`Zweite Klasse`,en:`Second Class`,fr:`Deuxième classe`,it:`Seconda classe`}},He={de:`Zug`,en:`Train`,fr:`Train`,it:`Treno`},Ue={de:`Züge`,en:`Trains`,fr:`Trains`,it:`Treni`},We={de:`Wagen des Zuges`,en:`Coaches of the train`,fr:`Wagons du train`,it:`Carrozze del treno`},Ge={de:`Wagen`,en:`Train coach`,fr:`Wagon`,it:`Carrozza del treno`},Ke={de:`Nummer`,en:`Number`,fr:`Numéro`,it:`Numero`},qe={de:`Geschlossener Zugwaggon`,en:`Closed train coach`,fr:`Wagon du train fermé`,it:`Carrozza del treno chiuso`},Je={de:`Lokomotive`,en:`Locomotive`,fr:`Locomotive`,it:`Locomotiva`},Ye={de:`Schlafwagen`,en:`Sleeping car`,fr:`Voiture-lits`,it:`Carrozza letti`},Xe={de:`Liegewagen`,en:`Couchette car`,fr:`Voiture-couchettes`,it:`Carrozza cuccette`},Ze={de:`Speisewagen`,en:`Dining car`,fr:`Voiture-restaurant`,it:`Carrozza ristorante`},Qe={previous:{de:`Kein Durchgang zum vorherigen Wagen`,en:`No passage to the previous train coach`,fr:`Pas de passage au wagon du train précédent`,it:`Nessun passaggio alla carrozza del treno precedente`},next:{de:`Kein Durchgang zum nächsten Wagen`,en:`No passage to the next train coach`,fr:`Pas de passage au wagon du train suivant`,it:`Nessun passaggio alla carrozza del treno successivo`},both:{de:`Kein Durchgang zum nächsten und vorherigen Wagen`,en:`No passage to the next and previous train coach`,fr:`Pas de passage au wagon du train suivant et précédent`,it:`Nessun passaggio alla carrozza del treno successivo e precedente`}},$e={de:`Zusätzliche Wageninformation`,en:`Additional wagon information`,fr:`Informations supplémentaires sur les wagons`,it:`Informazioni aggiuntive sulla carrozza del treno`},et={de:`Abfahrt`,en:`Departure`,fr:`Départ`,it:`Partenza`},tt={de:`nicht barrierefrei`,en:`not accessible`,fr:`non accessible`,it:`non accessibile`},nt={de:`herunterladen`,en:`download`,fr:`télécharger`,it:`scaricare`},rt={single:{long:{de:`Minute`,en:`Minute`,fr:`Minute`,it:`Minuto`},short:{de:`m`,en:`m`,fr:`m`,it:`m`}},multiple:{long:{de:`Minuten`,en:`Minutes`,fr:`Minutes`,it:`Minuti`},short:{de:`Min`,en:`min`,fr:`min.`,it:`mins`}}},it={single:{long:{de:`Stunde`,en:`Hour`,fr:`Heure`,it:`Ora`},short:{de:`Std.`,en:`h`,fr:`ore`,it:`hrs`}},multiple:{long:{de:`Stunden`,en:`Hours`,fr:`Heures`,it:`Ore`},short:{de:`Std.`,en:`h`,fr:`ore`,it:`hrs`}}},at={single:{long:{de:`Tag`,en:`Day`,fr:`Jour`,it:`Giorno`}},multiple:{long:{de:`Tage`,en:`Days`,fr:`Jours`,it:`Giorni`}}},ot={de:`Gleisänderung im Verlauf dieser Verbindung`,en:`Track change in the course of this connection`,fr:`Changement de voie sur le parcours de cette connexion`,it:`Cambiamento di binario nel corso di questa connessione`},st={de:`Reisedauer`,en:`Travel time`,fr:`Durée du voyage`,it:`Durata del viaggio`},ct={de:`Reisehinweise`,en:`Travelhints`,fr:`Indications sur le voyage`,it:`Indicazioni di viaggio`},lt={de:`Echtzeitinformationen`,en:`Real time information`,fr:`Informations en temps réel`,it:`Informazioni in tempo reale`},ut={de:`mal umsteigen`,en:`change`,fr:`changement de train`,it:`cambio`},dt={de:`mal umsteigen`,en:`changes`,fr:`changements de train`,it:`cambi`},ft={de:`neu`,en:`new`,fr:`nouveau`,it:`nuovo`},pt={de:`Auf`,en:`on`,fr:`sur`,it:`su`},mt={de:`Sparbillette`,en:`Supersaver tickets`,fr:`Billets dégriffés`,it:`Biglietti risparmio`},ht={none:{de:`Keine Belegungsprognose verfügbar`,en:`No occupancy forecast available`,fr:`Aucune prévision d'occupation disponible`,it:`Nessuna previsione di occupazione disponibile`},low:{de:`Tiefe bis mittlere Belegung erwartet`,en:`Low to average occupancy expected`,fr:`Taux d’occupation faible à moyen prévu`,it:`È prevista un’occupazione medio-bassa`},medium:{de:`Hohe Belegung erwartet`,en:`High occupancy expected`,fr:`Taux d’occupation élevé prévu`,it:`È prevista un’occupazione elevata`},high:{de:`Sehr hohe Belegung erwartet`,en:`Very high occupancy expected`,fr:`Taux d’occupation très élevé prévu`,it:`È prevista un’occupazione molto elevata`}},gt={funicular:{de:`Seilbahn/Zahnradbahn`,en:`Funicular/Cog railway`,fr:`Funiculaire/Chemin de fer à crémaillère`,it:`Funivia/Ferrovia a cremagliera`},ec_id:{de:`EC/IC`,en:`EC/IC`,fr:`EC/IC`,it:`EC/IC`},bus:{de:`Bus`,en:`Bus`,fr:`Bus`,it:`Bus`},re:{de:`RE`,en:`RE`,fr:`RE`,it:`RE`},arz_ext:{de:`ARZ/EXT`,en:`ARZ/EXT`,fr:`ARZ/EXT`,it:`ARZ/EXT`},ice_tgv_rjx:{de:`ICE/TGV/RJX`,en:`ICE/TGV/RJX`,fr:`ICE/TGV/RJX`,it:`ICE/TGV/RJX`},ir_pe:{de:`IR/PE`,en:`IR/PE`,fr:`IR/PE`,it:`IR/PE`},s_sn_r:{de:`S/SN/R`,en:`S/SN/R`,fr:`S/SN/R`,it:`S/SN/R`},tramway:{de:`Tram/Metro`,en:`Tramway/Underground`,fr:`Tram/Métro`,it:`Tram/Metro`},ship:{de:`Schiff`,en:`Ship`,fr:`Bateau`,it:`Battello`},train:{de:`Zug`,en:`Train`,fr:`Train`,it:`Treno`}},_t={de:`Linkziel öffnet in neuem Fenster.`,en:`Link target opens in a new window.`,fr:`Le lien s'ouvre dans une nouvelle fenêtre.`,it:`Il link si apre in una nuova finestra.`},vt={de:`Minuten Fussweg nach Ankunft:`,en:`minutes of walking time after arrival:`,fr:`minutes de trajet à pied après l’arrivée:`,it:`minuti a piedi all’arrivo:`},yt={de:`Minuten Fussweg vor Abfahrt:`,en:`minutes of walking time before departure:`,fr:`minutes de trajet à pied avant le départ:`,it:`minuti a piedi prima della partenza:`},bt={de:`Meldung schliessen`,en:`Close message`,fr:`Fermer le message`,it:`Chiudere il messaggio`},xt={de:`Nachricht schliessen`,en:`Close message`,fr:`Fermer le message`,it:`Chiudere il messaggio`},St={de:`Dialog`,en:`Dialog`,fr:`Dialogue`,it:`Dialogo`},Ct={de:`Übergelagertes Fenster schliessen`,en:`Close secondary window`,fr:`Fermer la fenêtre superposée`,it:`Chiudere la finestra sovrapposta`},wt={de:`Navigation schliessen`,en:`Close navigation`,fr:`Fermer la navigation`,it:`Chiudere la navigazione`},Tt={de:`Seitenleiste schliessen`,en:`Close sidebar`,fr:`Fermer la barre latérale`,it:`Chiudere la barra laterale`},Et={de:`Hinweis schliessen`,en:`Close note`,fr:`Fermer la note`,it:`Chiudere la nota`},Dt={de:`Zurück`,en:`Go back`,fr:`Retourner`,it:`Indietro`},Ot={de:`Heute`,en:`Today`,fr:`Aujourd’hui`,it:`Oggi`},kt={de:`Zum nächsten Monat wechseln`,en:`Change to the next month`,fr:`Passer au mois suivant`,it:`Passare al mese successivo`},At={de:`Zum letzten Monat wechseln`,en:`Change to the previous month`,fr:`Passer au mois précédent`,it:`Passare al mese precedente`},jt={de:`Nächster Tag`,en:`Next day`,fr:`Jour suivant`,it:`Giorno successivo`},Mt={de:`Vorheriger Tag`,en:`Previous day`,fr:`Jour précédent`,it:`Giorno precedente`},Nt={de:`Jahr und Monat auswählen`,en:`Choose year and month`,fr:`Choisir l’année et le mois`,it:`Seleziona anno e mese`},Pt={de:`Wechsel zur Datumsauswahl`,en:`Change to date selection`,fr:`Passer à la sélection de date`,it:`Passare alla selezione della data`},Ft=e=>({de:`Wechsel zu den nächsten ${e} Jahren`,en:`Change to the next ${e} years`,fr:`Passer aux ${e} prochaines années`,it:`Passare ai successivi ${e} anni`}),It=e=>({de:`Wechsel zu den vorherigen ${e} Jahren`,en:`Change to the previous ${e} years`,fr:`Passage aux ${e} précédentes années`,it:`Passare ai precedenti ${e} anni`}),Lt={de:`Zum nächsten Jahr wechseln`,en:`Change to the next year`,fr:`Passer à l'année suivante`,it:`Passare all'anno successivo`},Rt={de:`Zum letzten Jahr wechseln`,en:`Change to the previous year`,fr:`Passer à l'année précédent`,it:`Passare all'anno precedente`},zt=e=>({de:`Zum nächsten Tag wechseln, derzeit ausgewählt ${e}.`,en:`Change to the next day, currently selected ${e}.`,fr:`Passer au jour suivant, actuellement sélectionné ${e}.`,it:`Passare al giorno successivo, attualmente selezionato ${e}.`}),Bt=e=>({de:`Zum vorherigen Tag wechseln, derzeit ausgewählt ${e}.`,en:`Change to the previous day, currently selected ${e}.`,fr:`Passer au jour précédent, actuellement sélectionné ${e}.`,it:`Passare al giorno precedente, attualmente selezionato ${e}.`}),Vt={de:`Kalender anzeigen`,en:`Show calendar`,fr:`Afficher le calendrier`,it:`Visualizza il calendario`},Ht={de:`TT.MM.JJJJ`,en:`DD.MM.YYYY`,fr:`JJ.MM.AAAA`,it:`GG.MM.AAAA`},Ut={de:`Datum geändert auf`,en:`Date changed to`,fr:`Date modifiée au`,it:`Data modificata in`},Wt={de:`Verbindung von`,en:`Connection from`,fr:`Liaison de`,it:`Collegamento da`},Gt={de:`nach`,en:`to`,fr:`à`,it:`a`},Kt=e=>({de:`und zurück nach ${e}.`,en:`and back to ${e}.`,fr:`et retour à ${e}.`,it:`e ritorno a ${e}.`}),qt={de:`erweitert`,en:`expanded`,fr:`étendu`,it:`espanso`},Jt={de:`reduziert`,en:`collapsed`,fr:`condensé`,it:`compresso`},Yt={de:`Karte zeigen`,en:`Show map`,fr:`Afficher la carte`,it:`Mostra la mappa`},Xt={de:`Mehr Breadcrumbs anzeigen`,en:`Show more breadcrumbs`,fr:`Afficher plus de fils d’Ariane`,it:`Mostra più breadcrumbs`},Zt={de:`Feldinhalt löschen`,en:`Clear input value`,fr:`Effacer la valeur d’entrée`,it:`Cancella il valore dell’input`},Qt={de:`Klicken Sie auf diese Karte für Details`,en:`Click on this card for details`,fr:`Cliquez sur cette carte pour plus de détails`,it:`Clicca su questa scheda per i dettagli`},$t={de:`Klicken Sie auf diese Karte, um zurück zur Zusammenfassung zu gelangen`,en:`Click on this card to go back to the summary`,fr:`Cliquez sur cette carte pour revenir au résumé`,it:`Clicca su questa scheda per tornare al sommario`},en={de:`Datei auswählen`,en:`Choose a file`,fr:`Choisissez un fichier`,it:`Scegli un file`},tn={de:`Dateien auswählen`,en:`Choose files`,fr:`Choisissez des fichiers`,it:`Scegli file`},nn={de:`Ziehen Sie Ihre Datei hier hin (Drag & Drop)`,en:`Drag & Drop your file here`,fr:`Faites glisser et déposez votre fichier ici`,it:`Trascina e rilascia il file qui`},rn={de:`Ziehen Sie Ihre Dateien hier hin (Drag & Drop)`,en:`Drag & Drop your files here`,fr:`Faites glisser et déposez vos fichiers ici`,it:`Trascina e rilascia i file qui`},an={de:`Datei entfernen`,en:`Remove file`,fr:`Effacer le fichier`,it:`Rimuovi il file`},on=e=>e&&e.length>0?{de:`Aktuell ausgewählte Datei: ${e.join(`, `)}.`,en:`Currently selected files: ${e.join(`, `)}.`,fr:`Fichier actuellement sélectionné: ${e.join(`, `)}.`,it:`File attualmente selezionato: ${e.join(`, `)}.`}:{de:`Keine Datei ausgewählt.`,en:`No files selected.`,fr:`Nessun fichier sélectionné.`,it:`Nessun file selezionato.`},sn={de:`Nächste Seite`,en:`Next page`,fr:`Page suivante`,it:`Pagina successiva`},cn={de:`Vorherige Seite`,en:`Previous page`,fr:`Page précédente`,it:`Pagina precedente`},ln={de:`Seite`,en:`Page`,fr:`Page`,it:`Pagina`},un={de:`Einträge pro Seite`,en:`Items per page`,fr:`Entrées par page`,it:`Elementi per pagina`},dn={de:`ausgewählt`,en:`selected`,fr:`sélectionnée`,it:`selezionata`},fn={de:`von`,en:`of`,fr:`sur`,it:`di`},pn={de:`Muss gesetzt sein.`,en:`Must be checked.`,fr:`Doit être cochée.`,it:`Deve essere impostato.`},mn={de:`Auswahl erforderlich.`,en:`Selection required.`,fr:`Sélection requise.`,it:`Selezione necessaria.`},hn={de:`Eingabe erforderlich.`,en:`Input required.`,fr:`Entrée obligatoire.`,it:`Inserimento necessario.`},gn={de:`Bitte gültiges Datum eingeben.`,en:`Please provide a valid date.`,fr:`Veuillez saisir une date valide.`,it:`Inserire una data valida.`},_n=e=>({de:`Datum darf nicht vor ${e} sein.`,en:`Date must not be before ${e}.`,fr:`La date ne doit pas être antérieure au ${e}.`,it:`La data non deve essere anteriore al ${e}.`}),vn=e=>({de:`Datum darf nicht nach ${e} sein.`,en:`Date must not be after ${e}.`,fr:`La date ne doit pas être postérieure au ${e}.`,it:`La data non deve essere successiva al ${e}.`}),yn=e=>({de:`Zeit geändert zu ${e}.`,en:`Time changed to ${e}.`,fr:`Heure modifiée: ${e}.`,it:`Orario modificata alle ${e}.`}),bn={de:`Bitte gültige Zeit eingeben.`,en:`Please provide a valid time.`,fr:`Veuillez saisir une heure valide.`,it:`Inserisci un orario valido.`},xn={de:`Zeit darf nicht nach 23:59 sein.`,en:`Time must not be after 23:59.`,fr:`L’heure ne doit pas être postérieure à 23h59.`,it:`L’orario non può essere successivo alle 23.59.`},Sn={de:`Die Zeiteingabe darf nicht mehr als fünf Zeichen haben.`,en:`The time input must not exceed five characters.`,fr:`La saisie de l’heure ne doit pas comporter plus de cinq caractères.`,it:`L’indicazione temporale non può contenere più di cinque caratteri.`},Cn={de:`Drücken Sie die Entfernen-Taste um den Chip zu löschen`,en:`Press the Delete button to remove the chip`,fr:`Appuyez sur la touche Del pour supprimer cette puce`,it:`Premi il tasto Canc per rimuovere questa chip`},wn={de:`Ausgewählte Elemente:`,en:`Selected elements:`,fr:`Éléments sélectionnés:`,it:`Elementi selezionati:`},Tn={de:`Woche`,en:`Week`,fr:`Semaine`,it:`Settimana`},En={de:`Von und Nach tauschen`,en:`Swap from and to`,fr:`Échanger de et à`,it:`Inverti Da e A`},Dn=(e,t)=>({de:`${e} von ${t}`,en:`${e} of ${t}`,fr:`${e} sur ${t}`,it:`${e} di ${t}`}),On={de:`Karussell – Benutzen Sie die Pfeiltasten im Interaktionsmodus, um durch die Folien zu navigieren`,en:`Carousel - Use the arrow keys in interaction mode to navigate through the slides`,fr:`Carrousel – Utilisez les touches fléchées en mode interaction pour naviguer dans les diapositives`,it:`Carosello – Utilizzare i tasti freccia in modalità interazione per navigare tra le slide`},kn={de:`Nächste Folie`,en:`Next slide`,fr:`Diapositive suivante`,it:`Slide successiva`},An={de:`Vorherige Folie`,en:`Previous slide`,fr:`Diapositive précédente`,it:`Slide precedente`},jn={de:`Folie`,en:`Slide`,fr:`Diapositive`,it:`Slide`},Mn={de:`Zeichen übrig`,en:`characters remaining`,fr:`caractères restants`,it:`caratteri rimanenti`};let Nn=(()=>{let e=P,t,a=[],c=[],u,d=[],f=[],p,m=[],h=[],g,_=[],v=[],y,b=[],x=[],S,C=[],w=[];return class extends e{static{let n=typeof Symbol==`function`&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;t=[F(),l({reflect:!0,converter:z})],u=[F(),l({reflect:!0,converter:z})],p=[F(),l({reflect:!0,converter:z})],g=[F(),l({type:Boolean,reflect:!0})],y=[F(),l({attribute:`accessibility-label`})],S=[F(),l({attribute:`accessibility-current`})],o(this,null,t,{kind:`accessor`,name:`href`,static:!1,private:!1,access:{has:e=>`href`in e,get:e=>e.href,set:(e,t)=>{e.href=t}},metadata:n},a,c),o(this,null,u,{kind:`accessor`,name:`target`,static:!1,private:!1,access:{has:e=>`target`in e,get:e=>e.target,set:(e,t)=>{e.target=t}},metadata:n},d,f),o(this,null,p,{kind:`accessor`,name:`rel`,static:!1,private:!1,access:{has:e=>`rel`in e,get:e=>e.rel,set:(e,t)=>{e.rel=t}},metadata:n},m,h),o(this,null,g,{kind:`accessor`,name:`download`,static:!1,private:!1,access:{has:e=>`download`in e,get:e=>e.download,set:(e,t)=>{e.download=t}},metadata:n},_,v),o(this,null,y,{kind:`accessor`,name:`accessibilityLabel`,static:!1,private:!1,access:{has:e=>`accessibilityLabel`in e,get:e=>e.accessibilityLabel,set:(e,t)=>{e.accessibilityLabel=t}},metadata:n},b,x),o(this,null,S,{kind:`accessor`,name:`accessibilityCurrent`,static:!1,private:!1,access:{has:e=>`accessibilityCurrent`in e,get:e=>e.accessibilityCurrent,set:(e,t)=>{e.accessibilityCurrent=t}},metadata:n},C,w),n&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}#e;get href(){return this.#e}set href(e){this.#e=e}#t;get target(){return this.#t}set target(e){this.#t=e}#n;get rel(){return this.#n}set rel(e){this.#n=e}#r;get download(){return this.#r}set download(e){this.#r=e}#i;get accessibilityLabel(){return this.#i}set accessibilityLabel(e){this.#i=e}#a;get accessibilityCurrent(){return this.#a}set accessibilityCurrent(e){this.#a=e}constructor(){super(),this.#e=s(this,a,``),this.#t=(s(this,c),s(this,d,``)),this.#n=(s(this,f),s(this,m,``)),this.#r=(s(this,h),s(this,_,!1)),this.#i=(s(this,v),s(this,b,``)),this.#a=(s(this,x),s(this,C,``)),this.language=(s(this,w),new R(this)),this.anchorRole=null,this._evaluateRelAttribute=e=>this.rel?this.rel:e===`_blank`?`external noopener nofollow`:i,this.internals.states.add(`link`),r||this.setupBaseEventHandlers()}focus(e){this.shadowRoot.querySelector(`a`)?.focus(e)}blur(){this.shadowRoot.querySelector(`a`)?.blur()}click(){this.shadowRoot.querySelector(`a`)?.click()}resolveTarget(){return this.target}render(){return this.renderLink(this.renderTemplate())}renderLink(e){let t=this.resolveTarget(),r=!!this.href&&t===`_blank`;return n`
|
|
21
21
|
<a
|
|
22
22
|
class="sbb-action-base ${this.localName}"
|
|
23
23
|
href=${this.href||i}
|
|
24
24
|
?download=${this.download}
|
|
25
|
-
target=${
|
|
26
|
-
rel=${this._evaluateRelAttribute()}
|
|
25
|
+
target=${t||i}
|
|
26
|
+
rel=${this._evaluateRelAttribute(t)}
|
|
27
27
|
role=${this.anchorRole||i}
|
|
28
28
|
aria-label=${this.accessibilityLabel||i}
|
|
29
29
|
aria-current=${this.accessibilityCurrent||i}
|
|
30
30
|
tabindex=${this.maybeDisabled&&!this.maybeDisabledInteractive?`-1`:i}
|
|
31
31
|
aria-disabled=${this.maybeDisabled?`true`:i}
|
|
32
|
-
aria-describedby=${
|
|
32
|
+
aria-describedby=${r?`sbb-link-new-window`:i}
|
|
33
33
|
>
|
|
34
34
|
${e}
|
|
35
35
|
</a>
|
|
36
|
-
${
|
|
36
|
+
${r?n`<span id="sbb-link-new-window" hidden
|
|
37
37
|
>${_t[this.language.current]}</span
|
|
38
38
|
>`:i}
|
|
39
39
|
`}}})();var Pn=class extends N{static{this.events={beforeopen:`beforeopen`,open:`open`,beforeclose:`beforeclose`,close:`close`}}set state(e){this._state&&this.internals.states.delete(`state-${this._state}`),this._state=e,this._state&&this.internals.states.add(`state-${this._state}`)}get state(){return this._state}get isOpen(){return this.state===`opened`}constructor(){super(),this.state=`closed`}escapeStrategy(){this.close()}dispatchBeforeOpenEvent(){return this.dispatchEvent(new Event(`beforeopen`,{cancelable:!0}))}dispatchOpenEvent(){return this.dispatchEvent(new Event(`open`))}dispatchBeforeCloseEvent(){return this.dispatchEvent(new Event(`beforeclose`,{cancelable:!0}))}dispatchCloseEvent(){return this.dispatchEvent(new Event(`close`))}};const B=e=>(()=>{let t=e,n=[],r;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l({type:Boolean,reflect:!0})],o(this,null,r,{kind:`setter`,name:`disabled`,static:!1,private:!1,access:{has:e=>`disabled`in e,set:(e,t)=>{e.disabled=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}set disabled(e){this.#e=!!e,this.toggleAttribute(`disabled`,this.disabled)}get disabled(){return this.#e||this.isDisabledExternally()}#e=(s(this,n),!1);isDisabledExternally(){return!1}}})(),Fn=e=>(()=>{let t=e,n,r=[],i=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[F(),l({attribute:`disabled-interactive`,type:Boolean,reflect:!0})],o(this,null,n,{kind:`accessor`,name:`disabledInteractive`,static:!1,private:!1,access:{has:e=>`disabledInteractive`in e,get:e=>e.disabledInteractive,set:(e,t)=>{e.disabledInteractive=t}},metadata:e},r,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=s(this,r,!1);get disabledInteractive(){return this.#e}set disabledInteractive(e){this.#e=e}constructor(){super(...arguments),s(this,i)}}})(),In=e=>{class t extends Fn(B(e)){willUpdate(e){super.willUpdate(e),e.has(`disabledInteractive`)&&(this.internals.ariaDisabled=this.disabledInteractive?`true`:null),e.has(`disabled`)&&(this.disabled?this.removeAttribute(`tabindex`):this.setAttribute(`tabindex`,`0`))}}return t},V=e=>(()=>{let t=e,n=[],r;return class extends t{constructor(){super(...arguments),this._required=(s(this,n),!1)}static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l({reflect:!0,type:Boolean})],o(this,null,r,{kind:`setter`,name:`required`,static:!1,private:!1,access:{has:e=>`required`in e,set:(e,t)=>{e.required=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}set required(e){this._required=!!e}get required(){return this._required||this.isRequiredExternally()}willUpdate(e){super.willUpdate(e),e.has(`required`)&&(this.internals.ariaRequired=`${this.required}`)}isRequiredExternally(){return!1}}})();var Ln=`:host{flex-flow:var(--sbb-selection-group-orientation) wrap;gap:var(--sbb-selection-group-gap);width:var(--sbb-selection-group-width);align-items:flex-start;display:flex}:host([orientation=vertical]){--sbb-selection-group-orientation:column;--sbb-selection-group-width:100%;--sbb-selection-group-elements-width:100%}:host(:is(:state(has-panel),[state--has-panel])){--sbb-selection-group-width:100%;--sbb-selection-group-gap:var(--sbb-spacing-fixed-2x) var(--sbb-spacing-fixed-4x);--sbb-selection-group-elements-flex:auto}@media (width>=0){:host([orientation=vertical][horizontal-from=zero]){--sbb-selection-group-orientation:row;--sbb-selection-group-elements-width:auto}:host([orientation=vertical][horizontal-from=zero]:not(:is(:state(has-panel),[state--has-panel]))){--sbb-selection-group-width:auto}}@media (width>=37.5rem){:host([orientation=vertical][horizontal-from=small]){--sbb-selection-group-orientation:row;--sbb-selection-group-elements-width:auto}:host([orientation=vertical][horizontal-from=small]:not(:is(:state(has-panel),[state--has-panel]))){--sbb-selection-group-width:auto}}@media (width>=64rem){:host([orientation=vertical][horizontal-from=large]){--sbb-selection-group-orientation:row;--sbb-selection-group-elements-width:auto}:host([orientation=vertical][horizontal-from=large]:not(:is(:state(has-panel),[state--has-panel]))){--sbb-selection-group-width:auto}}@media (width>=90rem){:host([orientation=vertical][horizontal-from=ultra]){--sbb-selection-group-orientation:row;--sbb-selection-group-elements-width:auto}:host([orientation=vertical][horizontal-from=ultra]:not(:is(:state(has-panel),[state--has-panel]))){--sbb-selection-group-width:auto}}slot[name=error]::slotted(*){flex-basis:100%}::slotted(:is(sbb-checkbox-panel,sbb-radio-button-panel)){flex:var(--sbb-selection-group-elements-flex)}::slotted(:is(sbb-checkbox,sbb-checkbox-panel,sbb-radio-button-panel)){width:var(--sbb-selection-group-elements-width)}
|
package/custom-elements.json
CHANGED
|
@@ -7039,6 +7039,17 @@
|
|
|
7039
7039
|
"name": "_evaluateRelAttribute",
|
|
7040
7040
|
"privacy": "private"
|
|
7041
7041
|
},
|
|
7042
|
+
{
|
|
7043
|
+
"kind": "method",
|
|
7044
|
+
"name": "resolveTarget",
|
|
7045
|
+
"privacy": "protected",
|
|
7046
|
+
"return": {
|
|
7047
|
+
"type": {
|
|
7048
|
+
"text": "string"
|
|
7049
|
+
}
|
|
7050
|
+
},
|
|
7051
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set."
|
|
7052
|
+
},
|
|
7042
7053
|
{
|
|
7043
7054
|
"kind": "method",
|
|
7044
7055
|
"name": "renderLink",
|
|
@@ -41399,6 +41410,21 @@
|
|
|
41399
41410
|
"module": "core/base-elements/link-base-element.js"
|
|
41400
41411
|
}
|
|
41401
41412
|
},
|
|
41413
|
+
{
|
|
41414
|
+
"kind": "method",
|
|
41415
|
+
"name": "resolveTarget",
|
|
41416
|
+
"privacy": "protected",
|
|
41417
|
+
"return": {
|
|
41418
|
+
"type": {
|
|
41419
|
+
"text": "string"
|
|
41420
|
+
}
|
|
41421
|
+
},
|
|
41422
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
41423
|
+
"inheritedFrom": {
|
|
41424
|
+
"name": "SbbLinkBaseElement",
|
|
41425
|
+
"module": "core/base-elements/link-base-element.js"
|
|
41426
|
+
}
|
|
41427
|
+
},
|
|
41402
41428
|
{
|
|
41403
41429
|
"kind": "method",
|
|
41404
41430
|
"name": "renderLink",
|
|
@@ -43221,6 +43247,21 @@
|
|
|
43221
43247
|
"module": "core/base-elements/link-base-element.js"
|
|
43222
43248
|
}
|
|
43223
43249
|
},
|
|
43250
|
+
{
|
|
43251
|
+
"kind": "method",
|
|
43252
|
+
"name": "resolveTarget",
|
|
43253
|
+
"privacy": "protected",
|
|
43254
|
+
"return": {
|
|
43255
|
+
"type": {
|
|
43256
|
+
"text": "string"
|
|
43257
|
+
}
|
|
43258
|
+
},
|
|
43259
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
43260
|
+
"inheritedFrom": {
|
|
43261
|
+
"name": "SbbLinkBaseElement",
|
|
43262
|
+
"module": "core/base-elements/link-base-element.js"
|
|
43263
|
+
}
|
|
43264
|
+
},
|
|
43224
43265
|
{
|
|
43225
43266
|
"kind": "method",
|
|
43226
43267
|
"name": "renderLink",
|
|
@@ -44132,6 +44173,21 @@
|
|
|
44132
44173
|
"module": "core/base-elements/link-base-element.js"
|
|
44133
44174
|
}
|
|
44134
44175
|
},
|
|
44176
|
+
{
|
|
44177
|
+
"kind": "method",
|
|
44178
|
+
"name": "resolveTarget",
|
|
44179
|
+
"privacy": "protected",
|
|
44180
|
+
"return": {
|
|
44181
|
+
"type": {
|
|
44182
|
+
"text": "string"
|
|
44183
|
+
}
|
|
44184
|
+
},
|
|
44185
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
44186
|
+
"inheritedFrom": {
|
|
44187
|
+
"name": "SbbLinkBaseElement",
|
|
44188
|
+
"module": "core/base-elements/link-base-element.js"
|
|
44189
|
+
}
|
|
44190
|
+
},
|
|
44135
44191
|
{
|
|
44136
44192
|
"kind": "method",
|
|
44137
44193
|
"name": "renderLink",
|
|
@@ -45043,6 +45099,21 @@
|
|
|
45043
45099
|
"module": "core/base-elements/link-base-element.js"
|
|
45044
45100
|
}
|
|
45045
45101
|
},
|
|
45102
|
+
{
|
|
45103
|
+
"kind": "method",
|
|
45104
|
+
"name": "resolveTarget",
|
|
45105
|
+
"privacy": "protected",
|
|
45106
|
+
"return": {
|
|
45107
|
+
"type": {
|
|
45108
|
+
"text": "string"
|
|
45109
|
+
}
|
|
45110
|
+
},
|
|
45111
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
45112
|
+
"inheritedFrom": {
|
|
45113
|
+
"name": "SbbLinkBaseElement",
|
|
45114
|
+
"module": "core/base-elements/link-base-element.js"
|
|
45115
|
+
}
|
|
45116
|
+
},
|
|
45046
45117
|
{
|
|
45047
45118
|
"kind": "method",
|
|
45048
45119
|
"name": "renderLink",
|
|
@@ -45954,6 +46025,21 @@
|
|
|
45954
46025
|
"module": "core/base-elements/link-base-element.js"
|
|
45955
46026
|
}
|
|
45956
46027
|
},
|
|
46028
|
+
{
|
|
46029
|
+
"kind": "method",
|
|
46030
|
+
"name": "resolveTarget",
|
|
46031
|
+
"privacy": "protected",
|
|
46032
|
+
"return": {
|
|
46033
|
+
"type": {
|
|
46034
|
+
"text": "string"
|
|
46035
|
+
}
|
|
46036
|
+
},
|
|
46037
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
46038
|
+
"inheritedFrom": {
|
|
46039
|
+
"name": "SbbLinkBaseElement",
|
|
46040
|
+
"module": "core/base-elements/link-base-element.js"
|
|
46041
|
+
}
|
|
46042
|
+
},
|
|
45957
46043
|
{
|
|
45958
46044
|
"kind": "method",
|
|
45959
46045
|
"name": "renderLink",
|
|
@@ -50835,6 +50921,21 @@
|
|
|
50835
50921
|
"module": "core/base-elements/link-base-element.js"
|
|
50836
50922
|
}
|
|
50837
50923
|
},
|
|
50924
|
+
{
|
|
50925
|
+
"kind": "method",
|
|
50926
|
+
"name": "resolveTarget",
|
|
50927
|
+
"privacy": "protected",
|
|
50928
|
+
"return": {
|
|
50929
|
+
"type": {
|
|
50930
|
+
"text": "string"
|
|
50931
|
+
}
|
|
50932
|
+
},
|
|
50933
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
50934
|
+
"inheritedFrom": {
|
|
50935
|
+
"name": "SbbLinkBaseElement",
|
|
50936
|
+
"module": "core/base-elements/link-base-element.js"
|
|
50937
|
+
}
|
|
50938
|
+
},
|
|
50838
50939
|
{
|
|
50839
50940
|
"kind": "method",
|
|
50840
50941
|
"name": "renderLink",
|
|
@@ -53880,6 +53981,21 @@
|
|
|
53880
53981
|
"module": "core/base-elements/link-base-element.js"
|
|
53881
53982
|
}
|
|
53882
53983
|
},
|
|
53984
|
+
{
|
|
53985
|
+
"kind": "method",
|
|
53986
|
+
"name": "resolveTarget",
|
|
53987
|
+
"privacy": "protected",
|
|
53988
|
+
"return": {
|
|
53989
|
+
"type": {
|
|
53990
|
+
"text": "string"
|
|
53991
|
+
}
|
|
53992
|
+
},
|
|
53993
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
53994
|
+
"inheritedFrom": {
|
|
53995
|
+
"name": "SbbLinkBaseElement",
|
|
53996
|
+
"module": "core/base-elements/link-base-element.js"
|
|
53997
|
+
}
|
|
53998
|
+
},
|
|
53883
53999
|
{
|
|
53884
54000
|
"kind": "method",
|
|
53885
54001
|
"name": "renderLink",
|
|
@@ -69274,6 +69390,21 @@
|
|
|
69274
69390
|
"module": "core/base-elements/link-base-element.js"
|
|
69275
69391
|
}
|
|
69276
69392
|
},
|
|
69393
|
+
{
|
|
69394
|
+
"kind": "method",
|
|
69395
|
+
"name": "resolveTarget",
|
|
69396
|
+
"privacy": "protected",
|
|
69397
|
+
"return": {
|
|
69398
|
+
"type": {
|
|
69399
|
+
"text": "string"
|
|
69400
|
+
}
|
|
69401
|
+
},
|
|
69402
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
69403
|
+
"inheritedFrom": {
|
|
69404
|
+
"name": "SbbLinkBaseElement",
|
|
69405
|
+
"module": "core/base-elements/link-base-element.js"
|
|
69406
|
+
}
|
|
69407
|
+
},
|
|
69277
69408
|
{
|
|
69278
69409
|
"kind": "method",
|
|
69279
69410
|
"name": "renderLink",
|
|
@@ -81028,6 +81159,21 @@
|
|
|
81028
81159
|
"module": "core/base-elements/link-base-element.js"
|
|
81029
81160
|
}
|
|
81030
81161
|
},
|
|
81162
|
+
{
|
|
81163
|
+
"kind": "method",
|
|
81164
|
+
"name": "resolveTarget",
|
|
81165
|
+
"privacy": "protected",
|
|
81166
|
+
"return": {
|
|
81167
|
+
"type": {
|
|
81168
|
+
"text": "string"
|
|
81169
|
+
}
|
|
81170
|
+
},
|
|
81171
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
81172
|
+
"inheritedFrom": {
|
|
81173
|
+
"name": "SbbLinkBaseElement",
|
|
81174
|
+
"module": "core/base-elements/link-base-element.js"
|
|
81175
|
+
}
|
|
81176
|
+
},
|
|
81031
81177
|
{
|
|
81032
81178
|
"kind": "method",
|
|
81033
81179
|
"name": "renderLink",
|
|
@@ -107960,7 +108106,7 @@
|
|
|
107960
108106
|
"declarations": [
|
|
107961
108107
|
{
|
|
107962
108108
|
"kind": "class",
|
|
107963
|
-
"description": "It displays a downloadable document, styled as a card.\n\nInherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel
|
|
108109
|
+
"description": "It displays a downloadable document, styled as a card.\n\nInherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel`,\n`download` and `accessibilityLabel`. Without the `download` attribute the\nreferenced document is opened inline in a new browser tab, unless a `target`\nis explicitly set.",
|
|
107964
108110
|
"name": "SbbDownloadElement",
|
|
107965
108111
|
"slots": [
|
|
107966
108112
|
{
|
|
@@ -108004,7 +108150,7 @@
|
|
|
108004
108150
|
"name": "SbbElement",
|
|
108005
108151
|
"module": "core/base-elements/element.js"
|
|
108006
108152
|
},
|
|
108007
|
-
"default": "[SbbSecondaryButtonStaticElement]"
|
|
108153
|
+
"default": "[ SbbDividerElement, SbbSecondaryButtonStaticElement, ]"
|
|
108008
108154
|
},
|
|
108009
108155
|
{
|
|
108010
108156
|
"kind": "field",
|
|
@@ -108029,22 +108175,6 @@
|
|
|
108029
108175
|
"description": "The label of the download. Defaults to the file name of the `href`.",
|
|
108030
108176
|
"attribute": "label"
|
|
108031
108177
|
},
|
|
108032
|
-
{
|
|
108033
|
-
"kind": "field",
|
|
108034
|
-
"name": "download",
|
|
108035
|
-
"type": {
|
|
108036
|
-
"text": "boolean"
|
|
108037
|
-
},
|
|
108038
|
-
"privacy": "public",
|
|
108039
|
-
"default": "true",
|
|
108040
|
-
"description": "The download behavior is always enabled and handled internally, therefore\nthis property cannot be disabled and is not reflected to the host element.",
|
|
108041
|
-
"attribute": "download",
|
|
108042
|
-
"reflects": true,
|
|
108043
|
-
"inheritedFrom": {
|
|
108044
|
-
"name": "SbbLinkBaseElement",
|
|
108045
|
-
"module": "core/base-elements/link-base-element.js"
|
|
108046
|
-
}
|
|
108047
|
-
},
|
|
108048
108178
|
{
|
|
108049
108179
|
"kind": "field",
|
|
108050
108180
|
"name": "fileName",
|
|
@@ -108086,6 +108216,21 @@
|
|
|
108086
108216
|
"module": "icon/icon-name-mixin.js"
|
|
108087
108217
|
}
|
|
108088
108218
|
},
|
|
108219
|
+
{
|
|
108220
|
+
"kind": "method",
|
|
108221
|
+
"name": "resolveTarget",
|
|
108222
|
+
"privacy": "protected",
|
|
108223
|
+
"return": {
|
|
108224
|
+
"type": {
|
|
108225
|
+
"text": "string"
|
|
108226
|
+
}
|
|
108227
|
+
},
|
|
108228
|
+
"description": "Documents which are not downloaded are shown inline, in which case they\nare opened in a new browser tab, unless a target is explicitly set.\nAn explicitly empty `target` attribute also counts as set, which allows\nto opt out of the new tab behavior.",
|
|
108229
|
+
"inheritedFrom": {
|
|
108230
|
+
"name": "SbbLinkBaseElement",
|
|
108231
|
+
"module": "core/base-elements/link-base-element.js"
|
|
108232
|
+
}
|
|
108233
|
+
},
|
|
108089
108234
|
{
|
|
108090
108235
|
"kind": "method",
|
|
108091
108236
|
"name": "_updateDescribedByElements",
|
|
@@ -108221,6 +108366,22 @@
|
|
|
108221
108366
|
"module": "core/base-elements/link-base-element.js"
|
|
108222
108367
|
}
|
|
108223
108368
|
},
|
|
108369
|
+
{
|
|
108370
|
+
"kind": "field",
|
|
108371
|
+
"name": "download",
|
|
108372
|
+
"type": {
|
|
108373
|
+
"text": "boolean"
|
|
108374
|
+
},
|
|
108375
|
+
"privacy": "public",
|
|
108376
|
+
"default": "false",
|
|
108377
|
+
"description": "Whether the browser will show the download dialog on click.",
|
|
108378
|
+
"attribute": "download",
|
|
108379
|
+
"reflects": true,
|
|
108380
|
+
"inheritedFrom": {
|
|
108381
|
+
"name": "SbbLinkBaseElement",
|
|
108382
|
+
"module": "core/base-elements/link-base-element.js"
|
|
108383
|
+
}
|
|
108384
|
+
},
|
|
108224
108385
|
{
|
|
108225
108386
|
"kind": "field",
|
|
108226
108387
|
"name": "accessibilityLabel",
|
|
@@ -108636,19 +108797,6 @@
|
|
|
108636
108797
|
"description": "The label of the download. Defaults to the file name of the `href`.",
|
|
108637
108798
|
"fieldName": "label"
|
|
108638
108799
|
},
|
|
108639
|
-
{
|
|
108640
|
-
"name": "download",
|
|
108641
|
-
"type": {
|
|
108642
|
-
"text": "boolean"
|
|
108643
|
-
},
|
|
108644
|
-
"default": "true",
|
|
108645
|
-
"description": "The download behavior is always enabled and handled internally, therefore\nthis property cannot be disabled and is not reflected to the host element.",
|
|
108646
|
-
"fieldName": "download",
|
|
108647
|
-
"inheritedFrom": {
|
|
108648
|
-
"name": "SbbLinkBaseElement",
|
|
108649
|
-
"module": "core/base-elements/link-base-element.js"
|
|
108650
|
-
}
|
|
108651
|
-
},
|
|
108652
108800
|
{
|
|
108653
108801
|
"name": "icon-name",
|
|
108654
108802
|
"type": {
|
|
@@ -108701,6 +108849,19 @@
|
|
|
108701
108849
|
"module": "core/base-elements/link-base-element.js"
|
|
108702
108850
|
}
|
|
108703
108851
|
},
|
|
108852
|
+
{
|
|
108853
|
+
"name": "download",
|
|
108854
|
+
"type": {
|
|
108855
|
+
"text": "boolean"
|
|
108856
|
+
},
|
|
108857
|
+
"default": "false",
|
|
108858
|
+
"description": "Whether the browser will show the download dialog on click.",
|
|
108859
|
+
"fieldName": "download",
|
|
108860
|
+
"inheritedFrom": {
|
|
108861
|
+
"name": "SbbLinkBaseElement",
|
|
108862
|
+
"module": "core/base-elements/link-base-element.js"
|
|
108863
|
+
}
|
|
108864
|
+
},
|
|
108704
108865
|
{
|
|
108705
108866
|
"name": "accessibility-label",
|
|
108706
108867
|
"type": {
|
|
@@ -119010,6 +119171,21 @@
|
|
|
119010
119171
|
"module": "core/base-elements/link-base-element.js"
|
|
119011
119172
|
}
|
|
119012
119173
|
},
|
|
119174
|
+
{
|
|
119175
|
+
"kind": "method",
|
|
119176
|
+
"name": "resolveTarget",
|
|
119177
|
+
"privacy": "protected",
|
|
119178
|
+
"return": {
|
|
119179
|
+
"type": {
|
|
119180
|
+
"text": "string"
|
|
119181
|
+
}
|
|
119182
|
+
},
|
|
119183
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
119184
|
+
"inheritedFrom": {
|
|
119185
|
+
"name": "SbbLinkBaseElement",
|
|
119186
|
+
"module": "core/base-elements/link-base-element.js"
|
|
119187
|
+
}
|
|
119188
|
+
},
|
|
119013
119189
|
{
|
|
119014
119190
|
"kind": "method",
|
|
119015
119191
|
"name": "renderLink",
|
|
@@ -122894,6 +123070,21 @@
|
|
|
122894
123070
|
"module": "core/base-elements/link-base-element.js"
|
|
122895
123071
|
}
|
|
122896
123072
|
},
|
|
123073
|
+
{
|
|
123074
|
+
"kind": "method",
|
|
123075
|
+
"name": "resolveTarget",
|
|
123076
|
+
"privacy": "protected",
|
|
123077
|
+
"return": {
|
|
123078
|
+
"type": {
|
|
123079
|
+
"text": "string"
|
|
123080
|
+
}
|
|
123081
|
+
},
|
|
123082
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
123083
|
+
"inheritedFrom": {
|
|
123084
|
+
"name": "SbbLinkBaseElement",
|
|
123085
|
+
"module": "core/base-elements/link-base-element.js"
|
|
123086
|
+
}
|
|
123087
|
+
},
|
|
122897
123088
|
{
|
|
122898
123089
|
"kind": "method",
|
|
122899
123090
|
"name": "renderLink",
|
|
@@ -130830,6 +131021,21 @@
|
|
|
130830
131021
|
"module": "core/base-elements/link-base-element.js"
|
|
130831
131022
|
}
|
|
130832
131023
|
},
|
|
131024
|
+
{
|
|
131025
|
+
"kind": "method",
|
|
131026
|
+
"name": "resolveTarget",
|
|
131027
|
+
"privacy": "protected",
|
|
131028
|
+
"return": {
|
|
131029
|
+
"type": {
|
|
131030
|
+
"text": "string"
|
|
131031
|
+
}
|
|
131032
|
+
},
|
|
131033
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
131034
|
+
"inheritedFrom": {
|
|
131035
|
+
"name": "SbbLinkBaseElement",
|
|
131036
|
+
"module": "core/base-elements/link-base-element.js"
|
|
131037
|
+
}
|
|
131038
|
+
},
|
|
130833
131039
|
{
|
|
130834
131040
|
"kind": "method",
|
|
130835
131041
|
"name": "renderLink",
|
|
@@ -136079,6 +136285,21 @@
|
|
|
136079
136285
|
"module": "core/base-elements/link-base-element.js"
|
|
136080
136286
|
}
|
|
136081
136287
|
},
|
|
136288
|
+
{
|
|
136289
|
+
"kind": "method",
|
|
136290
|
+
"name": "resolveTarget",
|
|
136291
|
+
"privacy": "protected",
|
|
136292
|
+
"return": {
|
|
136293
|
+
"type": {
|
|
136294
|
+
"text": "string"
|
|
136295
|
+
}
|
|
136296
|
+
},
|
|
136297
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
136298
|
+
"inheritedFrom": {
|
|
136299
|
+
"name": "SbbLinkBaseElement",
|
|
136300
|
+
"module": "core/base-elements/link-base-element.js"
|
|
136301
|
+
}
|
|
136302
|
+
},
|
|
136082
136303
|
{
|
|
136083
136304
|
"kind": "method",
|
|
136084
136305
|
"name": "renderLink",
|
|
@@ -155971,6 +156192,21 @@
|
|
|
155971
156192
|
"module": "core/base-elements/link-base-element.js"
|
|
155972
156193
|
}
|
|
155973
156194
|
},
|
|
156195
|
+
{
|
|
156196
|
+
"kind": "method",
|
|
156197
|
+
"name": "resolveTarget",
|
|
156198
|
+
"privacy": "protected",
|
|
156199
|
+
"return": {
|
|
156200
|
+
"type": {
|
|
156201
|
+
"text": "string"
|
|
156202
|
+
}
|
|
156203
|
+
},
|
|
156204
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
156205
|
+
"inheritedFrom": {
|
|
156206
|
+
"name": "SbbLinkBaseElement",
|
|
156207
|
+
"module": "core/base-elements/link-base-element.js"
|
|
156208
|
+
}
|
|
156209
|
+
},
|
|
155974
156210
|
{
|
|
155975
156211
|
"kind": "method",
|
|
155976
156212
|
"name": "renderLink",
|
|
@@ -157708,6 +157944,21 @@
|
|
|
157708
157944
|
"module": "core/base-elements/link-base-element.js"
|
|
157709
157945
|
}
|
|
157710
157946
|
},
|
|
157947
|
+
{
|
|
157948
|
+
"kind": "method",
|
|
157949
|
+
"name": "resolveTarget",
|
|
157950
|
+
"privacy": "protected",
|
|
157951
|
+
"return": {
|
|
157952
|
+
"type": {
|
|
157953
|
+
"text": "string"
|
|
157954
|
+
}
|
|
157955
|
+
},
|
|
157956
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
157957
|
+
"inheritedFrom": {
|
|
157958
|
+
"name": "SbbLinkBaseElement",
|
|
157959
|
+
"module": "core/base-elements/link-base-element.js"
|
|
157960
|
+
}
|
|
157961
|
+
},
|
|
157711
157962
|
{
|
|
157712
157963
|
"kind": "method",
|
|
157713
157964
|
"name": "renderLink",
|
|
@@ -159579,6 +159830,21 @@
|
|
|
159579
159830
|
"module": "core/base-elements/link-base-element.js"
|
|
159580
159831
|
}
|
|
159581
159832
|
},
|
|
159833
|
+
{
|
|
159834
|
+
"kind": "method",
|
|
159835
|
+
"name": "resolveTarget",
|
|
159836
|
+
"privacy": "protected",
|
|
159837
|
+
"return": {
|
|
159838
|
+
"type": {
|
|
159839
|
+
"text": "string"
|
|
159840
|
+
}
|
|
159841
|
+
},
|
|
159842
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
159843
|
+
"inheritedFrom": {
|
|
159844
|
+
"name": "SbbLinkBaseElement",
|
|
159845
|
+
"module": "core/base-elements/link-base-element.js"
|
|
159846
|
+
}
|
|
159847
|
+
},
|
|
159582
159848
|
{
|
|
159583
159849
|
"kind": "method",
|
|
159584
159850
|
"name": "renderLink",
|
|
@@ -173553,6 +173819,21 @@
|
|
|
173553
173819
|
"module": "core/base-elements/link-base-element.js"
|
|
173554
173820
|
}
|
|
173555
173821
|
},
|
|
173822
|
+
{
|
|
173823
|
+
"kind": "method",
|
|
173824
|
+
"name": "resolveTarget",
|
|
173825
|
+
"privacy": "protected",
|
|
173826
|
+
"return": {
|
|
173827
|
+
"type": {
|
|
173828
|
+
"text": "string"
|
|
173829
|
+
}
|
|
173830
|
+
},
|
|
173831
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
173832
|
+
"inheritedFrom": {
|
|
173833
|
+
"name": "SbbLinkBaseElement",
|
|
173834
|
+
"module": "core/base-elements/link-base-element.js"
|
|
173835
|
+
}
|
|
173836
|
+
},
|
|
173556
173837
|
{
|
|
173557
173838
|
"kind": "method",
|
|
173558
173839
|
"name": "renderLink",
|
|
@@ -25,6 +25,11 @@ export declare abstract class SbbLinkBaseElement extends SbbActionBaseElement {
|
|
|
25
25
|
/** @internal */
|
|
26
26
|
click(): void;
|
|
27
27
|
private _evaluateRelAttribute;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the target which is applied to the inner anchor element.
|
|
30
|
+
* Subclasses can override this to provide a fallback when no `target` is set.
|
|
31
|
+
*/
|
|
32
|
+
protected resolveTarget(): string;
|
|
28
33
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
29
34
|
protected render(): TemplateResult;
|
|
30
35
|
protected renderLink(renderContent: TemplateResult): TemplateResult;
|
package/development/core.js
CHANGED
|
@@ -2669,8 +2669,8 @@ let SbbLinkBaseElement = (() => {
|
|
|
2669
2669
|
this.#accessibilityCurrent_accessor_storage = (__runInitializers(this, _accessibilityLabel_extraInitializers), __runInitializers(this, _accessibilityCurrent_initializers, ""));
|
|
2670
2670
|
this.language = (__runInitializers(this, _accessibilityCurrent_extraInitializers), new SbbLanguageController(this));
|
|
2671
2671
|
this.anchorRole = null;
|
|
2672
|
-
this._evaluateRelAttribute = () => {
|
|
2673
|
-
return this.rel ? this.rel :
|
|
2672
|
+
this._evaluateRelAttribute = (target) => {
|
|
2673
|
+
return this.rel ? this.rel : target === "_blank" ? "external noopener nofollow" : nothing;
|
|
2674
2674
|
};
|
|
2675
2675
|
this.internals.states.add("link");
|
|
2676
2676
|
if (!isServer) this.setupBaseEventHandlers();
|
|
@@ -2687,19 +2687,27 @@ let SbbLinkBaseElement = (() => {
|
|
|
2687
2687
|
click() {
|
|
2688
2688
|
this.shadowRoot.querySelector("a")?.click();
|
|
2689
2689
|
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Resolves the target which is applied to the inner anchor element.
|
|
2692
|
+
* Subclasses can override this to provide a fallback when no `target` is set.
|
|
2693
|
+
*/
|
|
2694
|
+
resolveTarget() {
|
|
2695
|
+
return this.target;
|
|
2696
|
+
}
|
|
2690
2697
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
2691
2698
|
render() {
|
|
2692
2699
|
return this.renderLink(this.renderTemplate());
|
|
2693
2700
|
}
|
|
2694
2701
|
renderLink(renderContent) {
|
|
2695
|
-
const
|
|
2702
|
+
const target = this.resolveTarget();
|
|
2703
|
+
const opensInNewWindow = !!this.href && target === "_blank";
|
|
2696
2704
|
return html`
|
|
2697
2705
|
<a
|
|
2698
2706
|
class="sbb-action-base ${this.localName}"
|
|
2699
2707
|
href=${this.href || nothing}
|
|
2700
2708
|
?download=${this.download}
|
|
2701
|
-
target=${
|
|
2702
|
-
rel=${this._evaluateRelAttribute()}
|
|
2709
|
+
target=${target || nothing}
|
|
2710
|
+
rel=${this._evaluateRelAttribute(target)}
|
|
2703
2711
|
role=${this.anchorRole || nothing}
|
|
2704
2712
|
aria-label=${this.accessibilityLabel || nothing}
|
|
2705
2713
|
aria-current=${this.accessibilityCurrent || nothing}
|
|
@@ -4,8 +4,10 @@ declare const SbbDownloadElement_base: import("../../core.ts").AbstractConstruct
|
|
|
4
4
|
/**
|
|
5
5
|
* It displays a downloadable document, styled as a card.
|
|
6
6
|
*
|
|
7
|
-
* Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel
|
|
8
|
-
* and `accessibilityLabel`.
|
|
7
|
+
* Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel`,
|
|
8
|
+
* `download` and `accessibilityLabel`. Without the `download` attribute the
|
|
9
|
+
* referenced document is opened inline in a new browser tab, unless a `target`
|
|
10
|
+
* is explicitly set.
|
|
9
11
|
*
|
|
10
12
|
* @slot - Use the unnamed slot to add custom content. Optional.
|
|
11
13
|
* @slot info - Slot used to render a `sbb-download-info`. A `sbb-download-info`
|
|
@@ -21,13 +23,6 @@ export declare class SbbDownloadElement extends SbbDownloadElement_base {
|
|
|
21
23
|
accessor color: 'white' | 'milk';
|
|
22
24
|
/** The label of the download. Defaults to the file name of the `href`. */
|
|
23
25
|
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
26
|
/** The file name extracted from the `href` (e.g. `report.pdf`). */
|
|
32
27
|
get fileName(): string;
|
|
33
28
|
/** The lower-cased file extension extracted from the `href` (e.g. `pdf`), if any. */
|
|
@@ -38,7 +33,14 @@ export declare class SbbDownloadElement extends SbbDownloadElement_base {
|
|
|
38
33
|
* set.
|
|
39
34
|
*/
|
|
40
35
|
protected renderIconName(): string;
|
|
41
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Documents which are not downloaded are shown inline, in which case they
|
|
38
|
+
* are opened in a new browser tab, unless a target is explicitly set.
|
|
39
|
+
* An explicitly empty `target` attribute also counts as set, which allows
|
|
40
|
+
* to opt out of the new tab behavior.
|
|
41
|
+
*/
|
|
42
|
+
protected resolveTarget(): string;
|
|
43
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
42
44
|
private _updateDescribedByElements;
|
|
43
45
|
private _downloadInfoElements;
|
|
44
46
|
protected renderTemplate(): TemplateResult;
|
|
@@ -3,10 +3,11 @@ import { html, nothing, unsafeCSS } from "lit";
|
|
|
3
3
|
import { property } from "lit/decorators.js";
|
|
4
4
|
import { SbbSecondaryButtonStaticElement } from "./button.pure.js";
|
|
5
5
|
import { SbbElement, SbbLanguageController, SbbLinkBaseElement, SbbPropertyWatcherController, defaultDateAdapter, forceType, i18nDownload, i18nNonAccessible, omitEmptyConverter, readConfig, screenReaderOnlyStyles } from "./core.js";
|
|
6
|
+
import { SbbDividerElement } from "./divider.pure.js";
|
|
6
7
|
import { SbbIconNameMixin } from "./icon.pure.js";
|
|
7
8
|
|
|
8
9
|
//#region src/elements/download/download/download.scss?inline
|
|
9
|
-
var download_default = ":host {\n --sbb-card-background-color: var(--sbb-background-color-1);\n --sbb-card-border-color: transparent;\n --sbb-card-border-radius: var(--sbb-border-radius-4x);\n --sbb-card-animation-easing: var(--sbb-animation-easing);\n --sbb-card-border-style: solid;\n --sbb-card-padding-inline-default: var(--sbb-spacing-responsive-s);\n --sbb-card-padding-block-default: var(--sbb-spacing-responsive-xxxs);\n --sbb-card-with-badge-padding-block-default: var(--sbb-spacing-fixed-6x) var(--sbb-spacing-responsive-xxxs);\n --sbb-card-padding-block: var(--sbb-card-padding-block-default);\n --sbb-card-with-badge-padding-block: var(--sbb-card-with-badge-padding-block-default);\n --sbb-card-padding-inline: var(--sbb-card-padding-inline-default);\n display: block;\n}\n\n:host(:where([color=white])) {\n --sbb-card-background-color: var(--sbb-background-color-1);\n --sbb-card-border-color: transparent;\n}\n\n:host(:where([color=milk])) {\n --sbb-card-background-color: var(--sbb-background-color-3);\n --sbb-card-border-color: transparent;\n}\n\n.sbb-download {\n --sbb-focus-outline-color: var(--sbb-focus-outline-color-default);\n --sbb-focus-outline-color: light-dark(\n var(--sbb-focus-outline-color-default),\n var(--sbb-focus-outline-color-dark)\n );\n --sbb-card-animation-duration: var(\n --sbb-disable-animation-duration,\n var(--sbb-animation-duration-1x)\n );\n display: block;\n position: relative;\n padding-inline: var(--sbb-card-padding-inline);\n padding-block: var(--sbb-card-padding-block);\n border-radius: var(--sbb-card-border-radius);\n background-color: var(--sbb-card-background-color);\n box-shadow: none;\n transition: box-shadow var(--sbb-card-animation-duration) var(--sbb-card-animation-easing);\n color: var(--sbb-card-color);\n}\n.sbb-download::after {\n content: \"\";\n position: absolute;\n inset: 0;\n background-color: transparent;\n border: var(--sbb-card-border-width) var(--sbb-card-border-style) var(--sbb-card-border-color);\n border-radius: var(--sbb-card-border-radius);\n pointer-events: none;\n}\n@media (forced-colors: active) {\n .sbb-download {\n --sbb-title-color: var(--sbb-card-color);\n }\n}\n.sbb-download {\n display: flex;\n align-items: center;\n
|
|
10
|
+
var download_default = ":host {\n --sbb-card-background-color: var(--sbb-background-color-1);\n --sbb-card-border-color: transparent;\n --sbb-card-border-radius: var(--sbb-border-radius-4x);\n --sbb-card-animation-easing: var(--sbb-animation-easing);\n --sbb-card-border-style: solid;\n --sbb-card-padding-inline-default: var(--sbb-spacing-responsive-s);\n --sbb-card-padding-block-default: var(--sbb-spacing-responsive-xxxs);\n --sbb-card-with-badge-padding-block-default: var(--sbb-spacing-fixed-6x) var(--sbb-spacing-responsive-xxxs);\n --sbb-card-padding-block: var(--sbb-card-padding-block-default);\n --sbb-card-with-badge-padding-block: var(--sbb-card-with-badge-padding-block-default);\n --sbb-card-padding-inline: var(--sbb-card-padding-inline-default);\n display: block;\n}\n\n:host(:where([color=white])) {\n --sbb-card-background-color: var(--sbb-background-color-1);\n --sbb-card-border-color: transparent;\n}\n\n:host(:where([color=milk])) {\n --sbb-card-background-color: var(--sbb-background-color-3);\n --sbb-card-border-color: transparent;\n}\n\n.sbb-download {\n --sbb-focus-outline-color: var(--sbb-focus-outline-color-default);\n --sbb-focus-outline-color: light-dark(\n var(--sbb-focus-outline-color-default),\n var(--sbb-focus-outline-color-dark)\n );\n --sbb-card-animation-duration: var(\n --sbb-disable-animation-duration,\n var(--sbb-animation-duration-1x)\n );\n display: block;\n position: relative;\n padding-inline: var(--sbb-card-padding-inline);\n padding-block: var(--sbb-card-padding-block);\n border-radius: var(--sbb-card-border-radius);\n background-color: var(--sbb-card-background-color);\n box-shadow: none;\n transition: box-shadow var(--sbb-card-animation-duration) var(--sbb-card-animation-easing);\n color: var(--sbb-card-color);\n}\n.sbb-download::after {\n content: \"\";\n position: absolute;\n inset: 0;\n background-color: transparent;\n border: var(--sbb-card-border-width) var(--sbb-card-border-style) var(--sbb-card-border-color);\n border-radius: var(--sbb-card-border-radius);\n pointer-events: none;\n}\n@media (forced-colors: active) {\n .sbb-download {\n --sbb-title-color: var(--sbb-card-color);\n }\n}\n.sbb-download {\n display: flex;\n align-items: center;\n text-decoration: none;\n translate: 0 var(--sbb-card-hover-shift, 0);\n transition: box-shadow var(--sbb-card-animation-duration) var(--sbb-card-animation-easing), translate var(--sbb-card-animation-duration) var(--sbb-card-animation-easing);\n}\n\n.sbb-download: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}\n\n@media (any-hover: hover) {\n :host(:hover) .sbb-download {\n --sbb-card-hover-shift: -0.125rem;\n box-shadow: var(--sbb-box-shadow-level-9-hard);\n }\n}\n@media (any-hover: hover) and (forced-colors: active) {\n :host(:hover) .sbb-download {\n --sbb-card-border-color: Highlight;\n }\n}\n\n.sbb-download__icon {\n flex: 0 0 auto;\n}\n\n.sbb-download__divider {\n align-self: stretch;\n height: auto;\n margin-block: var(--sbb-download-divider-margin-block);\n margin-inline: var(--sbb-download-gap) var(--sbb-download-content-gap);\n}\n:host(:not(:is(:state(slotted-icon),[state--slotted-icon]), :is(:state(has-icon-name),[state--has-icon-name]))) .sbb-download__divider {\n display: none;\n}\n\n.sbb-download__content {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.sbb-download__label {\n overflow-wrap: break-word;\n font-size: var(--sbb-download-label-font-size);\n line-height: var(--sbb-typo-line-height-heading);\n letter-spacing: var(--sbb-letter-spacing-heading);\n font-weight: bold;\n color: var(--sbb-download-label-color);\n}\n\n.sbb-download__custom-content,\n.sbb-download__info {\n line-height: var(--sbb-typo-line-height-text);\n letter-spacing: var(--sbb-letter-spacing-text);\n font-size: var(--sbb-text-font-size-xxs);\n color: var(--sbb-download-info-color);\n}\n\n.sbb-download__button {\n flex: 0 0 auto;\n margin-inline-start: var(--sbb-download-content-gap);\n}\n";
|
|
10
11
|
|
|
11
12
|
//#endregion
|
|
12
13
|
//#region src/elements/download/download/download.component.ts
|
|
@@ -29,8 +30,10 @@ const fileExtensionIcons = /* @__PURE__ */ new Map([
|
|
|
29
30
|
/**
|
|
30
31
|
* It displays a downloadable document, styled as a card.
|
|
31
32
|
*
|
|
32
|
-
* Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel
|
|
33
|
-
* and `accessibilityLabel`.
|
|
33
|
+
* Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel`,
|
|
34
|
+
* `download` and `accessibilityLabel`. Without the `download` attribute the
|
|
35
|
+
* referenced document is opened inline in a new browser tab, unless a `target`
|
|
36
|
+
* is explicitly set.
|
|
34
37
|
*
|
|
35
38
|
* @slot - Use the unnamed slot to add custom content. Optional.
|
|
36
39
|
* @slot info - Slot used to render a `sbb-download-info`. A `sbb-download-info`
|
|
@@ -40,18 +43,16 @@ const fileExtensionIcons = /* @__PURE__ */ new Map([
|
|
|
40
43
|
*/
|
|
41
44
|
let SbbDownloadElement = (() => {
|
|
42
45
|
let _classSuper = SbbIconNameMixin(SbbLinkBaseElement);
|
|
43
|
-
let _instanceExtraInitializers = [];
|
|
44
46
|
let _color_decorators;
|
|
45
47
|
let _color_initializers = [];
|
|
46
48
|
let _color_extraInitializers = [];
|
|
47
49
|
let _label_decorators;
|
|
48
50
|
let _label_initializers = [];
|
|
49
51
|
let _label_extraInitializers = [];
|
|
50
|
-
let _set_download_decorators;
|
|
51
52
|
return class SbbDownloadElement extends _classSuper {
|
|
52
53
|
constructor() {
|
|
53
54
|
super(...arguments);
|
|
54
|
-
this.#color_accessor_storage =
|
|
55
|
+
this.#color_accessor_storage = __runInitializers(this, _color_initializers, "white");
|
|
55
56
|
this.#label_accessor_storage = (__runInitializers(this, _color_extraInitializers), __runInitializers(this, _label_initializers, ""));
|
|
56
57
|
this._languageController = (__runInitializers(this, _label_extraInitializers), new SbbLanguageController(this));
|
|
57
58
|
}
|
|
@@ -59,10 +60,6 @@ let SbbDownloadElement = (() => {
|
|
|
59
60
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
60
61
|
_color_decorators = [property({ reflect: true })];
|
|
61
62
|
_label_decorators = [forceType(), property({ converter: omitEmptyConverter })];
|
|
62
|
-
_set_download_decorators = [property({
|
|
63
|
-
type: Boolean,
|
|
64
|
-
reflect: false
|
|
65
|
-
})];
|
|
66
63
|
__esDecorate(this, null, _color_decorators, {
|
|
67
64
|
kind: "accessor",
|
|
68
65
|
name: "color",
|
|
@@ -91,19 +88,6 @@ let SbbDownloadElement = (() => {
|
|
|
91
88
|
},
|
|
92
89
|
metadata: _metadata
|
|
93
90
|
}, _label_initializers, _label_extraInitializers);
|
|
94
|
-
__esDecorate(this, null, _set_download_decorators, {
|
|
95
|
-
kind: "setter",
|
|
96
|
-
name: "download",
|
|
97
|
-
static: false,
|
|
98
|
-
private: false,
|
|
99
|
-
access: {
|
|
100
|
-
has: (obj) => "download" in obj,
|
|
101
|
-
set: (obj, value) => {
|
|
102
|
-
obj.download = value;
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
metadata: _metadata
|
|
106
|
-
}, null, _instanceExtraInitializers);
|
|
107
91
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
108
92
|
enumerable: true,
|
|
109
93
|
configurable: true,
|
|
@@ -115,7 +99,7 @@ let SbbDownloadElement = (() => {
|
|
|
115
99
|
this.elementName = "sbb-download";
|
|
116
100
|
}
|
|
117
101
|
static {
|
|
118
|
-
this.elementDependencies = [SbbSecondaryButtonStaticElement];
|
|
102
|
+
this.elementDependencies = [SbbDividerElement, SbbSecondaryButtonStaticElement];
|
|
119
103
|
}
|
|
120
104
|
static {
|
|
121
105
|
this.styles = [screenReaderOnlyStyles, unsafeCSS(download_default)];
|
|
@@ -136,15 +120,6 @@ let SbbDownloadElement = (() => {
|
|
|
136
120
|
set label(value) {
|
|
137
121
|
this.#label_accessor_storage = value;
|
|
138
122
|
}
|
|
139
|
-
/**
|
|
140
|
-
* The download behavior is always enabled and handled internally, therefore
|
|
141
|
-
* this property cannot be disabled and is not reflected to the host element.
|
|
142
|
-
* @default true
|
|
143
|
-
*/
|
|
144
|
-
set download(_value) {}
|
|
145
|
-
get download() {
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
123
|
/** The file name extracted from the `href` (e.g. `report.pdf`). */
|
|
149
124
|
get fileName() {
|
|
150
125
|
return this.href.split(/[?#]/)[0].split("/").filter(Boolean).at(-1) ?? "";
|
|
@@ -164,15 +139,29 @@ let SbbDownloadElement = (() => {
|
|
|
164
139
|
const extension = this.fileExtension;
|
|
165
140
|
return extension && fileExtensionIcons.get(extension) || "document-standard-small";
|
|
166
141
|
}
|
|
167
|
-
|
|
168
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Documents which are not downloaded are shown inline, in which case they
|
|
144
|
+
* are opened in a new browser tab, unless a target is explicitly set.
|
|
145
|
+
* An explicitly empty `target` attribute also counts as set, which allows
|
|
146
|
+
* to opt out of the new tab behavior.
|
|
147
|
+
*/
|
|
148
|
+
resolveTarget() {
|
|
149
|
+
return !!this.target || this.hasAttribute("target") ? this.target : this.download ? "" : "_blank";
|
|
150
|
+
}
|
|
151
|
+
updated(changedProperties) {
|
|
152
|
+
super.updated(changedProperties);
|
|
169
153
|
this._updateDescribedByElements();
|
|
170
154
|
}
|
|
171
155
|
_updateDescribedByElements() {
|
|
172
156
|
const link = this.shadowRoot?.querySelector?.("a");
|
|
173
157
|
if (link) {
|
|
174
158
|
const customContentElement = this.shadowRoot?.querySelector?.(".sbb-download__custom-content");
|
|
175
|
-
|
|
159
|
+
const newWindowHintElement = this.shadowRoot?.querySelector?.("#sbb-link-new-window");
|
|
160
|
+
link.ariaDescribedByElements = [
|
|
161
|
+
...customContentElement ? [customContentElement] : [],
|
|
162
|
+
...this._downloadInfoElements(),
|
|
163
|
+
...newWindowHintElement ? [newWindowHintElement] : []
|
|
164
|
+
];
|
|
176
165
|
}
|
|
177
166
|
}
|
|
178
167
|
_downloadInfoElements() {
|
|
@@ -181,6 +170,11 @@ let SbbDownloadElement = (() => {
|
|
|
181
170
|
renderTemplate() {
|
|
182
171
|
return html`
|
|
183
172
|
${this.renderIconSlot("sbb-download__icon")}
|
|
173
|
+
<sbb-divider
|
|
174
|
+
class="sbb-download__divider"
|
|
175
|
+
orientation="vertical"
|
|
176
|
+
aria-hidden="true"
|
|
177
|
+
></sbb-divider>
|
|
184
178
|
<span class="sbb-download__content">
|
|
185
179
|
<span class="sbb-download__label">${this.label || this.fileName}</span>
|
|
186
180
|
<span class="sbb-screen-reader-only">
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
$theme: 'standard' !default;
|
|
2
2
|
|
|
3
3
|
@mixin base {
|
|
4
|
+
// Gap between the icon and the divider.
|
|
4
5
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
6
|
+
|
|
7
|
+
// Gap between the divider and the content, and the content and the button.
|
|
8
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
9
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
10
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
5
11
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
6
12
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|
|
7
13
|
}
|
package/download.pure.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import{__esDecorate as e,__runInitializers as t}from"tslib";import{html as n,nothing as r,unsafeCSS as i}from"lit";import{property as a}from"lit/decorators.js";import{SbbSecondaryButtonStaticElement as o}from"./button.pure.js";import{SbbElement as s,SbbLanguageController as c,SbbLinkBaseElement as l,SbbPropertyWatcherController as u,defaultDateAdapter as d,forceType as f,i18nDownload as p,i18nNonAccessible as m,omitEmptyConverter as h,readConfig as g,screenReaderOnlyStyles as _}from"./core.js";import{
|
|
2
|
-
`;const
|
|
1
|
+
import{__esDecorate as e,__runInitializers as t}from"tslib";import{html as n,nothing as r,unsafeCSS as i}from"lit";import{property as a}from"lit/decorators.js";import{SbbSecondaryButtonStaticElement as o}from"./button.pure.js";import{SbbElement as s,SbbLanguageController as c,SbbLinkBaseElement as l,SbbPropertyWatcherController as u,defaultDateAdapter as d,forceType as f,i18nDownload as p,i18nNonAccessible as m,omitEmptyConverter as h,readConfig as g,screenReaderOnlyStyles as _}from"./core.js";import{SbbDividerElement as v}from"./divider.pure.js";import{SbbIconNameMixin as y}from"./icon.pure.js";var b=`:host{--sbb-card-background-color:var(--sbb-background-color-1);--sbb-card-border-color:transparent;--sbb-card-border-radius:var(--sbb-border-radius-4x);--sbb-card-animation-easing:var(--sbb-animation-easing);--sbb-card-border-style:solid;--sbb-card-padding-inline-default:var(--sbb-spacing-responsive-s);--sbb-card-padding-block-default:var(--sbb-spacing-responsive-xxxs);--sbb-card-with-badge-padding-block-default:var(--sbb-spacing-fixed-6x) var(--sbb-spacing-responsive-xxxs);--sbb-card-padding-block:var(--sbb-card-padding-block-default);--sbb-card-with-badge-padding-block:var(--sbb-card-with-badge-padding-block-default);--sbb-card-padding-inline:var(--sbb-card-padding-inline-default);display:block}:host(:where([color=white])){--sbb-card-background-color:var(--sbb-background-color-1);--sbb-card-border-color:transparent}:host(:where([color=milk])){--sbb-card-background-color:var(--sbb-background-color-3);--sbb-card-border-color:transparent}.sbb-download{--sbb-focus-outline-color:light-dark(var(--sbb-focus-outline-color-default),var(--sbb-focus-outline-color-dark));--sbb-card-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-1x));padding-inline:var(--sbb-card-padding-inline);padding-block:var(--sbb-card-padding-block);border-radius:var(--sbb-card-border-radius);background-color:var(--sbb-card-background-color);box-shadow:none;transition:box-shadow var(--sbb-card-animation-duration) var(--sbb-card-animation-easing);color:var(--sbb-card-color);display:block;position:relative}.sbb-download:after{content:"";border:var(--sbb-card-border-width) var(--sbb-card-border-style) var(--sbb-card-border-color);border-radius:var(--sbb-card-border-radius);pointer-events:none;background-color:#0000;position:absolute;inset:0}@media (forced-colors:active){.sbb-download{--sbb-title-color:var(--sbb-card-color)}}.sbb-download{translate:0 var(--sbb-card-hover-shift,0);transition:box-shadow var(--sbb-card-animation-duration) var(--sbb-card-animation-easing), translate var(--sbb-card-animation-duration) var(--sbb-card-animation-easing);align-items:center;text-decoration:none;display:flex}.sbb-download:focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width)}@media (any-hover:hover){:host(:hover) .sbb-download{--sbb-card-hover-shift:-.125rem;box-shadow:var(--sbb-box-shadow-level-9-hard)}}@media (any-hover:hover) and (forced-colors:active){:host(:hover) .sbb-download{--sbb-card-border-color:Highlight}}.sbb-download__icon{flex:none}.sbb-download__divider{height:auto;margin-block:var(--sbb-download-divider-margin-block);margin-inline:var(--sbb-download-gap) var(--sbb-download-content-gap);align-self:stretch}:host(:not(:is(:state(slotted-icon),[state--slotted-icon]),:is(:state(has-icon-name),[state--has-icon-name]))) .sbb-download__divider{display:none}.sbb-download__content{flex-direction:column;flex:auto;min-width:0;display:flex}.sbb-download__label{overflow-wrap:break-word;font-size:var(--sbb-download-label-font-size);line-height:var(--sbb-typo-line-height-heading);letter-spacing:var(--sbb-letter-spacing-heading);color:var(--sbb-download-label-color);font-weight:700}.sbb-download__custom-content,.sbb-download__info{line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-letter-spacing-text);font-size:var(--sbb-text-font-size-xxs);color:var(--sbb-download-info-color)}.sbb-download__button{flex:none;margin-inline-start:var(--sbb-download-content-gap)}
|
|
2
|
+
`;const x=new Map([[`pdf`,`document-pdf-small`],[`xls`,`document-xls-small`],[`xlsx`,`document-xls-small`],[`ppt`,`document-ppt-small`],[`pptx`,`document-ppt-small`],[`doc`,`document-doc-small`],[`docx`,`document-doc-small`],[`zip`,`document-zip-small`],[`jpg`,`document-image-small`],[`jpeg`,`document-image-small`],[`png`,`document-image-small`],[`gif`,`document-image-small`],[`svg`,`document-image-small`],[`webp`,`document-image-small`]]);let S=(()=>{let s=y(l),u,d=[],m=[],g,S=[],C=[];return class extends s{constructor(){super(...arguments),this.#e=t(this,d,`white`),this.#t=(t(this,m),t(this,S,``)),this._languageController=(t(this,C),new c(this))}static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;u=[a({reflect:!0})],g=[f(),a({converter:h})],e(this,null,u,{kind:`accessor`,name:`color`,static:!1,private:!1,access:{has:e=>`color`in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:t},d,m),e(this,null,g,{kind:`accessor`,name:`label`,static:!1,private:!1,access:{has:e=>`label`in e,get:e=>e.label,set:(e,t)=>{e.label=t}},metadata:t},S,C),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.elementName=`sbb-download`}static{this.elementDependencies=[v,o]}static{this.styles=[_,i(b)]}#e;get color(){return this.#e}set color(e){this.#e=e}#t;get label(){return this.#t}set label(e){this.#t=e}get fileName(){return this.href.split(/[?#]/)[0].split(`/`).filter(Boolean).at(-1)??``}get fileExtension(){let e=this.fileName;return e.includes(`.`)?e.split(`.`).at(-1)?.toLowerCase()??``:``}renderIconName(){if(this.iconName)return this.iconName;if(!this.href)return``;let e=this.fileExtension;return e&&x.get(e)||`document-standard-small`}resolveTarget(){return this.target||this.hasAttribute(`target`)?this.target:this.download?``:`_blank`}updated(e){super.updated(e),this._updateDescribedByElements()}_updateDescribedByElements(){let e=this.shadowRoot?.querySelector?.(`a`);if(e){let t=this.shadowRoot?.querySelector?.(`.sbb-download__custom-content`),n=this.shadowRoot?.querySelector?.(`#sbb-link-new-window`);e.ariaDescribedByElements=[...t?[t]:[],...this._downloadInfoElements(),...n?[n]:[]]}}_downloadInfoElements(){return this.querySelectorAll?.(`sbb-download-info`)??[]}renderTemplate(){return n`
|
|
3
3
|
${this.renderIconSlot(`sbb-download__icon`)}
|
|
4
|
+
<sbb-divider
|
|
5
|
+
class="sbb-download__divider"
|
|
6
|
+
orientation="vertical"
|
|
7
|
+
aria-hidden="true"
|
|
8
|
+
></sbb-divider>
|
|
4
9
|
<span class="sbb-download__content">
|
|
5
10
|
<span class="sbb-download__label">${this.label||this.fileName}</span>
|
|
6
11
|
<span class="sbb-screen-reader-only">
|
|
@@ -17,5 +22,5 @@ import{__esDecorate as e,__runInitializers as t}from"tslib";import{html as n,not
|
|
|
17
22
|
class="sbb-download__button"
|
|
18
23
|
icon-name="download-small"
|
|
19
24
|
></sbb-secondary-button-static>
|
|
20
|
-
`}}})();var
|
|
21
|
-
`;const
|
|
25
|
+
`}}})();var C=`:host{display:block}
|
|
26
|
+
`;const w=[`B`,`KB`,`MB`,`GB`,`TB`];let T=(()=>{let r=s,o,l=[],p=[],_,v=[],y=[],b,x=[],S=[],T,E=[],D=[];return class extends r{static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[f(),a({converter:h})],_=[f(),a({converter:h})],b=[f(),a({converter:h})],T=[f(),a({attribute:`non-accessible`,type:Boolean})],e(this,null,o,{kind:`accessor`,name:`type`,static:!1,private:!1,access:{has:e=>`type`in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:t},l,p),e(this,null,_,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:t},v,y),e(this,null,b,{kind:`accessor`,name:`changed`,static:!1,private:!1,access:{has:e=>`changed`in e,get:e=>e.changed,set:(e,t)=>{e.changed=t}},metadata:t},x,S),e(this,null,T,{kind:`accessor`,name:`nonAccessible`,static:!1,private:!1,access:{has:e=>`nonAccessible`in e,get:e=>e.nonAccessible,set:(e,t)=>{e.nonAccessible=t}},metadata:t},E,D),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.elementName=`sbb-download-info`}static{this.styles=[i(C)]}#e;get type(){return this.#e}set type(e){this.#e=e}#t;get size(){return this.#t}set size(e){this.#t=e}#n;get changed(){return this.#n}set changed(e){this.#n=e}#r;get nonAccessible(){return this.#r}set nonAccessible(e){this.#r=e}constructor(){super(),this.#e=t(this,l,``),this.#t=(t(this,p),t(this,v,``)),this.#n=(t(this,y),t(this,x,``)),this.#r=(t(this,S),t(this,E,!1)),this._language=(t(this,D),new c(this)),this._dateAdapter=g().datetime?.dateAdapter??d,this._resolvedType=``,this._typeRedundant=!1,this._resolvedSize=``,this._resolvedChanged=``,this.internals.ariaHidden=`true`,this.addController(new u(this,()=>this.closest(`sbb-download`),{href:()=>this.requestUpdate(),label:()=>this.requestUpdate()}))}connectedCallback(){super.connectedCallback(),this.slot||=`info`,this.requestUpdate()}willUpdate(e){super.willUpdate(e),this._resolvedType=this._resolveType(),this._typeRedundant=this._isTypeRedundant(),e.has(`size`)&&(this._resolvedSize=this._resolveSize()),e.has(`changed`)&&(this._resolvedChanged=this._resolveChanged())}_resolveType(){return this.type||(this.closest?.(`sbb-download`)?.fileExtension.toUpperCase()??``)}_isTypeRedundant(){let e=this.closest?.(`sbb-download`);return!!e&&!e.label&&!!e.fileExtension}_resolveSize(){let e=this.size.trim();if(!e||!/^\d+$/.test(e))return e;let t=Number(e);if(t<=0)return`0 ${w[0]}`;let n=Math.min(Math.floor(Math.log(t)/Math.log(1024)),w.length-1);return`${(t/1024**n).toFixed(0)} ${w[n]}`}_resolveChanged(){if(!this.changed)return``;let e=this._dateAdapter.deserialize(this.changed);return this._dateAdapter.isValid(e)?this._dateAdapter.format(e,{weekdayStyle:`none`}):this.changed}render(){let e=[this._resolvedType,this._resolvedSize,this.nonAccessible?m[this._language.current]:``,this._resolvedChanged].filter(Boolean);return this.internals.ariaLabel=e.slice(this._typeRedundant&&this._resolvedType?1:0).join(`, `),n`${e.join(`, `)}`}}})();export{S as SbbDownloadElement,T as SbbDownloadInfoElement};
|
package/lean-off-brand-theme.css
CHANGED
|
@@ -1302,6 +1302,9 @@ summary {
|
|
|
1302
1302
|
--sbb-divider-color-negative: var(--sbb-background-color-4-negative);
|
|
1303
1303
|
--sbb-divider-border-width: var(--sbb-border-width-1x);
|
|
1304
1304
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
1305
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
1306
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
1307
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
1305
1308
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
1306
1309
|
--sbb-download-info-color: var(--sbb-color-granite);
|
|
1307
1310
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|
package/lean-safety-theme.css
CHANGED
|
@@ -1322,6 +1322,9 @@ summary {
|
|
|
1322
1322
|
--sbb-divider-color-negative: var(--sbb-background-color-4-negative);
|
|
1323
1323
|
--sbb-divider-border-width: var(--sbb-border-width-1x);
|
|
1324
1324
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
1325
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
1326
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
1327
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
1325
1328
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
1326
1329
|
--sbb-download-info-color: var(--sbb-color-granite);
|
|
1327
1330
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|
package/lean-theme.css
CHANGED
|
@@ -1322,6 +1322,9 @@ summary {
|
|
|
1322
1322
|
--sbb-divider-color-negative: var(--sbb-background-color-4-negative);
|
|
1323
1323
|
--sbb-divider-border-width: var(--sbb-border-width-1x);
|
|
1324
1324
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
1325
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
1326
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
1327
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
1325
1328
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
1326
1329
|
--sbb-download-info-color: var(--sbb-color-granite);
|
|
1327
1330
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|
package/off-brand-theme.css
CHANGED
|
@@ -1302,6 +1302,9 @@ summary {
|
|
|
1302
1302
|
--sbb-divider-color-negative: var(--sbb-background-color-4-negative);
|
|
1303
1303
|
--sbb-divider-border-width: var(--sbb-border-width-1x);
|
|
1304
1304
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
1305
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
1306
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
1307
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
1305
1308
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
1306
1309
|
--sbb-download-info-color: var(--sbb-color-granite);
|
|
1307
1310
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbb-esta/lyne-elements-dev",
|
|
3
|
-
"version": "5.8.0-dev.
|
|
3
|
+
"version": "5.8.0-dev.1788874314",
|
|
4
4
|
"description": "Lyne Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
7
7
|
"web components",
|
|
8
8
|
"lit",
|
|
9
|
-
"https://github.com/sbb-design-systems/lyne-components/commit/
|
|
9
|
+
"https://github.com/sbb-design-systems/lyne-components/commit/e0cd632b0b04d213956fa80609b92da64499af76"
|
|
10
10
|
],
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|
package/safety-theme.css
CHANGED
|
@@ -1322,6 +1322,9 @@ summary {
|
|
|
1322
1322
|
--sbb-divider-color-negative: var(--sbb-background-color-4-negative);
|
|
1323
1323
|
--sbb-divider-border-width: var(--sbb-border-width-1x);
|
|
1324
1324
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
1325
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
1326
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
1327
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
1325
1328
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
1326
1329
|
--sbb-download-info-color: var(--sbb-color-granite);
|
|
1327
1330
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|
package/standard-theme.css
CHANGED
|
@@ -1322,6 +1322,9 @@ summary {
|
|
|
1322
1322
|
--sbb-divider-color-negative: var(--sbb-background-color-4-negative);
|
|
1323
1323
|
--sbb-divider-border-width: var(--sbb-border-width-1x);
|
|
1324
1324
|
--sbb-download-gap: var(--sbb-spacing-fixed-3x);
|
|
1325
|
+
--sbb-download-content-gap: var(--sbb-spacing-fixed-4x);
|
|
1326
|
+
--sbb-download-divider-margin-block: var(--sbb-divider-border-width);
|
|
1327
|
+
--sbb-download-label-font-size: var(--sbb-heading-font-size-5);
|
|
1325
1328
|
--sbb-download-label-color: var(--sbb-color-3);
|
|
1326
1329
|
--sbb-download-info-color: var(--sbb-color-granite);
|
|
1327
1330
|
--sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
|