@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.
@@ -1,4 +1,5 @@
1
1
  import { SpaceProps } from "styled-system";
2
2
  export interface BreadcrumbsProps extends SpaceProps {
3
3
  separator?: React.ReactNode;
4
+ children?: React.ReactNode;
4
5
  }
@@ -3,6 +3,7 @@ export interface RampButtonProps {
3
3
  onClick: () => void;
4
4
  title?: string;
5
5
  extended?: boolean;
6
+ children?: React.ReactNode;
6
7
  }
7
8
  declare const RampButtonLite: React.FunctionComponent<RampButtonProps>;
8
9
  export default RampButtonLite;
@@ -72,5 +72,6 @@ export interface ButtonSwitchProps {
72
72
  export interface ButtonSwitchItemProps {
73
73
  active: boolean;
74
74
  onClick?: (active: boolean) => void;
75
+ children?: React.ReactNode;
75
76
  }
76
77
  export {};
@@ -4,4 +4,5 @@ export interface PositionProps {
4
4
  }
5
5
  export interface DropdownProps extends PositionProps {
6
6
  target: React.ReactElement;
7
+ children?: React.ReactNode;
7
8
  }
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
- declare const EarnedCarouselWrapper: React.FC;
2
+ declare const EarnedCarouselWrapper: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
3
5
  export default EarnedCarouselWrapper;
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
- declare const EarnedWrapper: React.FC;
2
+ declare const EarnedWrapper: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
3
5
  export default EarnedWrapper;
@@ -1,10 +1,10 @@
1
1
  export declare const tags: {
2
- H1: string;
3
- H2: string;
4
- H3: string;
5
- H4: string;
6
- H5: string;
7
- H6: string;
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";
@@ -25,6 +25,7 @@ interface InputWrapperProps {
25
25
  error?: string | boolean;
26
26
  success?: boolean;
27
27
  successMsg?: string;
28
+ children?: React.ReactNode;
28
29
  }
29
30
  export declare const InputWrapper: React.FC<InputWrapperProps>;
30
31
  export {};
@@ -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: val, row }: {
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,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { TableRowProps } from "./types";
3
- declare const TableRow: React.SFC<TableRowProps>;
3
+ declare const TableRow: React.FC<TableRowProps>;
4
4
  export default TableRow;
@@ -4,5 +4,5 @@ export interface LiquidityContainerProps {
4
4
  tooltip: React.ReactNode;
5
5
  grid?: number;
6
6
  }
7
- declare const LiquidityContainer: React.SFC<LiquidityContainerProps>;
7
+ declare const LiquidityContainer: React.FC<LiquidityContainerProps>;
8
8
  export default LiquidityContainer;
@@ -7,5 +7,5 @@ export interface TableActionBoxProps {
7
7
  mobile?: boolean;
8
8
  column?: boolean;
9
9
  }
10
- declare const TableActionBox: React.SFC<TableActionBoxProps>;
10
+ declare const TableActionBox: React.FC<TableActionBoxProps>;
11
11
  export default TableActionBox;
@@ -36,6 +36,7 @@ export interface TagProps extends SpaceProps {
36
36
  startIcon?: ReactNode;
37
37
  endIcon?: ReactNode;
38
38
  outline?: boolean;
39
+ children?: ReactNode;
39
40
  }
40
41
  export interface CoreTagProps extends TagProps {
41
42
  active?: boolean;
@@ -1,12 +1,4 @@
1
1
  import React from "react";
2
- export interface TooltipProps {
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
+ }