@mahatisystems/mahati-ui-components 5.0.1 → 5.0.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
@@ -688,6 +688,99 @@ interface CardWithLoadingProps {
688
688
  declare const CardWithLoading: ({ loading, imageUrl, title, content, testId, }: CardWithLoadingProps) => any;
689
689
 
690
690
  declare function SearchableDropdown({ label, options, value, onChange, placeholder, testId }: any): react_jsx_runtime.JSX.Element;
691
+ declare function MultiSelectDropdown({ label, options, values, onChange, testId }: {
692
+ testId?: string;
693
+ label?: string;
694
+ options: {
695
+ label: string;
696
+ value: string;
697
+ }[];
698
+ values: string[];
699
+ onChange: (values: string[]) => void;
700
+ }): react_jsx_runtime.JSX.Element;
701
+ type CascadeOption = {
702
+ label: string;
703
+ value: string;
704
+ children?: CascadeOption[];
705
+ testId?: string;
706
+ };
707
+ interface CascadingValue {
708
+ level1?: string;
709
+ level2?: string;
710
+ level3?: string;
711
+ }
712
+ interface CascadingDropdownProps {
713
+ label?: string;
714
+ data: CascadeOption[];
715
+ testId?: string;
716
+ value: CascadingValue;
717
+ onChange: (val: CascadingValue) => void;
718
+ }
719
+ declare function CascadingDropdown({ label, data, value, testId, onChange, }: CascadingDropdownProps): react_jsx_runtime.JSX.Element;
720
+ type GroupedOption = {
721
+ label: string;
722
+ value: string;
723
+ };
724
+ type GroupedGroup = {
725
+ label: string;
726
+ options: GroupedOption[];
727
+ };
728
+ type GroupValue = {
729
+ section: string;
730
+ values: string[];
731
+ } | null;
732
+ type GroupedDropdownProps = {
733
+ label?: string;
734
+ testId?: string;
735
+ groups: GroupedGroup[];
736
+ values: GroupValue;
737
+ onChange: (val: GroupValue) => void;
738
+ };
739
+ declare function GroupedDropdown({ label, groups, values, onChange, testId }: GroupedDropdownProps): react_jsx_runtime.JSX.Element;
740
+ interface AvatarDropdownProps {
741
+ label?: string;
742
+ string?: string;
743
+ placeholder?: string;
744
+ options: AvatarOption[];
745
+ value?: string;
746
+ testId?: string;
747
+ onChange: (value: string) => void;
748
+ }
749
+ declare function AvatarDropdown({ label, placeholder, options, value, testId, onChange, }: AvatarDropdownProps): react_jsx_runtime.JSX.Element;
750
+ interface AvatarOption {
751
+ label: string;
752
+ value: string;
753
+ subtitle?: string;
754
+ image: string;
755
+ }
756
+ interface AvatarOption {
757
+ label: string;
758
+ value: string;
759
+ subtitle?: string;
760
+ image: string;
761
+ }
762
+ interface AvatarMultiSelectProps {
763
+ label?: string;
764
+ placeholder?: string;
765
+ options: AvatarOption[];
766
+ values: string[];
767
+ testId?: string;
768
+ onChange: (values: string[]) => void;
769
+ }
770
+ declare function AvatarMultiSelectDropdown({ label, placeholder, options, values, testId, onChange, }: AvatarMultiSelectProps): react_jsx_runtime.JSX.Element;
771
+ interface AsyncDropdownProps {
772
+ label?: string;
773
+ placeholder?: string;
774
+ value?: string;
775
+ disabled?: boolean;
776
+ testId?: string;
777
+ loadOptions: (search: string) => Promise<{
778
+ label: string;
779
+ value: string;
780
+ }[]>;
781
+ onChange: (value: string) => void;
782
+ }
783
+ declare function AsyncDropdown({ label, placeholder, value, disabled, testId, loadOptions, onChange, }: AsyncDropdownProps): react_jsx_runtime.JSX.Element;
691
784
 
692
785
  type IconSet = {
693
786
  play: string;
@@ -781,4 +874,4 @@ interface MahatiNotificationCardProps {
781
874
  }
782
875
  declare const MahatiNotificationCard: ({ title, testId, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => react_jsx_runtime.JSX.Element;
783
876
 
784
- 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 };
877
+ export { Accordion, type AccordionProps, type AvatarOption, 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, AsyncDropdown as MahatiAsyncDropdown, AvatarDropdown as MahatiAvatarDropdown, AvatarMultiSelectDropdown as MahatiAvatarMultiSelectDropdown, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, CascadingDropdown as MahatiCascadingDropdown, MahatiChartAnalyticsWidget, ConfettiExplosion as MahatiConfettiExplosion, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, GroupedDropdown as MahatiGroupedDropdown, Input as MahatiInput, MahatiLocationAccessModal, MahatiMicrophoneAccessModal, Modal as MahatiModal, MultiSelectDropdown as MahatiMultiSelectDropdown, 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
@@ -688,6 +688,99 @@ interface CardWithLoadingProps {
688
688
  declare const CardWithLoading: ({ loading, imageUrl, title, content, testId, }: CardWithLoadingProps) => any;
689
689
 
690
690
  declare function SearchableDropdown({ label, options, value, onChange, placeholder, testId }: any): react_jsx_runtime.JSX.Element;
691
+ declare function MultiSelectDropdown({ label, options, values, onChange, testId }: {
692
+ testId?: string;
693
+ label?: string;
694
+ options: {
695
+ label: string;
696
+ value: string;
697
+ }[];
698
+ values: string[];
699
+ onChange: (values: string[]) => void;
700
+ }): react_jsx_runtime.JSX.Element;
701
+ type CascadeOption = {
702
+ label: string;
703
+ value: string;
704
+ children?: CascadeOption[];
705
+ testId?: string;
706
+ };
707
+ interface CascadingValue {
708
+ level1?: string;
709
+ level2?: string;
710
+ level3?: string;
711
+ }
712
+ interface CascadingDropdownProps {
713
+ label?: string;
714
+ data: CascadeOption[];
715
+ testId?: string;
716
+ value: CascadingValue;
717
+ onChange: (val: CascadingValue) => void;
718
+ }
719
+ declare function CascadingDropdown({ label, data, value, testId, onChange, }: CascadingDropdownProps): react_jsx_runtime.JSX.Element;
720
+ type GroupedOption = {
721
+ label: string;
722
+ value: string;
723
+ };
724
+ type GroupedGroup = {
725
+ label: string;
726
+ options: GroupedOption[];
727
+ };
728
+ type GroupValue = {
729
+ section: string;
730
+ values: string[];
731
+ } | null;
732
+ type GroupedDropdownProps = {
733
+ label?: string;
734
+ testId?: string;
735
+ groups: GroupedGroup[];
736
+ values: GroupValue;
737
+ onChange: (val: GroupValue) => void;
738
+ };
739
+ declare function GroupedDropdown({ label, groups, values, onChange, testId }: GroupedDropdownProps): react_jsx_runtime.JSX.Element;
740
+ interface AvatarDropdownProps {
741
+ label?: string;
742
+ string?: string;
743
+ placeholder?: string;
744
+ options: AvatarOption[];
745
+ value?: string;
746
+ testId?: string;
747
+ onChange: (value: string) => void;
748
+ }
749
+ declare function AvatarDropdown({ label, placeholder, options, value, testId, onChange, }: AvatarDropdownProps): react_jsx_runtime.JSX.Element;
750
+ interface AvatarOption {
751
+ label: string;
752
+ value: string;
753
+ subtitle?: string;
754
+ image: string;
755
+ }
756
+ interface AvatarOption {
757
+ label: string;
758
+ value: string;
759
+ subtitle?: string;
760
+ image: string;
761
+ }
762
+ interface AvatarMultiSelectProps {
763
+ label?: string;
764
+ placeholder?: string;
765
+ options: AvatarOption[];
766
+ values: string[];
767
+ testId?: string;
768
+ onChange: (values: string[]) => void;
769
+ }
770
+ declare function AvatarMultiSelectDropdown({ label, placeholder, options, values, testId, onChange, }: AvatarMultiSelectProps): react_jsx_runtime.JSX.Element;
771
+ interface AsyncDropdownProps {
772
+ label?: string;
773
+ placeholder?: string;
774
+ value?: string;
775
+ disabled?: boolean;
776
+ testId?: string;
777
+ loadOptions: (search: string) => Promise<{
778
+ label: string;
779
+ value: string;
780
+ }[]>;
781
+ onChange: (value: string) => void;
782
+ }
783
+ declare function AsyncDropdown({ label, placeholder, value, disabled, testId, loadOptions, onChange, }: AsyncDropdownProps): react_jsx_runtime.JSX.Element;
691
784
 
692
785
  type IconSet = {
693
786
  play: string;
@@ -781,4 +874,4 @@ interface MahatiNotificationCardProps {
781
874
  }
782
875
  declare const MahatiNotificationCard: ({ title, testId, description, time, iconSrc, avatarSrc, badgeIconSrc, badgeType, primaryActionText, onPrimaryAction, secondaryActionText, onSecondaryAction, onClose, }: MahatiNotificationCardProps) => react_jsx_runtime.JSX.Element;
783
876
 
784
- 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 };
877
+ export { Accordion, type AccordionProps, type AvatarOption, 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, AsyncDropdown as MahatiAsyncDropdown, AvatarDropdown as MahatiAvatarDropdown, AvatarMultiSelectDropdown as MahatiAvatarMultiSelectDropdown, Button as MahatiButton, Calendar as MahatiCalendar, MahatiCameraAccessModal, Card as MahatiCard, CascadingDropdown as MahatiCascadingDropdown, MahatiChartAnalyticsWidget, ConfettiExplosion as MahatiConfettiExplosion, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, GroupedDropdown as MahatiGroupedDropdown, Input as MahatiInput, MahatiLocationAccessModal, MahatiMicrophoneAccessModal, Modal as MahatiModal, MultiSelectDropdown as MahatiMultiSelectDropdown, 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 };