@ape.swap/bonds-sdk 1.0.87 → 1.0.89

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.
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsxs as _jsxs, jsx as _jsx } from "theme-ui/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
13
  import { Flex, ThemeUIProvider } from "theme-ui";
14
14
  import { useWeb3React } from "@web3-react/core";
15
15
  import { getColumnDiscountStyle } from '../Bonds/styles';
@@ -17,6 +17,7 @@ import { defaultTheme } from '../../theme';
17
17
  import '../../scss/bondmodal.scss';
18
18
  import getTimePeriods from '../../utils/getTimePeriods';
19
19
  import { Button } from '../uikit/Button';
20
+ import Svg from '../uikit/Svg';
20
21
  var BondModal = function (_a) {
21
22
  var _b, _c, _d, _e, _f, _g;
22
23
  var isOpen = _a.isOpen, onClose = _a.onClose, bond = _a.bond;
@@ -26,6 +27,6 @@ var BondModal = function (_a) {
26
27
  var vestingTime = function (vestingTerm) {
27
28
  return getTimePeriods(vestingTerm !== null && vestingTerm !== void 0 ? vestingTerm : 0, true);
28
29
  };
29
- return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: _jsx(Flex, __assign({ className: "modal-backdrop" }, { children: _jsxs(Flex, __assign({ className: "modal-content" }, { children: ["Bond Modal", _jsxs("p", { children: ["Bond Address: ", bond === null || bond === void 0 ? void 0 : bond.billAddress] }), isActive && account && (_jsxs("p", { children: ["Wallet Address: ", account] })), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-header" }, { children: "Token" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Discount" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "ARR" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Terms" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Tokens Remaining" }))] })), _jsxs(Flex, __assign({ className: "container bondrow-container" }, { children: [_jsx(Flex, __assign({ className: "column column-token" }, { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName })), _jsx(Flex, __assign({ className: "column column-discount", sx: getColumnDiscountStyle((_b = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _b !== void 0 ? _b : 0) }, { children: "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: "".concat("".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime((_e = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _e !== void 0 ? _e : 0).days).toFixed(2), "%")) })), _jsx(Flex, __assign({ className: "column column-term" }, { children: vestingTime((_f = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _f !== void 0 ? _f : 0).days ? "".concat(vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: bond === null || bond === void 0 ? void 0 : bond.tokensRemaining.split('.')[0] }))] }))] })), _jsxs(Flex, __assign({ className: "container button-container" }, { children: [_jsx(Button, __assign({ onClick: onClose }, { children: "Close" })), _jsxs(Button, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] })] }))] })) })) })));
30
+ return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: _jsx(Flex, __assign({ className: "modal-backdrop" }, { children: _jsxs(Flex, __assign({ className: "modal-content" }, { children: [_jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close", width: "20px" }) })), "Bond Modal", _jsxs("p", { children: ["Bond Address: ", bond === null || bond === void 0 ? void 0 : bond.billAddress] }), isActive && account && (_jsxs("p", { children: ["Wallet Address: ", account] })), _jsxs(Flex, __assign({ className: "container table-container" }, { children: [_jsxs(Flex, __assign({ className: "container header-container" }, { children: [_jsx(Flex, __assign({ className: "column column-header" }, { children: "Token" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Discount" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "ARR" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Terms" })), _jsx(Flex, __assign({ className: "column column-header" }, { children: "Tokens Remaining" }))] })), _jsxs(Flex, __assign({ className: "container bondrow-container" }, { children: [_jsx(Flex, __assign({ className: "column column-token" }, { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName })), _jsx(Flex, __assign({ className: "column column-discount", sx: getColumnDiscountStyle((_b = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _b !== void 0 ? _b : 0) }, { children: "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%") })), _jsx(Flex, __assign({ className: "column column-arr" }, { children: "".concat("".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime((_e = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _e !== void 0 ? _e : 0).days).toFixed(2), "%")) })), _jsx(Flex, __assign({ className: "column column-term" }, { children: vestingTime((_f = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _f !== void 0 ? _f : 0).days ? "".concat(vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days, " D") : '-' })), _jsx(Flex, __assign({ className: "column column-tokensremaining" }, { children: bond === null || bond === void 0 ? void 0 : bond.tokensRemaining.split('.')[0] }))] }))] })), _jsxs(Flex, __assign({ className: "container button-container" }, { children: [_jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }), _jsxs(Button, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] })] }))] })) })) })));
30
31
  };
31
32
  export default BondModal;
@@ -4,7 +4,7 @@
4
4
  left: 0;
5
5
  width: 100%;
6
6
  height: 100%;
7
- background-color: rgba(0, 0, 0, 0.5); /* Dim background */
7
+ background-color: rgba(66, 66, 66, 0.5);
8
8
  display: flex;
9
9
  justify-content: center;
10
10
  align-items: center;
@@ -92,14 +92,13 @@
92
92
  }
93
93
 
94
94
  .container.button-container {
95
- display: flex;
96
- flex-direction: row;
97
- justify-content: space-between;
95
+ width: 100%;
98
96
 
99
97
  Button {
100
98
  justify-content: center;
101
99
  align-items: center;
102
- height: 60px;
103
- width: 80px;
100
+ flex: 1;
101
+ margin-left: 10px;
102
+ margin-right: 10px;
104
103
  }
105
104
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.87",
6
+ "version": "1.0.89",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",