tek-wallet 0.0.185 → 0.0.187

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.
@@ -144,8 +144,8 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
144
144
  _e.trys.push([0, 3, , 4]);
145
145
  setOtp(value);
146
146
  if (!(value.length === passcodeLength)) return [3 /*break*/, 2];
147
- (_a = loadingRef.current) === null || _a === void 0 ? void 0 : _a.startLoading();
148
- (_b = drawerRef.current) === null || _b === void 0 ? void 0 : _b.lockStatus();
147
+ (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.lockStatus();
148
+ (_b = loadingRef.current) === null || _b === void 0 ? void 0 : _b.startLoading();
149
149
  return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 5000); })];
150
150
  case 1:
151
151
  _e.sent();
@@ -35,6 +35,7 @@ var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
35
35
  var onOpen = props.onOpen, onClose = props.onClose, onToggle = props.onToggle, sx = props.sx, trigger = props.trigger, direction = props.direction, children = props.children, rest = __rest(props, ["onOpen", "onClose", "onToggle", "sx", "trigger", "direction", "children"]);
36
36
  var _a = (0, react_1.useState)(false), isShowDrawerComponent = _a[0], setIsShowDrawerComponent = _a[1];
37
37
  var _b = (0, react_1.useState)(undefined), isOpen = _b[0], setIsOpen = _b[1];
38
+ var DrawerComponent = (0, react_1.useMemo)(function () { return (isOpen !== undefined ? material_1.Drawer : material_1.SwipeableDrawer); }, [isOpen]);
38
39
  var lockStatus = function () {
39
40
  setIsOpen(isShowDrawerComponent);
40
41
  };
@@ -70,13 +71,13 @@ var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
70
71
  setIsShowDrawerComponent(true);
71
72
  onOpen === null || onOpen === void 0 ? void 0 : onOpen(e);
72
73
  };
73
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: sx, onClick: toggle, children: trigger }), (0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, __assign({}, rest, { sx: {
74
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: sx, onClick: toggle, children: trigger }), (0, jsx_runtime_1.jsx)(DrawerComponent, __assign({}, rest, { sx: {
74
75
  "& .MuiDrawer-paper": {
75
76
  backgroundColor: "transparent",
76
77
  overflow: "hidden",
77
78
  boxShadow: "none",
78
79
  },
79
- }, anchor: direction || "bottom", open: isOpen !== null && isOpen !== void 0 ? isOpen : isShowDrawerComponent, onOpen: onDrawerOpen, onClose: onDrawerClose, disableSwipeToOpen: isOpen !== undefined, disableDiscovery: isOpen !== undefined, children: children }))] }));
80
+ }, anchor: direction || "bottom", open: isOpen !== null && isOpen !== void 0 ? isOpen : isShowDrawerComponent, onOpen: onDrawerOpen, onClose: onDrawerClose, children: children }))] }));
80
81
  });
81
82
  DrawerComponent.displayName = "DrawerComponent";
82
83
  exports.default = DrawerComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.185",
3
+ "version": "0.0.187",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",