@coinswap-app/uikit 0.8.0 → 1.0.1
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/components/Breadcrumbs/types.d.ts +1 -0
- package/dist/components/Button/RampButtonLite.d.ts +1 -0
- package/dist/components/ButtonMenu/types.d.ts +1 -0
- package/dist/components/Dropdown/types.d.ts +1 -0
- package/dist/components/EarnedCarouselWrapper/EarnedCarouselWrapper.d.ts +3 -1
- package/dist/components/EarnedWrapper/EarnedWrapper.d.ts +3 -1
- package/dist/components/Heading/types.d.ts +6 -6
- package/dist/components/MuiInput/InputAssets/InputAssets.d.ts +1 -0
- package/dist/components/SpacePadComponents/index.logic.d.ts +1 -1
- package/dist/components/Table/hooks.d.ts +1 -1
- package/dist/components/Table/types.d.ts +14 -14
- package/dist/components/TableRow/TableRow.d.ts +1 -1
- package/dist/components/TableRow/components/LiquidityContainer.d.ts +1 -1
- package/dist/components/TableRow/components/TableActionBox.d.ts +1 -1
- package/dist/components/Tag/types.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +1 -9
- package/dist/components/Tooltip/types.d.ts +10 -0
- package/dist/index.cjs.js +282 -272
- package/dist/index.esm.js +282 -272
- package/dist/theme/index.d.ts +2 -2
- package/dist/widgets/Menu/types.d.ts +1 -0
- package/dist/widgets/Modal/Modal.d.ts +1 -0
- package/dist/widgets/Modal/ModalContext.d.ts +3 -1
- package/dist/widgets/PriceContainer/PriceContainer.d.ts +1 -1
- package/dist/widgets/TopTokensContainer/TopTokensContainer.d.ts +1 -1
- package/dist/widgets/WalletModal/CopyToClipboard.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const tags: {
|
|
2
|
-
H1:
|
|
3
|
-
H2:
|
|
4
|
-
H3:
|
|
5
|
-
H4:
|
|
6
|
-
H5:
|
|
7
|
-
H6:
|
|
2
|
+
readonly H1: "h1";
|
|
3
|
+
readonly H2: "h2";
|
|
4
|
+
readonly H3: "h3";
|
|
5
|
+
readonly H4: "h4";
|
|
6
|
+
readonly H5: "h5";
|
|
7
|
+
readonly H6: "h6";
|
|
8
8
|
};
|
|
9
9
|
export declare const sizes: {
|
|
10
10
|
readonly MD: "md";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpaceRound } from "@coinswap-app/sdk";
|
|
2
|
-
import { IDOState } from "
|
|
2
|
+
import { IDOState } from "../../util/types";
|
|
3
3
|
export declare const getIdoState: (round: SpaceRound, blockNumber: number) => IDOState;
|
|
4
4
|
export declare const getEndBlockByIdoSate: (spaceRound: SpaceRound, state: IDOState) => number;
|
|
5
5
|
export declare const getTimestampForEventBlock: (seconds: number, customDateFormat?: string) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { ColumnType, DataType, UseTableReturnType, UseTableOptionsType } from "./types";
|
|
3
|
-
export declare const makeRender: <T extends DataType>(value: any, render: (({ value
|
|
3
|
+
export declare const makeRender: <T extends DataType>(value: any, render: (({ value, row }: {
|
|
4
4
|
value: any;
|
|
5
5
|
row: T;
|
|
6
6
|
}) => ReactNode) | undefined, row: T) => (() => React.ReactNode);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ColumnType<T> = {
|
|
1
|
+
export type ColumnType<T extends DataType = DataType> = {
|
|
2
2
|
name: string;
|
|
3
3
|
label?: string;
|
|
4
4
|
hidden?: boolean;
|
|
@@ -9,7 +9,7 @@ export type ColumnType<T> = {
|
|
|
9
9
|
}) => React.ReactNode;
|
|
10
10
|
headerRender?: HeaderRenderType;
|
|
11
11
|
};
|
|
12
|
-
export type ColumnStateType<T> = {
|
|
12
|
+
export type ColumnStateType<T extends DataType = DataType> = {
|
|
13
13
|
name: string;
|
|
14
14
|
label: string;
|
|
15
15
|
hidden: boolean;
|
|
@@ -23,7 +23,7 @@ export type ColumnStateType<T> = {
|
|
|
23
23
|
export type HeaderRenderType = ({ label }: {
|
|
24
24
|
label: React.ReactNode;
|
|
25
25
|
}) => React.ReactNode;
|
|
26
|
-
export type HeaderType<T> = {
|
|
26
|
+
export type HeaderType<T extends DataType = DataType> = {
|
|
27
27
|
name: string;
|
|
28
28
|
label?: string;
|
|
29
29
|
hidden?: boolean;
|
|
@@ -37,16 +37,16 @@ export type HeaderType<T> = {
|
|
|
37
37
|
export type DataType = {
|
|
38
38
|
[key: string]: any;
|
|
39
39
|
};
|
|
40
|
-
export type ColumnByNamesType<T> = {
|
|
40
|
+
export type ColumnByNamesType<T extends DataType = DataType> = {
|
|
41
41
|
[key: string]: ColumnType<T>;
|
|
42
42
|
};
|
|
43
|
-
export type RenderFunctionType<T> = ({ value, row }: RenderFunctionArgsType<T>) => React.ReactNode | undefined;
|
|
44
|
-
type RenderFunctionArgsType<T> = {
|
|
43
|
+
export type RenderFunctionType<T extends DataType = DataType> = ({ value, row }: RenderFunctionArgsType<T>) => React.ReactNode | undefined;
|
|
44
|
+
type RenderFunctionArgsType<T extends DataType = DataType> = {
|
|
45
45
|
value: any;
|
|
46
46
|
row: T;
|
|
47
47
|
};
|
|
48
|
-
export type ColumnByNameType<T> = Omit<Required<ColumnType<T>>, "name" | "sort">;
|
|
49
|
-
export interface RowType<T extends DataType> {
|
|
48
|
+
export type ColumnByNameType<T extends DataType = DataType> = Omit<Required<ColumnType<T>>, "name" | "sort">;
|
|
49
|
+
export interface RowType<T extends DataType = DataType> {
|
|
50
50
|
id: number;
|
|
51
51
|
cells: CellType[];
|
|
52
52
|
hidden?: boolean;
|
|
@@ -57,7 +57,7 @@ export type CellType = {
|
|
|
57
57
|
value: any;
|
|
58
58
|
render: () => React.ReactNode;
|
|
59
59
|
};
|
|
60
|
-
export interface UseTableTypeParams<T extends DataType> {
|
|
60
|
+
export interface UseTableTypeParams<T extends DataType = DataType> {
|
|
61
61
|
columns: ColumnType<T>[];
|
|
62
62
|
data: T[];
|
|
63
63
|
options?: {
|
|
@@ -67,7 +67,7 @@ export interface UseTableTypeParams<T extends DataType> {
|
|
|
67
67
|
filterOn?: boolean;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
export interface UseTablePropsType<T> {
|
|
70
|
+
export interface UseTablePropsType<T extends DataType = DataType> {
|
|
71
71
|
columns: ColumnType<T>[];
|
|
72
72
|
data: T[];
|
|
73
73
|
options?: {
|
|
@@ -76,14 +76,14 @@ export interface UseTablePropsType<T> {
|
|
|
76
76
|
filter?: (row: RowType<T>[]) => RowType<T>[];
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
export interface UseTableOptionsType<T> {
|
|
79
|
+
export interface UseTableOptionsType<T extends DataType = DataType> {
|
|
80
80
|
sortable?: boolean;
|
|
81
81
|
selectable?: boolean;
|
|
82
82
|
pagination?: boolean;
|
|
83
83
|
sortColumn?: string;
|
|
84
84
|
filter?: (row: RowType<T>[]) => RowType<T>[];
|
|
85
85
|
}
|
|
86
|
-
export interface UseTableReturnType<T> {
|
|
86
|
+
export interface UseTableReturnType<T extends DataType = DataType> {
|
|
87
87
|
headers: HeaderType<T>[];
|
|
88
88
|
originalRows: RowType<T>[];
|
|
89
89
|
rows: RowType<T>[];
|
|
@@ -104,7 +104,7 @@ type PaginatorType = {
|
|
|
104
104
|
canNext: boolean;
|
|
105
105
|
canPrev: boolean;
|
|
106
106
|
};
|
|
107
|
-
export type TableState<T extends DataType> = {
|
|
107
|
+
export type TableState<T extends DataType = DataType> = {
|
|
108
108
|
columnsByName: ColumnByNamesType<T>;
|
|
109
109
|
columns: ColumnStateType<T>[];
|
|
110
110
|
rows: RowType<T>[];
|
|
@@ -116,7 +116,7 @@ export type TableState<T extends DataType> = {
|
|
|
116
116
|
pagination: PaginatorType;
|
|
117
117
|
paginationEnabled: boolean;
|
|
118
118
|
};
|
|
119
|
-
export type TableAction<T extends DataType> = {
|
|
119
|
+
export type TableAction<T extends DataType = DataType> = {
|
|
120
120
|
type: "TOGGLE_SORT";
|
|
121
121
|
columnName: string;
|
|
122
122
|
isAscOverride?: boolean;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
content: React.ReactNode;
|
|
4
|
-
small?: boolean;
|
|
5
|
-
width?: number;
|
|
6
|
-
style?: any;
|
|
7
|
-
removeAfter?: boolean;
|
|
8
|
-
bottom?: number;
|
|
9
|
-
right?: number;
|
|
10
|
-
}
|
|
2
|
+
import { TooltipProps } from "./types";
|
|
11
3
|
declare const Tooltip: React.FunctionComponent<TooltipProps>;
|
|
12
4
|
export default Tooltip;
|
|
@@ -3,3 +3,13 @@ export type TooltipTheme = {
|
|
|
3
3
|
text: string;
|
|
4
4
|
boxShadow: string;
|
|
5
5
|
};
|
|
6
|
+
export interface TooltipProps {
|
|
7
|
+
content: React.ReactNode;
|
|
8
|
+
small?: boolean;
|
|
9
|
+
width?: number;
|
|
10
|
+
style?: any;
|
|
11
|
+
removeAfter?: boolean;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
right?: number;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|