@yosgo/swap-ui 1.0.140 → 1.0.141
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/build/Modal/Modal.types.d.ts +1 -0
- package/build/index.esm.js +49 -32
- package/build/index.esm.js.map +1 -1
- package/build/index.js +49 -32
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -7376,8 +7376,8 @@ var useStyles$f = core.makeStyles(function (theme) { return ({
|
|
|
7376
7376
|
border: "unset",
|
|
7377
7377
|
borderRadius: 12,
|
|
7378
7378
|
margin: function (_a) {
|
|
7379
|
-
var fullWidth = _a.fullWidth, match_XS = _a.match_XS;
|
|
7380
|
-
return fullWidth ? 0 : match_XS ? "0px 24px" : "0px 16px";
|
|
7379
|
+
var fullWidth = _a.fullWidth, fullScreen = _a.fullScreen, match_XS = _a.match_XS;
|
|
7380
|
+
return (fullWidth || fullScreen) ? 0 : match_XS ? "0px 24px" : "0px 16px";
|
|
7381
7381
|
},
|
|
7382
7382
|
},
|
|
7383
7383
|
backdrop: {
|
|
@@ -7385,36 +7385,44 @@ var useStyles$f = core.makeStyles(function (theme) { return ({
|
|
|
7385
7385
|
},
|
|
7386
7386
|
modal: {
|
|
7387
7387
|
width: function (_a) {
|
|
7388
|
-
var width = _a.width, size = _a.size;
|
|
7389
|
-
return
|
|
7390
|
-
?
|
|
7391
|
-
:
|
|
7392
|
-
?
|
|
7393
|
-
: size === "
|
|
7394
|
-
?
|
|
7395
|
-
: size === "
|
|
7396
|
-
?
|
|
7397
|
-
: size === "
|
|
7398
|
-
?
|
|
7399
|
-
: "
|
|
7388
|
+
var fullScreen = _a.fullScreen, width = _a.width, size = _a.size;
|
|
7389
|
+
return fullScreen
|
|
7390
|
+
? "100vw"
|
|
7391
|
+
: width
|
|
7392
|
+
? width
|
|
7393
|
+
: size === "large"
|
|
7394
|
+
? 800
|
|
7395
|
+
: size === "medium"
|
|
7396
|
+
? 640
|
|
7397
|
+
: size === "small"
|
|
7398
|
+
? 480
|
|
7399
|
+
: size === "extraSmall"
|
|
7400
|
+
? 320
|
|
7401
|
+
: "100%";
|
|
7400
7402
|
},
|
|
7401
7403
|
maxWidth: function (_a) {
|
|
7402
7404
|
var maxWidth = _a.maxWidth;
|
|
7403
7405
|
return maxWidth;
|
|
7404
7406
|
},
|
|
7405
7407
|
borderRadius: function (_a) {
|
|
7406
|
-
var fullWidth = _a.fullWidth;
|
|
7407
|
-
return fullWidth ? "12px 12px 0px 0px" : 12;
|
|
7408
|
+
var fullWidth = _a.fullWidth, fullScreen = _a.fullScreen;
|
|
7409
|
+
return fullScreen ? 0 : fullWidth ? "12px 12px 0px 0px" : 12;
|
|
7408
7410
|
},
|
|
7409
7411
|
border: "unset",
|
|
7410
|
-
boxShadow:
|
|
7412
|
+
boxShadow: function (_a) {
|
|
7413
|
+
var fullScreen = _a.fullScreen;
|
|
7414
|
+
return fullScreen ? "unset" : theme.boxShadow.l;
|
|
7415
|
+
},
|
|
7411
7416
|
display: "flex",
|
|
7412
7417
|
flexDirection: "column",
|
|
7413
7418
|
outline: 0,
|
|
7414
7419
|
},
|
|
7415
7420
|
head: {
|
|
7416
7421
|
height: "100%",
|
|
7417
|
-
borderRadius:
|
|
7422
|
+
borderRadius: function (_a) {
|
|
7423
|
+
var fullScreen = _a.fullScreen;
|
|
7424
|
+
return fullScreen ? 0 : "12px 12px 0px 0px";
|
|
7425
|
+
},
|
|
7418
7426
|
padding: function (_a) {
|
|
7419
7427
|
var headpadding = _a.headpadding, mobile = _a.mobile, disCloseIcon = _a.disCloseIcon, helpText = _a.helpText, multiline = _a.multiline;
|
|
7420
7428
|
return headpadding
|
|
@@ -7694,8 +7702,8 @@ var useStyles$f = core.makeStyles(function (theme) { return ({
|
|
|
7694
7702
|
body: {
|
|
7695
7703
|
transition: "all 0.2s ease-in-out",
|
|
7696
7704
|
height: function (_a) {
|
|
7697
|
-
var height = _a.height;
|
|
7698
|
-
return (height ? height : "100%"
|
|
7705
|
+
var fullScreen = _a.fullScreen, height = _a.height;
|
|
7706
|
+
return fullScreen ? "calc(100vh - 146px)" : height ? height : "100%";
|
|
7699
7707
|
},
|
|
7700
7708
|
padding: function (_a) {
|
|
7701
7709
|
var bodyPadding = _a.bodyPadding, mobile = _a.mobile;
|
|
@@ -7707,8 +7715,14 @@ var useStyles$f = core.makeStyles(function (theme) { return ({
|
|
|
7707
7715
|
return (onExit ? "none" : "unset");
|
|
7708
7716
|
},
|
|
7709
7717
|
maxHeight: function (_a) {
|
|
7710
|
-
var bodyMaxHeight = _a.bodyMaxHeight, fullWidth = _a.fullWidth, clientHeight = _a.clientHeight;
|
|
7711
|
-
return
|
|
7718
|
+
var bodyMaxHeight = _a.bodyMaxHeight, fullWidth = _a.fullWidth, fullScreen = _a.fullScreen, clientHeight = _a.clientHeight;
|
|
7719
|
+
return fullScreen
|
|
7720
|
+
? "calc(100vh - 146px)"
|
|
7721
|
+
: bodyMaxHeight
|
|
7722
|
+
? bodyMaxHeight
|
|
7723
|
+
: fullWidth
|
|
7724
|
+
? clientHeight
|
|
7725
|
+
: "unset";
|
|
7712
7726
|
},
|
|
7713
7727
|
overflowY: function (_a) {
|
|
7714
7728
|
var onExit = _a.onExit;
|
|
@@ -7762,7 +7776,7 @@ var useStyles$f = core.makeStyles(function (theme) { return ({
|
|
|
7762
7776
|
},
|
|
7763
7777
|
}); });
|
|
7764
7778
|
var Modal = React__default.forwardRef(function (props, ref) {
|
|
7765
|
-
var width = props.width, height = props.height, open = props.open, onClose = props.onClose, title = props.title, helpText = props.helpText, size = props.size, headpadding = props.headpadding, headChildren = props.headChildren, checked = props.checked, failed = props.failed, icon = props.icon, checkIconColor = props.checkIconColor, iconColor = props.iconColor, children = props.children, label = props.label, buttonFullWidth = props.buttonFullWidth, footerDisplayColumn = props.footerDisplayColumn, secondaryButton = props.secondaryButton, primaryButton = props.primaryButton, mobile = props.mobile, fullWidth = props.fullWidth, bodyPadding = props.bodyPadding, maxWidth = props.maxWidth, disCloseIcon = props.disCloseIcon, titleStyle = props.titleStyle, bodyStyle = props.bodyStyle, onExit = props.onExit, bodyMaxHeight = props.bodyMaxHeight, multiline = props.multiline, disUnderLine = props.disUnderLine, footer = props.footer;
|
|
7779
|
+
var width = props.width, height = props.height, open = props.open, onClose = props.onClose, title = props.title, helpText = props.helpText, size = props.size, headpadding = props.headpadding, headChildren = props.headChildren, checked = props.checked, failed = props.failed, icon = props.icon, checkIconColor = props.checkIconColor, iconColor = props.iconColor, children = props.children, label = props.label, buttonFullWidth = props.buttonFullWidth, footerDisplayColumn = props.footerDisplayColumn, secondaryButton = props.secondaryButton, primaryButton = props.primaryButton, mobile = props.mobile, fullWidth = props.fullWidth, fullScreen = props.fullScreen, bodyPadding = props.bodyPadding, maxWidth = props.maxWidth, disCloseIcon = props.disCloseIcon, titleStyle = props.titleStyle, bodyStyle = props.bodyStyle, onExit = props.onExit, bodyMaxHeight = props.bodyMaxHeight, multiline = props.multiline, disUnderLine = props.disUnderLine, footer = props.footer;
|
|
7766
7780
|
var _a = React.useState(0), clientHeight = _a[0], setClientHeight = _a[1];
|
|
7767
7781
|
var _b = React.useState(0), scorllbarWidth = _b[0], setScorllbarWidth = _b[1];
|
|
7768
7782
|
React.useEffect(function () {
|
|
@@ -7788,6 +7802,7 @@ var Modal = React__default.forwardRef(function (props, ref) {
|
|
|
7788
7802
|
var match_XS = useBreakpoints("xs");
|
|
7789
7803
|
var classes = useStyles$f({
|
|
7790
7804
|
fullWidth: fullWidth,
|
|
7805
|
+
fullScreen: fullScreen,
|
|
7791
7806
|
match_XS: match_XS,
|
|
7792
7807
|
width: width,
|
|
7793
7808
|
size: size,
|
|
@@ -7814,7 +7829,7 @@ var Modal = React__default.forwardRef(function (props, ref) {
|
|
|
7814
7829
|
className: classes.backdrop,
|
|
7815
7830
|
style: { overflow: "auto", WebkitOverflowScrolling: "touch" },
|
|
7816
7831
|
} },
|
|
7817
|
-
React__default.createElement(ModalTransitionEffect, { in: open, slide: fullWidth, style: {
|
|
7832
|
+
React__default.createElement(ModalTransitionEffect, { in: open, slide: fullWidth || fullScreen, style: {
|
|
7818
7833
|
outline: "none",
|
|
7819
7834
|
transition: "ease-in-out",
|
|
7820
7835
|
width: "100%",
|
|
@@ -7866,7 +7881,7 @@ var Modal = React__default.forwardRef(function (props, ref) {
|
|
|
7866
7881
|
: mobile
|
|
7867
7882
|
? -16
|
|
7868
7883
|
: -24,
|
|
7869
|
-
position: bodyMaxHeight || height || (mobile && fullWidth)
|
|
7884
|
+
position: bodyMaxHeight || height || (mobile && fullWidth) || fullScreen
|
|
7870
7885
|
? "fixed"
|
|
7871
7886
|
: "absolute",
|
|
7872
7887
|
width: width
|
|
@@ -7880,13 +7895,15 @@ var Modal = React__default.forwardRef(function (props, ref) {
|
|
|
7880
7895
|
: size === "extraSmall"
|
|
7881
7896
|
? 320
|
|
7882
7897
|
: "100%",
|
|
7883
|
-
height:
|
|
7884
|
-
?
|
|
7885
|
-
:
|
|
7886
|
-
?
|
|
7887
|
-
:
|
|
7888
|
-
?
|
|
7889
|
-
:
|
|
7898
|
+
height: fullScreen
|
|
7899
|
+
? "100vh"
|
|
7900
|
+
: bodyMaxHeight
|
|
7901
|
+
? bodyMaxHeight
|
|
7902
|
+
: height
|
|
7903
|
+
? height
|
|
7904
|
+
: mobile && fullWidth
|
|
7905
|
+
? clientHeight
|
|
7906
|
+
: "100%",
|
|
7890
7907
|
background: "black",
|
|
7891
7908
|
opacity: 0.5,
|
|
7892
7909
|
zIndex: 10,
|