@yosgo/swap-ui 1.0.139 → 1.0.140

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.
@@ -25,4 +25,5 @@ export interface SWAPModalProps {
25
25
  errorMessage?: string;
26
26
  closeWindowOnSuccessMessage?: boolean;
27
27
  reloadOnWindowClose?: boolean;
28
+ fullScreen?: boolean;
28
29
  }
@@ -659,7 +659,7 @@ var ModalOpenEffect = function (props) {
659
659
  React__default.createElement("div", null, props.children)))));
660
660
  };
661
661
  var SWAPModal = function (_a) {
662
- var open = _a.open, title = _a.title, onClose = _a.onClose, helpText = _a.helpText, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, children = _a.children, steps = _a.steps, successMessage = _a.successMessage, errorMessage = _a.errorMessage, closeWindowOnSuccessMessage = _a.closeWindowOnSuccessMessage, reloadOnWindowClose = _a.reloadOnWindowClose;
662
+ var open = _a.open, title = _a.title, onClose = _a.onClose, helpText = _a.helpText, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, children = _a.children, steps = _a.steps, successMessage = _a.successMessage, errorMessage = _a.errorMessage, closeWindowOnSuccessMessage = _a.closeWindowOnSuccessMessage, reloadOnWindowClose = _a.reloadOnWindowClose, fullScreen = _a.fullScreen;
663
663
  var _b = useState(false), sm = _b[0], setSm = _b[1];
664
664
  var _c = useState(0), stepIndex = _c[0], setStepIndex = _c[1];
665
665
  var handleModalSize = function () {
@@ -720,7 +720,7 @@ var SWAPModal = function (_a) {
720
720
  React__default.createElement(Fade, { in: open, timeout: { enter: 300, exit: 300 } },
721
721
  React__default.createElement(SWAPModalWrap, { id: "modal_wrap_" + title },
722
722
  React__default.createElement(ModalOpenEffect, { in: open, sm: sm },
723
- React__default.createElement(Paper$1, { className: "modal_inner", id: "modal_inner_" + title },
723
+ React__default.createElement(Paper$1, { className: "modal_inner " + (fullScreen ? 'full_screen' : ''), id: "modal_inner_" + title },
724
724
  React__default.createElement("div", { className: "modal_inner_header", id: "modal_header_" + title },
725
725
  React__default.createElement(Container$1, { maxWidth: "lg" },
726
726
  React__default.createElement(SWAPSpace, { size: "m" }),
@@ -776,7 +776,7 @@ var SWAPModal = function (_a) {
776
776
  React__default.createElement(Button$1, { variant: "text", size: sm ? "medium" : "large", onClick: function () { return handleStepButton("next"); } }, steps[stepIndex].nextStepText || "下一步"))))),
777
777
  React__default.createElement(SWAPSpace, { size: "m" })))))))));
778
778
  };
779
- var SWAPModalWrap = styled.div(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"], ["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"])));
779
+ var SWAPModalWrap = styled.div(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n .full_screen {\n width: 100vw;\n height: 100vh;\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"], ["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n .full_screen {\n width: 100vw;\n height: 100vh;\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"])));
780
780
  var templateObject_1$5;
781
781
 
782
782
  function objectToGetParams(object) {