@spaceandtimelabs/dapp-mi-components 0.3.0 → 0.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.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
 
@@ -268,6 +277,7 @@ declare interface LayoutProps {
268
277
  children: default_2.ReactNode;
269
278
  onAuthButtonClick: () => void;
270
279
  onSidebarLinkClick: (link: string) => void;
280
+ hideNavbar?: boolean;
271
281
  }
272
282
 
273
283
  export declare const magicpen: string;
@@ -277,7 +287,7 @@ export declare const menu: string;
277
287
  declare interface MenuItem {
278
288
  icon: string;
279
289
  title: string;
280
- onClick?: (event: default_4.MouseEvent<HTMLElement>) => void;
290
+ onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
281
291
  className?: string;
282
292
  }
283
293
 
@@ -556,11 +566,11 @@ export declare const MI_DAPP_COMPONENTS_THEME: {
556
566
  };
557
567
 
558
568
  declare interface MiniDrawerProps {
559
- children: default_4.ReactNode;
569
+ children: default_2.ReactNode;
560
570
  onSidebarLinkClick: (link: string) => void;
561
571
  }
562
572
 
563
- export declare const MyAppsContent: () => default_2.JSX.Element;
573
+ export declare const MyAppsContent: () => JSX_2.Element;
564
574
 
565
575
  export declare const MyProjectHeader: default_2.FC<MyProjectHeaderProps>;
566
576
 
@@ -569,11 +579,13 @@ declare interface MyProjectHeaderProps {
569
579
  title: string;
570
580
  }
571
581
 
572
- export declare const MyProjects: () => default_2.JSX.Element;
582
+ export declare const MyProjects: () => JSX_2.Element;
573
583
 
574
- export declare const MySavedQueries: () => default_4.JSX.Element;
584
+ export declare const MySavedQueries: () => JSX_2.Element;
575
585
 
576
- export declare const NextIcon: () => default_2.JSX.Element;
586
+ export declare const NextIcon: () => JSX_2.Element;
587
+
588
+ declare type Omit_2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
577
589
 
578
590
  export declare const OverlayLoading: default_2.FC;
579
591
 
@@ -588,15 +600,16 @@ declare interface PageHeadProps {
588
600
 
589
601
  export declare const pages: string;
590
602
 
591
- export declare const PagesVersions: () => default_2.JSX.Element;
603
+ export declare const PagesVersions: () => JSX_2.Element;
592
604
 
593
605
  export declare const PaginationComponent: default_2.FC<CustomPaginationProps>;
594
606
 
595
607
  export declare const plus: string;
596
608
 
597
- export declare const PopoverMenu: default_2.FC<PopoverMenuProps>;
609
+ export declare const PopoverMenu: default_2.FC<ComponentWithChildren<PopoverMenuProps>>;
598
610
 
599
- export declare interface PopoverMenuProps extends Omit<MenuProps, 'variant' | 'content' | 'open'> {
611
+ export declare interface PopoverMenuProps extends Omit_2<MenuProps, 'variant' | 'content' | 'open'>, BaseComponentProps {
612
+ id?: string;
600
613
  anchorEl: HTMLElement | null;
601
614
  onClose: () => void;
602
615
  onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
@@ -616,15 +629,13 @@ export declare interface PopoverMenuProps extends Omit<MenuProps, 'variant' | 'c
616
629
  vertical: 'top' | 'bottom';
617
630
  horizontal: 'left' | 'right';
618
631
  };
619
- className?: string;
620
- theme?: any;
621
632
  }
622
633
 
623
- export declare const PopularTrade: default_4.FC;
634
+ export declare const PopularTrade: default_2.FC;
624
635
 
625
- export declare const PreviousIcon: () => default_2.JSX.Element;
636
+ export declare const PreviousIcon: () => JSX_2.Element;
626
637
 
627
- export declare const ProfileTooltip: () => default_4.JSX.Element;
638
+ export declare const ProfileTooltip: () => JSX_2.Element;
628
639
 
629
640
  export declare const proofOFSql: string;
630
641
 
@@ -649,20 +660,20 @@ export declare const share: string;
649
660
  declare interface SideBarButtonProps {
650
661
  menuItems: MenuItem[];
651
662
  section: string;
652
- tootlTipProps?: any;
663
+ tootlTipProps?: Partial<TooltipProps_2>;
653
664
  }
654
665
 
655
- export declare const SideBarButtons: default_4.FC<SideBarButtonProps>;
666
+ export declare const SideBarButtons: default_2.FC<SideBarButtonProps>;
656
667
 
657
- export declare const SideBarListItem: default_4.FC<SideBarListItemProps>;
668
+ export declare const SideBarListItem: default_2.NamedExoticComponent<SideBarListItemProps>;
658
669
 
659
670
  declare interface SideBarListItemProps {
660
671
  icon: string;
661
672
  title: string;
662
673
  className?: string;
663
674
  isSelected: boolean;
664
- onClick?: (event: default_4.MouseEvent<HTMLElement>) => void;
665
- tooltipProps?: any;
675
+ onClick?: (event: default_2.MouseEvent<HTMLElement>) => void;
676
+ tooltipProps?: Partial<TooltipProps_2>;
666
677
  }
667
678
 
668
679
  export declare const spaceArchitecture: string;
@@ -673,7 +684,7 @@ declare interface State {
673
684
  hasError: boolean;
674
685
  }
675
686
 
676
- export declare const SuggestedTrade: default_4.FC;
687
+ export declare const SuggestedTrade: default_2.FC;
677
688
 
678
689
  declare interface TableProps {
679
690
  headers: string[];
@@ -689,15 +700,15 @@ declare interface TabProps {
689
700
 
690
701
  export declare const TabsComponent: React_2.FC<TabProps>;
691
702
 
692
- export declare const TradeInfo: () => default_4.JSX.Element;
703
+ export declare const TradeInfo: () => JSX_2.Element;
693
704
 
694
- export declare const TradeSuccess: default_4.FC;
705
+ export declare const TradeSuccess: default_2.FC;
695
706
 
696
707
  export declare const transactions: string;
697
708
 
698
- export declare const TypeWriterInput: () => default_4.JSX.Element;
709
+ export declare const TypeWriterInput: () => JSX_2.Element;
699
710
 
700
- export declare const UIComponents: () => default_3.JSX.Element;
711
+ export declare const UIComponents: () => JSX_2.Element;
701
712
 
702
713
  export declare const upload: string;
703
714
 
@@ -705,13 +716,14 @@ export declare const variableTheme: Theme;
705
716
 
706
717
  export { }
707
718
 
719
+
708
720
  declare module '@mui/material/styles' {
709
721
  interface Theme {
710
- custom: any;
711
- bodyBg: any;
722
+ custom: CustomTheme;
723
+ bodyBg: string;
712
724
  }
713
725
  interface ThemeOptions {
714
- custom?: any;
715
- bodyBg?: any;
726
+ custom?: CustomTheme;
727
+ bodyBg?: string;
716
728
  }
717
729
  }