@aurodesignsystem-dev/auro-flightline 0.0.0-pr140.0 → 0.0.0-pr141.1

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 CHANGED
@@ -12,9 +12,9 @@ The following sections are editable by making changes to the following files:
12
12
  | SECTION | DESCRIPTION | FILE LOCATION |
13
13
  |------------------------|---------------------------------------------------|-------------------------------------|
14
14
  | Description | Description of the component | `./docs/partials/description.md` |
15
- | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
- | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
- | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
15
+ | Use cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
+ | Additional information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
+ | Component example code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
18
  -->
19
19
 
20
20
  # Flightline
@@ -23,21 +23,21 @@ The following sections are editable by making changes to the following files:
23
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
24
24
  The `<auro-flightline>` component represents any layovers and/or stopovers a guest may encounter throughout their journey.
25
25
 
26
- For mobile, the number of stops is automatically calculated by the number of layovers and/or stopovers added in the DOM via the `auro-flight-segment` element.
26
+ When a flightline with two or more segments is `320px` wide or narrower, it hides the individual segments and shows the number of stops, counted from the `auro-flight-segment` elements inside it.
27
27
  <!-- AURO-GENERATED-CONTENT:END -->
28
28
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
29
29
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
30
30
  <!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
31
31
  <!-- AURO-GENERATED-CONTENT:END -->
32
32
 
33
- ## Use Cases
33
+ ## Use cases
34
34
 
35
35
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
36
36
  <!-- The below content is automatically added from ./docs/partials/useCases.md -->
37
- The `<auro-flightline>` element should be used in situations where users may:
37
+ Use `<auro-flightline>` to show a route that includes layovers or stopovers, such as:
38
38
 
39
- * Flying from SEA (Seattle, WA) to AVP (Scranton, PA) will require a *layover* in ORD (Chicago, IL)
40
- * Flying from [ANC (Anchorage, AK) to ADK (Adak Island, AK) will have a *stopover* in CDB (Cold Bay, AK)](https://onemileatatime.com/alaska-airlines-adak-cold-bay/). These passengers will not deplane in Cold Bay. Stopover duration cannot be predicted due to variants in passenger and cargo loads.
39
+ * A flight from SEA (Seattle, WA) to AVP (Scranton, PA) that requires a *layover* in ORD (Chicago, IL).
40
+ * A flight from ANC (Anchorage, AK) to ADK (Adak Island, AK) that has a *stopover* in CDB (Cold Bay, AK). [Passengers stay on the plane in Cold Bay](https://onemileatatime.com/alaska-airlines-adak-cold-bay/), and the stopover duration can't be predicted because passenger and cargo loads vary.
41
41
  <!-- AURO-GENERATED-CONTENT:END -->
42
42
 
43
43
  ## Install
@@ -48,90 +48,76 @@ The `<auro-flightline>` element should be used in situations where users may:
48
48
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-flightline?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
49
49
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
50
50
 
51
- ```shell
52
- $ npm i @aurodesignsystem/auro-flightline
53
- ```
51
+ <pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-flightline</code></pre>
54
52
 
55
53
  <!-- AURO-GENERATED-CONTENT:END -->
56
54
 
57
- ### Define Dependency in Project
55
+ ### Define dependency in project
58
56
 
59
57
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
60
- Defining the dependency within each project that is using the `<auro-flightline>` component.
58
+ Import the component in each project that uses `<auro-flightline>`.
61
59
 
62
60
  <!-- AURO-GENERATED-CONTENT:END -->
63
61
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
64
62
 
65
- ```js
66
- import "@aurodesignsystem/auro-flightline";
67
- ```
63
+ <pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-flightline";</code></pre>
68
64
 
69
65
  <!-- AURO-GENERATED-CONTENT:END -->
70
66
 
71
67
  ### Use CDN
72
68
 
73
69
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
74
- In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
70
+ If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
75
71
 
76
- ```html
77
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-flightline@latest/+esm"></script>
78
- ```
72
+ <pre class="language-html"><code class="language-html">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-flightline@latest/+esm"&gt;&lt;/script&gt;</code></pre>
79
73
 
80
74
  <!-- AURO-GENERATED-CONTENT:END -->
81
75
 
82
- ## Basic Example
76
+ ## Basic example
83
77
 
84
78
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
85
79
  <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
86
80
 
87
- ```html
88
- <auro-flightline></auro-flightline>
89
- ```
81
+ <pre class="language-html"><code class="language-html">&lt;auro-flightline&gt;&lt;/auro-flightline&gt;</code></pre>
90
82
  <!-- AURO-GENERATED-CONTENT:END -->
91
83
 
92
- ## Custom Component Registration for Version Management
84
+ ## Custom component registration for version management
93
85
 
94
- There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
86
+ Every Auro component has two key parts: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
95
87
  The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
96
88
 
97
- When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
89
+ Installing the component as described in the Install section imports the class and registers the component globally for you.
98
90
 
99
- However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
91
+ However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), register the class manually under a custom element name to avoid conflicts.
100
92
 
101
- You can do this by importing only the component class and using the `register(name)` method with a unique name:
93
+ To do this, import only the component class and call the `register(name)` method with a unique name:
102
94
 
103
95
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
104
96
  <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
105
97
 
106
- ```js
107
- // Import the class only
108
- import { AuroFlightSegment } from "./auro-flight-segment.js";
109
- import { AuroFlightline } from "./auro-flightline.js";
98
+ <pre class="language-js"><code class="language-js">// Import the classes only
99
+ import { AuroFlightline, AuroFlightSegment } from "@aurodesignsystem/auro-flightline/class";
100
+ &#10;// Register with custom names if desired
101
+ AuroFlightSegment.register("custom-flight-segment");
102
+ AuroFlightline.register("custom-flightline");</code></pre>
110
103
 
111
- // Register with a custom name if desired
112
- AuroFlightSegment.register('custom-flight-segment');
113
- AuroFlightline.register('custom-flightline');
114
- ```
115
-
116
- This will create a new custom element `<custom-flightline>` and `<custom-flight-segment>` that behaves exactly like `<auro-flightline>` and `<auro-flight-segment>`, allowing both sets of components to coexist on the same page without interfering with each other.
104
+ This creates `<custom-flightline>` and `<custom-flight-segment>`, which work like `<auro-flightline>` and `<auro-flight-segment>`. The flightline's "number of stops" summary at narrow widths uses `<auro-flight-segment>`, so also call `AuroFlightSegment.register()` to register it under its default name.
117
105
  <!-- AURO-GENERATED-CONTENT:END -->
118
106
  <div class="exampleWrapper exampleWrapper--flex">
119
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
120
- <!-- The below content is automatically added from ./apiExamples/custom.html -->
121
- <custom-flightline>
122
- <custom-flight-segment canceled iata="ORD" duration="3h 40m"></custom-flight-segment>
123
- </custom-flightline>
124
- <!-- AURO-GENERATED-CONTENT:END -->
107
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
108
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
109
+ <custom-flightline>
110
+ <custom-flight-segment canceled iata="ORD" duration="3h 40m"></custom-flight-segment>
111
+ </custom-flightline>
112
+ <!-- AURO-GENERATED-CONTENT:END -->
125
113
  </div>
126
114
  <auro-accordion alignRight>
127
- <span slot="trigger">See code</span>
115
+ <span slot="trigger">See code</span>
128
116
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
129
117
  <!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
130
118
 
131
- ```html
132
- <custom-flightline>
133
- <custom-flight-segment canceled iata="ORD" duration="3h 40m"></custom-flight-segment>
134
- </custom-flightline>
135
- ```
119
+ <pre class="language-html"><code class="language-html">&lt;custom-flightline&gt;
120
+ &lt;custom-flight-segment canceled iata="ORD" duration="3h 40m"&gt;&lt;/custom-flight-segment&gt;
121
+ &lt;/custom-flightline&gt;</code></pre>
136
122
  <!-- AURO-GENERATED-CONTENT:END -->
137
123
  </auro-accordion>