@kimafinance/kima-transaction-widget 1.0.0 → 1.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/README.md +6 -6
- package/dist/assets/icons/Celo.d.ts +7 -0
- package/dist/assets/icons/Check.d.ts +2 -1
- package/dist/assets/icons/Copy.d.ts +8 -0
- package/dist/assets/icons/Fuse.d.ts +7 -0
- package/dist/assets/icons/GoodDollar.d.ts +7 -0
- package/dist/assets/icons/index.d.ts +4 -0
- package/dist/assets/loading/6-dots-scale.d.ts +3 -0
- package/dist/assets/loading/index.d.ts +1 -0
- package/dist/components/KimaTransactionWidget.d.ts +7 -3
- package/dist/components/TransferWidget.d.ts +6 -2
- package/dist/components/modals/HashPopup.d.ts +7 -0
- package/dist/components/modals/HelpPopup.d.ts +3 -0
- package/dist/components/modals/WalletConnectModal.d.ts +3 -0
- package/dist/components/modals/index.d.ts +3 -0
- package/dist/components/reusable/AddressInputWizard.d.ts +3 -0
- package/dist/components/reusable/ConfirmDetails.d.ts +3 -1
- package/dist/components/reusable/CopyButton.d.ts +6 -0
- package/dist/components/reusable/Dropdown.d.ts +2 -3
- package/dist/components/reusable/HelpPopup.d.ts +3 -0
- package/dist/components/reusable/NetworkDropdown.d.ts +5 -0
- package/dist/components/reusable/NetworkSelect.d.ts +2 -2
- package/dist/components/reusable/Progressbar.d.ts +2 -1
- package/dist/components/reusable/SecondaryButton.d.ts +2 -1
- package/dist/components/reusable/StepBox.d.ts +10 -0
- package/dist/components/reusable/Tooltip.d.ts +4 -1
- package/dist/components/reusable/index.d.ts +3 -1
- package/dist/hooks/useCurrencyOptions.d.ts +3 -0
- package/dist/hooks/useNetworkOptions.d.ts +3 -0
- package/dist/index.css +1041 -809
- package/dist/index.js +1600 -1116
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1280 -832
- package/dist/index.modern.js.map +1 -1
- package/dist/interface.d.ts +18 -8
- package/dist/store/optionSlice.d.ts +14 -1
- package/dist/store/selectors.d.ts +6 -0
- package/dist/utils/config.d.ts +2 -4
- package/dist/utils/constants.d.ts +45 -17
- package/dist/utils/testId.d.ts +1 -0
- package/package.json +19 -4
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install --save kima-transaction-widget
|
|
8
|
+
npm install --save @kimafinance/kima-transaction-widget
|
|
9
|
+
yarn add @kimafinance/kima-transaction-widget
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
## Usage
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
KimaProvider,
|
|
19
20
|
ThemeOptions,
|
|
20
21
|
FontSizeOptions,
|
|
21
|
-
ModeOptions
|
|
22
|
+
ModeOptions,
|
|
22
23
|
SupportNetworks
|
|
23
24
|
} from 'kima-transfer-widget'
|
|
24
25
|
import 'kima-transfer-widget/dist/index.css'
|
|
@@ -42,6 +43,9 @@ const App = () => {
|
|
|
42
43
|
successHandler={() => {
|
|
43
44
|
console.log('success')
|
|
44
45
|
}}
|
|
46
|
+
closeHandler={() => {
|
|
47
|
+
console.log('closed')
|
|
48
|
+
}}
|
|
45
49
|
/>
|
|
46
50
|
</div>
|
|
47
51
|
</KimaProvider>
|
|
@@ -68,7 +72,3 @@ export default App
|
|
|
68
72
|
## Note
|
|
69
73
|
|
|
70
74
|
[How to fix Polyfill node core module error](https://www.alchemy.com/blog/how-to-polyfill-node-core-modules-in-webpack-5)
|
|
71
|
-
|
|
72
|
-
## License
|
|
73
|
-
|
|
74
|
-
kima-transaction-widget is licensed under MIT license.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Check: ({ width, height, ...rest }: {
|
|
2
|
+
declare const Check: ({ width, height, fill, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
width?: number | undefined;
|
|
5
5
|
height?: number | undefined;
|
|
6
|
+
fill?: string | undefined;
|
|
6
7
|
}) => JSX.Element;
|
|
7
8
|
export default Check;
|
|
@@ -11,3 +11,7 @@ export { default as PolygonIcon } from './Polygon';
|
|
|
11
11
|
export { default as AvalancheIcon } from './Avalanche';
|
|
12
12
|
export { default as USDCIcon } from './USDC';
|
|
13
13
|
export { default as USDTIcon } from './USDT';
|
|
14
|
+
export { default as FuseIcon } from './Fuse';
|
|
15
|
+
export { default as CeloIcon } from './Celo';
|
|
16
|
+
export { default as GoodDollarIcon } from './GoodDollar';
|
|
17
|
+
export { default as CopyIcon } from './Copy';
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DefaultProps, TransactionOption, ModeOptions } from '../interface';
|
|
2
|
+
import { DefaultProps, TransactionOption, ModeOptions, TitleOption } from '../interface';
|
|
3
3
|
import '../index.css';
|
|
4
4
|
interface Props extends DefaultProps {
|
|
5
|
-
transactionOption?: TransactionOption;
|
|
6
5
|
mode: ModeOptions;
|
|
6
|
+
txId?: number;
|
|
7
|
+
titleOption?: TitleOption;
|
|
8
|
+
kimaBackendUrl: string;
|
|
9
|
+
transactionOption?: TransactionOption;
|
|
10
|
+
kimaNodeProviderQuery: string;
|
|
7
11
|
errorHandler?: (e: any) => void;
|
|
8
12
|
closeHandler?: (e: any) => void;
|
|
9
13
|
successHandler?: (e: any) => void;
|
|
10
14
|
}
|
|
11
|
-
export declare const KimaTransactionWidget: ({ theme, fontSize,
|
|
15
|
+
export declare const KimaTransactionWidget: ({ mode, txId, theme, fontSize, titleOption, transactionOption, kimaBackendUrl, kimaNodeProviderQuery, errorHandler, closeHandler, successHandler }: Props) => JSX.Element;
|
|
12
16
|
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DefaultProps } from '../interface';
|
|
2
|
+
import { DefaultProps, TitleOption } from '../interface';
|
|
3
3
|
import '../index.css';
|
|
4
|
-
|
|
4
|
+
interface Props extends DefaultProps {
|
|
5
|
+
titleOption?: TitleOption;
|
|
6
|
+
}
|
|
7
|
+
export declare const TransferWidget: ({ theme, fontSize, titleOption }: Props) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface Props {
|
|
3
3
|
open: boolean;
|
|
4
|
-
|
|
5
|
-
toggleWizard: any;
|
|
4
|
+
showHashes?: boolean;
|
|
6
5
|
}
|
|
7
|
-
declare const Dropdown: ({ open,
|
|
6
|
+
declare const Dropdown: ({ open, showHashes }: Props) => JSX.Element;
|
|
8
7
|
export default Dropdown;
|
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
focus: number;
|
|
5
5
|
setFocus: Dispatch<SetStateAction<number>>;
|
|
6
6
|
errorStep: number;
|
|
7
|
+
loadingStep: number;
|
|
7
8
|
}
|
|
8
|
-
declare const Progressbar: ({ step, errorStep, setFocus }: Props) => JSX.Element;
|
|
9
|
+
declare const Progressbar: ({ step, errorStep, setFocus, loadingStep }: Props) => JSX.Element;
|
|
9
10
|
export default Progressbar;
|
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
children?: any;
|
|
5
5
|
className?: string;
|
|
6
6
|
theme?: string;
|
|
7
|
+
style?: any;
|
|
7
8
|
}
|
|
8
|
-
declare const SecondaryButton: ({ className, clickHandler, children, theme }: Props) => JSX.Element;
|
|
9
|
+
declare const SecondaryButton: ({ className, clickHandler, children, theme, style }: Props) => JSX.Element;
|
|
9
10
|
export default SecondaryButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TransactionData } from '../../interface';
|
|
3
|
+
interface Props {
|
|
4
|
+
step: number;
|
|
5
|
+
errorStep: number;
|
|
6
|
+
loadingStep: number;
|
|
7
|
+
data?: TransactionData;
|
|
8
|
+
}
|
|
9
|
+
declare const StepBox: ({ step, errorStep, loadingStep, data }: Props) => JSX.Element;
|
|
10
|
+
export default StepBox;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TransactionData } from '../../interface';
|
|
2
3
|
interface Props {
|
|
3
4
|
step: number;
|
|
4
5
|
focus: number;
|
|
5
6
|
errorStep: number;
|
|
7
|
+
loadingStep: number;
|
|
8
|
+
data?: TransactionData;
|
|
6
9
|
}
|
|
7
|
-
declare const Tooltip: ({ step, focus, errorStep }: Props) => JSX.Element;
|
|
10
|
+
declare const Tooltip: ({ step, focus, errorStep, loadingStep, data }: Props) => JSX.Element;
|
|
8
11
|
export default Tooltip;
|
|
@@ -7,7 +7,9 @@ export { default as WalletSelect } from './WalletSelect';
|
|
|
7
7
|
export { default as Dropdown } from './Dropdown';
|
|
8
8
|
export { default as WalletButton } from './WalletButton';
|
|
9
9
|
export { default as CoinDropdown } from './CoinDropdown';
|
|
10
|
+
export { default as NetworkDropdown } from './NetworkDropdown';
|
|
10
11
|
export { default as ConfirmDetails } from './ConfirmDetails';
|
|
11
|
-
export { default as WalletConnectModal } from './WalletConnectModal';
|
|
12
12
|
export { default as AddressInput } from './AddressInput';
|
|
13
13
|
export { default as CustomCheckbox } from './CustomCheckbox';
|
|
14
|
+
export { default as StepBox } from './StepBox';
|
|
15
|
+
export { default as CopyButton } from './CopyButton';
|