@mahatisystems/mahati-ui-components 3.0.1 → 3.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/index.d.mts CHANGED
@@ -216,7 +216,8 @@ interface Tab {
216
216
  interface TabbedInterfaceProps {
217
217
  tabs: Tab[];
218
218
  variant?: "underline" | "pill" | "outline" | "filled" | "gradient" | "shadow" | "glass" | "dark";
219
- onTabChange?: (label: string) => void;
219
+ defaultActiveTab?: number;
220
+ onTabChange?: (index: number) => void;
220
221
  draggableTabs?: boolean;
221
222
  onReorderTabs?: (fromIndex: number, toIndex: number) => void;
222
223
  orientation?: "horizontal" | "vertical";
@@ -465,18 +466,7 @@ interface CardWithLoadingProps {
465
466
  }
466
467
  declare const CardWithLoading: React__default.FC<CardWithLoadingProps>;
467
468
 
468
- interface MahatiLocationAccessModalProps {
469
- isOpen: boolean;
470
- onClose: () => void;
471
- title: string;
472
- description: string;
473
- image?: string;
474
- allowText: string;
475
- denyText?: string;
476
- onAllow?: (coords?: GeolocationCoordinates) => void;
477
- onDeny?: () => void;
478
- }
479
- declare const MahatiLocationAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiLocationAccessModalProps) => React__default.ReactPortal | null;
469
+ declare const MahatiLocationAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: any) => React__default.ReactPortal | null;
480
470
  interface MahatiCameraAccessModalProps {
481
471
  isOpen: boolean;
482
472
  onClose: () => void;
@@ -489,18 +479,7 @@ interface MahatiCameraAccessModalProps {
489
479
  onDeny?: () => void;
490
480
  }
491
481
  declare const MahatiCameraAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiCameraAccessModalProps) => React__default.ReactPortal | null;
492
- interface MahatiMicrophoneAccessModalProps {
493
- isOpen: boolean;
494
- onClose: () => void;
495
- title: string;
496
- description: string;
497
- image?: string;
498
- allowText: string;
499
- denyText?: string;
500
- onAllow?: (stream?: MediaStream) => void;
501
- onDeny?: () => void;
502
- }
503
- declare const MahatiMicrophoneAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiMicrophoneAccessModalProps) => React__default.ReactPortal | null;
482
+ declare const MahatiMicrophoneAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: any) => React__default.ReactPortal | null;
504
483
  interface MahatiPromotionModalProps {
505
484
  isOpen: boolean;
506
485
  onClose: () => void;
@@ -513,12 +492,8 @@ interface MahatiPromotionModalProps {
513
492
  openInNewTab?: boolean;
514
493
  showInput?: boolean;
515
494
  inputPlaceholder?: string;
516
- onInputChange?: (value: string) => void;
517
495
  }
518
- declare const MahatiPromotionModal: ({ isOpen, onClose, ctaLink, openInNewTab, onCtaClick, ...cardProps }: MahatiPromotionModalProps & {
519
- ctaLink?: string;
520
- openInNewTab?: boolean;
521
- }) => React__default.ReactPortal | null;
496
+ declare const MahatiPromotionModal: ({ isOpen, onClose, ctaLink, openInNewTab, onCtaClick, ...cardProps }: MahatiPromotionModalProps) => React__default.ReactPortal | null;
522
497
  interface MahatiPromotionModalV2Props {
523
498
  isOpen: boolean;
524
499
  onClose: () => void;
@@ -547,6 +522,7 @@ interface MahatiPromotionModalV3Props {
547
522
  openInNewTab?: boolean;
548
523
  }
549
524
  declare const MahatiPromotionModalV3Modal: ({ isOpen, onClose, title, description, ctaText, onCtaClick, secondaryText, onSecondaryClick, imageSrc, ctaLink, openInNewTab, }: MahatiPromotionModalV3Props) => React__default.ReactPortal | null;
525
+ type BadgeType = "like" | "mention" | "follow" | "comment" | "add";
550
526
  interface MahatiNotificationCardProps {
551
527
  title: string;
552
528
  description?: string;
@@ -554,13 +530,13 @@ interface MahatiNotificationCardProps {
554
530
  iconSrc?: string;
555
531
  avatarSrc?: string;
556
532
  badgeIconSrc?: string;
557
- badgeBgClass?: string;
533
+ badgeType?: BadgeType;
558
534
  primaryActionText?: string;
559
535
  onPrimaryAction?: () => void;
560
536
  secondaryActionText?: string;
561
537
  onSecondaryAction?: () => void;
562
538
  onClose?: () => void;
563
539
  }
564
- declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeBgClass, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
540
+ declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
565
541
 
566
542
  export { Accordion, type AccordionProps, type CalendarDate, type CalendarDateRange, type CalendarProps, type CalendarTime, CardOverlayLoader, CardWithLoading, CircularSpinner, DEFAULT_ACTIVITY_OPTIONS, DEFAULT_STATUS_OPTIONS, type FieldSize, Filter, type FilterValues, LoadingDots, LoadingDotsLinear, MahatiActivity, type MahatiActivityProps, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, ConfettiExplosion as MahatiConfettiExplosion, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, Input as MahatiInput, MahatiLocationAccessModal, MahatiMicrophoneAccessModal, Modal as MahatiModal, MahatiNotificationCard, MahatiPromotionModal as MahatiPromotionModal_V1, MahatiPromotionModalV2Modal as MahatiPromotionModal_V2, MahatiPromotionModalV3Modal as MahatiPromotionModal_V3, RealisticConfetti as MahatiRealisticConfetti, MahatiSearch, type MahatiSearchProps, MahatiStatus, type MahatiStatusProps, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableWithTab as MahatiTableWithTab, ToastMessage as MahatiToastMessage, Tooltip as MahatiTooltip, type SelectOption, Spinner };
package/dist/index.d.ts CHANGED
@@ -216,7 +216,8 @@ interface Tab {
216
216
  interface TabbedInterfaceProps {
217
217
  tabs: Tab[];
218
218
  variant?: "underline" | "pill" | "outline" | "filled" | "gradient" | "shadow" | "glass" | "dark";
219
- onTabChange?: (label: string) => void;
219
+ defaultActiveTab?: number;
220
+ onTabChange?: (index: number) => void;
220
221
  draggableTabs?: boolean;
221
222
  onReorderTabs?: (fromIndex: number, toIndex: number) => void;
222
223
  orientation?: "horizontal" | "vertical";
@@ -465,18 +466,7 @@ interface CardWithLoadingProps {
465
466
  }
466
467
  declare const CardWithLoading: React__default.FC<CardWithLoadingProps>;
467
468
 
468
- interface MahatiLocationAccessModalProps {
469
- isOpen: boolean;
470
- onClose: () => void;
471
- title: string;
472
- description: string;
473
- image?: string;
474
- allowText: string;
475
- denyText?: string;
476
- onAllow?: (coords?: GeolocationCoordinates) => void;
477
- onDeny?: () => void;
478
- }
479
- declare const MahatiLocationAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiLocationAccessModalProps) => React__default.ReactPortal | null;
469
+ declare const MahatiLocationAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: any) => React__default.ReactPortal | null;
480
470
  interface MahatiCameraAccessModalProps {
481
471
  isOpen: boolean;
482
472
  onClose: () => void;
@@ -489,18 +479,7 @@ interface MahatiCameraAccessModalProps {
489
479
  onDeny?: () => void;
490
480
  }
491
481
  declare const MahatiCameraAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiCameraAccessModalProps) => React__default.ReactPortal | null;
492
- interface MahatiMicrophoneAccessModalProps {
493
- isOpen: boolean;
494
- onClose: () => void;
495
- title: string;
496
- description: string;
497
- image?: string;
498
- allowText: string;
499
- denyText?: string;
500
- onAllow?: (stream?: MediaStream) => void;
501
- onDeny?: () => void;
502
- }
503
- declare const MahatiMicrophoneAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiMicrophoneAccessModalProps) => React__default.ReactPortal | null;
482
+ declare const MahatiMicrophoneAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: any) => React__default.ReactPortal | null;
504
483
  interface MahatiPromotionModalProps {
505
484
  isOpen: boolean;
506
485
  onClose: () => void;
@@ -513,12 +492,8 @@ interface MahatiPromotionModalProps {
513
492
  openInNewTab?: boolean;
514
493
  showInput?: boolean;
515
494
  inputPlaceholder?: string;
516
- onInputChange?: (value: string) => void;
517
495
  }
518
- declare const MahatiPromotionModal: ({ isOpen, onClose, ctaLink, openInNewTab, onCtaClick, ...cardProps }: MahatiPromotionModalProps & {
519
- ctaLink?: string;
520
- openInNewTab?: boolean;
521
- }) => React__default.ReactPortal | null;
496
+ declare const MahatiPromotionModal: ({ isOpen, onClose, ctaLink, openInNewTab, onCtaClick, ...cardProps }: MahatiPromotionModalProps) => React__default.ReactPortal | null;
522
497
  interface MahatiPromotionModalV2Props {
523
498
  isOpen: boolean;
524
499
  onClose: () => void;
@@ -547,6 +522,7 @@ interface MahatiPromotionModalV3Props {
547
522
  openInNewTab?: boolean;
548
523
  }
549
524
  declare const MahatiPromotionModalV3Modal: ({ isOpen, onClose, title, description, ctaText, onCtaClick, secondaryText, onSecondaryClick, imageSrc, ctaLink, openInNewTab, }: MahatiPromotionModalV3Props) => React__default.ReactPortal | null;
525
+ type BadgeType = "like" | "mention" | "follow" | "comment" | "add";
550
526
  interface MahatiNotificationCardProps {
551
527
  title: string;
552
528
  description?: string;
@@ -554,13 +530,13 @@ interface MahatiNotificationCardProps {
554
530
  iconSrc?: string;
555
531
  avatarSrc?: string;
556
532
  badgeIconSrc?: string;
557
- badgeBgClass?: string;
533
+ badgeType?: BadgeType;
558
534
  primaryActionText?: string;
559
535
  onPrimaryAction?: () => void;
560
536
  secondaryActionText?: string;
561
537
  onSecondaryAction?: () => void;
562
538
  onClose?: () => void;
563
539
  }
564
- declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeBgClass, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
540
+ declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
565
541
 
566
542
  export { Accordion, type AccordionProps, type CalendarDate, type CalendarDateRange, type CalendarProps, type CalendarTime, CardOverlayLoader, CardWithLoading, CircularSpinner, DEFAULT_ACTIVITY_OPTIONS, DEFAULT_STATUS_OPTIONS, type FieldSize, Filter, type FilterValues, LoadingDots, LoadingDotsLinear, MahatiActivity, type MahatiActivityProps, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, ConfettiExplosion as MahatiConfettiExplosion, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, Input as MahatiInput, MahatiLocationAccessModal, MahatiMicrophoneAccessModal, Modal as MahatiModal, MahatiNotificationCard, MahatiPromotionModal as MahatiPromotionModal_V1, MahatiPromotionModalV2Modal as MahatiPromotionModal_V2, MahatiPromotionModalV3Modal as MahatiPromotionModal_V3, RealisticConfetti as MahatiRealisticConfetti, MahatiSearch, type MahatiSearchProps, MahatiStatus, type MahatiStatusProps, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableWithTab as MahatiTableWithTab, ToastMessage as MahatiToastMessage, Tooltip as MahatiTooltip, type SelectOption, Spinner };