Skip to content

Commit

Permalink
fix: address issues with misconfigs
Browse files Browse the repository at this point in the history
This commit fixes misses with updates to the generateDocs that left
configs undefined.

Changes to be committed:
modified:   demo/api.html
renamed:    demo/api.md -> demo/apiExamples.md
deleted:    demo/demo.md
modified:   demo/index.md
renamed:    docs/partials/api.md -> docs/partials/apiExamples.md
modified:   scripts/generateDocs.mjs
  • Loading branch information
blackfalcon committed Feb 29, 2024
1 parent 8df9c7d commit 3b27142
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 488 deletions.
2 changes: 1 addition & 1 deletion demo/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<script type="module">
import 'https://cdn.jsdelivr.net/npm/marked@5.1.0/marked.min.js';
import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
fetch('/demo/api.md')
fetch('/demo/apiExamples.md')
.then((response) => response.text())
.then((text) => {
const rawHtml = marked.parse(text);
Expand Down
207 changes: 99 additions & 108 deletions demo/api.md → demo/apiExamples.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../api.md) -->
<!-- The below content is automatically added from ./../api.md -->
<!-- The below content is automatically added from ./../api.md -->

# auro-badge

HTML custom element for the use of drawing attention to additional interface information

HTML custom element for the use of drawing attention to additional interface information

## Attributes

| Attribute | Type | Description |
|------------|-----------|--------------------------------------------------|
| `advisory` | `Boolean` | Enables advisory UI |
| `emerald` | `Boolean` | Sets the background color of the badge to the oneworld emerald color |
| `error` | `Boolean` | Enables error UI |
| `label` | `Boolean` | Enables label UI option |
| `pill` | `Boolean` | Enables pill UI option |
| `ruby` | `Boolean` | Sets the background color of the badge to the oneworld ruby color |
| `sapphire` | `Boolean` | Sets the background color of the badge to the oneworld sapphire color |
| `space` | `Boolean` | Adds default spacing spec to badges |
| `success` | `Boolean` | Enables success UI |
|------------|-----------|--------------------------------------------------|
| [advisory](#advisory) | `Boolean` | Enables advisory UI |
| [emerald](#emerald) | `Boolean` | Sets the background color of the badge to the oneworld emerald color |
| [error](#error) | `Boolean` | Enables error UI |
| [label](#label) | `Boolean` | Enables label UI option |
| [pill](#pill) | `Boolean` | Enables pill UI option |
| [ruby](#ruby) | `Boolean` | Sets the background color of the badge to the oneworld ruby color |
| [sapphire](#sapphire) | `Boolean` | Sets the background color of the badge to the oneworld sapphire color |
| [space](#space) | `Boolean` | Adds default spacing spec to badges |
| [success](#success) | `Boolean` | Enables success UI |

## Properties

| Property | Attribute | Type | Default | Description |
|------------|------------|-----------|---------|--------------------------------------------------|
| `disabled` | `disabled` | `Boolean` | false | If set to true button will become disabled and not allow for interactions |
| `target` | `target` | `Boolean` | false | Enables the close functionality |
<!-- AURO-GENERATED-CONTENT:END -->

## Badge API Examples

|------------|------------|-----------|---------|--------------------------------------------------|
| [disabled](#disabled) | `disabled` | `Boolean` | false | If set to true button will become disabled and not allow for interactions |
| [target](#target) | `target` | `Boolean` | false | Enables the close functionality |
<!-- AURO-GENERATED-CONTENT:END -->

## Badge API Examples

### `error`

Use the `error` attribute for a pre-defined use of color.
Expand All @@ -39,17 +40,16 @@ Use the `error` attribute for a pre-defined use of color.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/error.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/error.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/error.html -->

```html
<auro-badge error>Nonstop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge error>Nonstop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `success`

Use the `success` attribute for a pre-defined use of color.
Expand All @@ -61,17 +61,16 @@ Use the `success` attribute for a pre-defined use of color.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/success.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/success.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/success.html -->

```html
<auro-badge success>1 stop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge success>1 stop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `advisory`

Use the `advisory` attribute for a pre-defined use of color.
Expand All @@ -83,17 +82,16 @@ Use the `advisory` attribute for a pre-defined use of color.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/advisory.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/advisory.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/advisory.html -->

```html
<auro-badge advisory>2+ stops</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge advisory>2+ stops</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `emerald`

Use the `emerald` attribute for a pre-defined use of color.
Expand All @@ -105,17 +103,16 @@ Use the `emerald` attribute for a pre-defined use of color.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/emerald.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/emerald.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/emerald.html -->

```html
<auro-badge emerald><b>one</b>world Emerald</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge emerald><b>one</b>world Emerald</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `ruby`

Use the `ruby` attribute for a pre-defined use of color.
Expand All @@ -127,17 +124,16 @@ Use the `ruby` attribute for a pre-defined use of color.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/ruby.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/ruby.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/ruby.html -->

```html
<auro-badge ruby><b>one</b>world Ruby</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge ruby><b>one</b>world Ruby</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `sapphire`

Use the `sapphire` attribute for a pre-defined use of color.
Expand All @@ -149,17 +145,16 @@ Use the `sapphire` attribute for a pre-defined use of color.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/sapphire.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/sapphire.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/sapphire.html -->

```html
<auro-badge sapphire><b>one</b>world Sapphire</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge sapphire><b>one</b>world Sapphire</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `space`

Use the `space` attribute to allow for pre-defined spacing beteen badges.
Expand All @@ -173,19 +168,18 @@ Use the `space` attribute to allow for pre-defined spacing beteen badges.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/space.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/space.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/space.html -->

```html
<auro-badge space>Nonstop</auro-badge>
<auro-badge space>1 stop</auro-badge>
<auro-badge space>2+ stops</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge space>2+ stops</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `disabled`

Use the `disabled` attribute to render any `<auro-badge>` with a innoperable UI.
Expand All @@ -200,20 +194,19 @@ Use the `disabled` attribute to render any `<auro-badge>` with a innoperable UI.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/disabled.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/disabled.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/disabled.html -->

```html
<auro-badge disabled>1 stop</auro-badge>
<auro-badge success disabled>1 stop</auro-badge>
<auro-badge error disabled>1 stop</auro-badge>
<auro-badge advisory disabled>1 stop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge advisory disabled>1 stop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `target`

Use the `target` property to aply the clickable feature.
Expand All @@ -226,18 +219,17 @@ Use the `target` property to aply the clickable feature.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/target.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/target.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/target.html -->

```html
<auro-badge target>Nonstop</auro-badge>
<auro-badge target disabled>1 stop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

<auro-badge target disabled>1 stop</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

### `pill`

Use the `pill` attribute to render a small 'pill size' UI.
Expand All @@ -253,17 +245,16 @@ Use the `pill` attribute to render a small 'pill size' UI.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>

<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/pill.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/pill.html -->
<!-- The below code snippet is automatically added from ./../../apiExamples/pill.html -->

```html
<auro-badge pill>12</auro-badge>
<auro-badge error pill>Danger</auro-badge>
<auro-badge success pill>Flight 167</auro-badge>
<auro-badge advisory pill>99</auro-badge>
<auro-badge pill style="color: var(--auro-color-text-primary-on-light); background-color: var(--auro-color-brand-tropical-300); border-color: var(--auro-color-brand-tropical-300)">Flight 99</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->

<auro-badge pill style="color: var(--auro-color-text-primary-on-light); background-color: var(--auro-color-brand-tropical-300); border-color: var(--auro-color-brand-tropical-300)">Flight 99</auro-badge>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
Loading

0 comments on commit 3b27142

Please sign in to comment.