@yosgo/swap-ui 1.0.119 → 1.0.123

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.
@@ -1,4 +1,4 @@
1
- import { AppBar, Toolbar, Container as Container$1, Grid, Button as Button$1, Typography as Typography$1, IconButton as IconButton$1, Menu as Menu$1, MenuItem as MenuItem$1, Divider, Fade, Paper as Paper$1, TextField as TextField$1, Dialog, Modal as Modal$1, Breadcrumbs, Slide, FormControl, InputLabel, Select as Select$1, CssBaseline, Box, useTheme as useTheme$1, makeStyles as makeStyles$1, useMediaQuery, FormControlLabel, OutlinedInput, FormHelperText, ListItemIcon, Backdrop, fade as fade$1, Popper as Popper$1, InputBase } from '@material-ui/core';
1
+ import { AppBar, Toolbar, Container as Container$1, Grid, Button as Button$1, Typography as Typography$1, IconButton as IconButton$1, Menu as Menu$1, MenuItem as MenuItem$1, Divider, Fade, Paper as Paper$1, TextField as TextField$1, Dialog, Modal as Modal$1, Breadcrumbs, Slide, FormControl, InputLabel, Select as Select$1, CssBaseline, Box, useTheme as useTheme$1, makeStyles as makeStyles$1, useMediaQuery, FormControlLabel, OutlinedInput, FormHelperText, ListItemIcon, Backdrop, fade as fade$1, Popper as Popper$1, InputBase, Grow } from '@material-ui/core';
2
2
  export { CssBaseline } from '@material-ui/core';
3
3
  import React__default, { useEffect, useState, Component as Component$1, forwardRef, useRef, useLayoutEffect as useLayoutEffect$1, useCallback, createElement, createContext, useContext, useMemo, Fragment as Fragment$1 } from 'react';
4
4
  import styled from 'styled-components';
@@ -2695,14 +2695,22 @@ var RadioButton = function (props) {
2695
2695
  };
2696
2696
 
2697
2697
  var useStyles$2 = makeStyles$1(function (theme) { return ({
2698
+ root: {
2699
+ "& .MuiFormHelperText-contained": {
2700
+ marginLeft: 16,
2701
+ marginRight: 16,
2702
+ },
2703
+ },
2698
2704
  inputRoot: function (props) { return ({
2699
2705
  width: props.width,
2700
2706
  height: props.height,
2701
2707
  padding: "0px 16px",
2702
2708
  backgroundColor: "white",
2703
2709
  fontSize: 16,
2704
- lineHeight: 1.4,
2710
+ lineHeight: "unset",
2705
2711
  fontWeight: 400,
2712
+ display: "flex",
2713
+ alignItems: "center",
2706
2714
  "& fieldset": {
2707
2715
  "& legend": {
2708
2716
  width: "0.01px",
@@ -2710,11 +2718,9 @@ var useStyles$2 = makeStyles$1(function (theme) { return ({
2710
2718
  borderColor: theme.black.black500,
2711
2719
  },
2712
2720
  "&.Mui-focused": {
2713
- boxShadow: props.select ? "unset" : "0px 0px 0px 4px #D7DFF8",
2721
+ boxShadow: "0px 0px 0px 4px #D7DFF8",
2714
2722
  "& fieldset": {
2715
- border: props.select
2716
- ? "1px solid " + theme.black.black1000 + " !important"
2717
- : "1px solid " + theme.primary.primary400 + " !important",
2723
+ border: "1px solid " + theme.primary.primary400 + " !important",
2718
2724
  borderWidth: "1px !important",
2719
2725
  },
2720
2726
  "&.Mui-error": {
@@ -2732,11 +2738,18 @@ var useStyles$2 = makeStyles$1(function (theme) { return ({
2732
2738
  },
2733
2739
  }); },
2734
2740
  input: {
2741
+ fontSize: 16,
2742
+ lineHeight: "unset",
2743
+ fontWeight: 400,
2744
+ display: "flex",
2745
+ alignItems: "center",
2735
2746
  "&:-webkit-autofill": {
2736
2747
  "-webkit-box-shadow": "0 0 0 100px #FFFFFF inset",
2737
2748
  },
2738
2749
  "&::placeholder": { color: theme.black.black700, opacity: 1 },
2739
2750
  padding: 0,
2751
+ margin: 0,
2752
+ height: "fit-content",
2740
2753
  },
2741
2754
  selectRoot: function (props) { return ({
2742
2755
  borderRadius: 8,
@@ -2756,7 +2769,11 @@ var useStyles$2 = makeStyles$1(function (theme) { return ({
2756
2769
  "&.Mui-error": { color: theme.black.black700 },
2757
2770
  },
2758
2771
  shrink: {
2759
- transform: "translate(14px, -6px) !important",
2772
+ transform: "translate(14px, -10px) !important",
2773
+ height: 20,
2774
+ display: "flex",
2775
+ alignItems: "center",
2776
+ justifyContent: "center",
2760
2777
  backgroundColor: "white",
2761
2778
  fontSize: 14,
2762
2779
  fontWeight: 700,
@@ -2778,7 +2795,7 @@ var TextField = function (props) {
2778
2795
  select: select,
2779
2796
  };
2780
2797
  var classes = useStyles$2(styleProps);
2781
- return (React__default.createElement(MaterialTextField, __assign({ fullWidth: fullWidth, select: select }, other, { variant: "outlined", InputProps: __assign({ classes: {
2798
+ return (React__default.createElement(MaterialTextField, __assign({ fullWidth: fullWidth, select: select }, other, { className: classes.root, variant: "outlined", InputProps: __assign({ classes: {
2782
2799
  root: classes.inputRoot,
2783
2800
  input: classes.input,
2784
2801
  } }, InputProps), InputLabelProps: __assign({ classes: {
@@ -3102,7 +3119,7 @@ var Button = function (props) {
3102
3119
  : variant === "secondary"
3103
3120
  ? theme.primary.primary400
3104
3121
  : variant === "tertiary"
3105
- ? theme.primary.primary500
3122
+ ? theme.black.black800
3106
3123
  : variant === "text"
3107
3124
  ? theme.primary.primary400
3108
3125
  : variant === "black"
@@ -3115,7 +3132,7 @@ var Button = function (props) {
3115
3132
  : variant === "secondary"
3116
3133
  ? theme.black.white
3117
3134
  : variant === "tertiary"
3118
- ? theme.primary.primary50
3135
+ ? theme.black.black400
3119
3136
  : variant === "text"
3120
3137
  ? theme.black.white
3121
3138
  : variant === "black"
@@ -3160,7 +3177,7 @@ var Button = function (props) {
3160
3177
  : variant === "secondary"
3161
3178
  ? theme.primary.primary50
3162
3179
  : variant === "tertiary"
3163
- ? theme.primary.primary100
3180
+ ? theme.black.black500
3164
3181
  : variant === "text"
3165
3182
  ? theme.primary.primary50
3166
3183
  : variant === "black"
@@ -3184,7 +3201,7 @@ var Button = function (props) {
3184
3201
  : variant === "secondary"
3185
3202
  ? theme.primary.primary100
3186
3203
  : variant === "tertiary"
3187
- ? theme.primary.primary200
3204
+ ? theme.black.black600
3188
3205
  : variant === "text"
3189
3206
  ? theme.primary.primary100
3190
3207
  : variant === "black"
@@ -3198,13 +3215,15 @@ var Button = function (props) {
3198
3215
  ? "0px 0px 0px 4px #CCCCCC"
3199
3216
  : variant === "danger"
3200
3217
  ? "0px 0px 0px 4px #FFCCD0"
3201
- : "0px 0px 0px 4px #D7DFF8",
3218
+ : variant === "tertiary"
3219
+ ? "0px 0px 0px 4px rgba(0, 0, 0, 0.1)"
3220
+ : "0px 0px 0px 4px #D7DFF8",
3202
3221
  backgroundColor: variant === "primary"
3203
3222
  ? theme.primary.primary400
3204
3223
  : variant === "secondary"
3205
3224
  ? theme.primary.primary50
3206
3225
  : variant === "tertiary"
3207
- ? theme.primary.primary50
3226
+ ? theme.black.black400
3208
3227
  : variant === "text"
3209
3228
  ? theme.primary.primary50
3210
3229
  : variant === "black"
@@ -3215,7 +3234,7 @@ var Button = function (props) {
3215
3234
  border: variant === "secondary"
3216
3235
  ? "1px solid " + theme.primary.primary400
3217
3236
  : variant === "tertiary"
3218
- ? "1px solid " + theme.primary.primary400
3237
+ ? "1px solid " + theme.black.black600
3219
3238
  : variant === "text"
3220
3239
  ? "1px solid " + theme.primary.primary400
3221
3240
  : variant === "black"
@@ -3231,7 +3250,7 @@ var Button = function (props) {
3231
3250
  : variant === "secondary"
3232
3251
  ? theme.black.white
3233
3252
  : variant === "tertiary"
3234
- ? theme.primary.primary100
3253
+ ? theme.black.black400
3235
3254
  : variant === "text"
3236
3255
  ? theme.black.white
3237
3256
  : variant === "black"
@@ -3244,7 +3263,7 @@ var Button = function (props) {
3244
3263
  : variant === "secondary"
3245
3264
  ? theme.primary.primary400
3246
3265
  : variant === "tertiary"
3247
- ? theme.primary.primary500
3266
+ ? theme.black.black800
3248
3267
  : variant === "text"
3249
3268
  ? theme.primary.primary400
3250
3269
  : variant === "black"
@@ -6666,11 +6685,11 @@ var ModalTransitionEffect = React__default.forwardRef(function ModalTransitionEf
6666
6685
  return (React__default.createElement(React__default.Fragment, null, slide ? (React__default.createElement(Slide, { in: open, direction: "up", mountOnEnter: true, unmountOnExit: true, timeout: { enter: 300, exit: 300 } }, children)) : (React__default.createElement(animated.div, __assign({ style: __assign(__assign({}, style), defaultStyle) }, other), children))));
6667
6686
  });
6668
6687
  var Modal = React__default.forwardRef(function (props, ref) {
6669
- 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, isFreshchatOpen = props.isFreshchatOpen;
6688
+ 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;
6670
6689
  var _a = useState(0), clientHeight = _a[0], setClientHeight = _a[1];
6671
6690
  var _b = useState(0), scorllbarWidth = _b[0], setScorllbarWidth = _b[1];
6672
6691
  useEffect(function () {
6673
- if (mobile && fullWidth) {
6692
+ if (mobile || fullWidth) {
6674
6693
  if ((helpText || multiline) && !label) {
6675
6694
  setClientHeight(window.innerHeight - 64 - 73 - 64);
6676
6695
  }
@@ -6684,19 +6703,11 @@ var Modal = React__default.forwardRef(function (props, ref) {
6684
6703
  setClientHeight(window.innerHeight - 64 - 56 - 64);
6685
6704
  }
6686
6705
  }
6687
- }, []);
6706
+ }, [fullWidth, mobile]);
6688
6707
  useEffect(function () {
6689
6708
  var scrollbar_width = window.innerWidth - document.body.clientWidth;
6690
6709
  setScorllbarWidth(scrollbar_width / 2);
6691
6710
  }, []);
6692
- useEffect(function () {
6693
- if (!isFreshchatOpen) {
6694
- var elem = document.getElementById("fc_frame");
6695
- if (elem) {
6696
- elem.style["display"] = open ? "none" : "block";
6697
- }
6698
- }
6699
- }, [open]);
6700
6711
  var match_XS = useBreakpoints("xs");
6701
6712
  var useStyles = makeStyles$1(function (theme) { return ({
6702
6713
  root: {
@@ -7008,7 +7019,7 @@ var Modal = React__default.forwardRef(function (props, ref) {
7008
7019
  pointerEvents: onExit ? "none" : "unset",
7009
7020
  maxHeight: bodyMaxHeight
7010
7021
  ? bodyMaxHeight
7011
- : mobile && fullWidth
7022
+ : fullWidth
7012
7023
  ? clientHeight
7013
7024
  : "unset",
7014
7025
  overflowY: !onExit ? "scroll" : "hidden",
@@ -7048,7 +7059,10 @@ var Modal = React__default.forwardRef(function (props, ref) {
7048
7059
  },
7049
7060
  }); });
7050
7061
  var classes = useStyles();
7051
- return (React__default.createElement(MaterialModal, { open: open, className: classes.root, BackdropComponent: Backdrop, BackdropProps: { className: classes.backdrop } },
7062
+ return (React__default.createElement(MaterialModal, { open: open, className: classes.root, BackdropComponent: Backdrop, BackdropProps: {
7063
+ className: classes.backdrop,
7064
+ style: { overflow: "auto", WebkitOverflowScrolling: "touch" },
7065
+ } },
7052
7066
  React__default.createElement(ModalTransitionEffect, { in: open, slide: fullWidth, style: {
7053
7067
  outline: "none",
7054
7068
  transition: "ease-in-out",
@@ -7129,12 +7143,15 @@ var Modal = React__default.forwardRef(function (props, ref) {
7129
7143
  children))) : null,
7130
7144
  (label || secondaryButton || primaryButton) && !disUnderLine ? (React__default.createElement(Divider, null)) : null,
7131
7145
  React__default.createElement(Box, { className: classes.footer }, footer ? (footer) : (React__default.createElement(React__default.Fragment, null,
7132
- !buttonFullWidth || !footerDisplayColumn ? (React__default.createElement(Box, { marginBottom: mobile ? (label ? "12px" : 0) : 0 },
7133
- React__default.createElement(Typography, { variant: mobile ? "title" : "h6" }, label))) : null,
7146
+ !buttonFullWidth || !footerDisplayColumn ? (React__default.createElement(Box, { marginBottom: mobile ? (label ? "12px" : 0) : 0, style: {
7147
+ fontSize: mobile ? 16 : 18,
7148
+ fontWeight: 700,
7149
+ lineHeight: 1.4,
7150
+ } }, label)) : null,
7134
7151
  secondaryButton || primaryButton ? (React__default.createElement(Box, { className: classes.footerButton },
7135
7152
  React__default.createElement(Box, { width: mobile && !buttonFullWidth && !footerDisplayColumn
7136
7153
  ? null
7137
- : "100%", marginRight: !footerDisplayColumn ? 1 : 0 }, secondaryButton ? (React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn, variant: secondaryButton.variant
7154
+ : "100%", marginRight: !footerDisplayColumn && secondaryButton ? 1 : 0 }, secondaryButton ? (React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn, variant: secondaryButton.variant
7138
7155
  ? secondaryButton.variant
7139
7156
  : "secondary", size: "small", onClick: secondaryButton.onClick, disabled: secondaryButton.disabled, loading: secondaryButton.loading, style: secondaryButton.style }, secondaryButton.title)) : null),
7140
7157
  React__default.createElement(Box, { width: "100%", marginBottom: footerDisplayColumn ? 1 : 0 }, primaryButton ? (React__default.createElement(Button, { fullWidth: buttonFullWidth || footerDisplayColumn || mobile, variant: primaryButton.variant
@@ -7226,7 +7243,12 @@ var useStyles$b = makeStyles$1(function () { return ({
7226
7243
  height: props.height,
7227
7244
  display: "flex",
7228
7245
  alignItems: "center",
7229
- justifyContent: "space-between",
7246
+ justifyContent: "center",
7247
+ fontSize: "0.75rem",
7248
+ lineHeight: 1.4,
7249
+ fontWeight: 700,
7250
+ marginRight: props.marginRight,
7251
+ color: props.color,
7230
7252
  }); },
7231
7253
  }); });
7232
7254
  var Chip = function (props) {
@@ -7245,7 +7267,7 @@ var Chip = function (props) {
7245
7267
  ? theme.danger.danger50
7246
7268
  : theme.primary.primary50,
7247
7269
  width: width ? width : "fit-content",
7248
- height: height ? height : "fit-content",
7270
+ height: height ? height : 24,
7249
7271
  border: outlined || !contained
7250
7272
  ? variant === "neutral"
7251
7273
  ? "1px solid " + theme.black.black500
@@ -7257,21 +7279,25 @@ var Chip = function (props) {
7257
7279
  ? "1px solid " + theme.danger.danger800
7258
7280
  : "1px solid " + theme.primary.primary800
7259
7281
  : null,
7260
- padding: outlined || !contained ? "3.5px 8px" : "3.5px 9px",
7282
+ padding: outlined || !contained ? "0px 8px" : "0px 9px",
7283
+ color: variant === "neutral"
7284
+ ? theme.black.black800
7285
+ : variant === "primary"
7286
+ ? theme.primary.primary800
7287
+ : variant === "success"
7288
+ ? theme.success.success800
7289
+ : variant === "danger"
7290
+ ? theme.danger.danger800
7291
+ : theme.primary.primary800,
7292
+ marginRight: variant === "success" ? 4 : 0,
7261
7293
  };
7262
7294
  var classes = useStyles$b(styleProps);
7263
7295
  return (React__default.createElement("div", __assign({ className: classes.root }, other),
7264
- React__default.createElement(Typography, { variant: "caption1", color: variant === "neutral"
7265
- ? "black800"
7266
- : variant === "primary"
7267
- ? "primary800"
7268
- : variant === "success"
7269
- ? "success800"
7270
- : variant === "danger"
7271
- ? "danger800"
7272
- : "primary800", style: { marginRight: icon ? 4 : 0 } }, label),
7273
- icon));
7274
- };
7296
+ label,
7297
+ variant === "success" && !icon ? icon_success : icon));
7298
+ };
7299
+ 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" },
7300
+ React__default.createElement("path", { d: "M14 4.66666L6 12.6667L2.33333 9L3.27333 8.06L6 10.78L13.06 3.72666L14 4.66666Z", fill: "#00821E" })));
7275
7301
 
7276
7302
  var CircularProgress = function (props) {
7277
7303
  var theme = useTheme$1();
@@ -11779,7 +11805,7 @@ var AutoComplete = function (props) {
11779
11805
  };
11780
11806
 
11781
11807
  var TaxTextField = function (_a) {
11782
- var onChange = _a.onChange, codeValue = _a.codeValue, domainValue = _a.domainValue, domainCodeValue = _a.domainCodeValue, codeError = _a.codeError, codeHelperText = _a.codeHelperText, domainError = _a.domainError, domainHelperText = _a.domainHelperText, codeOnClick = _a.codeOnClick, domainOnClick = _a.domainOnClick, mobile = _a.mobile;
11808
+ var onChange = _a.onChange, codeValue = _a.codeValue, domainValue = _a.domainValue, domainCodeValue = _a.domainCodeValue, codeError = _a.codeError, codeHelperText = _a.codeHelperText, domainError = _a.domainError, domainHelperText = _a.domainHelperText, codeOnClick = _a.codeOnClick, domainOnClick = _a.domainOnClick, mobile = _a.mobile, codeFocused = _a.codeFocused, domainFocused = _a.domainFocused;
11783
11809
  var _b = useState(""), modalIncome = _b[0], setModalIncome = _b[1];
11784
11810
  var _c = useState(""), modalExpense = _c[0], setModalExpense = _c[1];
11785
11811
  var handleModalTaxDescription = function () {
@@ -11836,7 +11862,7 @@ var TaxTextField = function (_a) {
11836
11862
  justifyContent: "space-between",
11837
11863
  } },
11838
11864
  React__default.createElement("div", { style: { width: "100%" } },
11839
- React__default.createElement(TextField, { fullWidth: true, select: true, error: codeError, helperText: codeHelperText, height: 56, label: "\u9078\u64C7\u7533\u5831\u985E\u5225", value: codeValue, onClick: handleCodeClick, onChange: function (e) {
11865
+ React__default.createElement(TextField, { focused: codeFocused, fullWidth: true, select: true, error: codeError, helperText: codeHelperText, height: 56, label: "\u9078\u64C7\u7533\u5831\u985E\u5225", value: codeValue, onClick: handleCodeClick, onChange: function (e) {
11840
11866
  setModalIncome(e.target.value);
11841
11867
  setModalExpense("");
11842
11868
  } },
@@ -11868,7 +11894,7 @@ var TaxTextField = function (_a) {
11868
11894
  margin: mobile ? "24px 0 0 0 " : "0 0 0 8px",
11869
11895
  } }, codeValue === "9B" ? (
11870
11896
  // 9B Select
11871
- React__default.createElement(TextField, { select: true, fullWidth: true, error: domainError, helperText: domainHelperText, height: 56, label: "\u8F38\u5165\u57F7\u884C\u696D\u52D9\u985E\u5225", value: domainCodeValue, onClick: handleDomainClick, onChange: function (e) {
11897
+ React__default.createElement(TextField, { focused: domainFocused, select: true, fullWidth: true, error: domainError, helperText: domainHelperText, height: 56, label: "\u8F38\u5165\u57F7\u884C\u696D\u52D9\u985E\u5225", value: domainCodeValue, onClick: handleDomainClick, onChange: function (e) {
11872
11898
  setModalExpense(e.target.value);
11873
11899
  setAnchorEl(null);
11874
11900
  } },
@@ -11897,7 +11923,7 @@ var TaxTextField = function (_a) {
11897
11923
  option.label)); }))) : (
11898
11924
  // 9A AutoComplete
11899
11925
  React__default.createElement(React__default.Fragment, null,
11900
- React__default.createElement(TextField, { error: domainError, helperText: domainHelperText, fullWidth: true, label: "\u8F38\u5165\u57F7\u884C\u696D\u52D9\u985E\u5225", height: 56, value: domainValue, onClick: handleDomainClick, InputProps: {
11926
+ React__default.createElement(TextField, { focused: domainFocused, error: domainError, helperText: domainHelperText, fullWidth: true, label: "\u8F38\u5165\u57F7\u884C\u696D\u52D9\u985E\u5225", height: 56, value: domainValue, onClick: handleDomainClick, InputProps: {
11901
11927
  endAdornment: (React__default.createElement("div", { style: { width: 24, height: 24 } },
11902
11928
  React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
11903
11929
  React__default.createElement("path", { d: "M7 10L12 15L17 10H7Z", fill: "black" })))),
@@ -12640,6 +12666,543 @@ var Switch = function (props) {
12640
12666
  React__default.createElement("path", { d: "M4.5 10.21L1.395 7.105L2.81 5.69L4.5 7.385L9.44 2.44L10.855 3.855L4.5 10.21Z", fill: "#4862CC" })))) }, other))));
12641
12667
  };
12642
12668
 
12669
+ var useStylesForMonthButton = makeStyles$1(function (theme) { return ({
12670
+ root: function (props) { return ({
12671
+ width: "100%",
12672
+ height: "100%",
12673
+ borderRadius: 8,
12674
+ border: props.selected
12675
+ ? "1px solid " + theme.primary.primary300
12676
+ : "1px solid " + theme.black.black500,
12677
+ boxSizing: "border-box",
12678
+ display: "flex",
12679
+ alignItems: "center",
12680
+ justifyContent: "center",
12681
+ fontSize: 14,
12682
+ fontWeight: 700,
12683
+ lineHeight: 1.4,
12684
+ backgroundColor: props.selected
12685
+ ? theme.primary.primary50
12686
+ : theme.black.white,
12687
+ cursor: "pointer",
12688
+ "&:hover": {
12689
+ border: props.selected
12690
+ ? "1px solid " + theme.primary.primary300
12691
+ : "1px solid " + theme.black.black600,
12692
+ backgroundColor: props.selected
12693
+ ? theme.primary.primary50
12694
+ : theme.black.black100,
12695
+ },
12696
+ }); },
12697
+ }); });
12698
+ var useStylesForCalendar = makeStyles$1(function (theme) { return ({
12699
+ head: {
12700
+ width: "100%",
12701
+ display: "flex",
12702
+ alignItems: "center",
12703
+ justifyContent: "center",
12704
+ height: 48,
12705
+ fontSize: 14,
12706
+ fontWeight: 700,
12707
+ marginBottom: 8,
12708
+ position: "relative",
12709
+ },
12710
+ body: {
12711
+ display: "grid",
12712
+ gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr 1fr",
12713
+ gap: 8,
12714
+ },
12715
+ days: {
12716
+ width: 32,
12717
+ height: 32,
12718
+ display: "flex",
12719
+ alignItems: "center",
12720
+ justifyContent: "center",
12721
+ fontSize: 14,
12722
+ color: theme.black.black600,
12723
+ },
12724
+ date: {
12725
+ width: 32,
12726
+ height: 32,
12727
+ display: "flex",
12728
+ alignItems: "center",
12729
+ justifyContent: "center",
12730
+ marginBottom: 4,
12731
+ fontSize: 14,
12732
+ fontWeight: 700,
12733
+ color: theme.black.black800,
12734
+ cursor: "pointer",
12735
+ borderRadius: "50%",
12736
+ "&:hover": {
12737
+ backgroundColor: theme.primary.primary50,
12738
+ },
12739
+ },
12740
+ }); });
12741
+ var DatePicker = function (props) {
12742
+ 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"]);
12743
+ var _a = useState(Number(new Date().getFullYear())), year = _a[0], setYear = _a[1];
12744
+ var _b = useState(Number(new Date().getMonth() + 1)), month = _b[0], setMonth = _b[1];
12745
+ var _c = useState(1), nextMonth = _c[0], setNextMonth = _c[1];
12746
+ var _d = useState(""), date = _d[0], setDate = _d[1];
12747
+ var _e = useState(false), isOpenMonthSelector = _e[0], setIsOpenMonthSelector = _e[1];
12748
+ var _f = useState(false), isClicked = _f[0], setIsClicked = _f[1];
12749
+ useEffect(function () {
12750
+ if (format === "month") {
12751
+ if (month % 2 === 0) {
12752
+ setMonth(month - 1);
12753
+ }
12754
+ else {
12755
+ if (month < 1) {
12756
+ setMonth(11);
12757
+ setYear(year - 1);
12758
+ }
12759
+ if (month > 12) {
12760
+ setMonth(1);
12761
+ setYear(year + 1);
12762
+ }
12763
+ }
12764
+ }
12765
+ }, [month]);
12766
+ useEffect(function () {
12767
+ if (isClicked && getValue) {
12768
+ if (format === "month") {
12769
+ if (month < 1) {
12770
+ getValue(year - 1 + "-11");
12771
+ }
12772
+ else if (month > 12) {
12773
+ getValue(year + 1 + "-1");
12774
+ }
12775
+ else {
12776
+ getValue(year + "-" + month);
12777
+ }
12778
+ }
12779
+ else if (format === "day") {
12780
+ getValue(date.replace(/\//g, "-"));
12781
+ }
12782
+ else {
12783
+ getValue(String(year));
12784
+ }
12785
+ setIsClicked(false);
12786
+ }
12787
+ }, [isClicked]);
12788
+ useEffect(function () {
12789
+ if (value) {
12790
+ setDate(changeDateFormatToSlash(value));
12791
+ }
12792
+ }, [value]);
12793
+ return (React__default.createElement("div", __assign({}, other), format !== "day" ? (React__default.createElement("div", { style: {
12794
+ borderRadius: 8,
12795
+ border: "1px solid #cccccc",
12796
+ boxSizing: "border-box",
12797
+ width: format === "month" ? 219 : 180,
12798
+ height: 40,
12799
+ display: "grid",
12800
+ alignItems: "center",
12801
+ gridTemplateColumns: "36px 1px 1fr 1px 36px",
12802
+ position: "relative",
12803
+ } },
12804
+ React__default.createElement(IconButton, { onClick: function () {
12805
+ if (format === "month") {
12806
+ setMonth(month - 2);
12807
+ }
12808
+ else {
12809
+ setYear(year - 1);
12810
+ }
12811
+ setIsClicked(true);
12812
+ }, style: {
12813
+ width: "100%",
12814
+ height: "100%",
12815
+ display: "flex",
12816
+ justifyContent: "center",
12817
+ alignItems: "center",
12818
+ borderRadius: "8px 0 0 8px",
12819
+ } }, icon_arrowleft),
12820
+ verticalline,
12821
+ React__default.createElement("div", { style: {
12822
+ display: "flex",
12823
+ justifyContent: "center",
12824
+ alignItems: "center",
12825
+ } },
12826
+ icon_calendar,
12827
+ format === "month" ? (React__default.createElement("div", { style: {
12828
+ fontSize: 14,
12829
+ fontWeight: 700,
12830
+ lineHeight: 1.4,
12831
+ marginLeft: 4,
12832
+ cursor: "pointer",
12833
+ }, onClick: function () { return setIsOpenMonthSelector(!isOpenMonthSelector); } },
12834
+ year,
12835
+ "\u5E74",
12836
+ month,
12837
+ "-",
12838
+ month + 1,
12839
+ "\u6708")) : (React__default.createElement("div", { style: {
12840
+ fontSize: 14,
12841
+ fontWeight: 700,
12842
+ lineHeight: 1.4,
12843
+ marginLeft: 4,
12844
+ } },
12845
+ year,
12846
+ "\u5E74"))),
12847
+ verticalline,
12848
+ React__default.createElement(IconButton, { onClick: function () {
12849
+ if (format === "month") {
12850
+ setMonth(month + 2);
12851
+ }
12852
+ else {
12853
+ setYear(year + 1);
12854
+ }
12855
+ setIsClicked(true);
12856
+ }, style: {
12857
+ width: "100%",
12858
+ height: "100%",
12859
+ display: "flex",
12860
+ justifyContent: "center",
12861
+ alignItems: "center",
12862
+ borderRadius: "0 8px 8px 0",
12863
+ } }, icon_arrowright),
12864
+ format === "month" ? (React__default.createElement(Grow, { in: isOpenMonthSelector, style: { transformOrigin: "0 0 0" } },
12865
+ React__default.createElement("div", { style: {
12866
+ border: "1px solid #cccccc",
12867
+ borderRadius: 8,
12868
+ boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.1)",
12869
+ boxSizing: "border-box",
12870
+ width: 302,
12871
+ height: 160,
12872
+ position: "absolute",
12873
+ backgroundColor: "#ffffff",
12874
+ zIndex: 1,
12875
+ top: 52,
12876
+ left: 0,
12877
+ } },
12878
+ React__default.createElement("div", { style: {
12879
+ height: 48,
12880
+ padding: 8,
12881
+ display: "grid",
12882
+ gridTemplateColumns: "32px 1fr 32px",
12883
+ gap: 13,
12884
+ alignItems: "center",
12885
+ boxShadow: "0px 1px 0px #ECECEC",
12886
+ } },
12887
+ React__default.createElement(IconButton, { hoverColor: "black400", onClick: function () {
12888
+ setYear(year - 1);
12889
+ setIsClicked(true);
12890
+ } }, icon_arrowleft),
12891
+ React__default.createElement(Typography, { variant: "subtitle", style: { textAlign: "center" } },
12892
+ year,
12893
+ "\u5E74"),
12894
+ React__default.createElement(IconButton, { hoverColor: "black400", onClick: function () {
12895
+ setYear(year + 1);
12896
+ setIsClicked(true);
12897
+ } }, icon_arrowright)),
12898
+ React__default.createElement("div", { style: {
12899
+ padding: 16,
12900
+ display: "grid",
12901
+ alignItems: "center",
12902
+ gap: 8,
12903
+ gridTemplateColumns: "1fr 1fr 1fr",
12904
+ gridTemplateRows: "36px 36px",
12905
+ } }, Array.from(Array(6).keys()).map(function (_i, i) { return (React__default.createElement(MonthButton, { key: i, index: i, month: month, setMonth: setMonth, setIsOpenMonthSelector: setIsOpenMonthSelector, setIsClicked: setIsClicked })); }))))) : null)) : (React__default.createElement(Modal, __assign({ bodyPadding: mobile ? 16 : undefined, fullWidth: mobile, open: open, onClose: onClose, size: mobile ? undefined : "medium", label: !mobile ? (React__default.createElement(Typography, { variant: "h6" },
12906
+ React__default.createElement("span", { style: { fontWeight: 400 } }, "\u5DF2\u9078\u64C7\uFF1A"),
12907
+ date &&
12908
+ date.split("/")[0] + "\u5E74" + date.split("/")[1] + "\u6708" + date.split("/")[2] + "\u65E5")) : (React__default.createElement(React__default.Fragment, null,
12909
+ React__default.createElement(Typography, { variant: "caption2" },
12910
+ React__default.createElement("span", { style: { fontWeight: 400 } }, "\u5DF2\u9078\u64C7\uFF1A")),
12911
+ React__default.createElement(Typography, { variant: "subtitle" }, date &&
12912
+ date.split("/")[0] + "\u5E74" + date.split("/")[1] + "\u6708" + date.split("/")[2] + "\u65E5"))), primaryButton: {
12913
+ title: "確認",
12914
+ onClick: function () {
12915
+ onClose();
12916
+ },
12917
+ }, secondaryButton: { title: "取消", onClick: onClose }, children: !mobile ? (React__default.createElement("div", { style: { display: "flex", justifyContent: "space-between" } },
12918
+ React__default.createElement(Calendar, { month: month, year: year, date: date, setDate: setDate, min: min, max: max, position: "left", leftClick: function () {
12919
+ if (month - 1 < 1) {
12920
+ setMonth(12);
12921
+ setYear(year - 1);
12922
+ }
12923
+ else {
12924
+ setMonth(month - 1);
12925
+ }
12926
+ setNextMonth(month);
12927
+ }, defaultValue: defaultValue, setIsClicked: setIsClicked }),
12928
+ React__default.createElement(Calendar, { month: nextMonth, year: month > nextMonth ? year + 1 : year, date: date, setDate: setDate, min: min, max: max, position: "right", rightClick: function () {
12929
+ if (nextMonth + 1 > 12) {
12930
+ setMonth(12);
12931
+ setNextMonth(1);
12932
+ }
12933
+ else if (month + 1 > 12) {
12934
+ setMonth(1);
12935
+ setNextMonth(2);
12936
+ setYear(year + 1);
12937
+ }
12938
+ else {
12939
+ setMonth(month + 1);
12940
+ setNextMonth(nextMonth + 1);
12941
+ }
12942
+ }, defaultValue: defaultValue, setIsClicked: setIsClicked }))) : (React__default.createElement(Calendar, { month: month, year: year, date: date, setDate: setDate, min: min, max: max, position: "left", leftClick: function () {
12943
+ if (month - 1 < 1) {
12944
+ setMonth(12);
12945
+ setYear(year - 1);
12946
+ }
12947
+ else {
12948
+ setMonth(month - 1);
12949
+ }
12950
+ setNextMonth(month);
12951
+ }, rightClick: function () {
12952
+ if (nextMonth + 1 > 12) {
12953
+ setMonth(12);
12954
+ setNextMonth(1);
12955
+ }
12956
+ else if (month + 1 > 12) {
12957
+ setMonth(1);
12958
+ setNextMonth(2);
12959
+ setYear(year + 1);
12960
+ }
12961
+ else {
12962
+ setMonth(month + 1);
12963
+ setNextMonth(nextMonth + 1);
12964
+ }
12965
+ }, defaultValue: defaultValue, setIsClicked: setIsClicked, mobile: mobile })) }, ModalProps)))));
12966
+ };
12967
+ var MonthButton = function (_a) {
12968
+ var index = _a.index, month = _a.month, setMonth = _a.setMonth, setIsOpenMonthSelector = _a.setIsOpenMonthSelector, setIsClicked = _a.setIsClicked;
12969
+ var styleProps = {
12970
+ selected: 1 + 2 * index === month,
12971
+ };
12972
+ var classes = useStylesForMonthButton(styleProps);
12973
+ return (React__default.createElement("div", { className: classes.root, onClick: function () {
12974
+ setMonth(1 + 2 * index);
12975
+ setIsOpenMonthSelector(false);
12976
+ setIsClicked(true);
12977
+ } },
12978
+ 1 + 2 * index,
12979
+ "-",
12980
+ 2 + 2 * index,
12981
+ "\u6708"));
12982
+ };
12983
+ var Calendar = function (_a) {
12984
+ var year = _a.year, month = _a.month, setDate = _a.setDate, date = _a.date, min = _a.min, max = _a.max, leftClick = _a.leftClick, rightClick = _a.rightClick, position = _a.position, defaultValue = _a.defaultValue, setIsClicked = _a.setIsClicked, mobile = _a.mobile;
12985
+ var isBigMonth = (month <= 7 && month % 2 !== 0) || (month >= 8 && month % 2 === 0);
12986
+ var today = defaultValue
12987
+ ? new Date(changeDateFormatToSlash(defaultValue))
12988
+ : new Date();
12989
+ var selectedYear = Number(date.split("/")[0]);
12990
+ var selectedMonth = Number(date.split("/")[1]);
12991
+ var selectedDate = Number(date.split("/")[2]);
12992
+ var msOfMin = min ? new Date(changeDateFormatToSlash(min)).getTime() : 0;
12993
+ var msOfMax = max ? new Date(changeDateFormatToSlash(max)).getTime() : 0;
12994
+ var msOfFirstDayOfMonth = new Date(year + "/" + month + "/1").getTime();
12995
+ var msOfLastDayOfMonth = new Date(year + "/" + month + "/" + (month === 2 ? (year % 4 === 0 ? 29 : 28) : isBigMonth ? 31 : 30)).getTime();
12996
+ var arrowDisabled = (msOfMin !== 0 && position === "left" && msOfFirstDayOfMonth <= msOfMin) ||
12997
+ (msOfMax !== 0 && position === "right" && msOfLastDayOfMonth >= msOfMax);
12998
+ var mobileLeftArrowDisabled = msOfMin !== 0 && msOfFirstDayOfMonth <= msOfMin;
12999
+ var mobileRightArrowDisabled = msOfMax !== 0 && msOfLastDayOfMonth >= msOfMax;
13000
+ var classes = useStylesForCalendar();
13001
+ var theme = useTheme$1();
13002
+ return (React__default.createElement("div", null,
13003
+ React__default.createElement("div", { className: classes.head },
13004
+ year,
13005
+ "\u5E74",
13006
+ month,
13007
+ "\u6708",
13008
+ !mobile ? (React__default.createElement(IconButton, { onClick: position === "left" ? leftClick : rightClick, disabled: arrowDisabled, style: {
13009
+ position: "absolute",
13010
+ left: position === "left" ? 8 : undefined,
13011
+ right: position === "left" ? undefined : 8,
13012
+ top: 8,
13013
+ opacity: arrowDisabled ? 0.4 : undefined,
13014
+ } }, position === "left" ? icon_arrowleft : icon_arrowright)) : (React__default.createElement(React__default.Fragment, null,
13015
+ React__default.createElement(IconButton, { onClick: leftClick, disabled: mobileLeftArrowDisabled, style: {
13016
+ position: "absolute",
13017
+ left: 8,
13018
+ top: 8,
13019
+ opacity: mobileLeftArrowDisabled ? 0.4 : undefined,
13020
+ } }, icon_arrowleft),
13021
+ React__default.createElement(IconButton, { onClick: rightClick, disabled: mobileRightArrowDisabled, style: {
13022
+ position: "absolute",
13023
+ right: 8,
13024
+ top: 8,
13025
+ opacity: mobileRightArrowDisabled ? 0.4 : undefined,
13026
+ } }, icon_arrowright)))),
13027
+ React__default.createElement("div", { className: classes.body },
13028
+ ["日", "一", "二", "三", "四", "五", "六"].map(function (i) { return (React__default.createElement("div", { key: i, className: classes.days }, i)); }),
13029
+ Array.from(Array(month === 2
13030
+ ? year % 4 === 0
13031
+ ? 29 + firstDayOfMonth(year, month)
13032
+ : 28 + firstDayOfMonth(year, month)
13033
+ : isBigMonth
13034
+ ? 31 + firstDayOfMonth(year, month)
13035
+ : 30 + firstDayOfMonth(year, month)).keys()).map(function (_i, i) {
13036
+ if (i + 1 <= firstDayOfMonth(year, month))
13037
+ return (React__default.createElement("div", { key: i, style: {
13038
+ width: 32,
13039
+ height: 32,
13040
+ } }));
13041
+ var dateNumber = i + 1 - firstDayOfMonth(year, month);
13042
+ var isSelected = year === selectedYear &&
13043
+ month === selectedMonth &&
13044
+ dateNumber === selectedDate;
13045
+ var isToday = year === today.getFullYear() &&
13046
+ month === today.getMonth() + 1 &&
13047
+ dateNumber === today.getDate();
13048
+ var msOfDate = new Date(year + "/" + month + "/" + dateNumber).getTime();
13049
+ var disabled = (msOfMin !== 0 && msOfDate < msOfMin) ||
13050
+ (msOfMax !== 0 && msOfDate > msOfMax);
13051
+ return (React__default.createElement("div", { key: i, className: classes.date, onClick: function () {
13052
+ setDate(year + "/" + month + "/" + dateNumber);
13053
+ setIsClicked(true);
13054
+ }, style: {
13055
+ backgroundColor: isSelected
13056
+ ? theme.primary.primary400
13057
+ : isToday
13058
+ ? theme.black.black400
13059
+ : undefined,
13060
+ color: isSelected ? theme.black.white : undefined,
13061
+ border: isSelected
13062
+ ? "1px solid " + theme.primary.primary600
13063
+ : undefined,
13064
+ opacity: disabled ? 0.4 : undefined,
13065
+ pointerEvents: disabled ? "none" : undefined,
13066
+ } }, dateNumber));
13067
+ }))));
13068
+ };
13069
+ var firstDayOfMonth = function (year, month) {
13070
+ var firstDay = year + "/" + month + "/" + 1;
13071
+ return new Date(firstDay).getDay();
13072
+ };
13073
+ var changeDateFormatToSlash = function (date) {
13074
+ return date.replace(/-/g, "/");
13075
+ };
13076
+ var verticalline = (React__default.createElement("div", { style: { width: 1, height: "100%", backgroundColor: "#cccccc" } }));
13077
+ var icon_arrowleft = (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13078
+ React__default.createElement("path", { d: "M12.8417 13.8167L9.02502 10L12.8417 6.175L11.6667 5L6.66669 10L11.6667 15L12.8417 13.8167Z", fill: "black" })));
13079
+ var icon_arrowright = (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13080
+ React__default.createElement("path", { d: "M7.15833 13.8167L10.975 10L7.15833 6.175L8.33333 5L13.3333 10L8.33333 15L7.15833 13.8167Z", fill: "black" })));
13081
+ var icon_calendar = (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13082
+ React__default.createElement("path", { d: "M5.83333 8.33333H10V12.5H5.83333V8.33333ZM15.8333 15.8333H4.16667V6.66667H15.8333V15.8333ZM15.8333 2.5H15V0.833332H13.3333V2.5H6.66667V0.833332H5V2.5H4.16667C3.24167 2.5 2.5 3.25 2.5 4.16667V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H15.8333C16.2754 17.5 16.6993 17.3244 17.0118 17.0118C17.3244 16.6993 17.5 16.2754 17.5 15.8333V4.16667C17.5 3.72464 17.3244 3.30071 17.0118 2.98815C16.6993 2.67559 16.2754 2.5 15.8333 2.5Z", fill: "#6F6F6F" })));
13083
+
13084
+ var Breadcrumb = function (props) {
13085
+ var maxItems = props.maxItems, separator = props.separator, children = props.children, other = __rest(props, ["maxItems", "separator", "children"]);
13086
+ var _a = useState(false), isHoverThreeDots = _a[0], setIsHoverThreeDots = _a[1];
13087
+ var _b = useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
13088
+ var handleThreeDotsClick = function (event) {
13089
+ setAnchorEl(event.currentTarget);
13090
+ };
13091
+ var handleThreeDotsClose = function () {
13092
+ setAnchorEl(null);
13093
+ };
13094
+ return (React__default.createElement("div", __assign({ style: { display: "flex", alignItems: "center" } }, other),
13095
+ maxItems && (children === null || children === void 0 ? void 0 : children.length) > maxItems ? (
13096
+ /**隱藏內容 */
13097
+ React__default.createElement(React__default.Fragment, null,
13098
+ React__default.createElement("div", { style: {
13099
+ display: "flex",
13100
+ alignItems: "center",
13101
+ fontSize: 14,
13102
+ fontWeight: 400,
13103
+ } },
13104
+ children[0],
13105
+ React__default.createElement(Typography, { variant: "body2", style: { margin: "0 8px" } }, separator ? separator : "/"),
13106
+ React__default.createElement("div", { onClick: handleThreeDotsClick, onMouseEnter: function () { return setIsHoverThreeDots(true); }, onMouseLeave: function () { return setIsHoverThreeDots(false); }, style: { cursor: "pointer" } }, isHoverThreeDots ? icon_threedots_hover : icon_threedots),
13107
+ React__default.createElement(Typography, { variant: "body2", style: { margin: "0 8px" } }, separator ? separator : "/")),
13108
+ children
13109
+ .slice((children === null || children === void 0 ? void 0 : children.length) - maxItems + 1)
13110
+ .map(function (i, index) {
13111
+ return (React__default.createElement("div", { key: Math.random().toString(36).substr(2), style: {
13112
+ display: "flex",
13113
+ alignItems: "center",
13114
+ fontSize: 14,
13115
+ fontWeight: index + 1 === (children === null || children === void 0 ? void 0 : children.length) ? 700 : 400,
13116
+ } },
13117
+ i,
13118
+ index + 1 !== maxItems - 1 && (React__default.createElement(Typography, { variant: "body2", style: { margin: "0 8px" } }, separator ? separator : "/"))));
13119
+ }))) : (children === null || children === void 0 ? void 0 : children.map(function (i, index) {
13120
+ return (React__default.createElement("div", { key: Math.random().toString(36).substr(2), style: {
13121
+ display: "flex",
13122
+ alignItems: "center",
13123
+ fontSize: 14,
13124
+ fontWeight: index + 1 === (children === null || children === void 0 ? void 0 : children.length) ? 700 : 400,
13125
+ } },
13126
+ i,
13127
+ index + 1 !== (children === null || children === void 0 ? void 0 : children.length) && (React__default.createElement(Typography, { variant: "body2", style: { margin: "0 8px" } }, separator ? separator : "/"))));
13128
+ })),
13129
+ React__default.createElement(Menu, { anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleThreeDotsClose, anchorOrigin: { vertical: "bottom", horizontal: -16 }, getContentAnchorEl: null }, children === null || children === void 0 ? void 0 : children.slice(1, (children === null || children === void 0 ? void 0 : children.length) - maxItems + 1).map(function (i) {
13130
+ var content = i.props.children;
13131
+ var href = i.props.href;
13132
+ var target = i.props.target;
13133
+ console.log(target);
13134
+ return (React__default.createElement(MenuItem, { key: Math.random().toString(36).substr(2), onClick: function () {
13135
+ if (target && target === "_blank") {
13136
+ window.open(href);
13137
+ }
13138
+ else {
13139
+ window.location.href = href;
13140
+ }
13141
+ } }, content));
13142
+ }))));
13143
+ };
13144
+ var icon_threedots = (React__default.createElement("svg", { width: "12", height: "20", viewBox: "0 0 12 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13145
+ React__default.createElement("path", { d: "M1.946 16.182C2.45 16.182 2.87 15.79 2.87 15.216C2.87 14.642 2.45 14.222 1.946 14.222C1.442 14.222 1.022 14.642 1.022 15.216C1.022 15.79 1.442 16.182 1.946 16.182ZM5.84248 16.182C6.34648 16.182 6.76648 15.79 6.76648 15.216C6.76648 14.642 6.34648 14.222 5.84248 14.222C5.33848 14.222 4.91848 14.642 4.91848 15.216C4.91848 15.79 5.33848 16.182 5.84248 16.182ZM9.73897 16.182C10.243 16.182 10.663 15.79 10.663 15.216C10.663 14.642 10.243 14.222 9.73897 14.222C9.23497 14.222 8.81497 14.642 8.81497 15.216C8.81497 15.79 9.23497 16.182 9.73897 16.182Z", fill: "#4B4B4B" })));
13146
+ var icon_threedots_hover = (React__default.createElement("svg", { width: "12", height: "20", viewBox: "0 0 12 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13147
+ React__default.createElement("path", { d: "M1.946 16.182C2.45 16.182 2.87 15.79 2.87 15.216C2.87 14.642 2.45 14.222 1.946 14.222C1.442 14.222 1.022 14.642 1.022 15.216C1.022 15.79 1.442 16.182 1.946 16.182ZM5.84248 16.182C6.34648 16.182 6.76648 15.79 6.76648 15.216C6.76648 14.642 6.34648 14.222 5.84248 14.222C5.33848 14.222 4.91848 14.642 4.91848 15.216C4.91848 15.79 5.33848 16.182 5.84248 16.182ZM9.73897 16.182C10.243 16.182 10.663 15.79 10.663 15.216C10.663 14.642 10.243 14.222 9.73897 14.222C9.23497 14.222 8.81497 14.642 8.81497 15.216C8.81497 15.79 9.23497 16.182 9.73897 16.182Z", fill: "#4B4B4B" }),
13148
+ React__default.createElement("path", { d: "M0 18.1H11.685V18.8H0V18.1Z", fill: "#4B4B4B" })));
13149
+
13150
+ var BreadcrumbItem = function (props) {
13151
+ var last = props.last, other = __rest(props, ["last"]);
13152
+ return (React__default.createElement(Link, __assign({}, other, { color: last ? "black1000" : "black800", style: {
13153
+ fontWeight: last ? 700 : 400,
13154
+ cursor: last ? "unset" : undefined,
13155
+ textDecoration: last ? "none" : undefined,
13156
+ } })));
13157
+ };
13158
+
13159
+ var useStyles$n = makeStyles$1(function (theme) { return ({
13160
+ root: function (props) { return ({
13161
+ width: props.width ? props.width : 350,
13162
+ height: props.height ? props.height : "100%",
13163
+ backgroundColor: theme.black.white,
13164
+ boxSizing: "border-box",
13165
+ border: "1px solid " + theme.black.black500,
13166
+ borderRadius: 8,
13167
+ display: "flex",
13168
+ flexDirection: "column",
13169
+ justifyContent: "space-between",
13170
+ overflow: "hidden",
13171
+ }); },
13172
+ body: { padding: 24, width: "100%", height: "100%" },
13173
+ buttonblock: {
13174
+ width: "100%",
13175
+ boxShadow: "0px -1px 0px " + theme.black.black400,
13176
+ borderRadius: " 0px 0px 8px 8px",
13177
+ display: "flex",
13178
+ padding: 0,
13179
+ },
13180
+ }); });
13181
+ var Card = function (props) {
13182
+ var width = props.width, height = props.height, children = props.children, buttons = props.buttons, bodyStyle = props.bodyStyle, loading = props.loading, other = __rest(props, ["width", "height", "children", "buttons", "bodyStyle", "loading"]);
13183
+ var useStylesProps = { width: width, height: height };
13184
+ var classes = useStyles$n(useStylesProps);
13185
+ var theme = useTheme$1();
13186
+ return (React__default.createElement("div", __assign({ className: classes.root }, other),
13187
+ React__default.createElement("div", { className: classes.body, style: bodyStyle }, !loading ? (children) : (React__default.createElement("div", { style: { width: "100%", height: "100%" } },
13188
+ React__default.createElement(Skeleton$1, { width: "40%", height: "calc((100% - 16px) /3 )" }),
13189
+ React__default.createElement(SWAPSpace, { size: 8 }),
13190
+ React__default.createElement(Skeleton$1, { width: "100%", height: "calc((100% - 16px) /3 )" }),
13191
+ React__default.createElement(SWAPSpace, { size: 8 }),
13192
+ React__default.createElement("div", { style: {
13193
+ display: "flex",
13194
+ justifyContent: "space-between",
13195
+ width: "100%",
13196
+ height: "calc((100% - 16px) /3 )",
13197
+ } },
13198
+ React__default.createElement(Skeleton$1, { width: "26.4%", height: "100%" }),
13199
+ React__default.createElement(Skeleton$1, { width: "26.4%", height: "100%" }))))),
13200
+ React__default.createElement("div", { className: classes.buttonblock }, !loading ? (buttons === null || buttons === void 0 ? void 0 : buttons.map(function (i, index) { return (React__default.createElement(Button, { key: Math.random().toString(36).substr(2), fullWidth: true, variant: i.variant ? i.variant : "black", style: __assign({ borderRight: index + 1 === (buttons === null || buttons === void 0 ? void 0 : buttons.length)
13201
+ ? undefined
13202
+ : "1px solid " + theme.black.black400, borderRadius: "0px 0px 0px 0px" }, i.style), onClick: i.onClick, disabled: i.disabled, loading: i.loading }, i.title)); })) : (React__default.createElement("div", { style: { padding: "16px 24px", width: "100%", height: 48 } },
13203
+ React__default.createElement(Skeleton$1, { width: "100%", height: "100%" }))))));
13204
+ };
13205
+
12643
13206
  var Container = function (_a) {
12644
13207
  var children = _a.children, style = _a.style, maxWidth = _a.maxWidth, padding = _a.padding;
12645
13208
  var XXS = useBreakpoints("xxs");
@@ -12697,5 +13260,5 @@ var Container = function (_a) {
12697
13260
  return (React__default.createElement(MaterialContainer, { className: classes.root, style: style }, children));
12698
13261
  };
12699
13262
 
12700
- export { AutoComplete, Banner, Button, CheckBox, CheckBoxList, Chip, CircularProgress, Container, Dropdown, IconButton, Link, Menu, MenuItem, Modal, Pagination$1 as Pagination, Paper, Progress, RadioButton, RadioList, SWAPAppBar, SWAPBanner, SWAPCopyField, SWAPDialog, SWAPExpenseTypes, SWAPIncomeTypes, SWAPLogo, SWAPModal, SWAPShare, SWAPSpace, SWAPTaxDescription, SWAPTaxExpenseLabel, SWAPTaxField, SWAPTaxIncomeLabel, SWAPTheme, SegmentedTab, SegmentedTabs, Select, Skeleton$1 as Skeleton, Snackbar, Styles, Switch, Tab, TabPanel, Tabs, TaxTextField, TextField, Tooltip, Typography, useBreakpoints };
13263
+ export { AutoComplete, Banner, Breadcrumb, BreadcrumbItem, Button, Card, CheckBox, CheckBoxList, Chip, CircularProgress, Container, DatePicker, Dropdown, IconButton, Link, Menu, MenuItem, Modal, Pagination$1 as Pagination, Paper, Progress, RadioButton, RadioList, SWAPAppBar, SWAPBanner, SWAPCopyField, SWAPDialog, SWAPExpenseTypes, SWAPIncomeTypes, SWAPLogo, SWAPModal, SWAPShare, SWAPSpace, SWAPTaxDescription, SWAPTaxExpenseLabel, SWAPTaxField, SWAPTaxIncomeLabel, SWAPTheme, SegmentedTab, SegmentedTabs, Select, Skeleton$1 as Skeleton, Snackbar, Styles, Switch, Tab, TabPanel, Tabs, TaxTextField, TextField, Tooltip, Typography, useBreakpoints };
12701
13264
  //# sourceMappingURL=index.esm.js.map