@mahatisystems/mahati-ui-components 4.5.0 → 4.6.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
@@ -7,8 +7,11 @@ interface AccordionProps {
7
7
  title: string;
8
8
  children?: React__default.ReactNode;
9
9
  defaultOpen?: boolean;
10
+ accordionTestId?: string;
11
+ headerTestId?: string;
12
+ contentTestId?: string;
10
13
  }
11
- declare function Accordion({ title, children, defaultOpen, }: AccordionProps): _emotion_react_jsx_runtime.JSX.Element;
14
+ declare function Accordion({ title, children, defaultOpen, accordionTestId, headerTestId, contentTestId, }: AccordionProps): _emotion_react_jsx_runtime.JSX.Element;
12
15
  declare namespace Accordion {
13
16
  var displayName: string;
14
17
  }
@@ -35,6 +38,7 @@ declare const Card: any;
35
38
  type MahatiModalSize = "default" | "sm" | "md" | "lg" | "xl";
36
39
  type MahatiModalProps = {
37
40
  isOpen: boolean;
41
+ testId?: string;
38
42
  onOpenChange?: (open: boolean) => void;
39
43
  onClose: () => void;
40
44
  title?: string;
@@ -58,7 +62,7 @@ type MahatiModalProps = {
58
62
  headerIcon?: React.ReactNode;
59
63
  showDivider?: boolean;
60
64
  };
61
- declare function Modal({ isOpen, onClose, title, subtitle, children, className, width: customWidth, height, margin, primaryAction, secondaryAction, headerIcon, showDivider, position, size, }: MahatiModalProps): _emotion_react_jsx_runtime.JSX.Element | null;
65
+ declare function Modal({ testId, isOpen, onClose, title, subtitle, children, className, width: customWidth, height, margin, primaryAction, secondaryAction, headerIcon, showDivider, position, size, }: MahatiModalProps): _emotion_react_jsx_runtime.JSX.Element | null;
62
66
  declare namespace Modal {
63
67
  var displayName: string;
64
68
  }
@@ -68,9 +72,10 @@ interface FormContainerProps {
68
72
  onSubmit?: (e: React__default.FormEvent) => void;
69
73
  className?: string;
70
74
  style?: React__default.CSSProperties;
75
+ testId?: string;
71
76
  }
72
77
  declare const FormContainer: {
73
- ({ children, onSubmit, style, className }: FormContainerProps): _emotion_react_jsx_runtime.JSX.Element;
78
+ ({ children, onSubmit, style, testId, className }: FormContainerProps): _emotion_react_jsx_runtime.JSX.Element;
74
79
  displayName: string;
75
80
  };
76
81
 
@@ -92,6 +97,7 @@ interface CalendarDateRange {
92
97
  }
93
98
  type CalendarSize = "small" | "medium" | "large" | "extra-large";
94
99
  interface CalendarProps {
100
+ calendartestId?: string;
95
101
  value?: CalendarDate | null;
96
102
  onChange?: (date: CalendarDate | null, dateString?: string) => void;
97
103
  enableRangeSelection?: boolean;
@@ -129,7 +135,7 @@ interface CalendarProps {
129
135
  };
130
136
  }
131
137
  declare const Calendar: {
132
- ({ value, onChange, enableRangeSelection, rangeValue, onRangeChange, enableTimeSelection, timeValue, onTimeChange, showTimeFormatToggle, timeFormat, onTimeFormatChange, autoHide, showTodayButton, showClearButton, placeholder, className, disabled, onShow, onHide, icon, showIcon, size, enableYearDropdown, showDateFormatSelector, dateFormat, onDateFormatChange, showTimeZoneSelector, timeZoneFormat, onTimeZoneFormatChange, blockDateConfig, previewTextStyles, globalTypography }: CalendarProps): _emotion_react_jsx_runtime.JSX.Element;
138
+ ({ calendartestId, value, onChange, enableRangeSelection, rangeValue, onRangeChange, enableTimeSelection, timeValue, onTimeChange, showTimeFormatToggle, timeFormat, onTimeFormatChange, autoHide, showTodayButton, showClearButton, placeholder, className, disabled, onShow, onHide, icon, showIcon, size, enableYearDropdown, showDateFormatSelector, dateFormat, onDateFormatChange, showTimeZoneSelector, timeZoneFormat, onTimeZoneFormatChange, blockDateConfig, previewTextStyles, globalTypography }: CalendarProps): _emotion_react_jsx_runtime.JSX.Element;
133
139
  displayName: string;
134
140
  };
135
141
 
@@ -149,18 +155,21 @@ interface MahatiActivityProps {
149
155
  onChange: (v: string | number) => void;
150
156
  options?: SelectOption[];
151
157
  size?: FieldSize;
158
+ testId?: string;
152
159
  }
153
160
  interface MahatiStatusProps {
154
161
  value: string | number;
155
162
  onChange: (v: string | number) => void;
156
163
  options?: SelectOption[];
157
164
  size?: FieldSize;
165
+ testId?: string;
158
166
  }
159
167
  interface MahatiSearchProps {
160
168
  value: string;
161
169
  onChange: (v: string) => void;
162
170
  placeholder?: string;
163
171
  size?: FieldSize;
172
+ testId?: string;
164
173
  }
165
174
  declare const DEFAULT_ACTIVITY_OPTIONS: SelectOption[];
166
175
  declare const DEFAULT_STATUS_OPTIONS: SelectOption[];
@@ -170,25 +179,26 @@ interface FilterProps {
170
179
  activityOptions?: SelectOption[];
171
180
  statusOptions?: SelectOption[];
172
181
  searchPlaceholder?: string;
182
+ testId?: string;
173
183
  size?: any;
174
184
  }
175
185
  declare const Filter$1: {
176
- ({ onApply, onReset, activityOptions, statusOptions, searchPlaceholder, size }: FilterProps): _emotion_react_jsx_runtime.JSX.Element;
186
+ ({ onApply, onReset, activityOptions, statusOptions, searchPlaceholder, size, testId }: FilterProps): _emotion_react_jsx_runtime.JSX.Element;
177
187
  displayName: string;
178
188
  };
179
189
  /** ✅ MAHATI ACTIVITY */
180
190
  declare const MahatiActivity: {
181
- ({ value, onChange, options, size, }: MahatiActivityProps): _emotion_react_jsx_runtime.JSX.Element;
191
+ ({ value, onChange, options, size, testId }: MahatiActivityProps): _emotion_react_jsx_runtime.JSX.Element;
182
192
  displayName: string;
183
193
  };
184
194
  /** ✅ MAHATI STATUS */
185
195
  declare const MahatiStatus: {
186
- ({ value, onChange, options, size, }: MahatiStatusProps): _emotion_react_jsx_runtime.JSX.Element;
196
+ ({ value, onChange, options, size, testId, }: MahatiStatusProps): _emotion_react_jsx_runtime.JSX.Element;
187
197
  displayName: string;
188
198
  };
189
199
  /** ✅ MAHATI SEARCH */
190
200
  declare const MahatiSearch: {
191
- ({ value, onChange, placeholder, size, }: MahatiSearchProps): _emotion_react_jsx_runtime.JSX.Element;
201
+ ({ value, onChange, placeholder, size, testId }: MahatiSearchProps): _emotion_react_jsx_runtime.JSX.Element;
192
202
  displayName: string;
193
203
  };
194
204
 
@@ -200,6 +210,7 @@ interface Tab {
200
210
  interface TabbedInterfaceProps {
201
211
  tabs: Tab[];
202
212
  variant?: "underline" | "pill" | "outline" | "filled" | "gradient" | "shadow" | "glass" | "dark";
213
+ testId?: string;
203
214
  defaultActiveTab?: number;
204
215
  onTabChange?: (index: number) => void;
205
216
  draggableTabs?: boolean;
@@ -216,7 +227,7 @@ interface TabbedInterfaceProps {
216
227
  sectionDescriptionFont?: string;
217
228
  }
218
229
  declare const TabbedInterface: {
219
- ({ tabs, variant, defaultActiveTab, onTabChange, draggableTabs, onReorderTabs, orientation, verticalPosition, showTabCloseIconInHeader, tabCloseIconPosition, tabCloseIconContent, onCloseTab, tabHeaderFont, tabContentFont, sectionTitleFont, sectionDescriptionFont, }: TabbedInterfaceProps): any;
230
+ ({ tabs, variant, defaultActiveTab, onTabChange, draggableTabs, onReorderTabs, orientation, verticalPosition, showTabCloseIconInHeader, tabCloseIconPosition, tabCloseIconContent, onCloseTab, tabHeaderFont, tabContentFont, sectionTitleFont, sectionDescriptionFont, testId }: TabbedInterfaceProps): any;
220
231
  displayName: string;
221
232
  };
222
233
 
@@ -232,9 +243,10 @@ interface DropdownProps {
232
243
  className?: string;
233
244
  placeholder?: string;
234
245
  disabled?: boolean;
246
+ testId?: string;
235
247
  }
236
248
  declare const Dropdown: {
237
- ({ options, value, onSelect, variant, className, placeholder, disabled }: DropdownProps): _emotion_react_jsx_runtime.JSX.Element;
249
+ ({ options, value, onSelect, variant, className, placeholder, disabled, testId }: DropdownProps): _emotion_react_jsx_runtime.JSX.Element;
238
250
  displayName: string;
239
251
  };
240
252
 
@@ -246,6 +258,7 @@ interface TableProps {
246
258
  data: {
247
259
  [key: string]: unknown;
248
260
  }[];
261
+ tableTestId?: string;
249
262
  page?: number;
250
263
  setPage?: (page: number) => void;
251
264
  limit?: number;
@@ -273,7 +286,7 @@ interface TableProps {
273
286
  textWrapColumnMaxLengths?: Record<string, number>;
274
287
  }
275
288
  declare const Table: {
276
- ({ headers, data, page, setPage, limit, setLimit, totalCount, highlightRowColor, actions, paginationRequired, paginationPosition, onDownloadPDF, onDownloadExcel, searchable, searchTerm, onResetSearch, onSearch, searchModeOptions, summary, summaryKey, summaryTitleField, summaryColumn, summaryColumnKey, summaryColumnMaxLength, textWrapColumns, textWrapMaxLength, textWrapColumnMaxLengths, }: TableProps): any;
289
+ ({ headers, data, page, setPage, limit, setLimit, totalCount, highlightRowColor, actions, paginationRequired, paginationPosition, onDownloadPDF, onDownloadExcel, searchable, searchTerm, onResetSearch, onSearch, searchModeOptions, summary, summaryKey, summaryTitleField, summaryColumn, summaryColumnKey, summaryColumnMaxLength, textWrapColumns, textWrapMaxLength, textWrapColumnMaxLengths, tableTestId, }: TableProps): any;
277
290
  displayName: string;
278
291
  };
279
292
 
@@ -314,6 +327,7 @@ interface TableWithTabProps<RowType extends Record<string, any>> {
314
327
  */
315
328
  title?: string;
316
329
  description?: string;
330
+ testId?: string;
317
331
  /**
318
332
  * Key of the column to use as the tab header label.
319
333
  * For example: "name", "email", "policyNumber", etc.
@@ -327,7 +341,7 @@ interface TableWithTabProps<RowType extends Record<string, any>> {
327
341
  sectionTitleFont?: string;
328
342
  sectionDescriptionFont?: string;
329
343
  }
330
- declare function TableWithTab<RowType extends Record<string, any>>({ tableProps, tabProps, rearrange, getRowId, renderTabContent, onRowOpenInTab, title, description, tabLabelKey, sectionTitleFont, sectionDescriptionFont, }: TableWithTabProps<RowType>): _emotion_react_jsx_runtime.JSX.Element;
344
+ declare function TableWithTab<RowType extends Record<string, any>>({ tableProps, tabProps, rearrange, getRowId, renderTabContent, onRowOpenInTab, title, description, tabLabelKey, sectionTitleFont, sectionDescriptionFont, testId }: TableWithTabProps<RowType>): _emotion_react_jsx_runtime.JSX.Element;
331
345
  declare namespace TableWithTab {
332
346
  var displayName: string;
333
347
  }
@@ -471,6 +485,7 @@ declare const MahatiChartAnalyticsWidget: {
471
485
 
472
486
  interface TooltipProps {
473
487
  text?: string | React__default.ReactNode;
488
+ testId?: string;
474
489
  position?: "top" | "right" | "bottom" | "left";
475
490
  children: React__default.ReactNode;
476
491
  variant?: "default" | "transparent";
@@ -490,7 +505,7 @@ interface TooltipProps {
490
505
  };
491
506
  }
492
507
  declare const Tooltip: {
493
- ({ text, position, children, variant, className, textColor, backgroundColor, image, animation }: TooltipProps): any;
508
+ ({ text, position, children, variant, className, textColor, backgroundColor, image, testId, animation }: TooltipProps): any;
494
509
  displayName: string;
495
510
  };
496
511
 
@@ -554,6 +569,7 @@ interface ToastMessageProps extends React__default.HTMLAttributes<HTMLDivElement
554
569
  background?: BackgroundType;
555
570
  custom?: CustomToastStyles;
556
571
  action?: ActionButton[];
572
+ testId?: string;
557
573
  }
558
574
  declare const ToastMessage: React__default.ForwardRefExoticComponent<ToastMessageProps & React__default.RefAttributes<HTMLDivElement>>;
559
575
 
@@ -565,6 +581,7 @@ interface ConfettiExplosionProps {
565
581
  force?: number;
566
582
  particleSize?: number;
567
583
  stageHeight?: number;
584
+ testId?: string;
568
585
  }
569
586
  declare const ConfettiExplosion: React__default.FC<ConfettiExplosionProps>;
570
587
 
@@ -575,6 +592,7 @@ interface RealisticConfettiProps {
575
592
  colors?: string[];
576
593
  explosionForce?: number;
577
594
  wind?: number;
595
+ testId?: string;
578
596
  }
579
597
  declare const RealisticConfetti: React__default.FC<RealisticConfettiProps>;
580
598
 
@@ -585,15 +603,17 @@ interface SpinnerProps {
585
603
  primaryColor?: string;
586
604
  backgroundColor?: string;
587
605
  speed?: number;
606
+ testId?: string;
588
607
  }
589
- declare const Spinner: ({ size, borderWidth, borderRadius, primaryColor, backgroundColor, speed }: SpinnerProps) => any;
608
+ declare const Spinner: ({ size, testId, borderWidth, borderRadius, primaryColor, backgroundColor, speed }: SpinnerProps) => any;
590
609
  interface CircularSpinnerProps {
591
610
  size?: number;
592
611
  color?: string;
593
612
  speed?: number;
594
613
  ringCount?: number;
614
+ testId?: string;
595
615
  }
596
- declare const CircularSpinner: ({ size, color, speed, ringCount, }: CircularSpinnerProps) => any;
616
+ declare const CircularSpinner: ({ size, color, speed, ringCount, testId, }: CircularSpinnerProps) => any;
597
617
  interface CardOverlayLoaderProps {
598
618
  show?: boolean;
599
619
  spinnerSize?: number;
@@ -602,33 +622,37 @@ interface CardOverlayLoaderProps {
602
622
  spinnerTrack?: string;
603
623
  backdrop?: string;
604
624
  label?: string;
625
+ testId?: string;
605
626
  }
606
- declare const CardOverlayLoader: ({ show, spinnerSize, spinnerBorderWidth, spinnerPrimary, spinnerTrack, backdrop, label }: CardOverlayLoaderProps) => any;
627
+ declare const CardOverlayLoader: ({ show, testId, spinnerSize, spinnerBorderWidth, spinnerPrimary, spinnerTrack, backdrop, label }: CardOverlayLoaderProps) => any;
607
628
  interface LoadingDotsProps {
608
629
  size?: number;
609
630
  color?: string;
610
631
  gap?: number;
611
632
  speed?: number;
612
633
  count?: number;
634
+ testId?: string;
613
635
  }
614
- declare const LoadingDots: ({ size, color, gap, speed, count, }: LoadingDotsProps) => any;
636
+ declare const LoadingDots: ({ size, color, gap, speed, count, testId, }: LoadingDotsProps) => any;
615
637
  interface LoadingDotsLinearProps {
616
638
  size?: number;
617
639
  color?: string;
618
640
  gap?: number;
619
641
  speed?: number;
620
642
  count?: number;
643
+ testId?: string;
621
644
  }
622
- declare const LoadingDotsLinear: ({ size, color, gap, speed, count, }: LoadingDotsLinearProps) => any;
645
+ declare const LoadingDotsLinear: ({ size, color, gap, speed, count, testId }: LoadingDotsLinearProps) => any;
623
646
  interface CardWithLoadingProps {
624
647
  loading?: boolean;
625
648
  imageUrl?: string;
626
649
  title?: string;
627
650
  content?: string;
651
+ testId?: string;
628
652
  }
629
- declare const CardWithLoading: ({ loading, imageUrl, title, content, }: CardWithLoadingProps) => any;
653
+ declare const CardWithLoading: ({ loading, testId, imageUrl, title, content, }: CardWithLoadingProps) => any;
630
654
 
631
- declare function SearchableDropdown({ label, options, value, onChange, placeholder, }: any): _emotion_react_jsx_runtime.JSX.Element;
655
+ declare function SearchableDropdown({ label, options, value, onChange, placeholder, testId }: any): _emotion_react_jsx_runtime.JSX.Element;
632
656
 
633
657
  type IconSet = {
634
658
  play: string;
@@ -644,8 +668,9 @@ declare const TexttoAudio: ({ icons }: {
644
668
  icons?: IconSet;
645
669
  }) => _emotion_react_jsx_runtime.JSX.Element;
646
670
 
647
- declare const MahatiLocationAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: any) => any;
671
+ declare const MahatiLocationAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, testId, }: any) => any;
648
672
  interface MahatiCameraAccessModalProps {
673
+ testId?: string;
649
674
  isOpen: boolean;
650
675
  onClose: () => void;
651
676
  title: string;
@@ -656,8 +681,8 @@ interface MahatiCameraAccessModalProps {
656
681
  onAllow?: (stream?: MediaStream) => void;
657
682
  onDeny?: () => void;
658
683
  }
659
- declare const MahatiCameraAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: MahatiCameraAccessModalProps) => any;
660
- declare const MahatiMicrophoneAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, }: any) => any;
684
+ declare const MahatiCameraAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, testId }: MahatiCameraAccessModalProps) => any;
685
+ declare const MahatiMicrophoneAccessModal: ({ isOpen, onClose, title, description, image, allowText, denyText, onAllow, onDeny, testId }: any) => any;
661
686
  interface MahatiPromotionModalProps {
662
687
  isOpen: boolean;
663
688
  onClose: () => void;
@@ -670,10 +695,12 @@ interface MahatiPromotionModalProps {
670
695
  openInNewTab?: boolean;
671
696
  showInput?: boolean;
672
697
  inputPlaceholder?: string;
698
+ testId?: string;
673
699
  }
674
- declare const MahatiPromotionModal: ({ isOpen, onClose, ctaLink, openInNewTab, onCtaClick, ...cardProps }: MahatiPromotionModalProps) => any;
700
+ declare const MahatiPromotionModal: ({ isOpen, onClose, ctaLink, openInNewTab, onCtaClick, testId, ...cardProps }: MahatiPromotionModalProps) => any;
675
701
  interface MahatiPromotionModalV2Props {
676
702
  isOpen: boolean;
703
+ testId?: string;
677
704
  onClose: () => void;
678
705
  headerTitle: string;
679
706
  title: string;
@@ -685,10 +712,11 @@ interface MahatiPromotionModalV2Props {
685
712
  showBadgeImage?: boolean;
686
713
  badgeImageSrc?: string;
687
714
  }
688
- declare const MahatiPromotionModalV2Modal: ({ isOpen, onClose, headerTitle, title, description, ctaText, onCtaClick, ctaLink, openInNewTab, showBadgeImage, badgeImageSrc, }: MahatiPromotionModalV2Props) => any;
715
+ declare const MahatiPromotionModalV2Modal: ({ isOpen, testId, onClose, headerTitle, title, description, ctaText, onCtaClick, ctaLink, openInNewTab, showBadgeImage, badgeImageSrc, }: MahatiPromotionModalV2Props) => any;
689
716
  interface MahatiPromotionModalV3Props {
690
717
  isOpen: boolean;
691
718
  onClose: () => void;
719
+ testId?: string;
692
720
  title: string;
693
721
  description: string;
694
722
  ctaText: string;
@@ -699,12 +727,13 @@ interface MahatiPromotionModalV3Props {
699
727
  ctaLink?: string;
700
728
  openInNewTab?: boolean;
701
729
  }
702
- declare const MahatiPromotionModalV3Modal: ({ isOpen, onClose, title, description, ctaText, onCtaClick, secondaryText, onSecondaryClick, imageSrc, ctaLink, openInNewTab, }: MahatiPromotionModalV3Props) => any;
730
+ declare const MahatiPromotionModalV3Modal: ({ isOpen, testId, onClose, title, description, ctaText, onCtaClick, secondaryText, onSecondaryClick, imageSrc, ctaLink, openInNewTab, }: MahatiPromotionModalV3Props) => any;
703
731
  type BadgeType = "like" | "mention" | "follow" | "comment" | "add";
704
732
  interface MahatiNotificationCardProps {
705
733
  title: string;
706
734
  description?: string;
707
735
  time?: string;
736
+ testId?: string;
708
737
  iconSrc?: string;
709
738
  avatarSrc?: string;
710
739
  badgeIconSrc?: string;
@@ -715,6 +744,6 @@ interface MahatiNotificationCardProps {
715
744
  onSecondaryAction?: () => void;
716
745
  onClose?: () => void;
717
746
  }
718
- declare const MahatiNotificationCard: ({ title, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
747
+ declare const MahatiNotificationCard: ({ title, testId, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => _emotion_react_jsx_runtime.JSX.Element;
719
748
 
720
749
  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 };