@spaceandtimelabs/dapp-mi-components 0.3.0 → 0.3.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.ts CHANGED
@@ -1,25 +1,27 @@
1
- import { AccordionProps } from '../../@mui/material';
2
- import { ButtonProps as ButtonProps_2 } from '../../@mui/material/Button';
3
- import { ChangeEvent } from '../../react';
4
- import { Component } from '../../react';
5
- import { default as default_2 } from '../../react';
6
- import { default as default_3 } from '../../../../react';
7
- import { default as default_4 } from '../../../react';
8
- import { DefaultTheme } from './styled-components';
9
- import { ErrorInfo } from '../../react';
10
- import { GlobalStyleComponent } from './styled-components';
11
- import { MenuProps } from '../../@mui/material';
12
- import { PaginationProps } from '../../@mui/material';
1
+ import { AccordionProps } from '@mui/material';
2
+ import { ButtonProps as ButtonProps_2 } from '@mui/material/Button';
3
+ import { ChangeEvent } from 'react';
4
+ import { Component } from 'react';
5
+ import { default as default_2 } from 'react';
6
+ import { DefaultTheme } from 'styled-components';
7
+ import { ErrorInfo } from 'react';
8
+ import { GlobalStyleComponent } from 'styled-components';
9
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
10
+ import { MenuProps } from '@mui/material';
11
+ import { PaginationProps } from '@mui/material';
12
+ import { PropsWithChildren } from 'react';
13
13
  import * as React_2 from 'react';
14
- import { ReactNode } from '../../react';
15
- import { SnackbarCloseReason } from '../../@mui/material/Snackbar';
16
- import { SwitchProps } from '../../@mui/material';
17
- import { Theme } from './@mui/material/styles';
18
- import { TooltipProps } from '../../@mui/material/Tooltip';
14
+ import { ReactNode } from 'react';
15
+ import { SnackbarCloseReason } from '@mui/material/Snackbar';
16
+ import { SwitchProps } from '@mui/material';
17
+ import { SxProps } from '@mui/system';
18
+ import { Theme } from '@mui/material/styles';
19
+ import { TooltipProps } from '@mui/material/Tooltip';
20
+ import { TooltipProps as TooltipProps_2 } from '@mui/material';
19
21
 
20
- export declare const Accordion: default_2.FC<AccordionComponentProps>;
22
+ export declare const Accordion: default_2.FC<ComponentWithChildren<AccordionComponentProps>>;
21
23
 
22
- declare interface AccordionComponentProps extends Omit<AccordionProps, 'children'> {
24
+ declare interface AccordionComponentProps extends Omit_2<AccordionProps, 'children'>, BaseComponentProps {
23
25
  id: string;
24
26
  summary: string;
25
27
  items: ItemProps[];
@@ -33,7 +35,7 @@ export declare const ActivityBar: React_2.FC<ActivityBarProps>;
33
35
  declare interface ActivityBarProps {
34
36
  handleClose: (event: Event | React_2.SyntheticEvent, reason?: SnackbarCloseReason) => void;
35
37
  open: boolean;
36
- theme?: any;
38
+ theme?: Theme;
37
39
  anchorOrigin?: {
38
40
  vertical: 'top' | 'bottom';
39
41
  horizontal: 'left' | 'right';
@@ -50,70 +52,78 @@ export declare const arrowRight: string;
50
52
 
51
53
  export declare const arrowRightUp: string;
52
54
 
55
+ declare interface BaseComponentProps {
56
+ className?: string;
57
+ theme?: Theme;
58
+ sx?: SxProps<Theme>;
59
+ }
60
+
53
61
  export declare const btnArrowRight: string;
54
62
 
55
- export declare const Button: ({ type, sizes, variants, className, icon, iconPosition, text, onClick, isDisabled, theme, children, iconColor, ...rest }: ButtonProps) => default_2.JSX.Element;
63
+ export declare const Button: default_2.FC<ComponentWithChildren<ButtonProps>>;
56
64
 
57
- export declare interface ButtonProps extends Omit<ButtonProps_2, 'variant' | 'size'> {
65
+ export declare interface ButtonProps extends Omit_2<ButtonProps_2, 'variant' | 'size'>, BaseComponentProps {
58
66
  type?: 'button' | 'submit' | 'reset';
59
67
  sizes?: 'sm' | 'md';
60
68
  variants?: 'primary' | 'secondary' | 'primary-outline' | 'skyPink' | 'skyPink-outline' | 'blue' | 'blue-outline' | 'indigo' | 'indigo-outline' | 'violet' | 'violet-outline' | 'danger' | 'danger-outline';
61
- className?: string;
62
69
  icon?: string;
63
70
  iconPosition?: 'right' | 'left' | string | undefined;
64
71
  text?: string | undefined;
65
72
  onClick?: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
66
73
  isDisabled?: boolean;
67
- theme?: any;
68
- iconColor?: string;
69
74
  }
70
75
 
71
- export declare const Cards: ({ variants, className, theme, title, content, image, }: CardsProps) => default_2.JSX.Element;
76
+ export declare const Cards: ({ variants, className, theme, title, content, image }: CardsProps) => JSX_2.Element;
72
77
 
73
78
  declare interface CardsProps {
74
79
  variants?: 'apps' | 'dashboard';
75
80
  className?: string;
76
- theme?: any;
81
+ theme?: Theme;
77
82
  title?: string;
78
83
  content?: string;
79
84
  image?: string;
80
85
  }
81
86
 
82
- export declare const Chat: ({ messageCollection, onNewUserMessage, userInput, onInputValueChange, messageLoading, onImageUploadClick, imageUploadDisabled, isSendDisabled, }: ChatProps) => default_3.JSX.Element;
87
+ export declare const Chat: ({ messageCollection, onNewUserMessage, userInput, onInputValueChange, messageLoading, onImageUploadClick, imageUploadDisabled, isSendDisabled, }: ChatProps) => JSX_2.Element;
83
88
 
84
- export declare const ChatBotButton: default_3.FC<ChatBotProps>;
89
+ export declare const ChatBotButton: default_2.FC<ChatBotProps>;
85
90
 
86
- export declare const ChatBotComponentsTab: () => default_3.JSX.Element;
91
+ export declare const ChatBotComponentsTab: () => JSX_2.Element;
87
92
 
88
93
  declare interface ChatbotMessage {
89
94
  content: string;
90
95
  role: string;
91
96
  timestamp: number;
92
97
  type: ChatMessageTypeEnum;
98
+ class?: string;
93
99
  }
94
100
 
95
101
  declare interface ChatBotProps {
96
- ChatTab: default_3.ComponentType;
97
- ComponentsTab: default_3.ComponentType;
98
- ProjectsTab: default_3.ComponentType;
99
- ManageTab: default_3.ComponentType;
102
+ ChatTab: default_2.ComponentType;
103
+ ComponentsTab: default_2.ComponentType;
104
+ ProjectsTab: default_2.ComponentType;
105
+ ManageTab: default_2.ComponentType;
100
106
  onChatBotPinnedClick: () => void;
101
107
  onChatBotCloseClick: () => void;
102
108
  chatBotPinned: boolean;
103
109
  }
104
110
 
105
- export declare const ChatBotWrapper: ({ ChatTab, ComponentsTab, ProjectsTab, ManageTab, onChatBotPinnedClick, onChatBotCloseClick, chatBotPinned, }: ChatBotWrapperProps) => default_3.JSX.Element;
111
+ export declare const ChatBotWrapper: ({ ChatTab, ComponentsTab, ProjectsTab, ManageTab, onChatBotPinnedClick, onChatBotCloseClick, chatBotPinned, }: ChatBotWrapperProps) => JSX_2.Element;
106
112
 
107
113
  declare interface ChatBotWrapperProps {
108
- ChatTab: default_3.ComponentType;
109
- ComponentsTab: default_3.ComponentType;
110
- ProjectsTab: default_3.ComponentType;
111
- ManageTab: default_3.ComponentType;
114
+ ChatTab: default_2.ComponentType;
115
+ ComponentsTab: default_2.ComponentType;
116
+ ProjectsTab: default_2.ComponentType;
117
+ ManageTab: default_2.ComponentType;
112
118
  onChatBotPinnedClick: () => void;
113
119
  onChatBotCloseClick: () => void;
114
120
  chatBotPinned: boolean;
115
121
  }
116
122
 
123
+ declare interface ChatInputEvent extends React.ChangeEvent<HTMLInputElement> {
124
+ target: HTMLInputElement;
125
+ }
126
+
117
127
  declare enum ChatMessageTypeEnum {
118
128
  popularTrade = "popular",
119
129
  suggestion = "suggestion",
@@ -128,20 +138,20 @@ declare interface ChatProps {
128
138
  messageCollection: ChatbotMessage[];
129
139
  onNewUserMessage: () => void;
130
140
  userInput: string;
131
- onInputValueChange: (e: Event) => void;
141
+ onInputValueChange: (e: ChatInputEvent) => void;
132
142
  messageLoading: boolean;
133
143
  onImageUploadClick: () => void;
134
144
  imageUploadDisabled: boolean;
135
145
  isSendDisabled: boolean;
136
146
  }
137
147
 
138
- export declare const ChoiceOptions: default_4.FC;
148
+ export declare const ChoiceOptions: default_2.FC;
139
149
 
140
- export declare const Circular: () => default_2.JSX.Element;
150
+ export declare const Circular: () => JSX_2.Element;
141
151
 
142
152
  export declare const circular: string;
143
153
 
144
- export declare const CloseIconComponent: ({ className, iconColor, theme, }: IconsProps) => default_2.JSX.Element;
154
+ export declare const CloseIconComponent: default_2.FC<ComponentWithChildren<IconsProps>>;
145
155
 
146
156
  export declare const CommonDrawer: default_2.FC<CommonDrawerProps>;
147
157
 
@@ -149,7 +159,7 @@ export declare interface CommonDrawerProps {
149
159
  children?: default_2.ReactNode;
150
160
  header?: default_2.ReactNode;
151
161
  drawerList: default_2.ReactNode;
152
- theme?: any;
162
+ theme?: Theme;
153
163
  }
154
164
 
155
165
  export declare const CommonTable: default_2.FC<TableProps>;
@@ -161,26 +171,27 @@ export declare interface CommonTooltipProps extends TooltipProps {
161
171
  sizes?: 'sm' | 'md';
162
172
  }
163
173
 
174
+ declare type ComponentWithChildren<P = Record<string, unknown>> = PropsWithChildren<P>;
175
+
164
176
  export declare const create: string;
165
177
 
166
- export declare const CreateProject: () => default_2.JSX.Element;
178
+ export declare const CreateProject: () => JSX_2.Element;
167
179
 
168
- export declare const CurrencyBox: default_4.FC;
180
+ export declare const CurrencyBox: default_2.FC;
169
181
 
170
- declare interface CustomPaginationProps extends PaginationProps {
171
- }
182
+ declare type CustomPaginationProps = PaginationProps;
172
183
 
173
184
  export declare const CustomSwitch: default_2.FC<CustomSwitchProps>;
174
185
 
175
186
  export declare interface CustomSwitchProps extends SwitchProps {
176
187
  className?: string;
177
- theme?: any;
188
+ theme?: Theme;
178
189
  label?: string;
179
190
  labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
180
191
  }
181
192
 
182
193
  declare interface Data {
183
- [key: string]: string;
194
+ [key: string]: unknown;
184
195
  }
185
196
 
186
197
  export declare const data: string;
@@ -189,7 +200,7 @@ export declare const downArrow: string;
189
200
 
190
201
  export declare const edit: string;
191
202
 
192
- export declare const EditMenu: () => React_2.JSX.Element;
203
+ export declare const EditMenu: () => JSX_2.Element;
193
204
 
194
205
  export declare class ErrorBoundary extends Component<Props, State> {
195
206
  constructor(props: Props);
@@ -207,12 +218,12 @@ export declare const filterIcn: string;
207
218
  export declare const Footer: default_2.FC;
208
219
 
209
220
  export declare const GlobalStyle: GlobalStyleComponent< {
210
- theme: any;
221
+ theme: Theme;
211
222
  $useImgColors?: boolean | undefined;
212
223
  $chartBackground?: string[] | undefined;
213
224
  }, DefaultTheme>;
214
225
 
215
- export declare const Header: ({ onAuthButtonClick }: HeaderProps) => React_2.JSX.Element;
226
+ export declare const Header: ({ onAuthButtonClick }: HeaderProps) => JSX_2.Element;
216
227
 
217
228
  declare interface HeaderProps {
218
229
  onAuthButtonClick: () => void;
@@ -220,15 +231,13 @@ declare interface HeaderProps {
220
231
 
221
232
  export declare const icnSearchInput: string;
222
233
 
223
- export declare interface IconsProps extends Omit<ButtonProps_2, 'variant' | 'size'> {
224
- className?: string;
234
+ export declare interface IconsProps extends Omit_2<ButtonProps_2, 'variant' | 'size'>, BaseComponentProps {
225
235
  iconColor?: string;
226
- theme?: any;
227
236
  }
228
237
 
229
238
  export declare const infoCircle: string;
230
239
 
231
- export declare const Input: ({ type, isDisabled, onClick, className, icon, iconPosition, placeholder, isButton, btnText, isBtnIcon, isIconPosition, inputRef, onChange, onBlur, onFocus, ...rest }: InputProps) => default_2.JSX.Element;
240
+ export declare const Input: ({ type, isDisabled, onClick, className, icon, iconPosition, placeholder, isButton, btnText, isBtnIcon, isIconPosition, inputRef, onChange, onBlur, onFocus, ...rest }: InputProps) => JSX_2.Element;
232
241
 
233
242
  declare interface InputProps extends default_2.InputHTMLAttributes<HTMLInputElement> {
234
243
  type: 'text' | 'email' | 'password' | 'search';
@@ -238,7 +247,7 @@ declare interface InputProps extends default_2.InputHTMLAttributes<HTMLInputElem
238
247
  placeholder: string;
239
248
  onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
240
249
  isDisabled?: boolean;
241
- isButton?: boolean;
250
+ isButton: boolean;
242
251
  btnText?: string;
243
252
  isBtnIcon?: string;
244
253
  isIconPosition?: string;
@@ -256,7 +265,7 @@ declare interface ItemProps {
256
265
 
257
266
  export declare const Landing: default_2.FC;
258
267
 
259
- export declare const LandingDrawer: default_4.FC<MiniDrawerProps>;
268
+ export declare const LandingDrawer: default_2.FC<MiniDrawerProps>;
260
269
 
261
270
  export declare const LandingPage: default_2.FC;
262
271
 
@@ -277,7 +286,7 @@ export declare const menu: string;
277
286
  declare interface MenuItem {
278
287
  icon: string;
279
288
  title: string;
280
- onClick?: (event: default_4.MouseEvent<HTMLElement>) => void;
289
+ onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
281
290
  className?: string;
282
291
  }
283
292
 
@@ -556,11 +565,11 @@ export declare const MI_DAPP_COMPONENTS_THEME: {
556
565
  };
557
566
 
558
567
  declare interface MiniDrawerProps {
559
- children: default_4.ReactNode;
568
+ children: default_2.ReactNode;
560
569
  onSidebarLinkClick: (link: string) => void;
561
570
  }
562
571
 
563
- export declare const MyAppsContent: () => default_2.JSX.Element;
572
+ export declare const MyAppsContent: () => JSX_2.Element;
564
573
 
565
574
  export declare const MyProjectHeader: default_2.FC<MyProjectHeaderProps>;
566
575
 
@@ -569,11 +578,13 @@ declare interface MyProjectHeaderProps {
569
578
  title: string;
570
579
  }
571
580
 
572
- export declare const MyProjects: () => default_2.JSX.Element;
581
+ export declare const MyProjects: () => JSX_2.Element;
573
582
 
574
- export declare const MySavedQueries: () => default_4.JSX.Element;
583
+ export declare const MySavedQueries: () => JSX_2.Element;
575
584
 
576
- export declare const NextIcon: () => default_2.JSX.Element;
585
+ export declare const NextIcon: () => JSX_2.Element;
586
+
587
+ declare type Omit_2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
577
588
 
578
589
  export declare const OverlayLoading: default_2.FC;
579
590
 
@@ -588,15 +599,16 @@ declare interface PageHeadProps {
588
599
 
589
600
  export declare const pages: string;
590
601
 
591
- export declare const PagesVersions: () => default_2.JSX.Element;
602
+ export declare const PagesVersions: () => JSX_2.Element;
592
603
 
593
604
  export declare const PaginationComponent: default_2.FC<CustomPaginationProps>;
594
605
 
595
606
  export declare const plus: string;
596
607
 
597
- export declare const PopoverMenu: default_2.FC<PopoverMenuProps>;
608
+ export declare const PopoverMenu: default_2.FC<ComponentWithChildren<PopoverMenuProps>>;
598
609
 
599
- export declare interface PopoverMenuProps extends Omit<MenuProps, 'variant' | 'content' | 'open'> {
610
+ export declare interface PopoverMenuProps extends Omit_2<MenuProps, 'variant' | 'content' | 'open'>, BaseComponentProps {
611
+ id?: string;
600
612
  anchorEl: HTMLElement | null;
601
613
  onClose: () => void;
602
614
  onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
@@ -616,15 +628,13 @@ export declare interface PopoverMenuProps extends Omit<MenuProps, 'variant' | 'c
616
628
  vertical: 'top' | 'bottom';
617
629
  horizontal: 'left' | 'right';
618
630
  };
619
- className?: string;
620
- theme?: any;
621
631
  }
622
632
 
623
- export declare const PopularTrade: default_4.FC;
633
+ export declare const PopularTrade: default_2.FC;
624
634
 
625
- export declare const PreviousIcon: () => default_2.JSX.Element;
635
+ export declare const PreviousIcon: () => JSX_2.Element;
626
636
 
627
- export declare const ProfileTooltip: () => default_4.JSX.Element;
637
+ export declare const ProfileTooltip: () => JSX_2.Element;
628
638
 
629
639
  export declare const proofOFSql: string;
630
640
 
@@ -649,20 +659,20 @@ export declare const share: string;
649
659
  declare interface SideBarButtonProps {
650
660
  menuItems: MenuItem[];
651
661
  section: string;
652
- tootlTipProps?: any;
662
+ tootlTipProps?: Partial<TooltipProps_2>;
653
663
  }
654
664
 
655
- export declare const SideBarButtons: default_4.FC<SideBarButtonProps>;
665
+ export declare const SideBarButtons: default_2.FC<SideBarButtonProps>;
656
666
 
657
- export declare const SideBarListItem: default_4.FC<SideBarListItemProps>;
667
+ export declare const SideBarListItem: default_2.NamedExoticComponent<SideBarListItemProps>;
658
668
 
659
669
  declare interface SideBarListItemProps {
660
670
  icon: string;
661
671
  title: string;
662
672
  className?: string;
663
673
  isSelected: boolean;
664
- onClick?: (event: default_4.MouseEvent<HTMLElement>) => void;
665
- tooltipProps?: any;
674
+ onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
675
+ tooltipProps?: Partial<TooltipProps_2>;
666
676
  }
667
677
 
668
678
  export declare const spaceArchitecture: string;
@@ -673,7 +683,7 @@ declare interface State {
673
683
  hasError: boolean;
674
684
  }
675
685
 
676
- export declare const SuggestedTrade: default_4.FC;
686
+ export declare const SuggestedTrade: default_2.FC;
677
687
 
678
688
  declare interface TableProps {
679
689
  headers: string[];
@@ -689,15 +699,15 @@ declare interface TabProps {
689
699
 
690
700
  export declare const TabsComponent: React_2.FC<TabProps>;
691
701
 
692
- export declare const TradeInfo: () => default_4.JSX.Element;
702
+ export declare const TradeInfo: () => JSX_2.Element;
693
703
 
694
- export declare const TradeSuccess: default_4.FC;
704
+ export declare const TradeSuccess: default_2.FC;
695
705
 
696
706
  export declare const transactions: string;
697
707
 
698
- export declare const TypeWriterInput: () => default_4.JSX.Element;
708
+ export declare const TypeWriterInput: () => JSX_2.Element;
699
709
 
700
- export declare const UIComponents: () => default_3.JSX.Element;
710
+ export declare const UIComponents: () => JSX_2.Element;
701
711
 
702
712
  export declare const upload: string;
703
713
 
@@ -705,13 +715,14 @@ export declare const variableTheme: Theme;
705
715
 
706
716
  export { }
707
717
 
718
+
708
719
  declare module '@mui/material/styles' {
709
720
  interface Theme {
710
- custom: any;
711
- bodyBg: any;
721
+ custom: CustomTheme;
722
+ bodyBg: string;
712
723
  }
713
724
  interface ThemeOptions {
714
- custom?: any;
715
- bodyBg?: any;
725
+ custom?: CustomTheme;
726
+ bodyBg?: string;
716
727
  }
717
728
  }