@aurodesignsystem-dev/auro-flightline 0.0.0-pr140.0 → 0.0.0-pr141.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -51
- package/demo/api.md +232 -232
- package/demo/api.min.js +448 -1
- package/demo/index.md +18 -32
- package/demo/index.min.js +448 -1
- package/demo/readme.md +123 -0
- package/dist/auro-flightline-fhfUfH7l.js +27 -0
- package/dist/index.d.ts +356 -33
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +7 -7
- package/demo/auro-flightline.min.js +0 -432
- package/dist/auro-flightline-Ua1BdkHT.js +0 -27
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{css as e,LitElement as s,html as t}from"lit";import{classMap as a}from"lit/directives/class-map.js";import{html as i}from"lit/static-html.js";class l{registerComponent(e,s){customElements.get(e)||customElements.define(e,class extends s{})}closestElement(e,s=this,t=(s,a=s&&s.closest(e))=>s&&s!==document&&s!==window?a||t(s.getRootNode().host):null){return t(s)}handleComponentTagRename(e,s){const t=s.toLowerCase();e.tagName.toLowerCase()!==t&&e.setAttribute(t,!0)}elementMatch(e,s){const t=s.toLowerCase();return e.tagName.toLowerCase()===t||e.hasAttribute(t)}getSlotText(e,s){const t=e.shadowRoot?.querySelector(`slot[name="${s}"]`);return(t?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}var n=e`.wrapper:before{border-top-color:var(--ds-auro-flightline-segment-line-color)}.wrapper:after{border-top-color:var(--ds-auro-flightline-destination-line-color)}.iata{color:var(--ds-auro-flightline-segment-iata-text-color)}.duration{color:var(--ds-auro-flightline-layover-duration-color)}.leg{border-color:var(--ds-auro-flightline-layover-marker-border-color);background-color:var(--ds-auro-flightline-layover-marker-container-color)}.leg--stopover{--ds-auro-flightline-layover-marker-container-color: var(--ds-basic-color-surface-default, #ffffff)}.leg--canceled{--ds-auro-flightline-layover-marker-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-flightline-layover-marker-container-color: var(--ds-basic-color-status-error, #e31f26)}:host([nextday]){--ds-auro-flightline-layover-duration-color: var(--ds-basic-color-status-error, #e31f26)}:host([canceled]){--ds-auro-flightline-segment-line-color: var(--ds-basic-color-status-error, #e31f26)}:host([destinationCanceled]){--ds-auro-flightline-layover-duration-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-flightline-destination-line-color: var(--ds-basic-color-status-error, #e31f26)}
|
|
2
|
+
`,r=e`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-default-font-size, 1rem);font-variant-ligatures:none;font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-variant-ligatures:none;font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-lg-font-size, 1.125rem);font-variant-ligatures:none;font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-variant-ligatures:none;font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-sm-font-size, .875rem);font-variant-ligatures:none;font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-sm-emphasized-font-size, .875rem);font-variant-ligatures:none;font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-xs-font-size, .75rem);font-variant-ligatures:none;font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-xs-emphasized-font-size, .75rem);font-variant-ligatures:none;font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-variant-ligatures:none;font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, .875rem)}.body-2xs,.body-2xs-emphasized{letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-emphasized-font-size, .625rem);font-variant-ligatures:none;font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-variant-ligatures:none;font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-variant-ligatures:none;font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-variant-ligatures:none;font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-variant-ligatures:none;font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-variant-ligatures:none;font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-variant-ligatures:none;font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-variant-ligatures:none;font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-variant-ligatures:none;font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{flex-grow:1;flex-basis:0}.wrapper{position:relative}.wrapper:before,.wrapper:after{border-top-width:var(--ds-size-25, .125rem);border-top-style:solid;position:absolute;top:.5rem;z-index:1}.wrapper:before{content:"";right:50%;width:100%}.wrapper:after{left:50%;width:50%}:host(:first-child) .wrapper:before,:host(:only-of-type) .wrapper:before{width:50%}:host(:last-child) .wrapper:after,:host(:only-of-type) .wrapper:after{content:""}:host([canceled]) .wrapper:before{border-top-width:var(--ds-size-25, .125rem);border-top-style:dashed}:host([destinationCanceled]) .wrapper:after{border-top-width:var(--ds-size-25, .125rem);border-top-style:dashed}.layout{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;z-index:2;width:100%}.leg{border-style:solid;border-width:var(--ds-size-25, .125rem);border-radius:50%;width:var(--ds-size-150, .75rem);height:var(--ds-size-150, .75rem)}@media screen and (min-width: 576px){.leg{width:var(--ds-size-200, 1rem);height:var(--ds-size-200, 1rem)}}.iata{margin-top:var(--ds-size-150, .75rem)}
|
|
3
|
+
`,o=e`:host{--ds-auro-flightline-destination-line-color: var(--ds-advanced-color-flightline-line, #00274a);--ds-auro-flightline-segment-iata-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-flightline-segment-line-color: var(--ds-advanced-color-flightline-line, #00274a);--ds-auro-flightline-layover-duration-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-flightline-layover-marker-border-color: var(--ds-advanced-color-flightline-indicator, #00274a);--ds-auro-flightline-layover-marker-container-color: var(--ds-advanced-color-flightline-indicator, #00274a)}
|
|
4
|
+
`;class c extends s{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.stopover=!1,this.canceled=!1,this.destinationCanceled=!1,this.partialCancel=!1}static get properties(){return{canceled:{type:Boolean,reflect:!0},destinationCanceled:{type:Boolean,reflect:!0},duration:{type:String},iata:{type:String},nextDay:{type:Boolean,reflect:!0},partialCancel:{type:Boolean,reflect:!0},stopover:{type:Boolean,reflect:!0}}}static get styles(){return[e`${r}`,e`${n}`,e`${o}`]}static register(e="auro-flight-segment"){l.prototype.registerComponent(e,c)}firstUpdated(){l.prototype.handleComponentTagRename(this,"auro-flight-segment")}render(){const e={leg:!0,layout:!0,"leg--stopover":this.stopover,"leg--canceled":this.canceled||this.partialCancel};return i`
|
|
5
|
+
<div class="wrapper">
|
|
6
|
+
<div class="layout">
|
|
7
|
+
<slot></slot>
|
|
8
|
+
<div class="${a(e)}"></div>
|
|
9
|
+
<span class="iata body-default">${this.iata}</span>
|
|
10
|
+
${this.duration?i`<span class="duration body-xs">${this.duration}</span>`:void 0}
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
`}}var d=e`.nonstop:before,.canceled:before{border-top-color:var(--ds-auro-flightline-segment-line-color)}:host([canceled]){--ds-auro-flightline-segment-line-color: var(--ds-basic-color-status-error, #e31f26)}
|
|
14
|
+
`,m=e`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;isolation:isolate}.nonstop:before{content:"";height:var(--ds-size-25, .125rem);width:100%;position:relative;top:10px;border-width:var(--ds-size-25, .125rem) 0 0 0;border-style:solid}.canceled:before{border-style:dashed}.multiple ::slotted(*){display:block}@container (max-width: 320px){.multiple ::slotted(*){display:none}}.showNoStops{display:none}@container (max-width: 320px){.showNoStops{display:block}}.slotContainer{display:flex;justify-content:space-around;min-height:var(--ds-size-300, 1.5rem);container-type:inline-size}
|
|
15
|
+
`;class g extends s{constructor(){super(),this._initializeDefaults()}_initializeDefaults(){this.canceled=!1,this.hasCanceledSegment=!1,this.firstSegmentCanceled=!1,this.lastSegmentCanceled=!1,this.runtimeUtils=new l}static get properties(){return{canceled:{type:Boolean,reflect:!0},firstSegmentCanceled:{type:Boolean,reflect:!0},hasCanceledSegment:{type:Boolean,reflect:!0},lastSegmentCanceled:{type:Boolean,reflect:!0}}}static get styles(){return[m,d,o]}static register(e="auro-flightline"){l.prototype.registerComponent(e,g)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-flightline")}containsCanceledSegment(){const e=this.querySelectorAll("auro-flight-segment, [auro-flight-segment]");for(let s=0;s<e.length;s+=1){const t=e[s];this.canceled&&(t.canceled=!0,t.destinationCanceled=!0),(t.canceled||t.hasAttribute("canceled"))&&(this.hasCanceledSegment=!0,0===s&&(this.firstSegmentCanceled=!0)),t.hasAttribute("destinationCanceled")&&s===e.length-1&&(this.lastSegmentCanceled=!0)}}render(){const e=this.children.length>1,s={slotContainer:!0,nonstop:!this.children.length,multiple:e,canceled:this.canceled};return t`
|
|
16
|
+
<div class="${a(s)}">
|
|
17
|
+
<slot @slotchange=${this.containsCanceledSegment}></slot>
|
|
18
|
+
${e?t`
|
|
19
|
+
<auro-flight-segment
|
|
20
|
+
class="showNoStops"
|
|
21
|
+
?canceled=${this.firstSegmentCanceled}
|
|
22
|
+
?partialCancel=${this.hasCanceledSegment}
|
|
23
|
+
?destinationCanceled=${this.lastSegmentCanceled}
|
|
24
|
+
iata="${this.children.length} stops"
|
|
25
|
+
></auro-flight-segment>
|
|
26
|
+
`:t``}
|
|
27
|
+
</div>`}}export{g as A,c as a};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,356 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
`,n=css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{flex-grow:1;flex-basis:0}.wrapper{position:relative}.wrapper:before,.wrapper:after{border-top-width:var(--ds-size-25, .125rem);border-top-style:solid;position:absolute;top:.5rem;z-index:1}.wrapper:before{content:"";right:50%;width:100%}.wrapper:after{left:50%;width:50%}:host(:first-child) .wrapper:before,:host(:only-of-type) .wrapper:before{width:50%}:host(:last-child) .wrapper:after,:host(:only-of-type) .wrapper:after{content:""}:host([canceled]) .wrapper:before{border-top-width:var(--ds-size-25, .125rem);border-top-style:dashed}:host([destinationCanceled]) .wrapper:after{border-top-width:var(--ds-size-25, .125rem);border-top-style:dashed}.layout{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;z-index:2;width:100%}.leg{border-style:solid;border-width:var(--ds-size-25, .125rem);border-radius:50%;width:var(--ds-size-150, .75rem);height:var(--ds-size-150, .75rem)}@media screen and (min-width: 576px){.leg{width:var(--ds-size-200, 1rem);height:var(--ds-size-200, 1rem)}}.iata{margin-top:var(--ds-size-150, .75rem)}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import type { AuroFlightSegment } from "src/auro-flight-segment.js";
|
|
2
|
+
import type { AuroFlightline } from "src/auro-flightline.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This type can be used to create scoped tags for your components.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import type { ScopedElements } from "path/to/library/jsx-integration";
|
|
11
|
+
*
|
|
12
|
+
* declare module "my-library" {
|
|
13
|
+
* namespace JSX {
|
|
14
|
+
* interface IntrinsicElements
|
|
15
|
+
* extends ScopedElements<'test-', ''> {}
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Runtime scoped elements result in duplicate types and can confusing for developers. It is recommended to use the `prefix` and `suffix` options to generate new types instead.
|
|
21
|
+
*/
|
|
22
|
+
export type ScopedElements<
|
|
23
|
+
Prefix extends string = "",
|
|
24
|
+
Suffix extends string = "",
|
|
25
|
+
> = {
|
|
26
|
+
[
|
|
27
|
+
Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`
|
|
28
|
+
]: CustomElements[Key];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type BaseProps<T extends HTMLElement> = {
|
|
32
|
+
/** Content added between the opening and closing tags of the element */
|
|
33
|
+
children?: any;
|
|
34
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
35
|
+
class?: string;
|
|
36
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
|
|
39
|
+
classList?: Record<string, boolean | undefined>;
|
|
40
|
+
/** Specifies the text direction of the element. */
|
|
41
|
+
dir?: "ltr" | "rtl";
|
|
42
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
43
|
+
exportparts?: string;
|
|
44
|
+
/** For <label> and <output>, lets you associate the label with some control. */
|
|
45
|
+
htmlFor?: string;
|
|
46
|
+
/** Specifies whether the element should be hidden. */
|
|
47
|
+
hidden?: boolean | string;
|
|
48
|
+
/** A unique identifier for the element. */
|
|
49
|
+
id?: string;
|
|
50
|
+
/** Keys tell React which array item each component corresponds to */
|
|
51
|
+
key?: string | number;
|
|
52
|
+
/** Specifies the language of the element. */
|
|
53
|
+
lang?: string;
|
|
54
|
+
/** Defines the element's semantic role for accessibility APIs. */
|
|
55
|
+
role?: string;
|
|
56
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
57
|
+
part?: string;
|
|
58
|
+
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
59
|
+
ref?: T | ((e: T) => void);
|
|
60
|
+
/** Adds a reference for a custom element slot */
|
|
61
|
+
slot?: string;
|
|
62
|
+
/** Prop for setting inline styles */
|
|
63
|
+
style?: Record<string, string | number>;
|
|
64
|
+
/** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
|
|
65
|
+
tabIndex?: number;
|
|
66
|
+
/** Specifies the tooltip text for the element. */
|
|
67
|
+
title?: string;
|
|
68
|
+
/** Passing 'no' excludes the element content from being translated. */
|
|
69
|
+
translate?: "yes" | "no";
|
|
70
|
+
/** The popover global attribute is used to designate an element as a popover element. */
|
|
71
|
+
popover?: "auto" | "hint" | "manual";
|
|
72
|
+
/** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
|
|
73
|
+
popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
|
|
74
|
+
/** Specifies the action to be performed on a popover element being controlled by a control element. */
|
|
75
|
+
popovertargetaction?: "show" | "hide" | "toggle";
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
type BaseEvents = {};
|
|
79
|
+
|
|
80
|
+
export type AuroFlightSegmentProps = {
|
|
81
|
+
/** Marks the segment as canceled. The line leading to the segment is red and dashed, and the segment's marker is red. */
|
|
82
|
+
canceled?: AuroFlightSegment["canceled"];
|
|
83
|
+
/** Marks the final leg after the last segment as canceled. Use it on the last segment in a flightline, where it turns the line after the segment red and dashed and the duration text red. */
|
|
84
|
+
destinationCanceled?: AuroFlightSegment["destinationCanceled"];
|
|
85
|
+
/** Sets the layover length shown under the station code, such as `3h 40m`. Don't set it on a stopover, because stopover durations can't be predicted. */
|
|
86
|
+
duration?: AuroFlightSegment["duration"];
|
|
87
|
+
/** Sets the text shown under the segment's marker, typically a station code such as `SEA`. */
|
|
88
|
+
iata?: AuroFlightSegment["iata"];
|
|
89
|
+
/** Marks a layover that extends into the next calendar day by showing its duration in red. */
|
|
90
|
+
nextDay?: AuroFlightSegment["nextDay"];
|
|
91
|
+
/** Marks the segment as a stopover and shows its marker as an outlined circle. Don't set `duration` on a stopover, because stopover durations can't be predicted. */
|
|
92
|
+
stopover?: AuroFlightSegment["stopover"];
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export type AuroFlightSegmentSolidJsProps = {
|
|
96
|
+
/** Marks the segment as canceled. The line leading to the segment is red and dashed, and the segment's marker is red. */
|
|
97
|
+
"prop:canceled"?: AuroFlightSegment["canceled"];
|
|
98
|
+
/** Marks the final leg after the last segment as canceled. Use it on the last segment in a flightline, where it turns the line after the segment red and dashed and the duration text red. */
|
|
99
|
+
"prop:destinationCanceled"?: AuroFlightSegment["destinationCanceled"];
|
|
100
|
+
/** Sets the layover length shown under the station code, such as `3h 40m`. Don't set it on a stopover, because stopover durations can't be predicted. */
|
|
101
|
+
"prop:duration"?: AuroFlightSegment["duration"];
|
|
102
|
+
/** Sets the text shown under the segment's marker, typically a station code such as `SEA`. */
|
|
103
|
+
"prop:iata"?: AuroFlightSegment["iata"];
|
|
104
|
+
/** Marks a layover that extends into the next calendar day by showing its duration in red. */
|
|
105
|
+
"prop:nextDay"?: AuroFlightSegment["nextDay"];
|
|
106
|
+
/** Marks the segment as a stopover and shows its marker as an outlined circle. Don't set `duration` on a stopover, because stopover durations can't be predicted. */
|
|
107
|
+
"prop:stopover"?: AuroFlightSegment["stopover"];
|
|
108
|
+
|
|
109
|
+
/** Set the innerHTML of the element */
|
|
110
|
+
innerHTML?: string;
|
|
111
|
+
/** Set the textContent of the element */
|
|
112
|
+
textContent?: string | number;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type AuroFlightlineProps = {
|
|
116
|
+
/** Sets the whole flightline to canceled. The line turns red and dashed, and every segment inside it is shown as canceled. */
|
|
117
|
+
canceled?: AuroFlightline["canceled"];
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export type AuroFlightlineSolidJsProps = {
|
|
121
|
+
/** Sets the whole flightline to canceled. The line turns red and dashed, and every segment inside it is shown as canceled. */
|
|
122
|
+
"prop:canceled"?: AuroFlightline["canceled"];
|
|
123
|
+
|
|
124
|
+
/** Set the innerHTML of the element */
|
|
125
|
+
innerHTML?: string;
|
|
126
|
+
/** Set the textContent of the element */
|
|
127
|
+
textContent?: string | number;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export type CustomElements = {
|
|
131
|
+
/**
|
|
132
|
+
* Marks one stop on a flight as a layover or a stopover.
|
|
133
|
+
*
|
|
134
|
+
* **Key capabilities**
|
|
135
|
+
* - **Layover**: A stop with a duration, shown as a filled marker. Set `duration` to show it.
|
|
136
|
+
* - **Stopover**: A stop with no duration, shown as an outlined marker. Set `stopover` to turn it on.
|
|
137
|
+
* - **Cancellation**: `canceled` and `destinationCanceled` show the lines around the segment as canceled.
|
|
138
|
+
*
|
|
139
|
+
* **Example**
|
|
140
|
+
* ```html
|
|
141
|
+
* <auro-flight-segment iata="ORD" duration="3h 40m"></auro-flight-segment>
|
|
142
|
+
* ```
|
|
143
|
+
* Read about [the difference between a layover and a stopover](https://www.turkishairlines.com/en-int/any-questions/what-is-the-difference-between-a-layover-and-a-stopover/).
|
|
144
|
+
*
|
|
145
|
+
* ## Attributes & Properties
|
|
146
|
+
*
|
|
147
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
148
|
+
*
|
|
149
|
+
* - `canceled`: Marks the segment as canceled. The line leading to the segment is red and dashed, and the segment's marker is red.
|
|
150
|
+
* - `destinationCanceled`: Marks the final leg after the last segment as canceled. Use it on the last segment in a flightline, where it turns the line after the segment red and dashed and the duration text red.
|
|
151
|
+
* - `duration`: Sets the layover length shown under the station code, such as `3h 40m`. Don't set it on a stopover, because stopover durations can't be predicted.
|
|
152
|
+
* - `iata`: Sets the text shown under the segment's marker, typically a station code such as `SEA`.
|
|
153
|
+
* - `nextDay`: Marks a layover that extends into the next calendar day by showing its duration in red.
|
|
154
|
+
* - `stopover`: Marks the segment as a stopover and shows its marker as an outlined circle. Don't set `duration` on a stopover, because stopover durations can't be predicted.
|
|
155
|
+
*
|
|
156
|
+
* ## Methods
|
|
157
|
+
*
|
|
158
|
+
* Methods that can be called to access component functionality.
|
|
159
|
+
*
|
|
160
|
+
* - `_initializeDefaults() => void`: undefined
|
|
161
|
+
* - `register(name?: string = "auro-flight-segment") => void`: Registers the element with the browser under a tag name.
|
|
162
|
+
*/
|
|
163
|
+
"auro-flight-segment": Partial<
|
|
164
|
+
AuroFlightSegmentProps & BaseProps<AuroFlightSegment> & BaseEvents
|
|
165
|
+
>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Shows a flight's layovers and stopovers as dots on a timeline that adapts to the width of its container.
|
|
169
|
+
*
|
|
170
|
+
* **Key capabilities**
|
|
171
|
+
* - **Shows each stop**: Each `<auro-flight-segment>` in the default slot adds a dot to the timeline.
|
|
172
|
+
* - **Adapts to narrow spaces**: When its container is `320px` wide or narrower, it shows the number of stops instead of the dots.
|
|
173
|
+
* - **Shows cancellations**: `canceled` shows the whole flight as canceled.
|
|
174
|
+
*
|
|
175
|
+
* **Example**
|
|
176
|
+
* ```html
|
|
177
|
+
* <auro-flightline>
|
|
178
|
+
* <auro-flight-segment iata="SEA" duration="1h 40m"></auro-flight-segment>
|
|
179
|
+
* </auro-flightline>
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* ## Attributes & Properties
|
|
183
|
+
*
|
|
184
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
185
|
+
*
|
|
186
|
+
* - `canceled`: Sets the whole flightline to canceled. The line turns red and dashed, and every segment inside it is shown as canceled.
|
|
187
|
+
*
|
|
188
|
+
* ## Slots
|
|
189
|
+
*
|
|
190
|
+
* Areas where markup can be added to the component.
|
|
191
|
+
*
|
|
192
|
+
* - `(default)`: The `<auro-flight-segment>` elements that make up the flight, one for each stop.
|
|
193
|
+
*
|
|
194
|
+
* ## Methods
|
|
195
|
+
*
|
|
196
|
+
* Methods that can be called to access component functionality.
|
|
197
|
+
*
|
|
198
|
+
* - `_initializeDefaults() => void`: undefined
|
|
199
|
+
* - `register(name?: string = "auro-flightline") => void`: Registers the element with the browser under a tag name.
|
|
200
|
+
*/
|
|
201
|
+
"auro-flightline": Partial<
|
|
202
|
+
AuroFlightlineProps & BaseProps<AuroFlightline> & BaseEvents
|
|
203
|
+
>;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export type CustomElementsSolidJs = {
|
|
207
|
+
/**
|
|
208
|
+
* Marks one stop on a flight as a layover or a stopover.
|
|
209
|
+
*
|
|
210
|
+
* **Key capabilities**
|
|
211
|
+
* - **Layover**: A stop with a duration, shown as a filled marker. Set `duration` to show it.
|
|
212
|
+
* - **Stopover**: A stop with no duration, shown as an outlined marker. Set `stopover` to turn it on.
|
|
213
|
+
* - **Cancellation**: `canceled` and `destinationCanceled` show the lines around the segment as canceled.
|
|
214
|
+
*
|
|
215
|
+
* **Example**
|
|
216
|
+
* ```html
|
|
217
|
+
* <auro-flight-segment iata="ORD" duration="3h 40m"></auro-flight-segment>
|
|
218
|
+
* ```
|
|
219
|
+
* Read about [the difference between a layover and a stopover](https://www.turkishairlines.com/en-int/any-questions/what-is-the-difference-between-a-layover-and-a-stopover/).
|
|
220
|
+
*
|
|
221
|
+
* ## Attributes & Properties
|
|
222
|
+
*
|
|
223
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
224
|
+
*
|
|
225
|
+
* - `canceled`: Marks the segment as canceled. The line leading to the segment is red and dashed, and the segment's marker is red.
|
|
226
|
+
* - `destinationCanceled`: Marks the final leg after the last segment as canceled. Use it on the last segment in a flightline, where it turns the line after the segment red and dashed and the duration text red.
|
|
227
|
+
* - `duration`: Sets the layover length shown under the station code, such as `3h 40m`. Don't set it on a stopover, because stopover durations can't be predicted.
|
|
228
|
+
* - `iata`: Sets the text shown under the segment's marker, typically a station code such as `SEA`.
|
|
229
|
+
* - `nextDay`: Marks a layover that extends into the next calendar day by showing its duration in red.
|
|
230
|
+
* - `stopover`: Marks the segment as a stopover and shows its marker as an outlined circle. Don't set `duration` on a stopover, because stopover durations can't be predicted.
|
|
231
|
+
*
|
|
232
|
+
* ## Methods
|
|
233
|
+
*
|
|
234
|
+
* Methods that can be called to access component functionality.
|
|
235
|
+
*
|
|
236
|
+
* - `_initializeDefaults() => void`: undefined
|
|
237
|
+
* - `register(name?: string = "auro-flight-segment") => void`: Registers the element with the browser under a tag name.
|
|
238
|
+
*/
|
|
239
|
+
"auro-flight-segment": Partial<
|
|
240
|
+
AuroFlightSegmentProps &
|
|
241
|
+
AuroFlightSegmentSolidJsProps &
|
|
242
|
+
BaseProps<AuroFlightSegment> &
|
|
243
|
+
BaseEvents
|
|
244
|
+
>;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Shows a flight's layovers and stopovers as dots on a timeline that adapts to the width of its container.
|
|
248
|
+
*
|
|
249
|
+
* **Key capabilities**
|
|
250
|
+
* - **Shows each stop**: Each `<auro-flight-segment>` in the default slot adds a dot to the timeline.
|
|
251
|
+
* - **Adapts to narrow spaces**: When its container is `320px` wide or narrower, it shows the number of stops instead of the dots.
|
|
252
|
+
* - **Shows cancellations**: `canceled` shows the whole flight as canceled.
|
|
253
|
+
*
|
|
254
|
+
* **Example**
|
|
255
|
+
* ```html
|
|
256
|
+
* <auro-flightline>
|
|
257
|
+
* <auro-flight-segment iata="SEA" duration="1h 40m"></auro-flight-segment>
|
|
258
|
+
* </auro-flightline>
|
|
259
|
+
* ```
|
|
260
|
+
*
|
|
261
|
+
* ## Attributes & Properties
|
|
262
|
+
*
|
|
263
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
264
|
+
*
|
|
265
|
+
* - `canceled`: Sets the whole flightline to canceled. The line turns red and dashed, and every segment inside it is shown as canceled.
|
|
266
|
+
*
|
|
267
|
+
* ## Slots
|
|
268
|
+
*
|
|
269
|
+
* Areas where markup can be added to the component.
|
|
270
|
+
*
|
|
271
|
+
* - `(default)`: The `<auro-flight-segment>` elements that make up the flight, one for each stop.
|
|
272
|
+
*
|
|
273
|
+
* ## Methods
|
|
274
|
+
*
|
|
275
|
+
* Methods that can be called to access component functionality.
|
|
276
|
+
*
|
|
277
|
+
* - `_initializeDefaults() => void`: undefined
|
|
278
|
+
* - `register(name?: string = "auro-flightline") => void`: Registers the element with the browser under a tag name.
|
|
279
|
+
*/
|
|
280
|
+
"auro-flightline": Partial<
|
|
281
|
+
AuroFlightlineProps &
|
|
282
|
+
AuroFlightlineSolidJsProps &
|
|
283
|
+
BaseProps<AuroFlightline> &
|
|
284
|
+
BaseEvents
|
|
285
|
+
>;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export type CustomCssProperties = {};
|
|
289
|
+
|
|
290
|
+
declare module "react" {
|
|
291
|
+
namespace JSX {
|
|
292
|
+
interface IntrinsicElements extends CustomElements {}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
declare module "react/jsx-runtime" {
|
|
297
|
+
namespace JSX {
|
|
298
|
+
interface IntrinsicElements extends CustomElements {}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
declare module "react/jsx-dev-runtime" {
|
|
303
|
+
namespace JSX {
|
|
304
|
+
interface IntrinsicElements extends CustomElements {}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare module "preact" {
|
|
309
|
+
namespace JSX {
|
|
310
|
+
interface IntrinsicElements extends CustomElements {}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
declare module "@builder.io/qwik" {
|
|
315
|
+
namespace JSX {
|
|
316
|
+
interface IntrinsicElements extends CustomElements {}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare module "@stencil/core" {
|
|
321
|
+
namespace JSX {
|
|
322
|
+
interface IntrinsicElements extends CustomElements {}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare module "hono/jsx" {
|
|
327
|
+
namespace JSX {
|
|
328
|
+
interface IntrinsicElements extends CustomElements {}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
declare module "react-native" {
|
|
333
|
+
namespace JSX {
|
|
334
|
+
interface IntrinsicElements extends CustomElements {}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
declare module "solid-js" {
|
|
339
|
+
namespace JSX {
|
|
340
|
+
interface IntrinsicElements extends CustomElementsSolidJs {}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
declare global {
|
|
345
|
+
namespace JSX {
|
|
346
|
+
interface IntrinsicElements extends CustomElements {}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
declare global {
|
|
350
|
+
namespace svelteHTML {
|
|
351
|
+
interface IntrinsicElements extends CustomElements {}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
export { AuroFlightline, AuroFlightSegment } from "./index.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as AuroFlightSegment,A as AuroFlightline}from"./auro-flightline-
|
|
1
|
+
export{a as AuroFlightSegment,A as AuroFlightline}from"./auro-flightline-fhfUfH7l.js";import"lit";import"lit/directives/class-map.js";import"lit/static-html.js";
|
package/dist/registered.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as i,a as t}from"./auro-flightline-
|
|
1
|
+
import{A as i,a as t}from"./auro-flightline-fhfUfH7l.js";import"lit";import"lit/directives/class-map.js";import"lit/static-html.js";i.register(),t.register();
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-flightline",
|
|
10
|
-
"version": "0.0.0-
|
|
10
|
+
"version": "0.0.0-pr141.0",
|
|
11
11
|
"description": "auro-flightline HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"node": ">=20"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"lit": "^3.3.
|
|
23
|
+
"lit": "^3.3.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@aurodesignsystem/auro-cli": "^
|
|
27
|
-
"@aurodesignsystem/auro-config": "^1.3.
|
|
28
|
-
"@aurodesignsystem/auro-library": "^5.
|
|
29
|
-
"@aurodesignsystem/design-tokens": "^
|
|
30
|
-
"@aurodesignsystem/webcorestylesheets": "^
|
|
26
|
+
"@aurodesignsystem/auro-cli": "^5.7.0",
|
|
27
|
+
"@aurodesignsystem/auro-config": "^1.3.2",
|
|
28
|
+
"@aurodesignsystem/auro-library": "^5.14.4",
|
|
29
|
+
"@aurodesignsystem/design-tokens": "^9.4.3",
|
|
30
|
+
"@aurodesignsystem/webcorestylesheets": "^12.1.0",
|
|
31
31
|
"husky": "^9.1.7"
|
|
32
32
|
},
|
|
33
33
|
"browserslist": [
|