@yosgo/swap-ui 1.0.124 → 1.0.127
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 +5 -0
- package/build/index.esm.js +73 -64
- package/build/index.esm.js.map +1 -1
- package/build/index.js +73 -64
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -6667,6 +6667,58 @@ const host = createHost(primitives, {
|
|
|
6667
6667
|
});
|
|
6668
6668
|
const animated = host.animated;
|
|
6669
6669
|
|
|
6670
|
+
var useStyles$a = core.makeStyles(function (theme) { return ({
|
|
6671
|
+
root: function (props) { return ({
|
|
6672
|
+
margin: props.margin,
|
|
6673
|
+
backgroundColor: props.backgroundColor,
|
|
6674
|
+
color: props.color,
|
|
6675
|
+
padding: props.padding,
|
|
6676
|
+
boxShadow: theme.boxShadow.m,
|
|
6677
|
+
border: props.border,
|
|
6678
|
+
maxWidth: props.width,
|
|
6679
|
+
fontSize: 12,
|
|
6680
|
+
lineHeight: 1.4,
|
|
6681
|
+
fontWeight: props.fontWeight,
|
|
6682
|
+
}); },
|
|
6683
|
+
arrow: function (props) { return ({
|
|
6684
|
+
color: props.backgroundColor,
|
|
6685
|
+
}); },
|
|
6686
|
+
}); });
|
|
6687
|
+
var Tooltip = function (props) {
|
|
6688
|
+
var theme = core.useTheme();
|
|
6689
|
+
var arrow = props.arrow, margin = props.margin, marginTop = props.marginTop, marginBottom = props.marginBottom, marginRight = props.marginRight, marginLeft = props.marginLeft, dark = props.dark, light = props.light, children = props.children, width = props.width, childrenStyle = props.childrenStyle, other = __rest(props, ["arrow", "margin", "marginTop", "marginBottom", "marginRight", "marginLeft", "dark", "light", "children", "width", "childrenStyle"]);
|
|
6690
|
+
var styleProps = {
|
|
6691
|
+
width: width ? width : 240,
|
|
6692
|
+
padding: arrow ? "7.5px 12px" : 12,
|
|
6693
|
+
margin: margin
|
|
6694
|
+
? margin
|
|
6695
|
+
: marginTop
|
|
6696
|
+
? "0px 0px " + marginTop + "px 0px"
|
|
6697
|
+
: marginBottom
|
|
6698
|
+
? marginBottom + "px 0px 0px 0px"
|
|
6699
|
+
: marginRight
|
|
6700
|
+
? "0px 0px 0px " + marginRight + "px"
|
|
6701
|
+
: marginLeft
|
|
6702
|
+
? "0px " + marginLeft + "px 0px 0px"
|
|
6703
|
+
: "10px 0px",
|
|
6704
|
+
backgroundColor: dark
|
|
6705
|
+
? theme.black.black900
|
|
6706
|
+
: light
|
|
6707
|
+
? theme.black.white
|
|
6708
|
+
: theme.black.black900,
|
|
6709
|
+
color: dark
|
|
6710
|
+
? theme.black.white
|
|
6711
|
+
: light
|
|
6712
|
+
? theme.black.black800
|
|
6713
|
+
: theme.black.white,
|
|
6714
|
+
border: light ? "1px solid #CCCCCC" : null,
|
|
6715
|
+
fontWeight: arrow ? 700 : 400,
|
|
6716
|
+
};
|
|
6717
|
+
var classes = useStyles$a(styleProps);
|
|
6718
|
+
return (React__default.createElement(MaterialTooltip, __assign({ classes: { tooltip: classes.root, arrow: classes.arrow } }, other, { arrow: arrow }),
|
|
6719
|
+
React__default.createElement("div", { style: __assign({ width: "fit-content", height: "fit-content", display: "flex", alignItems: "center", justifyContent: "center" }, childrenStyle) }, children)));
|
|
6720
|
+
};
|
|
6721
|
+
|
|
6670
6722
|
var ModalTransitionEffect = React__default.forwardRef(function ModalTransitionEffect(props, ref) {
|
|
6671
6723
|
var open = props.in, slide = props.slide, children = props.children, onEnter = props.onEnter, onExited = props.onExited, style = props.style, other = __rest(props, ["in", "slide", "children", "onEnter", "onExited", "style"]);
|
|
6672
6724
|
var defaultStyle = useSpring({
|
|
@@ -7156,15 +7208,21 @@ var Modal = React__default.forwardRef(function (props, ref) {
|
|
|
7156
7208
|
secondaryButton || primaryButton ? (React__default.createElement(core.Box, { className: classes.footerButton },
|
|
7157
7209
|
React__default.createElement(core.Box, { width: mobile && !buttonFullWidth && !footerDisplayColumn
|
|
7158
7210
|
? null
|
|
7159
|
-
: "100%", marginRight: !footerDisplayColumn && secondaryButton ? 1 : 0 }, secondaryButton ? (React__default.createElement(
|
|
7211
|
+
: "100%", marginRight: !footerDisplayColumn && secondaryButton ? 1 : 0 }, secondaryButton ? (secondaryButton.tooltip ? (React__default.createElement(Tooltip, __assign({}, secondaryButton.tooltip),
|
|
7212
|
+
React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn, variant: secondaryButton.variant
|
|
7213
|
+
? secondaryButton.variant
|
|
7214
|
+
: "secondary", size: "small", onClick: secondaryButton.onClick, disabled: secondaryButton.disabled, loading: secondaryButton.loading, style: secondaryButton.style }, secondaryButton.title))) : (React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn, variant: secondaryButton.variant
|
|
7160
7215
|
? secondaryButton.variant
|
|
7161
|
-
: "secondary", size: "small", onClick: secondaryButton.onClick, disabled: secondaryButton.disabled, loading: secondaryButton.loading, style: secondaryButton.style }, secondaryButton.title)) : null),
|
|
7162
|
-
React__default.createElement(core.Box, { width: "100%", marginBottom: footerDisplayColumn ? 1 : 0 }, primaryButton ? (React__default.createElement(
|
|
7216
|
+
: "secondary", size: "small", onClick: secondaryButton.onClick, disabled: secondaryButton.disabled, loading: secondaryButton.loading, style: secondaryButton.style }, secondaryButton.title))) : null),
|
|
7217
|
+
React__default.createElement(core.Box, { width: "100%", marginBottom: footerDisplayColumn ? 1 : 0 }, primaryButton ? (primaryButton.tooltip ? (React__default.createElement(Tooltip, __assign({}, primaryButton.tooltip),
|
|
7218
|
+
React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn || mobile, variant: primaryButton.variant
|
|
7219
|
+
? primaryButton.variant
|
|
7220
|
+
: "primary", size: "small", onClick: primaryButton.onClick, disabled: primaryButton.disabled, loading: primaryButton.loading, style: primaryButton.style }, primaryButton.title))) : (React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn || mobile, variant: primaryButton.variant
|
|
7163
7221
|
? primaryButton.variant
|
|
7164
|
-
: "primary", size: "small", onClick: primaryButton.onClick, disabled: primaryButton.disabled, loading: primaryButton.loading, style: primaryButton.style }, primaryButton.title)) : null))) : null)))))));
|
|
7222
|
+
: "primary", size: "small", onClick: primaryButton.onClick, disabled: primaryButton.disabled, loading: primaryButton.loading, style: primaryButton.style }, primaryButton.title))) : null))) : null)))))));
|
|
7165
7223
|
});
|
|
7166
7224
|
|
|
7167
|
-
var useStyles$
|
|
7225
|
+
var useStyles$b = core.makeStyles(function () { return ({
|
|
7168
7226
|
root: function (props) { return ({
|
|
7169
7227
|
backgroundColor: props.backgroundColor,
|
|
7170
7228
|
border: "1px solid " + props.borderColor,
|
|
@@ -7212,7 +7270,7 @@ var Banner = function (props) {
|
|
|
7212
7270
|
height: height ? height : null,
|
|
7213
7271
|
alignItems: mobile ? "flex-start" : alignStart ? "flex-start" : "center",
|
|
7214
7272
|
};
|
|
7215
|
-
var classes = useStyles$
|
|
7273
|
+
var classes = useStyles$b(styleProps);
|
|
7216
7274
|
var ref = React.useRef(null);
|
|
7217
7275
|
React.useEffect(function () {
|
|
7218
7276
|
if (ref.current) {
|
|
@@ -7238,7 +7296,7 @@ var Banner = function (props) {
|
|
|
7238
7296
|
React__default.createElement(Typography, { variant: "caption2" }, children)));
|
|
7239
7297
|
};
|
|
7240
7298
|
|
|
7241
|
-
var useStyles$
|
|
7299
|
+
var useStyles$c = core.makeStyles(function () { return ({
|
|
7242
7300
|
root: function (props) { return ({
|
|
7243
7301
|
backgroundColor: props.backgroundColor,
|
|
7244
7302
|
border: props.border,
|
|
@@ -7252,7 +7310,6 @@ var useStyles$b = core.makeStyles(function () { return ({
|
|
|
7252
7310
|
fontSize: "0.75rem",
|
|
7253
7311
|
lineHeight: "17px",
|
|
7254
7312
|
fontWeight: 700,
|
|
7255
|
-
marginRight: props.marginRight,
|
|
7256
7313
|
color: props.color,
|
|
7257
7314
|
}); },
|
|
7258
7315
|
}); });
|
|
@@ -7294,11 +7351,10 @@ var Chip = function (props) {
|
|
|
7294
7351
|
: variant === "danger"
|
|
7295
7352
|
? theme.danger.danger800
|
|
7296
7353
|
: theme.primary.primary800,
|
|
7297
|
-
marginRight: variant === "success" ? 4 : 0,
|
|
7298
7354
|
};
|
|
7299
|
-
var classes = useStyles$
|
|
7355
|
+
var classes = useStyles$c(styleProps);
|
|
7300
7356
|
return (React__default.createElement("div", __assign({ className: classes.root }, other),
|
|
7301
|
-
label,
|
|
7357
|
+
React__default.createElement("span", { style: { marginRight: variant === "success" ? 4 : 0 } }, label),
|
|
7302
7358
|
variant === "success" && !icon ? icon_success : icon));
|
|
7303
7359
|
};
|
|
7304
7360
|
var icon_success = (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -7327,58 +7383,6 @@ var CircularProgress = function (props) {
|
|
|
7327
7383
|
} })));
|
|
7328
7384
|
};
|
|
7329
7385
|
|
|
7330
|
-
var useStyles$c = core.makeStyles(function (theme) { return ({
|
|
7331
|
-
root: function (props) { return ({
|
|
7332
|
-
margin: props.margin,
|
|
7333
|
-
backgroundColor: props.backgroundColor,
|
|
7334
|
-
color: props.color,
|
|
7335
|
-
padding: props.padding,
|
|
7336
|
-
boxShadow: theme.boxShadow.m,
|
|
7337
|
-
border: props.border,
|
|
7338
|
-
maxWidth: props.width,
|
|
7339
|
-
fontSize: 12,
|
|
7340
|
-
lineHeight: 1.4,
|
|
7341
|
-
fontWeight: props.fontWeight,
|
|
7342
|
-
}); },
|
|
7343
|
-
arrow: function (props) { return ({
|
|
7344
|
-
color: props.backgroundColor,
|
|
7345
|
-
}); },
|
|
7346
|
-
}); });
|
|
7347
|
-
var Tooltip = function (props) {
|
|
7348
|
-
var theme = core.useTheme();
|
|
7349
|
-
var arrow = props.arrow, margin = props.margin, marginTop = props.marginTop, marginBottom = props.marginBottom, marginRight = props.marginRight, marginLeft = props.marginLeft, dark = props.dark, light = props.light, children = props.children, width = props.width, childrenStyle = props.childrenStyle, other = __rest(props, ["arrow", "margin", "marginTop", "marginBottom", "marginRight", "marginLeft", "dark", "light", "children", "width", "childrenStyle"]);
|
|
7350
|
-
var styleProps = {
|
|
7351
|
-
width: width ? width : 240,
|
|
7352
|
-
padding: arrow ? "7.5px 12px" : 12,
|
|
7353
|
-
margin: margin
|
|
7354
|
-
? margin
|
|
7355
|
-
: marginTop
|
|
7356
|
-
? "0px 0px " + marginTop + "px 0px"
|
|
7357
|
-
: marginBottom
|
|
7358
|
-
? marginBottom + "px 0px 0px 0px"
|
|
7359
|
-
: marginRight
|
|
7360
|
-
? "0px 0px 0px " + marginRight + "px"
|
|
7361
|
-
: marginLeft
|
|
7362
|
-
? "0px " + marginLeft + "px 0px 0px"
|
|
7363
|
-
: "10px 0px",
|
|
7364
|
-
backgroundColor: dark
|
|
7365
|
-
? theme.black.black900
|
|
7366
|
-
: light
|
|
7367
|
-
? theme.black.white
|
|
7368
|
-
: theme.black.black900,
|
|
7369
|
-
color: dark
|
|
7370
|
-
? theme.black.white
|
|
7371
|
-
: light
|
|
7372
|
-
? theme.black.black800
|
|
7373
|
-
: theme.black.white,
|
|
7374
|
-
border: light ? "1px solid #CCCCCC" : null,
|
|
7375
|
-
fontWeight: arrow ? 700 : 400,
|
|
7376
|
-
};
|
|
7377
|
-
var classes = useStyles$c(styleProps);
|
|
7378
|
-
return (React__default.createElement(MaterialTooltip, __assign({ classes: { tooltip: classes.root, arrow: classes.arrow } }, other, { arrow: arrow }),
|
|
7379
|
-
React__default.createElement("div", { style: __assign({ width: "fit-content", height: "fit-content", display: "flex", alignItems: "center", justifyContent: "center" }, childrenStyle) }, children)));
|
|
7380
|
-
};
|
|
7381
|
-
|
|
7382
7386
|
function _extends() {
|
|
7383
7387
|
_extends = Object.assign || function (target) {
|
|
7384
7388
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -12747,10 +12751,15 @@ var DatePicker = function (props) {
|
|
|
12747
12751
|
var open = props.open, onClose = props.onClose, format = props.format, mobile = props.mobile, min = props.min, max = props.max, ModalProps = props.ModalProps, defaultValue = props.defaultValue, getValue = props.getValue, value = props.value, other = __rest(props, ["open", "onClose", "format", "mobile", "min", "max", "ModalProps", "defaultValue", "getValue", "value"]);
|
|
12748
12752
|
var _a = React.useState(Number(new Date().getFullYear())), year = _a[0], setYear = _a[1];
|
|
12749
12753
|
var _b = React.useState(Number(new Date().getMonth() + 1)), month = _b[0], setMonth = _b[1];
|
|
12750
|
-
var _c = React.useState(
|
|
12754
|
+
var _c = React.useState(Number(new Date().getMonth() + 2)), nextMonth = _c[0], setNextMonth = _c[1];
|
|
12751
12755
|
var _d = React.useState(""), date = _d[0], setDate = _d[1];
|
|
12752
12756
|
var _e = React.useState(false), isOpenMonthSelector = _e[0], setIsOpenMonthSelector = _e[1];
|
|
12753
12757
|
var _f = React.useState(false), isClicked = _f[0], setIsClicked = _f[1];
|
|
12758
|
+
React.useEffect(function () {
|
|
12759
|
+
if (month === 12) {
|
|
12760
|
+
setNextMonth(1);
|
|
12761
|
+
}
|
|
12762
|
+
}, []);
|
|
12754
12763
|
React.useEffect(function () {
|
|
12755
12764
|
if (format === "month") {
|
|
12756
12765
|
if (month % 2 === 0) {
|