@grasco/profile-picture 0.1.0 → 0.1.2
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/dist/angular.cjs +49 -31
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.d.cts +34 -1
- package/dist/angular.d.ts +34 -1
- package/dist/angular.js +49 -31
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +112 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -4
- package/dist/index.d.ts +59 -4
- package/dist/index.js +112 -93
- package/dist/index.js.map +1 -1
- package/dist/standalone.d.ts +37 -3
- package/dist/standalone.standalone.js +81 -62
- package/dist/standalone.standalone.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/svelte.cjs +49 -31
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.d.cts +34 -1
- package/dist/svelte.d.ts +34 -1
- package/dist/svelte.js +49 -31
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs +49 -31
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +34 -1
- package/dist/vue.d.ts +34 -1
- package/dist/vue.js +49 -31
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import zt,{useRef,useCallback,useEffect}from'react';import {LitElement,nothing,html}from'lit';import {property,state,customElement}from'lit/decorators.js';import {styleMap}from'lit/directives/style-map.js';var Rt=Object.defineProperty;var Tt=Object.getOwnPropertyDescriptor;var s=(r,n,t,e)=>{for(var o=e>1?void 0:e?Tt(n,t):n,a=r.length-1,p;a>=0;a--)(p=r[a])&&(o=(e?p(n,t,o):p(o))||o);return e&&o&&Rt(n,t,o),o};var rt="grasco-profile-picture-styles",M=false;function nt(){if(M||typeof document>"u")return;if(document.getElementById(rt)){M=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){M=true;return}let n=Ut();if(!n)return;let t=document.createElement("link");t.id=rt,t.rel="stylesheet",t.href=n,document.head.appendChild(t),M=true;}function Ut(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let n=import.meta.url;if(n)return `${n.substring(0,n.lastIndexOf("/")+1)}dist/styles.css`}catch{}let r=document.currentScript;if(r?.src){let n=new URL(r.src);return `${n.href.substring(0,n.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var D={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},ot={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},it={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},C={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm"};var R={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},S={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function x(...r){return r.filter(Boolean).join(" ")}function L(r){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(r)}function at(r){return {"top-left":"np:top-0 np:left-0","top-right":"np:top-0 np:right-0","bottom-left":"np:bottom-0 np:left-0","bottom-right":"np:bottom-0 np:right-0"}[r]}function st(r){return {"top-left":"np:-rotate-45 np:-translate-x-1/4 np:-translate-y-1/2","top-right":"np:rotate-45 np:translate-x-1/4 np:-translate-y-1/2","bottom-left":"np:rotate-45 np:-translate-x-1/4 np:translate-y-1/2","bottom-right":"np:-rotate-45 np:translate-x-1/4 np:translate-y-1/2"}[r]}function O(r){let t=r.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,1).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function X(r){return Math.round(r*.38)}function pt(r,n){let e=Math.max(n?18:10,Math.round(r*(n?.32:.22))),o=Math.round(e*.6);return {size:e,fontSize:o}}function dt(r,n){return Math.max(8,Math.round(r*.25))+(n-1)*2}function lt(r,n){return typeof r=="string"?r:n&&r>n?`${n}+`:r.toString()}function ct(r){return r.length===0?"transparent":r.length===1?r[0]:`conic-gradient(${r.map((t,e)=>{let o=e/r.length*360,a=(e+1)/r.length*360;return `${t} ${o}deg ${a}deg`}).join(", ")})`}function Lt(r){let n=0;for(let t=0;t<r.length;t++){let e=r.charCodeAt(t);n=(n<<5)-n+e,n&=n;}return Math.abs(n)}function gt(r,n,t){let o=Math.max(0,Math.min(100,r))/100*360;return `conic-gradient(from 270deg, ${n} 0deg ${o}deg, ${t} ${o}deg 360deg)`}function F(r){let n=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],t=Lt(r)%n.length;return n[t]}function ut(r){return typeof r=="number"?r:D[r]??D[S.size]}function bt(r,n,t){let e=t?n-1:n;if(r<=e)return {visible:r,hidden:0,showCounter:false};let o=e-1,a=r-o;return {visible:o,hidden:a,showCounter:true}}function N(r,n,t,e,o){let a=o??n*(1-t);return r*a}function ft(r,n,t){return t==="ltr"?n-r:r+1}function ht(r,n,t,e){if(r===0)return 0;if(r===1)return n;let o=e??n*(1-t);return n+o*(r-1)}function mt(r){return r>99?"+99":`+${r}`}function Q(r){return r<=80?"80":r<=120?"120":r<=240?"240":r<=480?"480":"960"}function P(r){if(!(r&&L(r)))return "light";let n=r.replace("#","");n.length===3&&(n=n.split("").map(p=>p+p).join(""));let t=Number.parseInt(n.slice(0,2),16),e=Number.parseInt(n.slice(2,4),16),o=Number.parseInt(n.slice(4,6),16);return (.299*t+.587*e+.114*o)/255>.5?"light":"dark"}function _(r,n,t,e,o){let a=r.endsWith("/")?r.slice(0,-1):r,p=`${n}_${t}_${e}.webp`;return `${a}/api/profile-picture/cdn/${p}?hostname=${o}`}function xt(r){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[r]}function vt(r,n){return {className:{1:"np:border",2:"np:border-2",3:"np:border-[3px]",4:"np:border-4",5:"np:border-[5px]",6:"np:border-[6px]",8:"np:border-8"}[r],style:{borderColor:n,borderStyle:"solid"}}}function yt(r,n){return n?{className:"",style:{background:n}}:r?r.includes("gradient")?{className:"",style:{background:r}}:{className:"",style:{backgroundColor:r}}:{className:"",style:{backgroundColor:"#e7e7e7"}}}function wt(r){return {boxShadow:it[r]}}var Bt={shimmer:`
|
|
2
2
|
@keyframes pp-shimmer {
|
|
3
3
|
0% { transform: translateX(-100%); }
|
|
4
4
|
100% { transform: translateX(100%); }
|
|
@@ -36,8 +36,8 @@ import Ce,{useRef,useCallback,useEffect}from'react';import {LitElement,nothing,h
|
|
|
36
36
|
0% { transform: scale(0.8); opacity: 0; }
|
|
37
37
|
50% { transform: scale(1.05); }
|
|
38
38
|
100% { transform: scale(1); opacity: 1; }
|
|
39
|
-
}`},
|
|
40
|
-
`),
|
|
39
|
+
}`},Gt=Object.values(Bt).join(`
|
|
40
|
+
`),Mt=`
|
|
41
41
|
/* Profile Picture Component Styles */
|
|
42
42
|
.pp-container {
|
|
43
43
|
--pp-transition-duration: 200ms;
|
|
@@ -160,7 +160,18 @@ import Ce,{useRef,useCallback,useEffect}from'react';import {LitElement,nothing,h
|
|
|
160
160
|
line-height: 1;
|
|
161
161
|
animation: pp-badge-bounce 0.4s var(--pp-spring-timing);
|
|
162
162
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
|
|
163
|
-
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.pp-badge-with-icon {
|
|
166
|
+
gap: 4px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.pp-badge-icon {
|
|
170
|
+
display: inline-flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
line-height: 1;
|
|
174
|
+
flex-shrink: 0;
|
|
164
175
|
}
|
|
165
176
|
|
|
166
177
|
.pp-badge-pulse {
|
|
@@ -201,12 +212,18 @@ import Ce,{useRef,useCallback,useEffect}from'react';import {LitElement,nothing,h
|
|
|
201
212
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
202
213
|
-webkit-mask-composite: xor;
|
|
203
214
|
mask-composite: exclude;
|
|
215
|
+
transition: background 0.3s ease;
|
|
204
216
|
}
|
|
205
217
|
|
|
206
218
|
.pp-ring-animated {
|
|
207
219
|
animation: pp-ring-rotate 3s linear infinite;
|
|
208
220
|
}
|
|
209
221
|
|
|
222
|
+
.pp-ring-progress {
|
|
223
|
+
/* Progress rings should not animate rotation */
|
|
224
|
+
animation: none;
|
|
225
|
+
}
|
|
226
|
+
|
|
210
227
|
/* Presence indicator */
|
|
211
228
|
.pp-presence {
|
|
212
229
|
position: absolute;
|
|
@@ -242,8 +259,8 @@ import Ce,{useRef,useCallback,useEffect}from'react';import {LitElement,nothing,h
|
|
|
242
259
|
transition: none !important;
|
|
243
260
|
}
|
|
244
261
|
}
|
|
245
|
-
`,
|
|
246
|
-
${
|
|
262
|
+
`,Ct=`${Gt}
|
|
263
|
+
${Mt}`,St=`
|
|
247
264
|
@keyframes np-shimmer {
|
|
248
265
|
0% { background-position: -200% 0; }
|
|
249
266
|
100% { background-position: 200% 0; }
|
|
@@ -253,7 +270,7 @@ ${Le}`,xe=`
|
|
|
253
270
|
background-size: 200% 100%;
|
|
254
271
|
animation: np-shimmer 1.5s infinite;
|
|
255
272
|
}
|
|
256
|
-
`;function
|
|
273
|
+
`;function kt(r,n=.3){if(L(r)){let t=Number.parseInt(r.slice(1,3),16),e=Number.parseInt(r.slice(3,5),16),o=Number.parseInt(r.slice(5,7),16);return `0 0 20px 0 rgba(${t}, ${e}, ${o}, ${n})`}return `0 0 20px 0 ${r}`}var Ot=`
|
|
257
274
|
@keyframes ppg-tooltip-in {
|
|
258
275
|
from {
|
|
259
276
|
opacity: 0;
|
|
@@ -284,7 +301,7 @@ ${Le}`,xe=`
|
|
|
284
301
|
transform: translateY(-4px) scale(1.08);
|
|
285
302
|
}
|
|
286
303
|
}
|
|
287
|
-
`,
|
|
304
|
+
`,Ft=`
|
|
288
305
|
/* Profile Picture Group Container */
|
|
289
306
|
.ppg-container {
|
|
290
307
|
--ppg-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -635,76 +652,77 @@ ${Le}`,xe=`
|
|
|
635
652
|
border-color: rgba(255, 255, 255, 0.1);
|
|
636
653
|
}
|
|
637
654
|
}
|
|
638
|
-
|
|
639
|
-
${
|
|
640
|
-
${this.placeholder==="shimmer"?html`<style>${
|
|
655
|
+
`,$t=`${Ot}
|
|
656
|
+
${Ft}`;var i=class extends LitElement{constructor(){super(...arguments);this.src="";this.alt="";this.size=C.size;this.variant=C.variant;this.shadow=C.shadow;this.border=false;this.borderWidth=C.borderWidth;this.borderColor=C.borderColor;this.rotation=0;this.loading=C.loading;this.placeholder=C.placeholder;this.placeholderColor=C.placeholderColor;this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.RETRY_DELAY_MS=3e4;}static setCdnBaseUrl(t){i.cdnBaseUrl=t,i.instances.forEach(e=>{e.extCustomerId&&!e.cdnImageUrl&&(e.cdnLoadFailed=false,e.retryTimeoutId&&(clearTimeout(e.retryTimeoutId),e.retryTimeoutId=void 0),e.previousExtCustomerId||(e.previousExtCustomerId=e.extCustomerId),e.loadCdnImage());});}static getCdnBaseUrl(){return i.cdnBaseUrl}createRenderRoot(){return i.injectStylesOnce(),this}static injectStylesOnce(){if(i.stylesInjected||typeof document>"u")return;let t=document.createElement("style");t.textContent=Ct,document.head.appendChild(t),i.stylesInjected=true;}get pixelSize(){let t=this.size;return typeof t=="number"?t:D[t]??D[C.size]}connectedCallback(){super.connectedCallback(),i.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),i.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&i.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(t){super.updated(t),this.extCustomerId&&i.cdnBaseUrl&&!this.cdnImageUrl&&(this.cdnLoadFailed||!this.previousExtCustomerId)&&(this.previousExtCustomerId||(this.previousExtCustomerId=this.extCustomerId),this.cdnLoadFailed=false,this.loadCdnImage());}willUpdate(t){t.has("src")&&this.src!==this.previousSrc&&(this.isLoaded=false,this.hasError=false,this.previousSrc=this.src),(t.has("extCustomerId")||t.has("size")||t.has("bgColor"))&&this.extCustomerId!==this.previousExtCustomerId&&(this.previousExtCustomerId=this.extCustomerId,this.cdnImageUrl=void 0,this.cdnLoadFailed=false,this.isLoaded=false,this.hasError=false,this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0),this.loadCdnImage());}handleLoad(){this.isLoaded=true,this.dispatchEvent(new CustomEvent("load",{bubbles:true,composed:true}));}handleError(){if(this.cdnImageUrl&&!this.cdnLoadFailed){this.cdnLoadFailed=true,this.cdnImageUrl=void 0,this.dispatchEvent(new CustomEvent("cdn-error",{bubbles:true,composed:true,detail:{error:"Image load failed"}})),this.retryTimeoutId&&clearTimeout(this.retryTimeoutId),this.retryTimeoutId=setTimeout(()=>{this.retryTimeoutId=void 0,this.extCustomerId&&i.cdnBaseUrl&&(this.cdnLoadFailed=false,this.hasError=false,this.isLoaded=false,this.loadCdnImage());},this.RETRY_DELAY_MS);return}this.hasError=true,this.isLoaded=true,this.dispatchEvent(new CustomEvent("error",{bubbles:true,composed:true}));}loadCdnImage(){if(!(this.extCustomerId&&i.cdnBaseUrl)){this.cdnLoadFailed=true;return}let t=Q(this.pixelSize),e=P(this.bgColor),o=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=_(i.cdnBaseUrl,this.extCustomerId,t,e,o);}getContainerStyles(){let t=yt(this.bgColor,this.bgGradient),e=this.border?vt(this.borderWidth,this.borderColor):null,o=wt(this.shadow),a={};if(this.glow){let l=this.glow.color??this.borderColor??"#6366f1";a={"--pp-glow-color":l,boxShadow:kt(l,this.glow.intensity??.3)};}let p=this.interactive?.hoverable||this.interactive?.pressable;return {classes:x("pp-container",xt(this.variant),t.className,e?.className,p&&"pp-interactive",this.glow?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:R[this.variant],...t.style,...e?.style,...o,...a,cursor:this.interactive?.cursor??(p?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0}}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return nothing;let t={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return html`
|
|
657
|
+
${this.placeholder==="shimmer"?html`<style>${St}</style>`:nothing}
|
|
641
658
|
<div
|
|
642
|
-
class=${
|
|
659
|
+
class=${x("np:absolute np:inset-0",t)}
|
|
643
660
|
style=${styleMap({backgroundColor:this.placeholderColor,borderRadius:"inherit"})}>
|
|
644
661
|
</div>
|
|
645
662
|
`}renderFallback(){if(this.fallback)return html`
|
|
646
663
|
<span
|
|
647
664
|
class="pp-fallback"
|
|
648
|
-
style=${styleMap({fontSize:`${
|
|
665
|
+
style=${styleMap({fontSize:`${X(this.pixelSize)}px`})}>
|
|
649
666
|
${this.fallback}
|
|
650
667
|
</span>
|
|
651
|
-
`;if(this.alt){let
|
|
668
|
+
`;if(this.alt){let e=F(this.alt);return html`
|
|
652
669
|
<div
|
|
653
670
|
class="pp-fallback np:absolute np:inset-0"
|
|
654
|
-
style=${styleMap({background:this.bgColor??
|
|
671
|
+
style=${styleMap({background:this.bgColor??e,fontSize:`${X(this.pixelSize)}px`})}>
|
|
655
672
|
${O(this.alt)}
|
|
656
673
|
</div>
|
|
657
|
-
`}let
|
|
674
|
+
`}let t=this.pixelSize*.5;return html`
|
|
658
675
|
<svg
|
|
659
676
|
class="pp-fallback-icon"
|
|
660
|
-
style="width: ${
|
|
677
|
+
style="width: ${t}px; height: ${t}px;"
|
|
661
678
|
fill="currentColor"
|
|
662
679
|
viewBox="0 0 24 24">
|
|
663
680
|
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
|
|
664
681
|
</svg>
|
|
665
|
-
`}renderImage(){return this.
|
|
682
|
+
`}renderImage(){let t=!!(this.extCustomerId&&i.cdnBaseUrl),e;return this.cdnImageUrl?e=this.cdnImageUrl:(!t||this.cdnLoadFailed)&&(e=this.src),this.hasError||!e?this.renderFallback():html`
|
|
666
683
|
<img
|
|
667
|
-
src=${
|
|
684
|
+
src=${e}
|
|
668
685
|
alt=${this.alt}
|
|
669
686
|
loading=${this.loading}
|
|
670
687
|
decoding="async"
|
|
671
688
|
@load=${this.handleLoad}
|
|
672
689
|
@error=${this.handleError}
|
|
673
|
-
class=${
|
|
690
|
+
class=${x("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
|
|
674
691
|
draggable="false" />
|
|
675
|
-
`}renderRing(){if(!this.ring?.show)return nothing;let
|
|
692
|
+
`}renderRing(){if(!this.ring?.show)return nothing;let t=this.ring.width??3,e=this.ring.gap??3,o=t+e,a,p=this.ring.progress!==void 0;if(p){let l=this.ring.progress??0,u=this.ring.color??"#30D158",b=this.ring.emptyColor??"#8E8E93";a=gt(l,u,b);}else this.ring.gradient&&this.ring.gradient.length>0?a=ct(this.ring.gradient):a=this.ring.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return html`
|
|
676
693
|
<div
|
|
677
|
-
class=${
|
|
678
|
-
style=${styleMap({inset:`-${
|
|
694
|
+
class=${x("pp-ring",this.ring.animate&&!p&&"pp-ring-animated",p&&"pp-ring-progress")}
|
|
695
|
+
style=${styleMap({inset:`-${o}px`,padding:`${t}px`,background:a,borderRadius:R[this.variant]})}>
|
|
679
696
|
</div>
|
|
680
|
-
`}renderPresence(){if(!this.presence)return nothing;let
|
|
697
|
+
`}renderPresence(){if(!this.presence)return nothing;let t=this.presence.thickness??2,e=dt(this.pixelSize,t),o=ot[this.presence.status],a=Math.max(0,this.pixelSize*.02);return html`
|
|
681
698
|
<div
|
|
682
|
-
class=${
|
|
683
|
-
style=${styleMap({width:`${
|
|
699
|
+
class=${x("pp-presence",this.presence.animate&&"pp-presence-animated")}
|
|
700
|
+
style=${styleMap({width:`${e}px`,height:`${e}px`,backgroundColor:o,bottom:`${a}px`,right:`${a}px`,color:o})}
|
|
684
701
|
title=${this.presence.status}>
|
|
685
702
|
</div>
|
|
686
|
-
`}renderBadge(){if(!this.badge)return nothing;let
|
|
703
|
+
`}renderBadge(){if(!this.badge)return nothing;let t=this.badge.position??"bottom-right",e=this.badge.content!==void 0,o=this.badge.icon!==void 0,a=e||o,{size:p,fontSize:l}=pt(this.pixelSize,a),u=this.badge.bgColor??"#22c55e",b=this.badge.color??"#ffffff",h=e&&this.badge.content!==void 0?lt(this.badge.content,this.badge.max):null,k=o?this.badge.icon:null,$=l*.9,E={"top-left":{top:"-4px",left:"-4px"},"top-right":{top:"-4px",right:"-4px"},"bottom-left":{bottom:"-4px",left:"-4px"},"bottom-right":{bottom:"-4px",right:"-4px"}};return html`
|
|
687
704
|
<div
|
|
688
|
-
class=${
|
|
689
|
-
style=${styleMap({width:
|
|
690
|
-
${
|
|
705
|
+
class=${x("pp-badge",this.badge.pulse&&"pp-badge-pulse",this.badge.glow&&"pp-badge-glow",o&&"pp-badge-with-icon")}
|
|
706
|
+
style=${styleMap({width:a?"auto":`${p}px`,minWidth:`${p}px`,height:`${p}px`,padding:a?"0 6px":"0",fontSize:`${l}px`,backgroundColor:u,color:b,"--pp-badge-glow-color":u,gap:o&&e?"4px":"0",...E[t]})}>
|
|
707
|
+
${k?html`<span class="pp-badge-icon" style=${styleMap({fontSize:`${$}px`})}>${k}</span>`:nothing}
|
|
708
|
+
${h??nothing}
|
|
691
709
|
</div>
|
|
692
|
-
`}renderRibbon(){if(!this.ribbon)return nothing;let
|
|
710
|
+
`}renderRibbon(){if(!this.ribbon)return nothing;let t=this.ribbon.position??"top-right",e=this.ribbon.bgColor??"#ef4444",o=this.ribbon.color??"#ffffff",a=L(e)?{backgroundColor:e}:{background:e},p={color:o},l=this.pixelSize*.9,u=this.pixelSize*.4,b=Math.max(8,this.pixelSize*.11);return html`
|
|
693
711
|
<div
|
|
694
|
-
class=${
|
|
695
|
-
style=${styleMap({width:`${
|
|
712
|
+
class=${x("pp-ribbon-container",at(t))}
|
|
713
|
+
style=${styleMap({width:`${l}px`,height:`${u}px`})}>
|
|
696
714
|
<div
|
|
697
|
-
class=${
|
|
698
|
-
style=${styleMap({fontSize:`${
|
|
715
|
+
class=${x("pp-ribbon np:origin-center np:transform",st(t))}
|
|
716
|
+
style=${styleMap({fontSize:`${b}px`,padding:`${b*.3}px 0`,...a,...p})}>
|
|
699
717
|
${this.ribbon.icon?html`<span style="margin-right: 2px">${this.ribbon.icon}</span>`:nothing}
|
|
700
718
|
${this.ribbon.text}
|
|
701
719
|
</div>
|
|
702
720
|
</div>
|
|
703
|
-
`}render(){let
|
|
721
|
+
`}render(){let t=this.getContainerStyles(),e=this.interactive?.focusable||this.interactive?.pressable?0:void 0;return html`
|
|
704
722
|
<div
|
|
705
|
-
class=${
|
|
706
|
-
style=${styleMap(
|
|
707
|
-
tabindex=${
|
|
723
|
+
class=${t.classes}
|
|
724
|
+
style=${styleMap(t.styles)}
|
|
725
|
+
tabindex=${e??nothing}
|
|
708
726
|
role=${this.interactive?.pressable?"button":nothing}
|
|
709
727
|
aria-label=${this.alt||nothing}
|
|
710
728
|
data-profile-picture>
|
|
@@ -715,7 +733,7 @@ ${Ge}`;var s=class extends LitElement{constructor(){super(...arguments);this.src
|
|
|
715
733
|
<!-- Inner container for image clipping -->
|
|
716
734
|
<div
|
|
717
735
|
class="pp-inner"
|
|
718
|
-
style=${styleMap({borderRadius:
|
|
736
|
+
style=${styleMap({borderRadius:R[this.variant]})}>
|
|
719
737
|
<!-- Placeholder -->
|
|
720
738
|
${this.renderPlaceholder()}
|
|
721
739
|
|
|
@@ -732,57 +750,58 @@ ${Ge}`;var s=class extends LitElement{constructor(){super(...arguments);this.src
|
|
|
732
750
|
<!-- Presence Indicator -->
|
|
733
751
|
${this.renderPresence()}
|
|
734
752
|
</div>
|
|
735
|
-
`}};
|
|
753
|
+
`}};i.stylesInjected=false,i.cdnBaseUrl="",i.instances=new Set,s([property({type:String})],i.prototype,"src",2),s([property({type:String})],i.prototype,"alt",2),s([property({type:String,attribute:"ext-customer-id"})],i.prototype,"extCustomerId",2),s([property({type:String})],i.prototype,"size",2),s([property({type:String})],i.prototype,"variant",2),s([property({type:String})],i.prototype,"shadow",2),s([property({type:Boolean})],i.prototype,"border",2),s([property({type:Number,attribute:"border-width"})],i.prototype,"borderWidth",2),s([property({type:String,attribute:"border-color"})],i.prototype,"borderColor",2),s([property({type:Number})],i.prototype,"rotation",2),s([property({type:String,attribute:"bg-color"})],i.prototype,"bgColor",2),s([property({type:String,attribute:"bg-gradient"})],i.prototype,"bgGradient",2),s([property({type:Object,attribute:"ring",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],i.prototype,"ring",2),s([property({type:Object,attribute:"presence",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],i.prototype,"presence",2),s([property({type:Object,attribute:"glow",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],i.prototype,"glow",2),s([property({type:Object,attribute:"ribbon",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],i.prototype,"ribbon",2),s([property({type:Object,attribute:"badge",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],i.prototype,"badge",2),s([property({type:String})],i.prototype,"loading",2),s([property({type:String})],i.prototype,"placeholder",2),s([property({type:String,attribute:"placeholder-color"})],i.prototype,"placeholderColor",2),s([property({type:String})],i.prototype,"fallback",2),s([property({type:Object,attribute:"interactive",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],i.prototype,"interactive",2),s([state()],i.prototype,"isLoaded",2),s([state()],i.prototype,"hasError",2),s([state()],i.prototype,"cdnImageUrl",2),s([state()],i.prototype,"cdnLoadFailed",2),i=s([customElement("profile-picture")],i);var It=false;function Wt(){if(It||typeof document>"u")return;let r=document.createElement("style");r.textContent=$t,document.head.appendChild(r),It=true;}var g=class extends LitElement{constructor(){super(...arguments);this.max=S.max;this.direction=S.direction;this.overlap=S.overlap;this.size=S.size;this.showAddButton=false;this.addButtonLabel="Add user";this.animated=S.animated;this.rotationAmount=0;this.users=[];this.dropdownOpen=false;this.tooltipData=null;this.tooltipTimeout=null;this.slotObserver=null;this.handleBackdropClick=()=>{this.dropdownOpen=false;};}createRenderRoot(){return Wt(),this}get pixelSize(){return ut(this.size)}get tooltipEnabled(){return this.tooltip?.enabled!==false}get tooltipPosition(){return this.tooltip?.position??"top"}get tooltipDelay(){return this.tooltip?.delay??S.tooltipDelay}get dropdownMaxHeight(){return this.dropdown?.maxHeight??S.dropdownMaxHeight}get showPresence(){return this.dropdown?.showPresence!==false}get dropdownPosition(){return this.dropdown?.position??"bottom"}connectedCallback(){super.connectedCallback(),this.updateUsers(),this.setupSlotObserver();}disconnectedCallback(){super.disconnectedCallback(),this.slotObserver?.disconnect(),this.clearTooltipTimeout();}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.updateUsers();}),this.slotObserver.observe(this,{childList:true,subtree:true,attributes:true,attributeFilter:["src","alt","data-user-id","data-status","variant","shadow","border","border-width","border-color","bg-color","bg-gradient"]});}updateUsers(){let t=Array.from(this.children).filter(e=>e.tagName.toLowerCase()==="profile-picture"&&e.getAttribute("slot")!=="internal");this.users=t.map((e,o)=>{let a=e.getAttribute("border-width"),p=a?Number.parseInt(a,10):void 0;return {id:e.getAttribute("data-user-id")??void 0,name:e.getAttribute("alt")??`User ${o+1}`,src:e.getAttribute("src")??void 0,status:e.getAttribute("data-status")??void 0,element:e,index:o,variant:e.getAttribute("variant")??void 0,shadow:e.getAttribute("shadow")??void 0,border:e.hasAttribute("border"),borderWidth:p,borderColor:e.getAttribute("border-color")??void 0,bgColor:e.getAttribute("bg-color")??void 0,bgGradient:e.getAttribute("bg-gradient")??void 0}});for(let e of this.users)e.element&&(e.element.style.display="none");}handleAvatarClick(t){this.dispatchEvent(new CustomEvent("avatar-click",{detail:{user:t},bubbles:true,composed:true}));}handleAvatarHover(t,e){if(!this.tooltipEnabled)return;this.clearTooltipTimeout();let o=e.currentTarget;this.tooltipTimeout=window.setTimeout(()=>{this.tooltipData={user:t,rect:o.getBoundingClientRect()};},this.tooltipDelay),this.dispatchEvent(new CustomEvent("avatar-hover",{detail:{user:t},bubbles:true,composed:true}));}handleAvatarLeave(){this.clearTooltipTimeout(),this.tooltipData=null;}clearTooltipTimeout(){this.tooltipTimeout&&(window.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=null);}handleCounterClick(t){this.dropdownOpen=!this.dropdownOpen,this.dispatchEvent(new CustomEvent("counter-click",{detail:{hiddenUsers:t,open:this.dropdownOpen},bubbles:true,composed:true}));}handleDropdownItemClick(t){this.dropdownOpen=false,this.dispatchEvent(new CustomEvent("dropdown-item-click",{detail:{user:t},bubbles:true,composed:true}));}handleAddClick(){this.dispatchEvent(new CustomEvent("add-click",{bubbles:true,composed:true}));}handleKeyDown(t,e){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),e());}renderAvatar(t,e,o){let a=N(e,this.pixelSize,this.overlap,this.direction,this.spacing),p=ft(e,o,this.direction),l=t.variant??"circle",u=t.shadow??"none",b=this.rotationAmount?e%2===0?-this.rotationAmount:this.rotationAmount:0;return html`
|
|
736
754
|
<div
|
|
737
755
|
class="ppg-avatar-wrapper"
|
|
738
756
|
style=${styleMap({left:`${a}px`,zIndex:String(p),width:`${this.pixelSize}px`,height:`${this.pixelSize}px`})}
|
|
739
757
|
tabindex="0"
|
|
740
758
|
role="button"
|
|
741
|
-
aria-label=${
|
|
742
|
-
@click=${()=>this.handleAvatarClick(
|
|
743
|
-
@mouseenter=${
|
|
759
|
+
aria-label=${t.name}
|
|
760
|
+
@click=${()=>this.handleAvatarClick(t)}
|
|
761
|
+
@mouseenter=${h=>this.handleAvatarHover(t,h)}
|
|
744
762
|
@mouseleave=${this.handleAvatarLeave}
|
|
745
|
-
@keydown=${
|
|
763
|
+
@keydown=${h=>this.handleKeyDown(h,()=>this.handleAvatarClick(t))}
|
|
746
764
|
>
|
|
747
|
-
${this.renderProfilePicture(
|
|
765
|
+
${this.renderProfilePicture(t,l,u,b)}
|
|
748
766
|
</div>
|
|
749
|
-
`}renderProfilePicture(e,
|
|
767
|
+
`}renderProfilePicture(t,e,o,a){return html`
|
|
750
768
|
<profile-picture
|
|
751
|
-
.src=${
|
|
752
|
-
.alt=${
|
|
769
|
+
.src=${t.src??""}
|
|
770
|
+
.alt=${t.name}
|
|
753
771
|
.size=${this.pixelSize}
|
|
754
|
-
.variant=${
|
|
755
|
-
.shadow=${
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
.
|
|
759
|
-
.
|
|
760
|
-
.
|
|
761
|
-
|
|
762
|
-
data-
|
|
772
|
+
.variant=${e}
|
|
773
|
+
.shadow=${o}
|
|
774
|
+
.rotation=${a}
|
|
775
|
+
?border=${t.border}
|
|
776
|
+
.borderWidth=${t.border?t.borderWidth??2:2}
|
|
777
|
+
.borderColor=${t.border?t.borderColor??"#ffffff":"#ffffff"}
|
|
778
|
+
.bgColor=${t.bgGradient?void 0:t.bgColor??"#ffffff"}
|
|
779
|
+
.bgGradient=${t.bgGradient??void 0}
|
|
780
|
+
data-user-id=${t.id??""}
|
|
781
|
+
data-status=${t.status??""}
|
|
763
782
|
></profile-picture>
|
|
764
|
-
`}renderCounter(e
|
|
783
|
+
`}renderCounter(t,e){return html`
|
|
765
784
|
<button
|
|
766
785
|
class="ppg-counter"
|
|
767
|
-
style=${styleMap({left:`${
|
|
768
|
-
aria-label=${`${
|
|
786
|
+
style=${styleMap({left:`${e}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
|
|
787
|
+
aria-label=${`${t} more users`}
|
|
769
788
|
aria-expanded=${this.dropdownOpen}
|
|
770
789
|
aria-haspopup="true"
|
|
771
|
-
@click=${()=>this.handleCounterClick(this.users.slice(-
|
|
790
|
+
@click=${()=>this.handleCounterClick(this.users.slice(-t))}
|
|
772
791
|
>
|
|
773
|
-
${
|
|
792
|
+
${mt(t)}
|
|
774
793
|
</button>
|
|
775
|
-
`}renderAddButton(
|
|
794
|
+
`}renderAddButton(t){let e=Math.round(this.pixelSize*.4);return html`
|
|
776
795
|
<button
|
|
777
796
|
class="ppg-add-button"
|
|
778
|
-
style=${styleMap({left:`${
|
|
797
|
+
style=${styleMap({left:`${t}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
|
|
779
798
|
aria-label=${this.addButtonLabel}
|
|
780
799
|
@click=${this.handleAddClick}
|
|
781
800
|
>
|
|
782
801
|
<svg
|
|
783
802
|
class="ppg-add-icon"
|
|
784
|
-
width=${
|
|
785
|
-
height=${
|
|
803
|
+
width=${e}
|
|
804
|
+
height=${e}
|
|
786
805
|
viewBox="0 0 24 24"
|
|
787
806
|
fill="none"
|
|
788
807
|
stroke="currentColor"
|
|
@@ -794,16 +813,16 @@ ${Ge}`;var s=class extends LitElement{constructor(){super(...arguments);this.src
|
|
|
794
813
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
795
814
|
</svg>
|
|
796
815
|
</button>
|
|
797
|
-
`}renderTooltip(){if(!this.tooltipData)return nothing;let{user:
|
|
816
|
+
`}renderTooltip(){if(!this.tooltipData)return nothing;let{user:t,rect:e}=this.tooltipData,o=8,a,p;return this.tooltipPosition==="bottom"?(a=e.bottom+o,p=e.left+e.width/2):(a=e.top-o,p=e.left+e.width/2),html`
|
|
798
817
|
<div
|
|
799
818
|
class="ppg-tooltip"
|
|
800
|
-
style=${styleMap({top:this.tooltipPosition==="top"?"auto":`${a}px`,bottom:this.tooltipPosition==="top"?`${window.innerHeight-
|
|
819
|
+
style=${styleMap({top:this.tooltipPosition==="top"?"auto":`${a}px`,bottom:this.tooltipPosition==="top"?`${window.innerHeight-e.top+o}px`:"auto",left:`${p}px`,transform:"translateX(-50%)"})}
|
|
801
820
|
data-position=${this.tooltipPosition}
|
|
802
821
|
role="tooltip"
|
|
803
822
|
>
|
|
804
|
-
${
|
|
823
|
+
${t.name}
|
|
805
824
|
</div>
|
|
806
|
-
`}renderDropdown(
|
|
825
|
+
`}renderDropdown(t){return this.dropdownOpen?html`
|
|
807
826
|
<div
|
|
808
827
|
class="ppg-backdrop"
|
|
809
828
|
@click=${this.handleBackdropClick}
|
|
@@ -816,50 +835,50 @@ ${Ge}`;var s=class extends LitElement{constructor(){super(...arguments);this.src
|
|
|
816
835
|
aria-label="Hidden users"
|
|
817
836
|
>
|
|
818
837
|
<div class="ppg-dropdown-header">
|
|
819
|
-
${
|
|
838
|
+
${t.length} more
|
|
820
839
|
</div>
|
|
821
840
|
<div
|
|
822
841
|
class="ppg-dropdown-list"
|
|
823
842
|
style=${styleMap({maxHeight:`${this.dropdownMaxHeight}px`})}
|
|
824
843
|
>
|
|
825
|
-
${
|
|
844
|
+
${t.map(e=>this.renderDropdownItem(e))}
|
|
826
845
|
</div>
|
|
827
846
|
</div>
|
|
828
|
-
`:nothing}renderDropdownItem(
|
|
847
|
+
`:nothing}renderDropdownItem(t){let e=F(t.name);return html`
|
|
829
848
|
<div
|
|
830
849
|
class="ppg-dropdown-item"
|
|
831
850
|
role="menuitem"
|
|
832
851
|
tabindex="0"
|
|
833
|
-
@click=${()=>this.handleDropdownItemClick(
|
|
834
|
-
@keydown=${
|
|
852
|
+
@click=${()=>this.handleDropdownItemClick(t)}
|
|
853
|
+
@keydown=${o=>this.handleKeyDown(o,()=>this.handleDropdownItemClick(t))}
|
|
835
854
|
>
|
|
836
|
-
${
|
|
855
|
+
${t.src?html`<img
|
|
837
856
|
class="ppg-dropdown-avatar"
|
|
838
|
-
src=${
|
|
839
|
-
alt=${
|
|
857
|
+
src=${t.src}
|
|
858
|
+
alt=${t.name}
|
|
840
859
|
/>`:html`<div
|
|
841
860
|
class="ppg-dropdown-avatar-fallback"
|
|
842
|
-
style=${styleMap({background:
|
|
861
|
+
style=${styleMap({background:e})}
|
|
843
862
|
>
|
|
844
|
-
${O(
|
|
863
|
+
${O(t.name)}
|
|
845
864
|
</div>`}
|
|
846
865
|
<div class="ppg-dropdown-info">
|
|
847
|
-
<div class="ppg-dropdown-name">${
|
|
848
|
-
${this.showPresence&&
|
|
866
|
+
<div class="ppg-dropdown-name">${t.name}</div>
|
|
867
|
+
${this.showPresence&&t.status?html`
|
|
849
868
|
<div class="ppg-dropdown-status">
|
|
850
869
|
<span
|
|
851
870
|
class="ppg-dropdown-presence"
|
|
852
|
-
data-status=${
|
|
871
|
+
data-status=${t.status}
|
|
853
872
|
></span>
|
|
854
|
-
${this.formatStatus(
|
|
873
|
+
${this.formatStatus(t.status)}
|
|
855
874
|
</div>
|
|
856
875
|
`:nothing}
|
|
857
876
|
</div>
|
|
858
877
|
</div>
|
|
859
|
-
`}formatStatus(
|
|
878
|
+
`}formatStatus(t){return {online:"Online",away:"Away",busy:"Busy",offline:"Offline",dnd:"Do not disturb"}[t]??t}render(){let{visible:t,hidden:e,showCounter:o}=bt(this.users.length,this.max,this.showAddButton),a=this.direction==="ltr"?this.users.slice(0,t):this.users.slice(0,t).reverse(),p=this.users.slice(t),l=t;o&&l++,this.showAddButton&&l++;let u=ht(l,this.pixelSize,this.overlap,this.spacing),b=o?N(t,this.pixelSize,this.overlap,this.direction,this.spacing):0,h=N(t+(o?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return html`
|
|
860
879
|
<div
|
|
861
|
-
class=${
|
|
862
|
-
style=${styleMap({width:`${
|
|
880
|
+
class=${x("ppg-container",this.animated&&"ppg-animated")}
|
|
881
|
+
style=${styleMap({width:`${u}px`,height:`${this.pixelSize}px`})}
|
|
863
882
|
role="group"
|
|
864
883
|
aria-label="User avatars"
|
|
865
884
|
>
|
|
@@ -867,19 +886,19 @@ ${Ge}`;var s=class extends LitElement{constructor(){super(...arguments);this.src
|
|
|
867
886
|
<slot style="display: none;"></slot>
|
|
868
887
|
|
|
869
888
|
<!-- Visible avatars -->
|
|
870
|
-
${a.map((
|
|
889
|
+
${a.map((k,$)=>this.renderAvatar(k,$,t))}
|
|
871
890
|
|
|
872
891
|
<!-- Counter -->
|
|
873
|
-
${
|
|
892
|
+
${o?this.renderCounter(e,b):nothing}
|
|
874
893
|
|
|
875
894
|
<!-- Add button -->
|
|
876
|
-
${this.showAddButton?this.renderAddButton(
|
|
895
|
+
${this.showAddButton?this.renderAddButton(h):nothing}
|
|
877
896
|
|
|
878
897
|
<!-- Tooltip -->
|
|
879
898
|
${this.renderTooltip()}
|
|
880
899
|
|
|
881
900
|
<!-- Dropdown -->
|
|
882
|
-
${
|
|
901
|
+
${o?this.renderDropdown(p):nothing}
|
|
883
902
|
</div>
|
|
884
|
-
`}};
|
|
903
|
+
`}};s([property({type:Number})],g.prototype,"max",2),s([property({type:String})],g.prototype,"direction",2),s([property({type:Number})],g.prototype,"overlap",2),s([property({type:String})],g.prototype,"size",2),s([property({type:Number})],g.prototype,"spacing",2),s([property({type:Object})],g.prototype,"tooltip",2),s([property({type:Object})],g.prototype,"dropdown",2),s([property({type:Boolean,attribute:"show-add-button"})],g.prototype,"showAddButton",2),s([property({type:String,attribute:"add-button-label"})],g.prototype,"addButtonLabel",2),s([property({type:Boolean})],g.prototype,"animated",2),s([property({type:Number,attribute:"rotation-amount"})],g.prototype,"rotationAmount",2),s([state()],g.prototype,"users",2),s([state()],g.prototype,"dropdownOpen",2),s([state()],g.prototype,"tooltipData",2),g=s([customElement("profile-picture-group")],g);var et=zt.forwardRef(({max:r,direction:n,overlap:t,size:e,spacing:o,tooltip:a,dropdown:p,showAddButton:l,addButtonLabel:u,animated:b,onAvatarClick:h,onAvatarHover:k,onCounterClick:$,onDropdownItemClick:E,onAddClick:G,className:H,style:V,children:W},I)=>{let A=useRef(null),Y=useCallback(c=>{h?.(c.detail.user);},[h]),J=useCallback(c=>{k?.(c.detail.user);},[k]),K=useCallback(c=>{let U=c;$?.(U.detail.hiddenUsers,U.detail.open);},[$]),q=useCallback(c=>{E?.(c.detail.user);},[E]),Z=useCallback(()=>{G?.();},[G]);return useEffect(()=>{let c=A.current;if(c)return c.addEventListener("avatar-click",Y),c.addEventListener("avatar-hover",J),c.addEventListener("counter-click",K),c.addEventListener("dropdown-item-click",q),c.addEventListener("add-click",Z),()=>{c.removeEventListener("avatar-click",Y),c.removeEventListener("avatar-hover",J),c.removeEventListener("counter-click",K),c.removeEventListener("dropdown-item-click",q),c.removeEventListener("add-click",Z);}},[Y,J,K,q,Z]),useEffect(()=>{typeof I=="function"?I(A.current):I&&(I.current=A.current);},[I]),zt.createElement("profile-picture-group",{ref:A,max:r,direction:n,overlap:t,size:e,spacing:o,tooltip:a,dropdown:p,"show-add-button":l||void 0,"add-button-label":u,animated:b,class:H,style:V},W)});et.displayName="ProfilePictureGroup";var Dt=zt.forwardRef(({src:r,alt:n,size:t,variant:e,border:o,borderWidth:a,borderColor:p,bgColor:l,bgGradient:u,ribbon:b,badge:h,loading:k,placeholder:$,placeholderColor:E,fallback:G,onLoad:H,onError:V,className:W,style:I},A)=>zt.createElement("profile-picture",{ref:A,src:r,alt:n,size:t,variant:e,border:o,"border-width":a,"border-color":p,"bg-color":l,"bg-gradient":u,ribbon:b,badge:h,loading:k,placeholder:$,"placeholder-color":E,fallback:G,onLoad:H,onError:V,className:W,style:I}));Dt.displayName="ProfilePicture";nt();export{Dt as ProfilePicture,et as ProfilePictureGroup,_ as constructCdnUrl,P as detectThemeFromColor,Q as getCdnSizeLabel};//# sourceMappingURL=index.js.map
|
|
885
904
|
//# sourceMappingURL=index.js.map
|