pelatform-ui 1.2.5 → 1.2.8

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.
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ComponentProps, ReactNode, HTMLAttributes, FC, DragEvent, RefObject } from 'react';
4
- import { Alert, badgeVariants, Button } from '@pelatform/ui.components/base';
4
+ import { Alert, badgeVariants, Button } from '@pelatform/ui.components/radix';
5
5
  import { B as BaseComponentProps, L as LinkComponentProps, I as ImageComponentProps } from './components-B1rw2xzN.js';
6
6
  import { QueryClient } from '@tanstack/react-query';
7
7
  import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
@@ -2634,7 +2634,7 @@ declare const ToolbarActions: ({ children }: BaseComponentProps) => react_jsx_ru
2634
2634
 
2635
2635
  /**
2636
2636
  * User Avatar Component
2637
- * Displays user profile pictures with fallback initials
2637
+ * Displays user profile pictures with fallback initials and optional status indicators
2638
2638
  * Built on top of the base Avatar component with enhanced user-specific features
2639
2639
  */
2640
2640
  /**
@@ -2643,6 +2643,8 @@ declare const ToolbarActions: ({ children }: BaseComponentProps) => react_jsx_ru
2643
2643
  interface UserAvatarProps {
2644
2644
  /** Additional CSS classes for styling */
2645
2645
  className?: string;
2646
+ /** Whether to show online status indicator */
2647
+ indicator?: boolean;
2646
2648
  /** Source URL for the user's profile image */
2647
2649
  src?: string | null | undefined;
2648
2650
  /** Alt text for the image, also used to generate initials */
@@ -2652,16 +2654,19 @@ interface UserAvatarProps {
2652
2654
  * UserAvatar Component
2653
2655
  *
2654
2656
  * Displays a user's profile picture with automatic fallback to initials
2655
- * when no image is available.
2657
+ * when no image is available. Supports optional online status indicators
2658
+ * and follows accessibility best practices.
2656
2659
  *
2657
2660
  * Features:
2658
2661
  * - Automatic initials generation from name
2659
2662
  * - Fallback handling for missing images
2663
+ * - Optional online status indicator
2660
2664
  * - Accessible alt text support
2661
2665
  * - Customizable styling
2662
2666
  *
2663
2667
  * @param props - Component props
2664
2668
  * @param props.className - Additional CSS classes for styling
2669
+ * @param props.indicator - Whether to show online status indicator (default: false)
2665
2670
  * @param props.src - Source URL for the user's profile image
2666
2671
  * @param props.alt - Alt text for the image, also used to generate initials
2667
2672
  * @returns JSX element containing the user avatar
@@ -2674,6 +2679,13 @@ interface UserAvatarProps {
2674
2679
  * alt="John Doe"
2675
2680
  * />
2676
2681
  *
2682
+ * // Avatar with online indicator
2683
+ * <UserAvatar
2684
+ * src="https://example.com/avatar.jpg"
2685
+ * alt="Jane Smith"
2686
+ * indicator={true}
2687
+ * />
2688
+ *
2677
2689
  * // Avatar with fallback initials (no image)
2678
2690
  * <UserAvatar
2679
2691
  * alt="Bob Johnson"
@@ -2687,6 +2699,7 @@ interface UserAvatarProps {
2687
2699
  * key={user.id}
2688
2700
  * src={user.avatar}
2689
2701
  * alt={user.name}
2702
+ * indicator={user.isOnline}
2690
2703
  * className="w-8 h-8"
2691
2704
  * />
2692
2705
  * ))}
@@ -2697,6 +2710,7 @@ interface UserAvatarProps {
2697
2710
  * <UserAvatar
2698
2711
  * src={currentUser.avatar}
2699
2712
  * alt={currentUser.name}
2713
+ * indicator={true}
2700
2714
  * className="w-16 h-16"
2701
2715
  * />
2702
2716
  * <div>
@@ -2706,7 +2720,7 @@ interface UserAvatarProps {
2706
2720
  * </div>
2707
2721
  * ```
2708
2722
  */
2709
- declare function UserAvatar({ className, src, alt }: UserAvatarProps): react_jsx_runtime.JSX.Element;
2723
+ declare function UserAvatar({ className, indicator, src, alt }: UserAvatarProps): react_jsx_runtime.JSX.Element;
2710
2724
  /**
2711
2725
  * Utility function to generate initials from a name
2712
2726
  *