@aurodesignsystem-dev/auro-tail 0.0.0-pr27.1 → 0.0.0-pr27.3
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/demo/api.md
CHANGED
|
@@ -196,8 +196,6 @@ Set the `tail` attribute to insert a tail graphic from the `<auro-icon>` reposit
|
|
|
196
196
|
|
|
197
197
|
Tail codes from `<auro-icon>` are expected to be UPPERCASE (e.g., `AS`, not `as`).
|
|
198
198
|
|
|
199
|
-
The `tail` attribute is required.
|
|
200
|
-
|
|
201
199
|
<div class="exampleWrapper">
|
|
202
200
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/tail.html) -->
|
|
203
201
|
<!-- The below content is automatically added from ../apiExamples/tail.html -->
|
|
@@ -223,15 +221,15 @@ The `tail` attribute is required.
|
|
|
223
221
|
|
|
224
222
|
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
223
|
|
|
226
|
-
- **No `tail` attribute** —
|
|
227
|
-
- **Invalid tail code** (e.g., `tail="INVALID"`) —
|
|
224
|
+
- **No `tail` attribute** — renders the default tail livery.
|
|
225
|
+
- **Invalid tail code** (e.g., `tail="INVALID"`) — falls back to the default tail livery.
|
|
228
226
|
|
|
229
227
|
<div class="exampleWrapper">
|
|
230
228
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/fallback.html) -->
|
|
231
229
|
<!-- The below content is automatically added from ../apiExamples/fallback.html -->
|
|
232
|
-
<!-- No tail attribute:
|
|
230
|
+
<!-- No tail attribute: renders the default tail livery -->
|
|
233
231
|
<auro-tail></auro-tail>
|
|
234
|
-
<!-- Invalid tail code:
|
|
232
|
+
<!-- Invalid tail code: falls back to the default tail livery -->
|
|
235
233
|
<auro-tail tail="INVALID"></auro-tail>
|
|
236
234
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
237
235
|
</div>
|
|
@@ -241,9 +239,9 @@ When the `tail` attribute is omitted or an unrecognized tail code is provided, `
|
|
|
241
239
|
<!-- The below code snippet is automatically added from ../apiExamples/fallback.html -->
|
|
242
240
|
|
|
243
241
|
```html
|
|
244
|
-
<!-- No tail attribute:
|
|
242
|
+
<!-- No tail attribute: renders the default tail livery -->
|
|
245
243
|
<auro-tail></auro-tail>
|
|
246
|
-
<!-- Invalid tail code:
|
|
244
|
+
<!-- Invalid tail code: falls back to the default tail livery -->
|
|
247
245
|
<auro-tail tail="INVALID"></auro-tail>
|
|
248
246
|
```
|
|
249
247
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -665,7 +665,7 @@ class AuroTail extends i$1 {
|
|
|
665
665
|
const tailContent = u$3`
|
|
666
666
|
<div class="border">
|
|
667
667
|
<div class="container" part="container" role="img" aria-label=${ariaLabel}>
|
|
668
|
-
<${this.iconTag} category="logos" name=${
|
|
668
|
+
<${this.iconTag} category="logos" name=${this.tail ? `tail-${this.tail.toUpperCase()}` : 'tail-DEFAULT'}></${this.iconTag}>
|
|
669
669
|
</div>
|
|
670
670
|
${badge?.icon ? u$3`<div class="badge">${badge.icon()}</div>` : null}
|
|
671
671
|
</div>
|
|
@@ -161,7 +161,7 @@ import{unsafeStatic as e,literal as t,html as a}from"lit/static-html.js";import{
|
|
|
161
161
|
`;class Oe extends o{static isAuroTail=!0;static get styles(){return[De]}static get properties(){return{badge:{type:String},href:{type:String,attribute:"href"},size:{type:String,reflect:!0},tail:{type:String},variant:{type:String,reflect:!0}}}static register(e="auro-tail"){u.prototype.registerComponent(e,Oe)}#e(){this.size="lg"}constructor(){super(),this.#e(),this._carrierType="oa";const e=new h;this.iconTag=e.generateTag("auro-icon","9.1.1",ye),this.hyperlinkTag=e.generateTag("auro-hyperlink","7.1.0",ue),this.runtimeUtils=new u}get carrierType(){const e={aag:["as","ha"],oa:["oa"]},t=this.tail?.toLowerCase();for(const[a,r]of Object.entries(e))if(r.includes(t))return a;return"oa"}_findParentGroup(){let e=this.parentElement;for(;e;){if(He(e))return e;e=e.parentElement}return null}get isInGroup(){return!!this._findParentGroup()}get isInHorizontalGroup(){const e=this._findParentGroup();return!!e&&"horizontal"===e.getAttribute("layout")}get isInDiagonalGroup(){const e=this._findParentGroup();return!!e&&"diagonal"===e.getAttribute("layout")}get badgeConfig(){return this.badge&&!this.isInGroup&&ke.includes(this.size)?we[this.badge]:void 0}get shouldShowLink(){return!!this.href&&!this.isInGroup&&ze.includes(this.size)}get labelTypeClass(){return{md:"body-xs",lg:"body-sm",xl:"body-default","2xl":"body-lg"}[this.size]||"body-sm"}connectedCallback(){super.connectedCallback()}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-tail")}updated(e){e.has("tail")&&(this._carrierType=this.carrierType,this.dataset.carrierType=this.carrierType),super.updated(e)}render(){const e=this.badgeConfig,t=e?function(e,t={}){return e.replace(/\{(\w+)\}/g,(e,a)=>a in t?t[a]:e)}(Be,{badgeAlt:e.alt}):Se,r=a`
|
|
162
162
|
<div class="border">
|
|
163
163
|
<div class="container" part="container" role="img" aria-label=${t}>
|
|
164
|
-
<${this.iconTag} category="logos" name=${
|
|
164
|
+
<${this.iconTag} category="logos" name=${this.tail?`tail-${this.tail.toUpperCase()}`:"tail-DEFAULT"}></${this.iconTag}>
|
|
165
165
|
</div>
|
|
166
166
|
${e?.icon?a`<div class="badge">${e.icon()}</div>`:null}
|
|
167
167
|
</div>
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AuroTail,a as AuroTailGroup}from"./auro-tail-group-
|
|
1
|
+
export{A as AuroTail,a as AuroTailGroup}from"./auro-tail-group-BQfA7yu8.js";import"lit/static-html.js";import"lit";import"lit/directives/if-defined.js";import"lit/directives/class-map.js";import"lit/directives/ref.js";
|
package/dist/registered.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as i,a as t}from"./auro-tail-group-
|
|
1
|
+
import{A as i,a as t}from"./auro-tail-group-BQfA7yu8.js";import"lit/static-html.js";import"lit";import"lit/directives/if-defined.js";import"lit/directives/class-map.js";import"lit/directives/ref.js";i.register(),t.register();
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-tail",
|
|
10
|
-
"version": "0.0.0-pr27.
|
|
10
|
+
"version": "0.0.0-pr27.3",
|
|
11
11
|
"description": "auro-tail HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"lit": "^3.3.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
+
"@alaskaairux/icons": "^5.23.0",
|
|
27
28
|
"@aurodesignsystem/auro-cli": "^3.6.0",
|
|
28
29
|
"@aurodesignsystem/auro-config": "^1.3.1",
|
|
29
30
|
"@aurodesignsystem/auro-hyperlink": "^8.0.2",
|