@aurodesignsystem-dev/auro-tail 0.0.0-pr23.0 → 0.0.0-pr27.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.
@@ -356,7 +356,6 @@
356
356
  "text": "string"
357
357
  },
358
358
  "description": "Sets the airline tail based on the tail codes used in auro-icon (e.g., `AS`, `HA`, `PR`).",
359
- "default": "'AS'",
360
359
  "attribute": "tail"
361
360
  },
362
361
  {
@@ -403,7 +402,6 @@
403
402
  "text": "string"
404
403
  },
405
404
  "description": "Sets the airline tail based on the tail codes used in auro-icon (e.g., `AS`, `HA`, `PR`).",
406
- "default": "'AS'",
407
405
  "fieldName": "tail"
408
406
  },
409
407
  {
package/demo/api.md CHANGED
@@ -12,7 +12,7 @@ The `auro-tail` custom element displays Alaska, Hawaiian, and partner airline ta
12
12
  | badge | badge | | string | | Sets the badge type to display (e.g., `oneworld`). |
13
13
  | href | href | | string | | Sets the href for the tail. |
14
14
  | size | size | | `xs` \| `sm` \| `md` \| `lg` \| `xl` \| `2xl` | `lg` | Sets the size of the tail. |
15
- | tail | tail | | string | `AS` | Sets the airline tail based on the tail codes used in auro-icon (e.g., `AS`, `HA`, `PR`). |
15
+ | tail | tail | | string | | Sets the airline tail based on the tail codes used in auro-icon (e.g., `AS`, `HA`, `PR`). |
16
16
  | variant | variant | | `outline` | | Sets the visual variant of the tail. |
17
17
 
18
18
  ### Methods
@@ -219,6 +219,36 @@ The `tail` attribute is required.
219
219
  <!-- AURO-GENERATED-CONTENT:END -->
220
220
  </auro-accordion>
221
221
 
222
+ ### Fallback
223
+
224
+ When the `tail` attribute is omitted or an unrecognized tail code is provided, `<auro-tail>` gracefully falls back to a default tail livery graphic rather than showing a broken icon.
225
+
226
+ - **No `tail` attribute** — the underlying `<auro-icon>` receives no `name` and renders the default tail livery.
227
+ - **Invalid tail code** (e.g., `tail="INVALID"`) — the icon cannot resolve the requested graphic and falls back to the default tail livery via the `tailFallback` behavior built into `<auro-icon>`.
228
+
229
+ <div class="exampleWrapper">
230
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/fallback.html) -->
231
+ <!-- The below content is automatically added from ../apiExamples/fallback.html -->
232
+ <!-- No tail attribute: the icon has no name and tailFallback renders the default tail livery -->
233
+ <auro-tail></auro-tail>
234
+ <!-- Invalid tail code: the icon cannot find "tail-INVALID" and tailFallback renders the default tail livery -->
235
+ <auro-tail tail="INVALID"></auro-tail>
236
+ <!-- AURO-GENERATED-CONTENT:END -->
237
+ </div>
238
+ <auro-accordion alignRight>
239
+ <span slot="trigger">See code</span>
240
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/fallback.html) -->
241
+ <!-- The below code snippet is automatically added from ../apiExamples/fallback.html -->
242
+
243
+ ```html
244
+ <!-- No tail attribute: the icon has no name and tailFallback renders the default tail livery -->
245
+ <auro-tail></auro-tail>
246
+ <!-- Invalid tail code: the icon cannot find "tail-INVALID" and tailFallback renders the default tail livery -->
247
+ <auro-tail tail="INVALID"></auro-tail>
248
+ ```
249
+ <!-- AURO-GENERATED-CONTENT:END -->
250
+ </auro-accordion>
251
+
222
252
  ### Variant
223
253
 
224
254
  Set the `variant` attribute to change the visual style of the tail.