Skip to content

Commit

Permalink
docs: use module path instead of relative src path in customization e…
Browse files Browse the repository at this point in the history
…xample
  • Loading branch information
sun-mota committed Oct 23, 2024
1 parent f6a6b87 commit 5b43107
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
20 changes: 10 additions & 10 deletions demo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,22 +510,14 @@ The following example illustrates additional data regarding departure and arriva
</auro-accordion>
<hr/>

## DoT regulations

Department of Transportation regulations mandate that the arrival and departure cities' font size and color be identical to the operational disclosures (for instance, AA 3210 is operated by Envoy Air on behalf of American Airlines).

## Accessibility

The `<auro-flight>` custom element is accessible by screen readers by default. Due to the style of content within, while this is accessible, it's up to the user of the element to determine if information is useable and/or necessary for a screen reader experience. If this element is being used for illustrative purposes and the details of the flight are outlined in greater detail outside the scope of this element, `aria-hidden='true'` is recommended.

## Recommended Use and Version Control

There are two important parts of every Auro component. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element. The class is exported and then used as part of defining the Web Component. When importing this component as described in the <a href="#install">install</a> section, the class is imported and the `auro-flight` custom element is defined automatically.

To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `AuroFlight.register(name)` method and pass in a unique name.

```js
import { AuroFlight } from './src/auro-flight.js';
import { AuroFlight } from '@aurodesignsystem/auro-flight/src/auro-flight.js';

AuroFlight.register('custom-flight');
```
Expand Down Expand Up @@ -563,4 +555,12 @@ This will create a new custom element that you can use in your HTML that will fu
</custom-flight>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
</auro-accordion>

## DoT regulations

Department of Transportation regulations mandate that the arrival and departure cities' font size and color be identical to the operational disclosures (for instance, AA 3210 is operated by Envoy Air on behalf of American Airlines).

## Accessibility

The `<auro-flight>` custom element is accessible by screen readers by default. Due to the style of content within, while this is accessible, it's up to the user of the element to determine if information is useable and/or necessary for a screen reader experience. If this element is being used for illustrative purposes and the details of the flight are outlined in greater detail outside the scope of this element, `aria-hidden='true'` is recommended.
23 changes: 11 additions & 12 deletions docs/partials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,24 +195,14 @@ The following example illustrates additional data regarding departure and arriva

<hr/>



## DoT regulations

Department of Transportation regulations mandate that the arrival and departure cities' font size and color be identical to the operational disclosures (for instance, AA 3210 is operated by Envoy Air on behalf of American Airlines).

## Accessibility

The `<auro-flight>` custom element is accessible by screen readers by default. Due to the style of content within, while this is accessible, it's up to the user of the element to determine if information is useable and/or necessary for a screen reader experience. If this element is being used for illustrative purposes and the details of the flight are outlined in greater detail outside the scope of this element, `aria-hidden='true'` is recommended.

## Recommended Use and Version Control

There are two important parts of every Auro component. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element. The class is exported and then used as part of defining the Web Component. When importing this component as described in the <a href="#install">install</a> section, the class is imported and the `auro-flight` custom element is defined automatically.

To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `AuroFlight.register(name)` method and pass in a unique name.

```js
import { AuroFlight } from './src/auro-flight.js';
import { AuroFlight } from '@aurodesignsystem/auro-flight/src/auro-flight.js';

AuroFlight.register('custom-flight');
```
Expand All @@ -227,4 +217,13 @@ This will create a new custom element that you can use in your HTML that will fu
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/custom.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
</auro-accordion>


## DoT regulations

Department of Transportation regulations mandate that the arrival and departure cities' font size and color be identical to the operational disclosures (for instance, AA 3210 is operated by Envoy Air on behalf of American Airlines).

## Accessibility

The `<auro-flight>` custom element is accessible by screen readers by default. Due to the style of content within, while this is accessible, it's up to the user of the element to determine if information is useable and/or necessary for a screen reader experience. If this element is being used for illustrative purposes and the details of the flight are outlined in greater detail outside the scope of this element, `aria-hidden='true'` is recommended.
15 changes: 10 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@aurodesignsystem/auro-badge": "^3.0.1",
"@aurodesignsystem/auro-datetime": "^2.2.1",
"@aurodesignsystem/auro-flightline": "^3.0.1",
"@aurodesignsystem/auro-library": "^2.10.1",
"@aurodesignsystem/auro-library": "^2.8.0",
"chalk": "^5.3.0",
"lit": "^3.2.1"
},
Expand Down

0 comments on commit 5b43107

Please sign in to comment.