@grasco/profile-picture 0.1.2 → 0.1.5
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/README.md +4 -0
- package/dist/angular.cjs +1 -370
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.d.cts +193 -16
- package/dist/angular.d.ts +193 -16
- package/dist/angular.js +1 -370
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +284 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -58
- package/dist/index.d.ts +134 -58
- package/dist/index.js +284 -175
- package/dist/index.js.map +1 -1
- package/dist/standalone.d.ts +17 -17
- package/dist/standalone.standalone.js +260 -151
- package/dist/standalone.standalone.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/svelte.cjs +1 -370
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.d.cts +193 -16
- package/dist/svelte.d.ts +193 -16
- package/dist/svelte.js +1 -370
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs +1 -370
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +193 -16
- package/dist/vue.d.ts +193 -16
- package/dist/vue.js +1 -370
- package/dist/vue.js.map +1 -1
- package/package.json +9 -2
package/dist/standalone.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { LitElement } from 'lit';
|
|
|
7
7
|
*/
|
|
8
8
|
type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
9
9
|
type Variant = "circle" | "rounded" | "squircle" | "square";
|
|
10
|
-
type Position = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
10
|
+
type Position = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
11
11
|
type LoadingStrategy = "lazy" | "eager";
|
|
12
12
|
type PlaceholderType = "shimmer" | "pulse" | "blur" | "skeleton" | "none";
|
|
13
13
|
type PresenceStatus = "online" | "away" | "busy" | "offline" | "dnd";
|
|
@@ -19,18 +19,6 @@ interface PresenceConfig {
|
|
|
19
19
|
/** Ring thickness (1-3) */
|
|
20
20
|
thickness?: 1 | 2 | 3;
|
|
21
21
|
}
|
|
22
|
-
interface RibbonConfig {
|
|
23
|
-
/** Text displayed on the ribbon */
|
|
24
|
-
text: string;
|
|
25
|
-
/** Position of the ribbon */
|
|
26
|
-
position?: Position;
|
|
27
|
-
/** Text color (CSS color) */
|
|
28
|
-
color?: string;
|
|
29
|
-
/** Background color (CSS color or gradient) */
|
|
30
|
-
bgColor?: string;
|
|
31
|
-
/** Icon before text (emoji or symbol) */
|
|
32
|
-
icon?: string;
|
|
33
|
-
}
|
|
34
22
|
interface BadgeConfig {
|
|
35
23
|
/** Badge content (text, number, or empty for dot) */
|
|
36
24
|
content?: string | number;
|
|
@@ -40,6 +28,8 @@ interface BadgeConfig {
|
|
|
40
28
|
color?: string;
|
|
41
29
|
/** Background color */
|
|
42
30
|
bgColor?: string;
|
|
31
|
+
/** Border radius (CSS value, e.g., "8px", "50%", "9999px") */
|
|
32
|
+
borderRadius?: string;
|
|
43
33
|
/** Enable pulse animation */
|
|
44
34
|
pulse?: boolean;
|
|
45
35
|
/** Enable glow effect */
|
|
@@ -107,6 +97,8 @@ interface GroupUserData {
|
|
|
107
97
|
name: string;
|
|
108
98
|
/** Image source URL */
|
|
109
99
|
src?: string;
|
|
100
|
+
/** External customer ID for CDN image loading */
|
|
101
|
+
extCustomerId?: string;
|
|
110
102
|
/** Presence status from data-status attribute */
|
|
111
103
|
status?: PresenceStatus;
|
|
112
104
|
/** Reference to the profile-picture element */
|
|
@@ -191,7 +183,6 @@ declare class ProfilePicture extends LitElement {
|
|
|
191
183
|
ring?: RingConfig;
|
|
192
184
|
presence?: PresenceConfig;
|
|
193
185
|
glow?: GlowConfig;
|
|
194
|
-
ribbon?: RibbonConfig;
|
|
195
186
|
badge?: BadgeConfig;
|
|
196
187
|
loading: LoadingStrategy;
|
|
197
188
|
placeholder: PlaceholderType;
|
|
@@ -224,9 +215,13 @@ declare class ProfilePicture extends LitElement {
|
|
|
224
215
|
private renderFallback;
|
|
225
216
|
private renderImage;
|
|
226
217
|
private renderRing;
|
|
218
|
+
/**
|
|
219
|
+
* Calculate corner offset based on variant
|
|
220
|
+
* Returns the inset from container edge where badges/presence should be positioned
|
|
221
|
+
*/
|
|
222
|
+
private getCornerOffset;
|
|
227
223
|
private renderPresence;
|
|
228
224
|
private renderBadge;
|
|
229
|
-
private renderRibbon;
|
|
230
225
|
render(): lit_html.TemplateResult<1>;
|
|
231
226
|
}
|
|
232
227
|
|
|
@@ -254,6 +249,8 @@ declare class ProfilePictureGroup extends LitElement {
|
|
|
254
249
|
private tooltipData;
|
|
255
250
|
private tooltipTimeout;
|
|
256
251
|
private slotObserver;
|
|
252
|
+
private portalContainer;
|
|
253
|
+
private counterRef;
|
|
257
254
|
private get pixelSize();
|
|
258
255
|
private get tooltipEnabled();
|
|
259
256
|
private get tooltipPosition();
|
|
@@ -265,6 +262,9 @@ declare class ProfilePictureGroup extends LitElement {
|
|
|
265
262
|
disconnectedCallback(): void;
|
|
266
263
|
private setupSlotObserver;
|
|
267
264
|
private updateUsers;
|
|
265
|
+
private createPortal;
|
|
266
|
+
private destroyPortal;
|
|
267
|
+
private updatePortalContent;
|
|
268
268
|
private handleAvatarClick;
|
|
269
269
|
private handleAvatarHover;
|
|
270
270
|
private handleAvatarLeave;
|
|
@@ -279,9 +279,9 @@ declare class ProfilePictureGroup extends LitElement {
|
|
|
279
279
|
private renderCounter;
|
|
280
280
|
private renderAddButton;
|
|
281
281
|
private renderTooltip;
|
|
282
|
-
private renderDropdown;
|
|
283
282
|
private renderDropdownItem;
|
|
284
283
|
private formatStatus;
|
|
284
|
+
protected updated(changedProperties: Map<PropertyKey, unknown>): void;
|
|
285
285
|
render(): lit_html.TemplateResult<1>;
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -291,4 +291,4 @@ declare global {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
export type { BadgeConfig, DropdownConfig, GroupUserData, LoadingStrategy, PlaceholderType, Position, ProfilePictureGroupProps,
|
|
294
|
+
export type { BadgeConfig, DropdownConfig, GroupUserData, LoadingStrategy, PlaceholderType, Position, ProfilePictureGroupProps, Size, StackDirection, TooltipConfig, TooltipPosition, Variant };
|