@redvars/peacock 3.1.0 → 3.1.1

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.
Files changed (138) hide show
  1. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.css.js +3 -3
  2. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.css.js.map +1 -1
  3. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.d.ts +0 -6
  4. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js +0 -6
  5. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js.map +1 -1
  6. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.d.ts +10 -0
  7. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.js +17 -0
  8. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.js.map +1 -0
  9. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.d.ts +1 -0
  10. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.js +33 -0
  11. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.js.map +1 -0
  12. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.d.ts +9 -0
  13. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js +37 -0
  14. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js.map +1 -0
  15. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/index.d.ts +1 -0
  16. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/index.js +2 -0
  17. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/index.js.map +1 -0
  18. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.d.ts +8 -0
  19. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.js +15 -0
  20. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.js.map +1 -0
  21. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.d.ts +0 -6
  22. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js +0 -7
  23. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js.map +1 -1
  24. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.d.ts +8 -1
  25. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.js +11 -4
  26. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.js.map +1 -1
  27. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.d.ts +3 -2
  28. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js +3 -2
  29. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js.map +1 -1
  30. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/index.d.ts +1 -0
  31. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/index.js +2 -0
  32. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/index.js.map +1 -0
  33. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.css.d.ts +2 -0
  34. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.css.js +36 -0
  35. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.css.js.map +1 -0
  36. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.d.ts +12 -0
  37. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.js +18 -0
  38. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/link/link.js.map +1 -0
  39. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js +31 -2
  40. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js.map +1 -1
  41. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/styleMixins.css.d.ts +9 -0
  42. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/styleMixins.css.js +46 -0
  43. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/styleMixins.css.js.map +1 -0
  44. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/text/text.css.d.ts +2 -0
  45. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/text/text.css.js +70 -0
  46. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/text/text.css.js.map +1 -0
  47. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.d.ts +0 -1
  48. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js +0 -7
  49. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js.map +1 -1
  50. package/.rollup.cache/E/git/redvars/peacock/components/dist/tsconfig.tsbuildinfo +1 -1
  51. package/{demo → assets}/tokens.css +60 -48
  52. package/copyDesignFiles.js +11 -0
  53. package/custom-elements-manifest.config.mjs +10 -22
  54. package/custom-elements.md +61 -137
  55. package/demo/index.html +21 -8
  56. package/dist/assets/styles/tokens.css +8 -1
  57. package/dist/{icon-1wpxQtrZ.js → avatar-GQwWRGRw.js} +94 -17
  58. package/dist/avatar-GQwWRGRw.js.map +1 -0
  59. package/dist/avatar-jfcIDB8G.js +424 -0
  60. package/dist/avatar-jfcIDB8G.js.map +1 -0
  61. package/dist/component/avatar.js +12 -8
  62. package/dist/component/avatar.js.map +1 -1
  63. package/dist/component/{Icon.js → icon.js} +96 -9
  64. package/dist/component/icon.js.map +1 -0
  65. package/dist/directive-CKEA2P55.js +70 -0
  66. package/dist/directive-CKEA2P55.js.map +1 -0
  67. package/dist/index.js +40 -61
  68. package/dist/index.js.map +1 -1
  69. package/dist/peacock-loader.js +132 -3
  70. package/dist/peacock-loader.js.map +1 -1
  71. package/dist/src/avatar/avatar.d.ts +0 -6
  72. package/dist/src/avatar/p-avatar.d.ts +10 -0
  73. package/dist/src/badge/badge.css.d.ts +1 -0
  74. package/dist/src/badge/badge.d.ts +9 -0
  75. package/dist/src/badge/index.d.ts +1 -0
  76. package/dist/src/badge/p-badge.d.ts +8 -0
  77. package/dist/src/icon/icon.d.ts +0 -6
  78. package/dist/src/icon/p-icon.d.ts +8 -1
  79. package/dist/src/index.d.ts +3 -2
  80. package/dist/src/link/link.css.d.ts +2 -0
  81. package/dist/src/styleMixins.css.d.ts +9 -0
  82. package/dist/src/text/text.css.d.ts +2 -0
  83. package/dist/src/utils.d.ts +0 -1
  84. package/dist/tsconfig.tsbuildinfo +1 -1
  85. package/dist/web-types.json +78 -0
  86. package/package.json +15 -7
  87. package/readme-gen.mjs +15 -2
  88. package/readme.md +190 -0
  89. package/rollup.config.js +12 -8
  90. package/src/avatar/avatar.css.ts +2 -2
  91. package/src/avatar/avatar.ts +0 -6
  92. package/src/avatar/demo/index.html +2 -2
  93. package/src/avatar/p-avatar.ts +12 -0
  94. package/src/badge/badge.css.ts +33 -0
  95. package/src/badge/badge.ts +29 -0
  96. package/src/badge/demo/index.html +54 -0
  97. package/src/badge/index.ts +1 -0
  98. package/src/badge/p-badge.ts +10 -0
  99. package/src/icon/demo/index.html +4 -4
  100. package/src/icon/icon.ts +1 -7
  101. package/src/icon/p-icon.ts +8 -1
  102. package/src/index.ts +3 -2
  103. package/src/link/link.css.ts +36 -0
  104. package/src/peacock-loader.ts +40 -2
  105. package/src/styleMixins.css.ts +55 -0
  106. package/src/styles.d.ts +11 -0
  107. package/src/text/text.css.ts +76 -0
  108. package/src/utils.ts +0 -8
  109. package/tsconfig.json +1 -1
  110. package/README.md +0 -46
  111. package/dist/component/Icon.js.map +0 -1
  112. package/dist/icon-1wpxQtrZ.js.map +0 -1
  113. package/dist/src/LoaderUtils.js +0 -81
  114. package/dist/src/LoaderUtils.js.map +0 -1
  115. package/dist/src/avatar/avatar.css.js +0 -41
  116. package/dist/src/avatar/avatar.css.js.map +0 -1
  117. package/dist/src/avatar/avatar.js +0 -49
  118. package/dist/src/avatar/avatar.js.map +0 -1
  119. package/dist/src/avatar/index.js +0 -2
  120. package/dist/src/avatar/index.js.map +0 -1
  121. package/dist/src/icon/datasource.js +0 -20
  122. package/dist/src/icon/datasource.js.map +0 -1
  123. package/dist/src/icon/icon.css.js +0 -22
  124. package/dist/src/icon/icon.css.js.map +0 -1
  125. package/dist/src/icon/icon.js +0 -124
  126. package/dist/src/icon/icon.js.map +0 -1
  127. package/dist/src/icon/index.js +0 -2
  128. package/dist/src/icon/index.js.map +0 -1
  129. package/dist/src/icon/p-icon.js +0 -15
  130. package/dist/src/icon/p-icon.js.map +0 -1
  131. package/dist/src/index.js +0 -3
  132. package/dist/src/index.js.map +0 -1
  133. package/dist/src/peacock-loader.js +0 -16
  134. package/dist/src/peacock-loader.js.map +0 -1
  135. package/dist/src/utils.js +0 -101
  136. package/dist/src/utils.js.map +0 -1
  137. package/dist/test/icon.test.js +0 -14
  138. package/dist/test/icon.test.js.map +0 -1
@@ -0,0 +1,424 @@
1
+ /******************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
16
+
17
+
18
+ function __decorate(decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ }
24
+
25
+ function __classPrivateFieldGet(receiver, state, kind, f) {
26
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
27
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
28
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
29
+ }
30
+
31
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
32
+ var e = new Error(message);
33
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
34
+ };
35
+
36
+ /**
37
+ * @license
38
+ * Copyright 2019 Google LLC
39
+ * SPDX-License-Identifier: BSD-3-Clause
40
+ */
41
+ const t$3=globalThis,e$5=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$5&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$4=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n$3(o,t,s$2)},S$1=(s,o)=>{if(e$5)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t$3.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$5?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$4(e)})(t):t;
42
+
43
+ /**
44
+ * @license
45
+ * Copyright 2017 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */const{is:i$3,defineProperty:e$4,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$3,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$3(t,s),b$1={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b$1){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$4(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$3(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.2");
48
+
49
+ /**
50
+ * @license
51
+ * Copyright 2017 Google LLC
52
+ * SPDX-License-Identifier: BSD-3-Clause
53
+ */
54
+ const t$2=globalThis,i$2=t=>t,s$1=t$2.trustedTypes,e$3=s$1?s$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",o$3=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$3,r$2=`<${n$1}>`,l=document,c=()=>l.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,d=t=>u(t)||"function"==typeof t?.[Symbol.iterator],f="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$3?e$3.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r$2:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o$3+x):s+o$3+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t);}else t.startsWith(o$3)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o$3),i=t.length-1;if(i>0){r.textContent=s$1?s$1.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c());}}}else if(8===r.nodeType)if(r.data===n$1)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$3,t+1));)d.push({type:7,index:l}),t+=o$3.length-1;}l++;}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$2(t).nextSibling;i$2(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class I extends H{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class L extends H{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t);}}const B=t$2.litHtmlPolyfillSupport;B?.(S,k),(t$2.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{});}return h._$AI(t),h};
55
+
56
+ /**
57
+ * @license
58
+ * Copyright 2017 Google LLC
59
+ * SPDX-License-Identifier: BSD-3-Clause
60
+ */const s=globalThis;let i$1 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}};i$1._$litElement$=true,i$1["finalized"]=true,s.litElementHydrateSupport?.({LitElement:i$1});const o$2=s.litElementPolyfillSupport;o$2?.({LitElement:i$1});(s.litElementVersions??=[]).push("4.2.2");
61
+
62
+ /**
63
+ * @license
64
+ * Copyright 2017 Google LLC
65
+ * SPDX-License-Identifier: BSD-3-Clause
66
+ */const o$1={attribute:true,type:String,converter:u$1,reflect:false,hasChanged:f$1},r$1=(t=o$1,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,true,r);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,true,r);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
67
+
68
+ /**
69
+ * @license
70
+ * Copyright 2017 Google LLC
71
+ * SPDX-License-Identifier: BSD-3-Clause
72
+ */function r(r){return n({...r,state:true,attribute:false})}
73
+
74
+ /**
75
+ * @license
76
+ * Copyright 2017 Google LLC
77
+ * SPDX-License-Identifier: BSD-3-Clause
78
+ */
79
+ const t$1={ATTRIBUTE:1,CHILD:2},e$2=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
80
+
81
+ /**
82
+ * @license
83
+ * Copyright 2017 Google LLC
84
+ * SPDX-License-Identifier: BSD-3-Clause
85
+ */let e$1 = class e extends i{constructor(i){if(super(i),this.it=A,i.type!==t$1.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===A||null==r)return this._t=void 0,this.it=r;if(r===E)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};e$1.directiveName="unsafeHTML",e$1.resultType=1;
86
+
87
+ /**
88
+ * @license
89
+ * Copyright 2017 Google LLC
90
+ * SPDX-License-Identifier: BSD-3-Clause
91
+ */class t extends e$1{}t.directiveName="unsafeSVG",t.resultType=2;const o=e$2(t);
92
+
93
+ async function createCacheFetch(name) {
94
+ let cache = null;
95
+ // This map tracks requests currently being processed
96
+ const inFlightRequests = new Map();
97
+ try {
98
+ cache = await window.caches.open(name);
99
+ }
100
+ catch (e) {
101
+ console.warn('window.caches access not allowed');
102
+ }
103
+ return async (url) => {
104
+ // 1. Check if we are already fetching this URL
105
+ if (inFlightRequests.has(url)) {
106
+ // Return the existing promise instead of starting a new one
107
+ return inFlightRequests.get(url);
108
+ }
109
+ // 2. Create the main logic as a promise
110
+ const fetchPromise = (async () => {
111
+ const request = new Request(url);
112
+ // Check Cache first
113
+ if (cache) {
114
+ const cachedResponse = await cache.match(request);
115
+ if (cachedResponse) {
116
+ return await cachedResponse.text();
117
+ }
118
+ }
119
+ // Prepare network request
120
+ const urlObj = new URL(request.url);
121
+ const isSameOrigin = urlObj.origin === window.location.origin;
122
+ const response = await fetch(request.url, {
123
+ method: 'GET',
124
+ mode: isSameOrigin ? 'no-cors' : 'cors',
125
+ credentials: isSameOrigin ? 'same-origin' : 'omit',
126
+ });
127
+ // --- Handle 404 ---
128
+ if (response.status === 404) {
129
+ console.error(`[Fetch Error] Resource not found (404): ${url}`);
130
+ return ''; // Return empty string as requested
131
+ }
132
+ const result = await response.text();
133
+ // Update Cache if applicable
134
+ if (cache && response.status === 200) {
135
+ // We clone the response logic by creating a new Response with the text body
136
+ await cache.put(request, new Response(result, {
137
+ status: response.status,
138
+ statusText: response.statusText,
139
+ headers: response.headers,
140
+ }));
141
+ }
142
+ return result;
143
+ })();
144
+ // 3. Store the promise in the map
145
+ inFlightRequests.set(url, fetchPromise);
146
+ try {
147
+ // 4. Wait for the result
148
+ return await fetchPromise;
149
+ }
150
+ finally {
151
+ // 5. Clean up: Remove the promise from the map when done
152
+ // This ensures subsequent calls (after this one finishes) can start fresh
153
+ inFlightRequests.delete(url);
154
+ }
155
+ };
156
+ }
157
+ // Basic sanitization: remove <script>, <foreignObject>, event handler attributes (on*), and iframes
158
+ function sanitizeSvg(rawSvg) {
159
+ try {
160
+ const parser = new DOMParser();
161
+ const doc = parser.parseFromString(rawSvg, 'image/svg+xml');
162
+ // remove script tags
163
+ const scripts = Array.from(doc.querySelectorAll('script'));
164
+ scripts.forEach(n => n.remove());
165
+ // remove foreignObject and iframe-like elements
166
+ const foreigns = Array.from(doc.querySelectorAll('foreignObject, iframe'));
167
+ foreigns.forEach(n => n.remove());
168
+ // remove event handler attributes like onload, onclick, etc.
169
+ const all = Array.from(doc.querySelectorAll('*'));
170
+ all.forEach(el => {
171
+ const attrs = Array.from(el.attributes).filter(a => /^on/i.test(a.name));
172
+ attrs.forEach(a => el.removeAttribute(a.name));
173
+ });
174
+ const el = doc.documentElement;
175
+ if (!el)
176
+ return '';
177
+ // serialize back to string
178
+ const serializer = new XMLSerializer();
179
+ return serializer.serializeToString(el);
180
+ }
181
+ catch (e) {
182
+ // parsing failed; fall back to empty content to avoid injecting unsafe content
183
+ return '';
184
+ }
185
+ }
186
+
187
+ const PROVIDERS = {
188
+ 'material-symbols': (name) => `https://cdn.jsdelivr.net/npm/@material-symbols/svg-500@0.40.1/outlined/${name}.svg`,
189
+ carbon: (name) => `https://cdn.jsdelivr.net/npm/@carbon/icons@11.41.0/svg/32/${name}.svg`,
190
+ };
191
+ const cacheFetch = await createCacheFetch('svg-cache');
192
+ async function fetchSVG(url) {
193
+ if (!url)
194
+ return '';
195
+ return cacheFetch(url);
196
+ }
197
+ async function fetchIcon(name, provider = 'material-symbols') {
198
+ if (!name)
199
+ return '';
200
+ if (!PROVIDERS[provider]) {
201
+ throw new Error(`Provider '${provider}' not found`);
202
+ }
203
+ return fetchSVG(PROVIDERS[provider](name));
204
+ }
205
+
206
+ const styles$1 = i$4 `
207
+ :host {
208
+ display: inline-block;
209
+ line-height: 0;
210
+ --icon-size: inherit;
211
+ --icon-color: inherit;
212
+ }
213
+
214
+ .icon {
215
+ display: inline-block;
216
+ height: var(--icon-size, 1rem);
217
+ width: var(--icon-size, 1rem);
218
+
219
+ svg {
220
+ fill: var(--icon-color);
221
+ height: 100%;
222
+ width: 100%;
223
+ }
224
+ }
225
+ `;
226
+
227
+ class Icon extends i$1 {
228
+ constructor() {
229
+ super(...arguments);
230
+ this.provider = 'material-symbols';
231
+ this.svgContent = '';
232
+ // loading + error states for consumers/tests
233
+ this.loading = false;
234
+ this.error = null;
235
+ // token to avoid race conditions when multiple fetches overlap
236
+ this._fetchId = 0;
237
+ }
238
+ firstUpdated() {
239
+ // perform initial fetch once component is connected and rendered
240
+ this.__scheduleUpdate();
241
+ }
242
+ updated(changedProperties) {
243
+ // only refetch when name or src changed
244
+ if (changedProperties.has('name') || changedProperties.has('src')) {
245
+ this.__scheduleUpdate();
246
+ }
247
+ }
248
+ render() {
249
+ // accessible wrapper; consumers can provide a fallback via <slot name="fallback">.
250
+ return b ` <div class="icon">
251
+ ${this.svgContent
252
+ ? o(this.svgContent)
253
+ : b `<slot name="fallback"></slot>`}
254
+ </div>`;
255
+ }
256
+ // small debounce to coalesce rapid changes (50ms)
257
+ __scheduleUpdate() {
258
+ if (this._debounceTimer) {
259
+ clearTimeout(this._debounceTimer);
260
+ }
261
+ // @ts-ignore - setTimeout in DOM returns number
262
+ this._debounceTimer = window.setTimeout(() => this.__updateSvg(), 50);
263
+ }
264
+ /**
265
+ * @internal
266
+ */
267
+ async __updateSvg() {
268
+ this._fetchId += 1;
269
+ const currentId = this._fetchId;
270
+ this.loading = true;
271
+ this.error = null;
272
+ try {
273
+ let raw;
274
+ if (this.name) {
275
+ raw = await fetchIcon(this.name, this.provider);
276
+ }
277
+ else if (this.src) {
278
+ raw = await fetchSVG(this.src);
279
+ }
280
+ else {
281
+ raw = '';
282
+ }
283
+ // If another fetch started after this one, ignore this result
284
+ if (currentId !== this._fetchId)
285
+ return;
286
+ if (raw) {
287
+ this.svgContent = sanitizeSvg(raw);
288
+ }
289
+ else {
290
+ this.svgContent = '';
291
+ }
292
+ }
293
+ catch (err) {
294
+ // capture and surface error, but avoid throwing
295
+ this.error = err instanceof Error ? err : new Error(String(err));
296
+ this.svgContent = '';
297
+ // bubble an event so consumers can react
298
+ this.dispatchEvent(new CustomEvent('icon-error', {
299
+ detail: { name: this.name, src: this.src, error: this.error },
300
+ bubbles: true,
301
+ composed: true,
302
+ }));
303
+ }
304
+ finally {
305
+ // ensure loading is cleared unless another fetch started
306
+ if (currentId === this._fetchId) {
307
+ this.loading = false;
308
+ }
309
+ }
310
+ }
311
+ }
312
+ Icon.styles = [styles$1];
313
+ __decorate([
314
+ n({ type: String, reflect: true })
315
+ ], Icon.prototype, "name", void 0);
316
+ __decorate([
317
+ n({ type: String, reflect: true })
318
+ ], Icon.prototype, "src", void 0);
319
+ __decorate([
320
+ n({ type: String })
321
+ ], Icon.prototype, "provider", void 0);
322
+ __decorate([
323
+ r()
324
+ ], Icon.prototype, "svgContent", void 0);
325
+ __decorate([
326
+ r()
327
+ ], Icon.prototype, "loading", void 0);
328
+ __decorate([
329
+ r()
330
+ ], Icon.prototype, "error", void 0);
331
+
332
+ /**
333
+ * @license
334
+ * Copyright 2018 Google LLC
335
+ * SPDX-License-Identifier: BSD-3-Clause
336
+ */const e=e$2(class extends i{constructor(t){if(super(t),t.type!==t$1.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter(s=>t[s]).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return E}});
337
+
338
+ const focusRing = (color = 'var(--border-interactive)') => i$4 `
339
+ outline: 2px solid ${r$4(color)};
340
+ `;
341
+ const getTypography = (name) => i$4 `
342
+ font-family: var(--typography-${r$4(name)}-font-family) !important;
343
+ font-size: var(--typography-${r$4(name)}-font-size) !important;
344
+ font-weight: var(--typography-${r$4(name)}-font-weight) !important;
345
+ line-height: var(--typography-${r$4(name)}-line-height) !important;
346
+ letter-spacing: var(
347
+ --typography-${r$4(name)}-letter-spacing
348
+ ) !important;
349
+ `;
350
+
351
+ const styles = i$4 `
352
+ :host {
353
+ display: inline-block;
354
+ pointer-events: none;
355
+ --avatar-size: 2rem;
356
+ --avatar-background-color: var(--color-primary);
357
+ --avatar-text-color: var(--color-on-primary);
358
+ --avatar-border-radius: var(--global-avatar-border-radius);
359
+ }
360
+
361
+ .avatar-container {
362
+ display: flex;
363
+ align-items: center;
364
+ gap: var(--spacing-050);
365
+ line-height: 0;
366
+ }
367
+
368
+ .avatar {
369
+ border-radius: var(--avatar-border-radius);
370
+ display: flex;
371
+ justify-content: center;
372
+ align-items: center;
373
+ color: var(--avatar-text-color);
374
+ width: var(--avatar-size);
375
+ height: var(--avatar-size);
376
+ ${getTypography('body-large-emphasized')}
377
+ background-color: var(--avatar-background-color);
378
+
379
+ font-size: calc(var(--avatar-size) * 0.4);
380
+
381
+ .image {
382
+ width: 100%;
383
+ height: 100%;
384
+ overflow: hidden;
385
+ border-radius: inherit;
386
+ }
387
+ }
388
+ `;
389
+
390
+ class Avatar extends i$1 {
391
+ constructor() {
392
+ super(...arguments);
393
+ this.name = '';
394
+ }
395
+ render() {
396
+ return b `<div class="avatar-container">
397
+ <div
398
+ class=${e({
399
+ avatar: true,
400
+ initials: !this.src,
401
+ image: !!this.src,
402
+ })}
403
+ >
404
+ ${this.src
405
+ ? b `<img class="image" src=${this.src} alt=${this.name} />`
406
+ : b `<div class="initials">${this.__getInitials()}</div>`}
407
+ </div>
408
+ </div>`;
409
+ }
410
+ __getInitials() {
411
+ const [first = '', last = ''] = this.name.split(' ');
412
+ return `${first.charAt(0)}${last.charAt(0)}`.toUpperCase();
413
+ }
414
+ }
415
+ Avatar.styles = [styles];
416
+ __decorate([
417
+ n({ type: String, reflect: true })
418
+ ], Avatar.prototype, "name", void 0);
419
+ __decorate([
420
+ n({ type: String, reflect: true })
421
+ ], Avatar.prototype, "src", void 0);
422
+
423
+ export { Avatar as A, Icon as I, __decorate as _, i$1 as a, __classPrivateFieldGet as b, b as c, r$4 as d, e, focusRing as f, getTypography as g, i$4 as i, n, r };
424
+ //# sourceMappingURL=avatar-jfcIDB8G.js.map