Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add register static method #136 #132 #137

Merged
merged 16 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apiExamples/custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<custom-flight
flights='["AS 1436"]'
duration="161"
departureTime="2022-07-13T12:15:00-07:00"
departureStation="SEA"
arrivalTime="2022-07-13T14:56:00-07:00"
arrivalStation="LAX">
<auro-flightline></auro-flightline>
</custom-flight>
4 changes: 1 addition & 3 deletions demo/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
Prism.highlightAll();
});
</script>
<script type="module" src="../index.js"></script>
<script type="module" src="./api.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/dist/auro-icon__bundled.js" type="module"></script>
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest/dist/auro-alert__bundled.js" type="module"></script>
</body>
</html>
1 change: 1 addition & 0 deletions demo/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../index.js';
72 changes: 36 additions & 36 deletions demo/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../api.md) -->
<!-- The below content is automatically added from ./../api.md -->

# auro-flight

The auro-flight element renders a DoT compliant Flight listing.
This design has been tested via the Alaska Legal team for legal compliance.
Please DO NOT modify unit tests pertaining to DoT regulations.

## Properties

| Property | Attribute | Type | Description |
|----------------------------|----------------------------|----------|--------------------------------------------------|
| [arrivalStation](#arrivalStation) | `arrivalStation` | `String` | String for the arrival station. `PVD` |
| [arrivalTime](#arrivalTime) | `arrivalTime` | `String` | String for the arrival ISO 8601 time. `2022-04-13T12:30:00-04:00` |
| [departureStation](#departureStation) | `departureStation` | `String` | String for the departure station. `SEA` |
| [departureTime](#departureTime) | `departureTime` | `String` | String for the departure ISO 8601 time. `2022-04-13T12:30:00-04:00` |
| [duration](#duration) | `duration` | `Number` | String for the duration. `505` |
| [flights](#flights) | `flights` | `Array` | Array of flight numbers `['AS 123', 'EK 432']` |
| [reroutedArrivalStation](#reroutedArrivalStation) | `reroutedArrivalStation` | `String` | String for the new arrival station for rerouted flights. `AVP` |
| [reroutedDepartureStation](#reroutedDepartureStation) | `reroutedDepartureStation` | `String` | String for the new departure station for rerouted flights. `PDX` |
| [stops](#stops) | `stops` | `Array` | Array of objects representing stopovers or layovers: "isStopover": bool, "arrivalStation": string, "duration": string ["123hr 123m"] (layover only). This content will not be used in the UI, but only constructs the a11y conversational phrase for screen readers and has no effect on the `auro-flight-segment` content. |

## Slots

| Name | Description |
|-------------------|--------------------------------------------------|
| [arrivalHeader](#arrivalHeader) | Text on top of the arrival station's time |
| [default](#default) | anticipates `<auro-flightline>` instance to fill out the flight timeline |
| [departureHeader](#departureHeader) | Text on top of the departure station's time |
| [footer](#footer) | Lower section allowing for tertiary content to be attributed to the element. Per **DoT Regulations** do NOT edit the styles contained within this slot |

## CSS Shadow Parts

| Part | Description |
|-------------------|--------------------------------------------------|
| [flightContainer](#flightContainer) | Apply css to the elements within the flight component container |

# auro-flight-header

The auro-flight-header element displays airline, duration, and day change information.
Expand Down Expand Up @@ -53,42 +88,7 @@ DoT: STATION SIZE AND COLOR MUST BE IDENTICAL TO DISCLOSURE SIZE AND COLOR!
| Part | Description |
|----------------------|--------------------------------------------------|
| [arrivalContainer](#arrivalContainer) | Apply css to the elements within the arrival container |
| [departureContainer](#departureContainer) | Apply css to the elements within the departure container |

# auro-flight
sun-mota marked this conversation as resolved.
Show resolved Hide resolved

The auro-flight element renders a DoT compliant Flight listing.
This design has been tested via the Alaska Legal team for legal compliance.
Please DO NOT modify unit tests pertaining to DoT regulations.

## Properties

| Property | Attribute | Type | Description |
|----------------------------|----------------------------|----------|--------------------------------------------------|
| [arrivalStation](#arrivalStation) | `arrivalStation` | `String` | String for the arrival station. `PVD` |
| [arrivalTime](#arrivalTime) | `arrivalTime` | `String` | String for the arrival ISO 8601 time. `2022-04-13T12:30:00-04:00` |
| [departureStation](#departureStation) | `departureStation` | `String` | String for the departure station. `SEA` |
| [departureTime](#departureTime) | `departureTime` | `String` | String for the departure ISO 8601 time. `2022-04-13T12:30:00-04:00` |
| [duration](#duration) | `duration` | `Number` | String for the duration. `505` |
| [flights](#flights) | `flights` | `Array` | Array of flight numbers `['AS 123', 'EK 432']` |
| [reroutedArrivalStation](#reroutedArrivalStation) | `reroutedArrivalStation` | `String` | String for the new arrival station for rerouted flights. `AVP` |
| [reroutedDepartureStation](#reroutedDepartureStation) | `reroutedDepartureStation` | `String` | String for the new departure station for rerouted flights. `PDX` |
| [stops](#stops) | `stops` | `Array` | Array of objects representing stopovers or layovers: "isStopover": bool, "arrivalStation": string, "duration": string ["123hr 123m"] (layover only). This content will not be used in the UI, but only constructs the a11y conversational phrase for screen readers and has no effect on the `auro-flight-segment` content. |

## Slots

| Name | Description |
|-------------------|--------------------------------------------------|
| [arrivalHeader](#arrivalHeader) | Text on top of the arrival station's time |
| [default](#default) | anticipates `<auro-flightline>` instance to fill out the flight timeline |
| [departureHeader](#departureHeader) | Text on top of the departure station's time |
| [footer](#footer) | Lower section allowing for tertiary content to be attributed to the element. Per **DoT Regulations** do NOT edit the styles contained within this slot |

## CSS Shadow Parts

| Part | Description |
|-------------------|--------------------------------------------------|
| [flightContainer](#flightContainer) | Apply css to the elements within the flight component container |
| [departureContainer](#departureContainer) | Apply css to the elements within the departure container |
<!-- AURO-GENERATED-CONTENT:END -->

## API Examples
Expand Down
Loading