@depay/widgets 6.31.1 → 7.0.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/esm/index.js CHANGED
@@ -12,7 +12,6 @@ import { Currency } from '@depay/local-currency';
12
12
  import { setProviderEndpoints, request, provider } from '@depay/web3-client';
13
13
  import { Blockchain } from '@depay/web3-blockchains';
14
14
  import { route as route$1 } from '@depay/web3-payments';
15
- import Slider from 'react-rangeslider';
16
15
  import { TokenImage } from '@depay/react-token-image';
17
16
 
18
17
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -727,34 +726,36 @@ var SelectWalletDialog = (function (props) {
727
726
  navigate = _useContext.navigate;
728
727
 
729
728
  var wallet = getWallet();
730
- useEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
731
- var accounts;
732
- return regenerator.wrap(function _callee$(_context) {
733
- while (1) {
734
- switch (_context.prev = _context.next) {
735
- case 0:
736
- if (!wallet) {
737
- _context.next = 5;
738
- break;
739
- }
729
+ useEffect(function () {
730
+ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
731
+ var accounts;
732
+ return regenerator.wrap(function _callee$(_context) {
733
+ while (1) {
734
+ switch (_context.prev = _context.next) {
735
+ case 0:
736
+ if (!wallet) {
737
+ _context.next = 5;
738
+ break;
739
+ }
740
740
 
741
- _context.next = 3;
742
- return wallet.accounts();
741
+ _context.next = 3;
742
+ return wallet.accounts();
743
743
 
744
- case 3:
745
- accounts = _context.sent;
744
+ case 3:
745
+ accounts = _context.sent;
746
746
 
747
- if (accounts == undefined || accounts.length == 0) {
748
- navigate('ConnectingWallet');
749
- }
747
+ if (accounts == undefined || accounts.length == 0) {
748
+ navigate('ConnectingWallet');
749
+ }
750
750
 
751
- case 5:
752
- case "end":
753
- return _context.stop();
751
+ case 5:
752
+ case "end":
753
+ return _context.stop();
754
+ }
754
755
  }
755
- }
756
- }, _callee);
757
- })), [wallet]);
756
+ }, _callee);
757
+ }))();
758
+ }, [wallet]);
758
759
 
759
760
  var connect = function connect(walletClass) {
760
761
  var wallet = new walletClass();
@@ -888,40 +889,42 @@ var ConnectStack = (function (props) {
888
889
  setWallet(wallet);
889
890
  }
890
891
  }, []);
891
- useEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
892
- var accounts;
893
- return regenerator.wrap(function _callee2$(_context2) {
894
- while (1) {
895
- switch (_context2.prev = _context2.next) {
896
- case 0:
897
- if (!wallet) {
898
- _context2.next = 5;
899
- break;
900
- }
892
+ useEffect(function () {
893
+ _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
894
+ var accounts;
895
+ return regenerator.wrap(function _callee2$(_context2) {
896
+ while (1) {
897
+ switch (_context2.prev = _context2.next) {
898
+ case 0:
899
+ if (!wallet) {
900
+ _context2.next = 5;
901
+ break;
902
+ }
901
903
 
902
- _context2.next = 3;
903
- return wallet.accounts();
904
+ _context2.next = 3;
905
+ return wallet.accounts();
904
906
 
905
- case 3:
906
- accounts = _context2.sent;
907
+ case 3:
908
+ accounts = _context2.sent;
907
909
 
908
- if (accounts instanceof Array && accounts.length > 0) {
909
- if (props.resolve) props.resolve({
910
- wallet: wallet,
911
- account: accounts[0],
912
- accounts: accounts
913
- });
914
- } else {
915
- connect(wallet);
916
- }
910
+ if (accounts instanceof Array && accounts.length > 0) {
911
+ if (props.resolve) props.resolve({
912
+ wallet: wallet,
913
+ account: accounts[0],
914
+ accounts: accounts
915
+ });
916
+ } else {
917
+ connect(wallet);
918
+ }
917
919
 
918
- case 5:
919
- case "end":
920
- return _context2.stop();
920
+ case 5:
921
+ case "end":
922
+ return _context2.stop();
923
+ }
921
924
  }
922
- }
923
- }, _callee2);
924
- })), [wallet]);
925
+ }, _callee2);
926
+ }))();
927
+ }, [wallet]);
925
928
  return /*#__PURE__*/React.createElement(ReactDialogStack, {
926
929
  open: open,
927
930
  close: close,
@@ -1091,7 +1094,7 @@ function ReactDialogStyle (styles) {
1091
1094
  `
1092
1095
  }
1093
1096
 
1094
- const _jsxFileName = "/home/runner/work/react-dialog/react-dialog/src/components/Dialog.jsx";
1097
+ const _jsxFileName$1 = "/home/runner/work/react-dialog/react-dialog/src/components/Dialog.jsx";
1095
1098
  class Dialog extends React.Component {
1096
1099
  constructor(props) {
1097
1100
  super(props);
@@ -1142,10 +1145,10 @@ class Dialog extends React.Component {
1142
1145
  const classNames = ['ReactDialog', this.state.open ? 'ReactDialogOpen' : ''];
1143
1146
  const style = ReactDialogStyle({ background: this.props.background });
1144
1147
  return (
1145
- React.createElement('div', { className: classNames.join(' '), __self: this, __source: {fileName: _jsxFileName, lineNumber: 56}}
1146
- , React.createElement('style', {__self: this, __source: {fileName: _jsxFileName, lineNumber: 57}}, style)
1147
- , React.createElement('div', { className: "ReactDialogInner", __self: this, __source: {fileName: _jsxFileName, lineNumber: 58}}
1148
- , React.createElement('div', { className: "ReactDialogBackground", onClick: this.onClickBackground.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 59}} )
1148
+ React.createElement('div', { className: classNames.join(' '), __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 55}}
1149
+ , React.createElement('style', {__self: this, __source: {fileName: _jsxFileName$1, lineNumber: 56}}, style)
1150
+ , React.createElement('div', { className: "ReactDialogInner", __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 57}}
1151
+ , React.createElement('div', { className: "ReactDialogBackground", onClick: this.onClickBackground.bind(this), __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 58}} )
1149
1152
  , this.props.children
1150
1153
  )
1151
1154
  )
@@ -1153,7 +1156,7 @@ class Dialog extends React.Component {
1153
1156
  }
1154
1157
  }
1155
1158
 
1156
- const _jsxFileName$1 = "/home/runner/work/react-dialog/react-dialog/src/index.jsx";
1159
+ const _jsxFileName = "/home/runner/work/react-dialog/react-dialog/src/index.jsx";
1157
1160
  class ReactDialog extends React.Component {
1158
1161
  constructor(props) {
1159
1162
  super(props);
@@ -1182,7 +1185,7 @@ class ReactDialog extends React.Component {
1182
1185
  background: this.props.background,
1183
1186
  close: this.props.close,
1184
1187
  document: _document,
1185
- open: this.props.open, __self: this, __source: {fileName: _jsxFileName$1, lineNumber: 29}}
1188
+ open: this.props.open, __self: this, __source: {fileName: _jsxFileName, lineNumber: 29}}
1186
1189
 
1187
1190
  , this.props.children
1188
1191
  ),
@@ -1325,7 +1328,7 @@ var DialogStyle = (function (style) {
1325
1328
  });
1326
1329
 
1327
1330
  var FontStyle = (function (style) {
1328
- return "\n\n *, div, div * {\n font-family: ".concat(style.fontFamily, ";\n }\n\n .FontSizeS {\n font-size: 16px;\n }\n\n .FontSizeM {\n font-size: 19px;\n }\n\n .FontSizeL {\n font-size: 23px;\n }\n\n .FontSizeXL {\n font-size: 32px;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ");
1331
+ return "\n\n *, div, div * {\n font-family: ".concat(style.fontFamily, ";\n }\n\n .FontSizeS {\n font-size: 16px;\n }\n\n .FontSizeM {\n font-size: 19px;\n }\n\n .FontSizeL {\n font-size: 23px;\n }\n\n .FontSizeXL {\n font-size: 32px;\n }\n\n .FontSizeXXL {\n font-size: 42px;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ");
1329
1332
  });
1330
1333
 
1331
1334
  var GraphicStyle = (function () {
@@ -2692,15 +2695,14 @@ var ChangeAmountDialog = (function (props) {
2692
2695
  className: "PaddingLeftM PaddingRightM"
2693
2696
  }, /*#__PURE__*/React.createElement("div", {
2694
2697
  className: "PaddingTopS TextCenter PaddingBottomL"
2695
- }, /*#__PURE__*/React.createElement("div", {
2696
- className: "FontSizeL"
2697
- }, /*#__PURE__*/React.createElement("input", {
2698
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
2698
2699
  max: parseFloat(maxAmount),
2699
2700
  min: min,
2700
2701
  step: step,
2701
- className: "Input FontSizeXL TextAlignCenter",
2702
+ className: "Input FontSizeXXL TextAlignCenter",
2702
2703
  type: "number",
2703
2704
  name: "amount",
2705
+ autoFocus: true,
2704
2706
  value: parseFloat(inputAmount),
2705
2707
  onChange: function onChange(event) {
2706
2708
  changeAmount(event.target.value);
@@ -2708,18 +2710,7 @@ var ChangeAmountDialog = (function (props) {
2708
2710
  onBlur: function onBlur(event) {
2709
2711
  setValidValue(event.target.value);
2710
2712
  }
2711
- })), /*#__PURE__*/React.createElement(Slider, {
2712
- max: parseFloat(maxAmount),
2713
- min: min,
2714
- step: step,
2715
- value: parseFloat(inputAmount),
2716
- onChange: function onChange(value) {
2717
- changeAmount(toValidStep(value));
2718
- },
2719
- onChangeComplete: function onChangeComplete() {
2720
- setValidValue(inputAmount);
2721
- }
2722
- }), /*#__PURE__*/React.createElement("div", {
2713
+ })), /*#__PURE__*/React.createElement("div", {
2723
2714
  style: {
2724
2715
  height: '40px'
2725
2716
  }