@mahatisystems/mahati-ui-components 4.3.0 → 4.4.0

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
@@ -494,50 +494,68 @@ declare const Tooltip: {
494
494
  displayName: string;
495
495
  };
496
496
 
497
- type ClassValue = string | false | null | undefined;
498
- declare const cn: (...values: ClassValue[]) => string;
499
- type ToastType = 'Success' | 'Error' | 'Warning' | 'Notification' | 'Action' | 'LiquidUI';
500
- type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
501
- type ToastBackground = 'solid' | 'transparent';
502
- interface ToastAction {
497
+ type ToastType = "success" | "error" | "warning" | "notification";
498
+ type BackgroundType = "solid" | "transparent";
499
+ interface CustomToastStyles {
500
+ containerBackground?: string;
501
+ containerBorderRadius?: string;
502
+ containerBoxShadow?: string;
503
+ containerWidth?: string;
504
+ containerHeight?: string;
505
+ containerPaddingLeft?: string;
506
+ stripBackground?: string;
507
+ stripWidth?: string;
508
+ stripLeft?: string;
509
+ stripBorderRadius?: string;
510
+ titleColor?: string;
511
+ titleFontFamily?: string;
512
+ titleFontSize?: string;
513
+ titleFontWeight?: string;
514
+ titleFontStyle?: string;
515
+ titleLineHeight?: string;
516
+ messageColor?: string;
517
+ messageFontFamily?: string;
518
+ messageFontSize?: string;
519
+ messageFontWeight?: string;
520
+ messageFontStyle?: string;
521
+ messageLineHeight?: string;
522
+ messageOpacity?: string;
523
+ messageMarginTop?: string;
524
+ iconSrc?: string;
525
+ iconWidth?: string;
526
+ iconHeight?: string;
527
+ iconMarginRight?: string;
528
+ closeIconSrc?: string;
529
+ closeIconWidth?: string;
530
+ closeIconHeight?: string;
531
+ closeButtonOpacity?: string;
532
+ closeButtonMarginLeft?: string;
533
+ }
534
+ interface ActionButton {
503
535
  label: string;
504
- onClick?: () => void;
505
- }
506
- type ToastSlots = 'base' | 'strip' | 'icon' | 'title' | 'message' | 'close' | 'actions' | 'primaryAction' | 'secondaryAction';
507
- type ToastClassNames = Partial<Record<ToastSlots, string>>;
508
- interface Toast {
509
- id: string;
510
- type: ToastType;
511
- title: string;
536
+ onClick: () => void;
537
+ variant?: 'primary' | 'secondary';
538
+ backgroundColor?: string;
539
+ textColor?: string;
540
+ borderColor?: string;
541
+ hoverBackgroundColor?: string;
542
+ fontSize?: string;
543
+ fontWeight?: string;
544
+ padding?: string;
545
+ borderRadius?: string;
546
+ }
547
+ interface ToastMessageProps extends React__default.HTMLAttributes<HTMLDivElement> {
548
+ type?: ToastType;
549
+ title?: string;
512
550
  message?: string;
551
+ onClose?: () => void;
552
+ showClose?: boolean;
513
553
  duration?: number;
514
- actions?: ToastAction[];
515
- background?: ToastBackground;
516
- classNames?: ToastClassNames;
554
+ background?: BackgroundType;
555
+ custom?: CustomToastStyles;
556
+ action?: ActionButton[];
517
557
  }
518
- type AlertArgs = {
519
- type: ToastType;
520
- message?: string;
521
- background?: ToastBackground;
522
- duration?: number;
523
- actions?: ToastAction[];
524
- classNames?: ToastClassNames;
525
- };
526
- interface ToastContainerProps {
527
- toasts: Toast[];
528
- position: ToastPosition;
529
- onClose: (id: string) => void;
530
- }
531
- declare const titleForType: (type: ToastType) => "Success" | "Error" | "Warning" | "Notification" | "Liquid UI" | "Confirmation";
532
- declare const ToastMessageBase: {
533
- ({ toasts, position, onClose }: ToastContainerProps): any;
534
- displayName: string;
535
- };
536
- type ToastMessageWithUtils = typeof ToastMessageBase & {
537
- cn: typeof cn;
538
- titleForType: typeof titleForType;
539
- };
540
- declare const ToastMessage: ToastMessageWithUtils;
558
+ declare const ToastMessage: React__default.ForwardRefExoticComponent<ToastMessageProps & React__default.RefAttributes<HTMLDivElement>>;
541
559
 
542
560
  interface ConfettiExplosionProps {
543
561
  isActive: boolean;
@@ -699,4 +717,4 @@ interface MahatiNotificationCardProps {
699
717
  }
700
718
  declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
701
719
 
702
- export { Accordion, type AccordionProps, type AlertArgs, type CalendarDate, type CalendarDateRange, type CalendarProps, type CalendarTime, CardOverlayLoader, CardWithLoading, CircularSpinner, DEFAULT_ACTIVITY_OPTIONS, DEFAULT_STATUS_OPTIONS, type FieldSize, Filter$1 as Filter, type FilterValues, LoadingDots, LoadingDotsLinear, MahatiActivity, type MahatiActivityProps, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, MahatiChartAnalyticsWidget, 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, SearchableDropdown as MahatiSearchableDropdown, MahatiStatus, type MahatiStatusProps, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableWithTab as MahatiTableWithTab, TexttoAudio as MahatiTexttoAudio, ToastMessage as MahatiToastMessage, Tooltip as MahatiTooltip, type SelectOption, Spinner, type Toast, type ToastAction, type ToastBackground, type ToastClassNames, type ToastContainerProps, type ToastPosition, type ToastSlots, type ToastType };
720
+ export { Accordion, type AccordionProps, type CalendarDate, type CalendarDateRange, type CalendarProps, type CalendarTime, CardOverlayLoader, CardWithLoading, CircularSpinner, DEFAULT_ACTIVITY_OPTIONS, DEFAULT_STATUS_OPTIONS, type FieldSize, Filter$1 as Filter, type FilterValues, LoadingDots, LoadingDotsLinear, MahatiActivity, type MahatiActivityProps, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, MahatiChartAnalyticsWidget, 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, SearchableDropdown as MahatiSearchableDropdown, MahatiStatus, type MahatiStatusProps, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableWithTab as MahatiTableWithTab, TexttoAudio as MahatiTexttoAudio, ToastMessage as MahatiToastMessage, Tooltip as MahatiTooltip, type SelectOption, Spinner };
package/dist/index.d.ts CHANGED
@@ -494,50 +494,68 @@ declare const Tooltip: {
494
494
  displayName: string;
495
495
  };
496
496
 
497
- type ClassValue = string | false | null | undefined;
498
- declare const cn: (...values: ClassValue[]) => string;
499
- type ToastType = 'Success' | 'Error' | 'Warning' | 'Notification' | 'Action' | 'LiquidUI';
500
- type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
501
- type ToastBackground = 'solid' | 'transparent';
502
- interface ToastAction {
497
+ type ToastType = "success" | "error" | "warning" | "notification";
498
+ type BackgroundType = "solid" | "transparent";
499
+ interface CustomToastStyles {
500
+ containerBackground?: string;
501
+ containerBorderRadius?: string;
502
+ containerBoxShadow?: string;
503
+ containerWidth?: string;
504
+ containerHeight?: string;
505
+ containerPaddingLeft?: string;
506
+ stripBackground?: string;
507
+ stripWidth?: string;
508
+ stripLeft?: string;
509
+ stripBorderRadius?: string;
510
+ titleColor?: string;
511
+ titleFontFamily?: string;
512
+ titleFontSize?: string;
513
+ titleFontWeight?: string;
514
+ titleFontStyle?: string;
515
+ titleLineHeight?: string;
516
+ messageColor?: string;
517
+ messageFontFamily?: string;
518
+ messageFontSize?: string;
519
+ messageFontWeight?: string;
520
+ messageFontStyle?: string;
521
+ messageLineHeight?: string;
522
+ messageOpacity?: string;
523
+ messageMarginTop?: string;
524
+ iconSrc?: string;
525
+ iconWidth?: string;
526
+ iconHeight?: string;
527
+ iconMarginRight?: string;
528
+ closeIconSrc?: string;
529
+ closeIconWidth?: string;
530
+ closeIconHeight?: string;
531
+ closeButtonOpacity?: string;
532
+ closeButtonMarginLeft?: string;
533
+ }
534
+ interface ActionButton {
503
535
  label: string;
504
- onClick?: () => void;
505
- }
506
- type ToastSlots = 'base' | 'strip' | 'icon' | 'title' | 'message' | 'close' | 'actions' | 'primaryAction' | 'secondaryAction';
507
- type ToastClassNames = Partial<Record<ToastSlots, string>>;
508
- interface Toast {
509
- id: string;
510
- type: ToastType;
511
- title: string;
536
+ onClick: () => void;
537
+ variant?: 'primary' | 'secondary';
538
+ backgroundColor?: string;
539
+ textColor?: string;
540
+ borderColor?: string;
541
+ hoverBackgroundColor?: string;
542
+ fontSize?: string;
543
+ fontWeight?: string;
544
+ padding?: string;
545
+ borderRadius?: string;
546
+ }
547
+ interface ToastMessageProps extends React__default.HTMLAttributes<HTMLDivElement> {
548
+ type?: ToastType;
549
+ title?: string;
512
550
  message?: string;
551
+ onClose?: () => void;
552
+ showClose?: boolean;
513
553
  duration?: number;
514
- actions?: ToastAction[];
515
- background?: ToastBackground;
516
- classNames?: ToastClassNames;
554
+ background?: BackgroundType;
555
+ custom?: CustomToastStyles;
556
+ action?: ActionButton[];
517
557
  }
518
- type AlertArgs = {
519
- type: ToastType;
520
- message?: string;
521
- background?: ToastBackground;
522
- duration?: number;
523
- actions?: ToastAction[];
524
- classNames?: ToastClassNames;
525
- };
526
- interface ToastContainerProps {
527
- toasts: Toast[];
528
- position: ToastPosition;
529
- onClose: (id: string) => void;
530
- }
531
- declare const titleForType: (type: ToastType) => "Success" | "Error" | "Warning" | "Notification" | "Liquid UI" | "Confirmation";
532
- declare const ToastMessageBase: {
533
- ({ toasts, position, onClose }: ToastContainerProps): any;
534
- displayName: string;
535
- };
536
- type ToastMessageWithUtils = typeof ToastMessageBase & {
537
- cn: typeof cn;
538
- titleForType: typeof titleForType;
539
- };
540
- declare const ToastMessage: ToastMessageWithUtils;
558
+ declare const ToastMessage: React__default.ForwardRefExoticComponent<ToastMessageProps & React__default.RefAttributes<HTMLDivElement>>;
541
559
 
542
560
  interface ConfettiExplosionProps {
543
561
  isActive: boolean;
@@ -699,4 +717,4 @@ interface MahatiNotificationCardProps {
699
717
  }
700
718
  declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
701
719
 
702
- export { Accordion, type AccordionProps, type AlertArgs, type CalendarDate, type CalendarDateRange, type CalendarProps, type CalendarTime, CardOverlayLoader, CardWithLoading, CircularSpinner, DEFAULT_ACTIVITY_OPTIONS, DEFAULT_STATUS_OPTIONS, type FieldSize, Filter$1 as Filter, type FilterValues, LoadingDots, LoadingDotsLinear, MahatiActivity, type MahatiActivityProps, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, MahatiChartAnalyticsWidget, 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, SearchableDropdown as MahatiSearchableDropdown, MahatiStatus, type MahatiStatusProps, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableWithTab as MahatiTableWithTab, TexttoAudio as MahatiTexttoAudio, ToastMessage as MahatiToastMessage, Tooltip as MahatiTooltip, type SelectOption, Spinner, type Toast, type ToastAction, type ToastBackground, type ToastClassNames, type ToastContainerProps, type ToastPosition, type ToastSlots, type ToastType };
720
+ export { Accordion, type AccordionProps, type CalendarDate, type CalendarDateRange, type CalendarProps, type CalendarTime, CardOverlayLoader, CardWithLoading, CircularSpinner, DEFAULT_ACTIVITY_OPTIONS, DEFAULT_STATUS_OPTIONS, type FieldSize, Filter$1 as Filter, type FilterValues, LoadingDots, LoadingDotsLinear, MahatiActivity, type MahatiActivityProps, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, MahatiChartAnalyticsWidget, 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, SearchableDropdown as MahatiSearchableDropdown, MahatiStatus, type MahatiStatusProps, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableWithTab as MahatiTableWithTab, TexttoAudio as MahatiTexttoAudio, ToastMessage as MahatiToastMessage, Tooltip as MahatiTooltip, type SelectOption, Spinner };