@yosgo/swap-ui 1.0.138 → 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.
@@ -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) {
@@ -2533,18 +2533,11 @@ var Typography = React__default.memo(function (_a) {
2533
2533
  return (React__default.createElement(MaterialTypography, { className: classes.root, style: style }, children));
2534
2534
  });
2535
2535
 
2536
- var Container = function (_a) {
2537
- var children = _a.children, style = _a.style, maxWidth = _a.maxWidth, padding = _a.padding;
2538
- var XXS = useBreakpoints("xxs");
2539
- var XS = useBreakpoints("xs");
2540
- var SM = useBreakpoints("sm");
2541
- var MD = useBreakpoints("md");
2542
- var LG = useBreakpoints("lg");
2543
- var XL = useBreakpoints("xl");
2544
- var XXL = useBreakpoints("xxl");
2545
- var useStyles = makeStyles$1({
2546
- root: {
2547
- maxWidth: maxWidth
2536
+ var useStyles$1 = makeStyles$1({
2537
+ root: {
2538
+ maxWidth: function (_a) {
2539
+ var maxWidth = _a.maxWidth, XXL = _a.XXL, XL = _a.XL, LG = _a.LG;
2540
+ return maxWidth
2548
2541
  ? maxWidth === "lg"
2549
2542
  ? 960
2550
2543
  : maxWidth === "xl"
@@ -2558,8 +2551,11 @@ var Container = function (_a) {
2558
2551
  ? 1140
2559
2552
  : LG
2560
2553
  ? 960
2561
- : null,
2562
- padding: padding
2554
+ : null;
2555
+ },
2556
+ padding: function (_a) {
2557
+ var padding = _a.padding, XXL = _a.XXL, XL = _a.XL, LG = _a.LG, MD = _a.MD, SM = _a.SM, XS = _a.XS, XXS = _a.XXS;
2558
+ return padding
2563
2559
  ? padding === "xxs"
2564
2560
  ? "0px 8px"
2565
2561
  : padding === "xs"
@@ -2583,10 +2579,30 @@ var Container = function (_a) {
2583
2579
  ? "0px 16px"
2584
2580
  : XXS
2585
2581
  ? "0px 8px"
2586
- : null,
2582
+ : null;
2587
2583
  },
2584
+ },
2585
+ });
2586
+ var Container = function (_a) {
2587
+ var children = _a.children, style = _a.style, maxWidth = _a.maxWidth, padding = _a.padding;
2588
+ var XXS = useBreakpoints("xxs");
2589
+ var XS = useBreakpoints("xs");
2590
+ var SM = useBreakpoints("sm");
2591
+ var MD = useBreakpoints("md");
2592
+ var LG = useBreakpoints("lg");
2593
+ var XL = useBreakpoints("xl");
2594
+ var XXL = useBreakpoints("xxl");
2595
+ var classes = useStyles$1({
2596
+ maxWidth: maxWidth,
2597
+ padding: padding,
2598
+ XXL: XXL,
2599
+ XL: XL,
2600
+ LG: LG,
2601
+ MD: MD,
2602
+ SM: SM,
2603
+ XS: XS,
2604
+ XXS: XXS,
2588
2605
  });
2589
- var classes = useStyles();
2590
2606
  return (React__default.createElement(MaterialContainer, { className: classes.root, style: style }, children));
2591
2607
  };
2592
2608
 
@@ -2609,7 +2625,7 @@ function useBreakpoints(breakpoints) {
2609
2625
  return matches;
2610
2626
  }
2611
2627
 
2612
- var useStyles$1 = makeStyles$1(function (theme) { return ({
2628
+ var useStyles$2 = makeStyles$1(function (theme) { return ({
2613
2629
  root: function (props) { return ({
2614
2630
  width: 40,
2615
2631
  height: 40,
@@ -2678,12 +2694,12 @@ var CheckBox = function (props) {
2678
2694
  var styleProps = {
2679
2695
  disableHover: disableHover,
2680
2696
  };
2681
- var classes = useStyles$1(styleProps);
2697
+ var classes = useStyles$2(styleProps);
2682
2698
  return (React__default.createElement(FormControlLabel, { label: label, labelPlacement: labelPlacement, style: { marginRight: 0 }, control: React__default.createElement(MaterialCheckBox, __assign({ disableFocusRipple: true, disableTouchRipple: true, className: classes.root }, other, { checkedIcon: React__default.createElement("span", { className: classes.checked_icon }, checkedIcon ? (checkedIcon) : (React__default.createElement("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2683
2699
  React__default.createElement("path", { d: "M1.5 8.5L7 13L15 2", stroke: "white", strokeWidth: "3", strokeLinecap: "round" })))), icon: React__default.createElement("span", { className: classes.icon }, icon ? icon : null) })) }));
2684
2700
  };
2685
2701
 
2686
- var useStyles$2 = makeStyles$1(function (theme) { return ({
2702
+ var useStyles$3 = makeStyles$1(function (theme) { return ({
2687
2703
  root: function (props) { return ({
2688
2704
  width: 40,
2689
2705
  height: 40,
@@ -2752,13 +2768,13 @@ var RadioButton = function (props) {
2752
2768
  var styleProps = {
2753
2769
  disableHover: disableHover,
2754
2770
  };
2755
- var classes = useStyles$2(styleProps);
2771
+ var classes = useStyles$3(styleProps);
2756
2772
  return (React__default.createElement(FormControlLabel, { label: label, labelPlacement: labelPlacement, style: { marginRight: 0 }, control: React__default.createElement(MaterialRadioButton, __assign({ disableFocusRipple: true, disableTouchRipple: true, className: classes.root, checkedIcon: React__default.createElement("span", { className: classes.checked_icon },
2757
2773
  React__default.createElement("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2758
2774
  React__default.createElement("circle", { cx: "5", cy: "5", r: "5", fill: "white" }))), icon: React__default.createElement("span", { className: classes.icon }) }, other)) }));
2759
2775
  };
2760
2776
 
2761
- var useStyles$3 = makeStyles$1(function (theme) { return ({
2777
+ var useStyles$4 = makeStyles$1(function (theme) { return ({
2762
2778
  root: {
2763
2779
  "& .MuiFormHelperText-contained": {
2764
2780
  marginLeft: 16,
@@ -2858,7 +2874,7 @@ var TextField = function (props) {
2858
2874
  height: height,
2859
2875
  select: select,
2860
2876
  };
2861
- var classes = useStyles$3(styleProps);
2877
+ var classes = useStyles$4(styleProps);
2862
2878
  return (React__default.createElement(MaterialTextField, __assign({ fullWidth: fullWidth, select: select }, other, { className: classes.root, variant: "outlined", InputProps: __assign({ classes: {
2863
2879
  root: classes.inputRoot,
2864
2880
  input: classes.input,
@@ -2874,50 +2890,79 @@ var TextField = function (props) {
2874
2890
  } }, SelectProps) }), children));
2875
2891
  };
2876
2892
 
2877
- var Tab = function (props) {
2878
- var label = props.label, selected = props.selected, width = props.width, height = props.height, margin = props.margin, fontSize = props.fontSize, noIndicator = props.noIndicator, animation = props.animation, other = __rest(props, ["label", "selected", "width", "height", "margin", "fontSize", "noIndicator", "animation"]);
2879
- var useStyles = makeStyles$1(function (theme) { return ({
2880
- root: {
2881
- minWidth: 0,
2882
- minHeight: 0,
2883
- padding: 0,
2884
- margin: margin ? margin : "0px 12px",
2885
- fontWeight: 700,
2886
- fontSize: fontSize ? fontSize : 14,
2887
- lineHeight: 1.4,
2888
- "&:hover": {
2889
- color: "#000000",
2890
- },
2893
+ var useStyles$5 = makeStyles$1(function (theme) { return ({
2894
+ root: {
2895
+ minWidth: 0,
2896
+ minHeight: 0,
2897
+ padding: 0,
2898
+ margin: function (_a) {
2899
+ var margin = _a.margin;
2900
+ return (margin ? margin : "0px 12px");
2891
2901
  },
2892
- text: {
2893
- opacity: 1,
2894
- color: theme.black.black700,
2902
+ fontWeight: 700,
2903
+ fontSize: function (_a) {
2904
+ var fontSize = _a.fontSize;
2905
+ return (fontSize ? fontSize : 14);
2895
2906
  },
2896
- indicatorRoot: {
2897
- color: selected ? "#000000" : "unset",
2898
- width: width ? width : 56,
2899
- height: height ? height : 56,
2900
- display: "flex",
2901
- justifyContent: "center",
2902
- alignItems: "center",
2903
- position: "relative",
2907
+ lineHeight: 1.4,
2908
+ "&:hover": {
2909
+ color: "#000000",
2904
2910
  },
2905
- selected_indicator: {
2906
- animation: animation ? "$selected 300ms " : "unset",
2907
- height: 4,
2908
- width: "100%",
2909
- backgroundColor: theme.primary.primary400,
2910
- position: "absolute",
2911
- bottom: 0,
2912
- display: noIndicator ? "none" : null,
2913
- borderRadius: "100px 100px 0px 0px",
2911
+ },
2912
+ text: {
2913
+ opacity: 1,
2914
+ color: theme.black.black700,
2915
+ },
2916
+ indicatorRoot: {
2917
+ color: function (_a) {
2918
+ var selected = _a.selected;
2919
+ return (selected ? "#000000" : "unset");
2914
2920
  },
2915
- "@keyframes selected": {
2916
- from: { width: 0 },
2917
- to: { width: "100%" },
2921
+ width: function (_a) {
2922
+ var width = _a.width;
2923
+ return (width ? width : 56);
2918
2924
  },
2919
- }); });
2920
- var classes = useStyles();
2925
+ height: function (_a) {
2926
+ var height = _a.height;
2927
+ return (height ? height : 56);
2928
+ },
2929
+ display: "flex",
2930
+ justifyContent: "center",
2931
+ alignItems: "center",
2932
+ position: "relative",
2933
+ },
2934
+ selected_indicator: {
2935
+ animation: function (_a) {
2936
+ var animation = _a.animation;
2937
+ return animation ? "$selected 300ms " : "unset";
2938
+ },
2939
+ height: 4,
2940
+ width: "100%",
2941
+ backgroundColor: theme.primary.primary400,
2942
+ position: "absolute",
2943
+ bottom: 0,
2944
+ display: function (_a) {
2945
+ var noIndicator = _a.noIndicator;
2946
+ return (noIndicator ? "none" : null);
2947
+ },
2948
+ borderRadius: "100px 100px 0px 0px",
2949
+ },
2950
+ "@keyframes selected": {
2951
+ from: { width: 0 },
2952
+ to: { width: "100%" },
2953
+ },
2954
+ }); });
2955
+ var Tab = function (props) {
2956
+ var label = props.label, selected = props.selected, width = props.width, height = props.height, margin = props.margin, fontSize = props.fontSize, noIndicator = props.noIndicator, animation = props.animation, other = __rest(props, ["label", "selected", "width", "height", "margin", "fontSize", "noIndicator", "animation"]);
2957
+ var classes = useStyles$5({
2958
+ animation: animation,
2959
+ noIndicator: noIndicator,
2960
+ height: height,
2961
+ width: width,
2962
+ selected: selected,
2963
+ margin: margin,
2964
+ fontSize: fontSize,
2965
+ });
2921
2966
  return (React__default.createElement(MaterialTab, __assign({}, other, { classes: {
2922
2967
  root: classes.root,
2923
2968
  textColorInherit: classes.text,
@@ -2926,7 +2971,7 @@ var Tab = function (props) {
2926
2971
  selected ? React__default.createElement("div", { className: classes.selected_indicator }) : null), disableRipple: true })));
2927
2972
  };
2928
2973
 
2929
- var useStyles$4 = makeStyles$1({
2974
+ var useStyles$6 = makeStyles$1({
2930
2975
  root: {},
2931
2976
  indicatorRoot: {
2932
2977
  backgroundColor: "transparent",
@@ -2934,14 +2979,14 @@ var useStyles$4 = makeStyles$1({
2934
2979
  });
2935
2980
  var Tabs = function (props) {
2936
2981
  var children = props.children, other = __rest(props, ["children"]);
2937
- var classes = useStyles$4();
2982
+ var classes = useStyles$6();
2938
2983
  return (React__default.createElement(MaterialTabs, __assign({}, other, { classes: {
2939
2984
  root: classes.root,
2940
2985
  indicator: classes.indicatorRoot,
2941
2986
  } }), children));
2942
2987
  };
2943
2988
 
2944
- var useStyles$5 = makeStyles$1(function (theme) { return ({
2989
+ var useStyles$7 = makeStyles$1(function (theme) { return ({
2945
2990
  root: function (props) { return ({
2946
2991
  //SWAPTheme調整
2947
2992
  textTransform: "unset",
@@ -2973,7 +3018,7 @@ var SegmentedTab = function (props) {
2973
3018
  fontSize: fontSize,
2974
3019
  flex: flex,
2975
3020
  };
2976
- var classes = useStyles$5(styleProps);
3021
+ var classes = useStyles$7(styleProps);
2977
3022
  return (React__default.createElement(MaterialTab, __assign({}, other, { disableRipple: true, classes: { textColorInherit: classes.text }, className: classes.root })));
2978
3023
  };
2979
3024
 
@@ -3410,7 +3455,7 @@ var smoothscroll = createCommonjsModule(function (module, exports) {
3410
3455
  });
3411
3456
  var smoothscroll_1 = smoothscroll.polyfill;
3412
3457
 
3413
- var useStyles$6 = makeStyles$1(function (theme) { return ({
3458
+ var useStyles$8 = makeStyles$1(function (theme) { return ({
3414
3459
  root: function (props) { return ({
3415
3460
  width: props.width,
3416
3461
  boxSizing: "border-box",
@@ -3445,7 +3490,7 @@ var SegmentedTabs = function (_a) {
3445
3490
  width: width,
3446
3491
  slide: slide,
3447
3492
  };
3448
- var classes = useStyles$6(styleProps);
3493
+ var classes = useStyles$8(styleProps);
3449
3494
  var tabsRef = useRef(null);
3450
3495
  useEffect(function () {
3451
3496
  smoothscroll.polyfill();
@@ -3501,7 +3546,7 @@ var useOutlinedInputStyles = makeStyles$1(function (theme) { return ({
3501
3546
  },
3502
3547
  notchedOutline: {},
3503
3548
  }); });
3504
- var useStyles$7 = makeStyles$1(function (theme) { return ({
3549
+ var useStyles$9 = makeStyles$1(function (theme) { return ({
3505
3550
  root: function (props) { return ({
3506
3551
  //SWAPTheme調整
3507
3552
  width: props.width ? props.width : "100%",
@@ -3564,7 +3609,7 @@ var Select = function (_a) {
3564
3609
  paddingLeft: paddingLeft,
3565
3610
  dropdown: dropdown,
3566
3611
  };
3567
- var classes = useStyles$7(styleProps);
3612
+ var classes = useStyles$9(styleProps);
3568
3613
  return (React__default.createElement(FormControl, { variant: "outlined", style: style, classes: { root: classes.root } },
3569
3614
  React__default.createElement(InputLabel, { classes: {
3570
3615
  root: classes.placeholder,
@@ -3588,7 +3633,7 @@ var Menu = function (props) {
3588
3633
  return (React__default.createElement(MaterialMenu, __assign({ open: open }, other), children));
3589
3634
  };
3590
3635
 
3591
- var useStyles$8 = makeStyles$1(function (theme) { return ({
3636
+ var useStyles$a = makeStyles$1(function (theme) { return ({
3592
3637
  root: function (props) { return ({
3593
3638
  fontSize: 14,
3594
3639
  fontWeight: 700,
@@ -3627,19 +3672,18 @@ var MenuItem = React__default.forwardRef(function (props, ref) {
3627
3672
  hoverIconColor: hoverIconColor,
3628
3673
  rippleColor: rippleColor,
3629
3674
  };
3630
- var classes = useStyles$8(styleProps);
3675
+ var classes = useStyles$a(styleProps);
3631
3676
  return (React__default.createElement(MaterialMenuItem, __assign({ className: classes.root }, other),
3632
3677
  children,
3633
3678
  React__default.createElement(ListItemIcon, { style: { justifyContent: "flex-end" } }, iconChildren)));
3634
3679
  });
3635
3680
 
3636
- var Button = function (props) {
3637
- var children = props.children, variant = props.variant, minWidth = props.minWidth, width = props.width, size = props.size, loading = props.loading, onClick = props.onClick, other = __rest(props, ["children", "variant", "minWidth", "width", "size", "loading", "onClick"]);
3638
- var theme = useTheme$1();
3639
- var useStyles = makeStyles$1(function (theme) { return ({
3640
- root: {
3641
- textTransform: "unset",
3642
- color: variant === "primary"
3681
+ var useStyles$b = makeStyles$1(function (theme) { return ({
3682
+ root: {
3683
+ textTransform: "unset",
3684
+ color: function (_a) {
3685
+ var variant = _a.variant;
3686
+ return variant === "primary"
3643
3687
  ? theme.black.white
3644
3688
  : variant === "secondary"
3645
3689
  ? theme.primary.primary400
@@ -3651,8 +3695,11 @@ var Button = function (props) {
3651
3695
  ? theme.black.black800
3652
3696
  : variant === "danger"
3653
3697
  ? theme.black.white
3654
- : theme.black.white,
3655
- backgroundColor: variant === "primary"
3698
+ : theme.black.white;
3699
+ },
3700
+ backgroundColor: function (_a) {
3701
+ var variant = _a.variant;
3702
+ return variant === "primary"
3656
3703
  ? theme.primary.primary400
3657
3704
  : variant === "secondary"
3658
3705
  ? theme.black.white
@@ -3664,8 +3711,11 @@ var Button = function (props) {
3664
3711
  ? theme.black.white
3665
3712
  : variant === "danger"
3666
3713
  ? theme.danger.danger800
3667
- : theme.primary.primary400,
3668
- border: variant === "primary"
3714
+ : theme.primary.primary400;
3715
+ },
3716
+ border: function (_a) {
3717
+ var variant = _a.variant;
3718
+ return variant === "primary"
3669
3719
  ? "1px solid " + theme.primary.primary600
3670
3720
  : variant === "secondary"
3671
3721
  ? "1px solid " + theme.primary.primary400
@@ -3675,29 +3725,47 @@ var Button = function (props) {
3675
3725
  ? null
3676
3726
  : variant === "danger"
3677
3727
  ? "1px solid " + theme.danger.dangerA11y
3678
- : "1px solid " + theme.primary.primary600,
3679
- borderRadius: "8px",
3680
- height: size === "small"
3728
+ : "1px solid " + theme.primary.primary600;
3729
+ },
3730
+ borderRadius: "8px",
3731
+ height: function (_a) {
3732
+ var size = _a.size;
3733
+ return size === "small"
3681
3734
  ? "40px"
3682
3735
  : size === "medium"
3683
3736
  ? "48px"
3684
3737
  : size === "large"
3685
3738
  ? "56px"
3686
- : "48px",
3687
- padding: size === "small"
3739
+ : "48px";
3740
+ },
3741
+ padding: function (_a) {
3742
+ var size = _a.size;
3743
+ return size === "small"
3688
3744
  ? "12px 16px"
3689
3745
  : size === "medium"
3690
3746
  ? "15px 24px"
3691
3747
  : size === "large"
3692
3748
  ? "19px 32px"
3693
- : "15px 24px",
3694
- minWidth: minWidth,
3695
- width: width,
3696
- fontSize: size === "small" ? 14 : size === "medium" || size === "large" ? 16 : 16,
3697
- fontWeight: 700,
3698
- lineHeight: 1.125,
3699
- "&:hover": {
3700
- backgroundColor: variant === "primary"
3749
+ : "15px 24px";
3750
+ },
3751
+ minWidth: function (_a) {
3752
+ var minWidth = _a.minWidth;
3753
+ return minWidth;
3754
+ },
3755
+ width: function (_a) {
3756
+ var width = _a.width;
3757
+ return width;
3758
+ },
3759
+ fontSize: function (_a) {
3760
+ var size = _a.size;
3761
+ return size === "small" ? 14 : size === "medium" || size === "large" ? 16 : 16;
3762
+ },
3763
+ fontWeight: 700,
3764
+ lineHeight: 1.125,
3765
+ "&:hover": {
3766
+ backgroundColor: function (_a) {
3767
+ var variant = _a.variant;
3768
+ return variant === "primary"
3701
3769
  ? theme.primary.primary300
3702
3770
  : variant === "secondary"
3703
3771
  ? theme.primary.primary50
@@ -3709,19 +3777,23 @@ var Button = function (props) {
3709
3777
  ? theme.black.black400
3710
3778
  : variant === "danger"
3711
3779
  ? theme.danger.danger600
3712
- : theme.primary.primary300,
3713
- border: variant === "primary"
3780
+ : theme.primary.primary300;
3781
+ },
3782
+ border: function (_a) {
3783
+ var variant = _a.variant;
3784
+ return variant === "primary"
3714
3785
  ? "1px solid " + theme.primary.primary300
3715
- : variant === "tertiary" ||
3716
- variant === "text" ||
3717
- variant === "black"
3786
+ : variant === "tertiary" || variant === "text" || variant === "black"
3718
3787
  ? null
3719
3788
  : variant === "danger"
3720
3789
  ? "1px solid " + theme.danger.dangerA11y
3721
- : "1px solid " + theme.primary.primary300,
3790
+ : "1px solid " + theme.primary.primary300;
3722
3791
  },
3723
- "&:active": {
3724
- backgroundColor: variant === "primary"
3792
+ },
3793
+ "&:active": {
3794
+ backgroundColor: function (_a) {
3795
+ var variant = _a.variant;
3796
+ return variant === "primary"
3725
3797
  ? theme.primary.primary500
3726
3798
  : variant === "secondary"
3727
3799
  ? theme.primary.primary100
@@ -3733,17 +3805,23 @@ var Button = function (props) {
3733
3805
  ? theme.black.black500
3734
3806
  : variant === "danger"
3735
3807
  ? theme.danger.danger900
3736
- : theme.primary.primary500,
3808
+ : theme.primary.primary500;
3737
3809
  },
3738
- "&:focus-visible": {
3739
- boxShadow: variant === "black"
3810
+ },
3811
+ "&:focus-visible": {
3812
+ boxShadow: function (_a) {
3813
+ var variant = _a.variant;
3814
+ return variant === "black"
3740
3815
  ? "0px 0px 0px 4px #CCCCCC"
3741
3816
  : variant === "danger"
3742
3817
  ? "0px 0px 0px 4px #FFCCD0"
3743
3818
  : variant === "tertiary"
3744
3819
  ? "0px 0px 0px 4px rgba(0, 0, 0, 0.1)"
3745
- : "0px 0px 0px 4px #D7DFF8",
3746
- backgroundColor: variant === "primary"
3820
+ : "0px 0px 0px 4px #D7DFF8";
3821
+ },
3822
+ backgroundColor: function (_a) {
3823
+ var variant = _a.variant;
3824
+ return variant === "primary"
3747
3825
  ? theme.primary.primary400
3748
3826
  : variant === "secondary"
3749
3827
  ? theme.primary.primary50
@@ -3755,8 +3833,11 @@ var Button = function (props) {
3755
3833
  ? theme.black.black400
3756
3834
  : variant === "danger"
3757
3835
  ? theme.danger.danger600
3758
- : theme.primary.primary400,
3759
- border: variant === "secondary"
3836
+ : theme.primary.primary400;
3837
+ },
3838
+ border: function (_a) {
3839
+ var variant = _a.variant;
3840
+ return variant === "secondary"
3760
3841
  ? "1px solid " + theme.primary.primary400
3761
3842
  : variant === "tertiary"
3762
3843
  ? "1px solid " + theme.black.black600
@@ -3766,11 +3847,14 @@ var Button = function (props) {
3766
3847
  ? "1px solid " + theme.black.black800
3767
3848
  : variant === "danger"
3768
3849
  ? "1px solid " + theme.danger.dangerA11y
3769
- : "1px solid " + theme.primary.primary600,
3850
+ : "1px solid " + theme.primary.primary600;
3770
3851
  },
3771
- "&:disabled": {
3772
- opacity: 0.4,
3773
- backgroundColor: variant === "primary"
3852
+ },
3853
+ "&:disabled": {
3854
+ opacity: 0.4,
3855
+ backgroundColor: function (_a) {
3856
+ var variant = _a.variant;
3857
+ return variant === "primary"
3774
3858
  ? theme.primary.primary800
3775
3859
  : variant === "secondary"
3776
3860
  ? theme.black.white
@@ -3782,8 +3866,11 @@ var Button = function (props) {
3782
3866
  ? theme.black.white
3783
3867
  : variant === "danger"
3784
3868
  ? theme.danger.danger800
3785
- : theme.primary.primary800,
3786
- color: variant === "primary"
3869
+ : theme.primary.primary800;
3870
+ },
3871
+ color: function (_a) {
3872
+ var variant = _a.variant;
3873
+ return variant === "primary"
3787
3874
  ? theme.black.white
3788
3875
  : variant === "secondary"
3789
3876
  ? theme.primary.primary400
@@ -3795,16 +3882,28 @@ var Button = function (props) {
3795
3882
  ? theme.black.black800
3796
3883
  : variant === "danger"
3797
3884
  ? theme.black.white
3798
- : theme.black.white,
3799
- border: variant === "secondary"
3885
+ : theme.black.white;
3886
+ },
3887
+ border: function (_a) {
3888
+ var variant = _a.variant;
3889
+ return variant === "secondary"
3800
3890
  ? "1px solid " + theme.primary.primary800
3801
3891
  : variant === "danger"
3802
3892
  ? "1px solid " + theme.danger.dangerA11y
3803
- : null,
3893
+ : null;
3804
3894
  },
3805
3895
  },
3806
- }); });
3807
- var classes = useStyles();
3896
+ },
3897
+ }); });
3898
+ var Button = function (props) {
3899
+ var children = props.children, variant = props.variant, minWidth = props.minWidth, width = props.width, size = props.size, loading = props.loading, onClick = props.onClick, other = __rest(props, ["children", "variant", "minWidth", "width", "size", "loading", "onClick"]);
3900
+ var theme = useTheme$1();
3901
+ var classes = useStyles$b({
3902
+ variant: variant,
3903
+ size: size,
3904
+ minWidth: minWidth,
3905
+ width: width,
3906
+ });
3808
3907
  return (React__default.createElement(MaterialButton, __assign({ className: classes.root, disableElevation: true, disableFocusRipple: true, onClick: function (event) {
3809
3908
  onClick(event);
3810
3909
  }, size: "medium" }, other), loading ? (React__default.createElement("div", { style: { position: "relative" } },
@@ -3844,7 +3943,7 @@ var Button = function (props) {
3844
3943
  } }))) : (React__default.createElement("div", { style: { whiteSpace: "nowrap" } }, children))));
3845
3944
  };
3846
3945
 
3847
- var useStyles$9 = makeStyles$1(function () { return ({
3946
+ var useStyles$c = makeStyles$1(function () { return ({
3848
3947
  root: function (props) { return ({
3849
3948
  width: props.width,
3850
3949
  height: props.height,
@@ -4092,7 +4191,7 @@ var IconButton = function (props) {
4092
4191
  : hoverIconColor
4093
4192
  : null,
4094
4193
  };
4095
- var classes = useStyles$9(styleProps);
4194
+ var classes = useStyles$c(styleProps);
4096
4195
  return React__default.createElement(IconButton$1$1, __assign({ className: classes.root }, other));
4097
4196
  };
4098
4197
 
@@ -4111,7 +4210,7 @@ function TransitionDown(props) {
4111
4210
  function Transition(props) {
4112
4211
  return React__default.createElement(Fade, __assign({}, props));
4113
4212
  }
4114
- var useStyles$a = makeStyles$1(function (theme) { return ({
4213
+ var useStyles$d = makeStyles$1(function (theme) { return ({
4115
4214
  root: {
4116
4215
  "@media only screen and (min-width: 600px)": {
4117
4216
  width: "fit-content",
@@ -4176,7 +4275,7 @@ var Snackbar = function (props) {
4176
4275
  height: height,
4177
4276
  variant: variant,
4178
4277
  };
4179
- var classes = useStyles$a(styleProps);
4278
+ var classes = useStyles$d(styleProps);
4180
4279
  return (React__default.createElement(MaterialSnackBar, __assign({}, other, { className: classes.root, ContentProps: {
4181
4280
  classes: {
4182
4281
  root: classes.contentRoot,
@@ -7187,7 +7286,7 @@ const host = createHost(primitives, {
7187
7286
  });
7188
7287
  const animated = host.animated;
7189
7288
 
7190
- var useStyles$b = makeStyles$1(function (theme) { return ({
7289
+ var useStyles$e = makeStyles$1(function (theme) { return ({
7191
7290
  root: function (props) { return ({
7192
7291
  margin: props.margin,
7193
7292
  backgroundColor: props.backgroundColor,
@@ -7234,7 +7333,7 @@ var Tooltip = function (props) {
7234
7333
  border: light ? "1px solid #CCCCCC" : null,
7235
7334
  fontWeight: arrow ? 700 : 400,
7236
7335
  };
7237
- var classes = useStyles$b(styleProps);
7336
+ var classes = useStyles$e(styleProps);
7238
7337
  return (React__default.createElement(MaterialTooltip, __assign({ classes: { tooltip: classes.root, arrow: classes.arrow } }, other, { arrow: arrow }),
7239
7338
  React__default.createElement("div", { style: __assign({ width: "fit-content", height: "fit-content", display: "flex", alignItems: "center", justifyContent: "center" }, childrenStyle) }, children)));
7240
7339
  };
@@ -7261,45 +7360,28 @@ var ModalTransitionEffect = React__default.forwardRef(function ModalTransitionEf
7261
7360
  });
7262
7361
  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))));
7263
7362
  });
7264
- var Modal = React__default.forwardRef(function (props, ref) {
7265
- 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;
7266
- var _a = useState(0), clientHeight = _a[0], setClientHeight = _a[1];
7267
- var _b = useState(0), scorllbarWidth = _b[0], setScorllbarWidth = _b[1];
7268
- useEffect(function () {
7269
- if (mobile || fullWidth) {
7270
- if ((helpText || multiline) && !label) {
7271
- setClientHeight(window.innerHeight - 64 - 73 - 64);
7272
- }
7273
- else if (!helpText && label) {
7274
- setClientHeight(window.innerHeight - 64 - 56 - 99);
7275
- }
7276
- else if ((helpText || multiline) && label) {
7277
- setClientHeight(window.innerHeight - 64 - 73 - 99);
7278
- }
7279
- else {
7280
- setClientHeight(window.innerHeight - 64 - 56 - 64);
7281
- }
7282
- }
7283
- }, [fullWidth, mobile]);
7284
- useEffect(function () {
7285
- var scrollbar_width = window.innerWidth - document.body.clientWidth;
7286
- setScorllbarWidth(scrollbar_width / 2);
7287
- }, []);
7288
- var match_XS = useBreakpoints("xs");
7289
- var useStyles = makeStyles$1(function (theme) { return ({
7290
- root: {
7291
- display: "flex",
7292
- alignItems: fullWidth ? "flex-end" : "center",
7293
- justifyContent: "center",
7294
- border: "unset",
7295
- borderRadius: 12,
7296
- margin: fullWidth ? 0 : match_XS ? "0px 24px" : "0px 16px",
7363
+ var useStyles$f = makeStyles$1(function (theme) { return ({
7364
+ root: {
7365
+ display: "flex",
7366
+ alignItems: function (_a) {
7367
+ var fullWidth = _a.fullWidth;
7368
+ return fullWidth ? "flex-end" : "center";
7297
7369
  },
7298
- backdrop: {
7299
- transition: "all 0.2s ease-in-out !important",
7370
+ justifyContent: "center",
7371
+ border: "unset",
7372
+ borderRadius: 12,
7373
+ margin: function (_a) {
7374
+ var fullWidth = _a.fullWidth, match_XS = _a.match_XS;
7375
+ return fullWidth ? 0 : match_XS ? "0px 24px" : "0px 16px";
7300
7376
  },
7301
- modal: {
7302
- width: width
7377
+ },
7378
+ backdrop: {
7379
+ transition: "all 0.2s ease-in-out !important",
7380
+ },
7381
+ modal: {
7382
+ width: function (_a) {
7383
+ var width = _a.width, size = _a.size;
7384
+ return width
7303
7385
  ? width
7304
7386
  : size === "large"
7305
7387
  ? 800
@@ -7309,19 +7391,28 @@ var Modal = React__default.forwardRef(function (props, ref) {
7309
7391
  ? 480
7310
7392
  : size === "extraSmall"
7311
7393
  ? 320
7312
- : "100%",
7313
- maxWidth: maxWidth,
7314
- borderRadius: fullWidth ? "12px 12px 0px 0px" : 12,
7315
- border: "unset",
7316
- boxShadow: theme.boxShadow.l,
7317
- display: "flex",
7318
- flexDirection: "column",
7319
- outline: 0,
7394
+ : "100%";
7395
+ },
7396
+ maxWidth: function (_a) {
7397
+ var maxWidth = _a.maxWidth;
7398
+ return maxWidth;
7320
7399
  },
7321
- head: {
7322
- height: "100%",
7323
- borderRadius: "12px 12px 0px 0px",
7324
- padding: headpadding
7400
+ borderRadius: function (_a) {
7401
+ var fullWidth = _a.fullWidth;
7402
+ return fullWidth ? "12px 12px 0px 0px" : 12;
7403
+ },
7404
+ border: "unset",
7405
+ boxShadow: theme.boxShadow.l,
7406
+ display: "flex",
7407
+ flexDirection: "column",
7408
+ outline: 0,
7409
+ },
7410
+ head: {
7411
+ height: "100%",
7412
+ borderRadius: "12px 12px 0px 0px",
7413
+ padding: function (_a) {
7414
+ var headpadding = _a.headpadding, mobile = _a.mobile, disCloseIcon = _a.disCloseIcon, helpText = _a.helpText, multiline = _a.multiline;
7415
+ return headpadding
7325
7416
  ? headpadding
7326
7417
  : mobile
7327
7418
  ? disCloseIcon && !helpText && !multiline
@@ -7329,24 +7420,30 @@ var Modal = React__default.forwardRef(function (props, ref) {
7329
7420
  : "12px 16px"
7330
7421
  : disCloseIcon && !helpText && !multiline
7331
7422
  ? "19.5px 24px"
7332
- : "16px 24px",
7333
- display: "flex",
7334
- alignItems: "center",
7335
- justifyContent: "space-between",
7336
- position: "relative",
7337
- pointerEvents: onExit ? "none" : "unset",
7423
+ : "16px 24px";
7338
7424
  },
7339
- title: {
7340
- display: "flex",
7341
- alignItems: "center",
7342
- justifyContent: "center",
7425
+ display: "flex",
7426
+ alignItems: "center",
7427
+ justifyContent: "space-between",
7428
+ position: "relative",
7429
+ pointerEvents: function (_a) {
7430
+ var onExit = _a.onExit;
7431
+ return (onExit ? "none" : "unset");
7343
7432
  },
7344
- icon: {
7345
- "& path": {
7346
- width: 20,
7347
- height: 20,
7348
- },
7349
- color: iconColor === "primary50"
7433
+ },
7434
+ title: {
7435
+ display: "flex",
7436
+ alignItems: "center",
7437
+ justifyContent: "center",
7438
+ },
7439
+ icon: {
7440
+ "& path": {
7441
+ width: 20,
7442
+ height: 20,
7443
+ },
7444
+ color: function (_a) {
7445
+ var iconColor = _a.iconColor, checkIconColor = _a.checkIconColor;
7446
+ return iconColor === "primary50"
7350
7447
  ? theme.primary.primary50
7351
7448
  : iconColor === "primary100"
7352
7449
  ? theme.primary.primary100
@@ -7566,76 +7663,148 @@ var Modal = React__default.forwardRef(function (props, ref) {
7566
7663
  ? theme.black.black900
7567
7664
  : checkIconColor === "black1000"
7568
7665
  ? theme.black.black1000
7569
- : theme.black.black700,
7570
- marginRight: 10,
7666
+ : theme.black.black700;
7571
7667
  },
7572
- closeIconButton: {
7573
- padding: 0,
7574
- width: 32,
7575
- height: 32,
7668
+ marginRight: 10,
7669
+ },
7670
+ closeIconButton: {
7671
+ padding: 0,
7672
+ width: 32,
7673
+ height: 32,
7674
+ borderRadius: 8,
7675
+ "&:hover": {
7576
7676
  borderRadius: 8,
7577
- "&:hover": {
7578
- borderRadius: 8,
7579
- },
7580
- marginLeft: 16,
7581
7677
  },
7582
- closeIconRippleRoot: {
7583
- borderRadius: 8,
7678
+ marginLeft: 16,
7679
+ },
7680
+ closeIconRippleRoot: {
7681
+ borderRadius: 8,
7682
+ },
7683
+ closeIcon: {
7684
+ color: theme.black.black1000,
7685
+ borderRadius: 8,
7686
+ width: 20,
7687
+ height: 20,
7688
+ },
7689
+ body: {
7690
+ transition: "all 0.2s ease-in-out",
7691
+ height: function (_a) {
7692
+ var height = _a.height;
7693
+ return (height ? height : "100%");
7584
7694
  },
7585
- closeIcon: {
7586
- color: theme.black.black1000,
7587
- borderRadius: 8,
7588
- width: 20,
7589
- height: 20,
7695
+ padding: function (_a) {
7696
+ var bodyPadding = _a.bodyPadding, mobile = _a.mobile;
7697
+ return bodyPadding ? bodyPadding : mobile ? 16 : 24;
7590
7698
  },
7591
- body: {
7592
- transition: "all 0.2s ease-in-out",
7593
- height: height ? height : "100%",
7594
- padding: bodyPadding ? bodyPadding : mobile ? 16 : 24,
7595
- position: "relative",
7596
- pointerEvents: onExit ? "none" : "unset",
7597
- maxHeight: bodyMaxHeight
7598
- ? bodyMaxHeight
7599
- : fullWidth
7600
- ? clientHeight
7601
- : "unset",
7602
- overflowY: !onExit ? "scroll" : "hidden",
7603
- "&::-webkit-scrollbar": {
7604
- backgroundColor: "transparent",
7605
- width: 5,
7606
- },
7607
- "&::-webkit-scrollbar-thumb": {
7608
- backgroundColor: theme.black.black600,
7609
- borderRadius: 100,
7610
- },
7611
- "&::-webkit-scrollbar-track-piece:start": {
7612
- marginTop: 12,
7613
- },
7614
- "&::-webkit-scrollbar-track-piece:end": {
7615
- marginBottom: 12,
7616
- },
7699
+ position: "relative",
7700
+ pointerEvents: function (_a) {
7701
+ var onExit = _a.onExit;
7702
+ return (onExit ? "none" : "unset");
7703
+ },
7704
+ maxHeight: function (_a) {
7705
+ var bodyMaxHeight = _a.bodyMaxHeight, fullWidth = _a.fullWidth, clientHeight = _a.clientHeight;
7706
+ return bodyMaxHeight ? bodyMaxHeight : fullWidth ? clientHeight : "unset";
7707
+ },
7708
+ overflowY: function (_a) {
7709
+ var onExit = _a.onExit;
7710
+ return (!onExit ? "scroll" : "hidden");
7711
+ },
7712
+ "&::-webkit-scrollbar": {
7713
+ backgroundColor: "transparent",
7714
+ width: 5,
7715
+ },
7716
+ "&::-webkit-scrollbar-thumb": {
7717
+ backgroundColor: theme.black.black600,
7718
+ borderRadius: 100,
7719
+ },
7720
+ "&::-webkit-scrollbar-track-piece:start": {
7721
+ marginTop: 12,
7722
+ },
7723
+ "&::-webkit-scrollbar-track-piece:end": {
7724
+ marginBottom: 12,
7617
7725
  },
7618
- footer: {
7619
- height: "100%",
7620
- padding: label || secondaryButton || primaryButton
7726
+ },
7727
+ footer: {
7728
+ height: "100%",
7729
+ padding: function (_a) {
7730
+ var label = _a.label, secondaryButton = _a.secondaryButton, primaryButton = _a.primaryButton, mobile = _a.mobile;
7731
+ return label || secondaryButton || primaryButton
7621
7732
  ? mobile
7622
7733
  ? "12px 16px"
7623
7734
  : "16px 24px"
7624
- : null,
7625
- borderRadius: "0px 0px 12px 12px",
7626
- display: "flex",
7627
- flexDirection: mobile ? "column" : "row",
7628
- alignItems: "center",
7629
- justifyContent: "space-between",
7735
+ : null;
7630
7736
  },
7631
- footerButton: {
7632
- width: buttonFullWidth || footerDisplayColumn || mobile ? "100%" : null,
7633
- display: "flex",
7634
- flexDirection: footerDisplayColumn ? "column-reverse" : "row",
7635
- alignItems: "center",
7737
+ borderRadius: "0px 0px 12px 12px",
7738
+ display: "flex",
7739
+ flexDirection: function (_a) {
7740
+ var mobile = _a.mobile;
7741
+ return (mobile ? "column" : "row");
7636
7742
  },
7637
- }); });
7638
- var classes = useStyles();
7743
+ alignItems: "center",
7744
+ justifyContent: "space-between",
7745
+ },
7746
+ footerButton: {
7747
+ width: function (_a) {
7748
+ var buttonFullWidth = _a.buttonFullWidth, footerDisplayColumn = _a.footerDisplayColumn, mobile = _a.mobile;
7749
+ return buttonFullWidth || footerDisplayColumn || mobile ? "100%" : null;
7750
+ },
7751
+ display: "flex",
7752
+ flexDirection: function (_a) {
7753
+ var footerDisplayColumn = _a.footerDisplayColumn;
7754
+ return footerDisplayColumn ? "column-reverse" : "row";
7755
+ },
7756
+ alignItems: "center",
7757
+ },
7758
+ }); });
7759
+ var Modal = React__default.forwardRef(function (props, ref) {
7760
+ 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;
7761
+ var _a = useState(0), clientHeight = _a[0], setClientHeight = _a[1];
7762
+ var _b = useState(0), scorllbarWidth = _b[0], setScorllbarWidth = _b[1];
7763
+ useEffect(function () {
7764
+ if (mobile || fullWidth) {
7765
+ if ((helpText || multiline) && !label) {
7766
+ setClientHeight(window.innerHeight - 64 - 73 - 64);
7767
+ }
7768
+ else if (!helpText && label) {
7769
+ setClientHeight(window.innerHeight - 64 - 56 - 99);
7770
+ }
7771
+ else if ((helpText || multiline) && label) {
7772
+ setClientHeight(window.innerHeight - 64 - 73 - 99);
7773
+ }
7774
+ else {
7775
+ setClientHeight(window.innerHeight - 64 - 56 - 64);
7776
+ }
7777
+ }
7778
+ }, [fullWidth, mobile]);
7779
+ useEffect(function () {
7780
+ var scrollbar_width = window.innerWidth - document.body.clientWidth;
7781
+ setScorllbarWidth(scrollbar_width / 2);
7782
+ }, []);
7783
+ var match_XS = useBreakpoints("xs");
7784
+ var classes = useStyles$f({
7785
+ fullWidth: fullWidth,
7786
+ match_XS: match_XS,
7787
+ width: width,
7788
+ size: size,
7789
+ maxWidth: maxWidth,
7790
+ headpadding: headpadding,
7791
+ mobile: mobile,
7792
+ disCloseIcon: disCloseIcon,
7793
+ onExit: onExit,
7794
+ iconColor: iconColor,
7795
+ checkIconColor: checkIconColor,
7796
+ height: height,
7797
+ bodyPadding: bodyPadding,
7798
+ bodyMaxHeight: bodyMaxHeight,
7799
+ clientHeight: clientHeight,
7800
+ label: label,
7801
+ secondaryButton: secondaryButton,
7802
+ primaryButton: primaryButton,
7803
+ buttonFullWidth: buttonFullWidth,
7804
+ footerDisplayColumn: footerDisplayColumn,
7805
+ helpText: helpText,
7806
+ multiline: multiline,
7807
+ });
7639
7808
  return (React__default.createElement(MaterialModal, { open: open, className: classes.root, BackdropComponent: Backdrop, BackdropProps: {
7640
7809
  className: classes.backdrop,
7641
7810
  style: { overflow: "auto", WebkitOverflowScrolling: "touch" },
@@ -7742,7 +7911,7 @@ var Modal = React__default.forwardRef(function (props, ref) {
7742
7911
  : "primary", size: "small", onClick: primaryButton.onClick, disabled: primaryButton.disabled, loading: primaryButton.loading, style: primaryButton.style }, primaryButton.title))) : null))) : null)))))));
7743
7912
  });
7744
7913
 
7745
- var useStyles$c = makeStyles$1(function () { return ({
7914
+ var useStyles$g = makeStyles$1(function () { return ({
7746
7915
  root: function (props) { return ({
7747
7916
  backgroundColor: props.backgroundColor,
7748
7917
  border: "1px solid " + props.borderColor,
@@ -7790,7 +7959,7 @@ var Banner = function (props) {
7790
7959
  height: height ? height : null,
7791
7960
  alignItems: mobile ? "flex-start" : alignStart ? "flex-start" : "center",
7792
7961
  };
7793
- var classes = useStyles$c(styleProps);
7962
+ var classes = useStyles$g(styleProps);
7794
7963
  var ref = useRef(null);
7795
7964
  useEffect(function () {
7796
7965
  if (ref.current) {
@@ -7816,7 +7985,7 @@ var Banner = function (props) {
7816
7985
  React__default.createElement(Typography, { variant: "caption2" }, children)));
7817
7986
  };
7818
7987
 
7819
- var useStyles$d = makeStyles$1(function () { return ({
7988
+ var useStyles$h = makeStyles$1(function () { return ({
7820
7989
  root: function (props) { return ({
7821
7990
  backgroundColor: props.backgroundColor,
7822
7991
  border: props.border,
@@ -7872,7 +8041,7 @@ var Chip = function (props) {
7872
8041
  ? theme.danger.danger800
7873
8042
  : theme.primary.primary800,
7874
8043
  };
7875
- var classes = useStyles$d(styleProps);
8044
+ var classes = useStyles$h(styleProps);
7876
8045
  return (React__default.createElement("div", __assign({ className: classes.root }, other),
7877
8046
  React__default.createElement("span", { style: { marginRight: variant === "success" ? 4 : 0 } }, label),
7878
8047
  variant === "success" && !icon ? icon_success : icon));
@@ -12013,7 +12182,7 @@ var MaterialSkeleton = withStyles(styles$3, {
12013
12182
  name: 'MuiSkeleton'
12014
12183
  })(Skeleton);
12015
12184
 
12016
- var useStyles$e = makeStyles$1(function (theme) { return ({
12185
+ var useStyles$i = makeStyles$1(function (theme) { return ({
12017
12186
  root: function () { return ({}); },
12018
12187
  ul: {
12019
12188
  "& li": {
@@ -12069,7 +12238,7 @@ var Pagination$1 = function (props) {
12069
12238
  // const theme = useTheme();
12070
12239
  var other = __rest(props, []);
12071
12240
  var styleProps = {};
12072
- var classes = useStyles$e(styleProps);
12241
+ var classes = useStyles$i(styleProps);
12073
12242
  return (React__default.createElement(MaterialPagination, __assign({ classes: { root: classes.root, ul: classes.ul }, shape: "rounded", variant: "outlined" }, other, { renderItem: function (item) { return (React__default.createElement(PaginationItem$1, __assign({}, item, { classes: {
12074
12243
  root: classes.itemRoot,
12075
12244
  rounded: classes.rounded,
@@ -12078,7 +12247,7 @@ var Pagination$1 = function (props) {
12078
12247
  } }))); } })));
12079
12248
  };
12080
12249
 
12081
- var useStyles$f = makeStyles$1(function (theme) { return ({
12250
+ var useStyles$j = makeStyles$1(function (theme) { return ({
12082
12251
  root: function (props) { return ({
12083
12252
  width: props.width,
12084
12253
  display: "flex",
@@ -12105,7 +12274,7 @@ var Progress = function (props) {
12105
12274
  width: width ? width : "100%",
12106
12275
  size: size ? size : 24,
12107
12276
  };
12108
- var classes = useStyles$f(styleProps);
12277
+ var classes = useStyles$j(styleProps);
12109
12278
  var a = Array.from(Array(count).keys());
12110
12279
  return (React__default.createElement("div", __assign({ className: classes.root }, other), a.map(function (i) {
12111
12280
  return (React__default.createElement("div", { key: i, style: {
@@ -12155,7 +12324,7 @@ var Progress = function (props) {
12155
12324
  })));
12156
12325
  };
12157
12326
 
12158
- var useStyles$g = makeStyles$1(function (theme) { return ({
12327
+ var useStyles$k = makeStyles$1(function (theme) { return ({
12159
12328
  popper: function (props) { return ({
12160
12329
  border: "1px solid #CCCCCC",
12161
12330
  boxShadow: " 0px 4px 12px rgba(0, 0, 0, 0.1)",
@@ -12298,7 +12467,7 @@ var AutoComplete = function (props) {
12298
12467
  marginTop: anchorOrigin ? anchorOrigin.vertical : -65,
12299
12468
  marginLeft: anchorOrigin ? anchorOrigin.horizontal : -0,
12300
12469
  };
12301
- var classes = useStyles$g(styleProps);
12470
+ var classes = useStyles$k(styleProps);
12302
12471
  var id = open ? "simple" : undefined;
12303
12472
  return (React__default.createElement("div", null,
12304
12473
  React__default.createElement(Popper$1, { id: id, open: open, anchorEl: anchorEl, placement: "bottom-start", className: classes.popper },
@@ -12673,7 +12842,7 @@ var SWAPTaxDescription$1 = function (incomeCode, expenseCode) {
12673
12842
  * 3. 所得類別為50薪資時不會有費用類別
12674
12843
  */
12675
12844
 
12676
- var useStyles$h = makeStyles$1(function (theme) { return ({
12845
+ var useStyles$l = makeStyles$1(function (theme) { return ({
12677
12846
  root: function (props) { return ({
12678
12847
  backgroundColor: theme.black.black400,
12679
12848
  transform: "unset",
@@ -12682,7 +12851,7 @@ var useStyles$h = makeStyles$1(function (theme) { return ({
12682
12851
  var Skeleton$1 = function (props) {
12683
12852
  var other = __rest(props, []);
12684
12853
  var styleProps = {};
12685
- var classes = useStyles$h(styleProps);
12854
+ var classes = useStyles$l(styleProps);
12686
12855
  return React__default.createElement(MaterialSkeleton, __assign({ classes: { root: classes.root } }, other));
12687
12856
  };
12688
12857
 
@@ -12709,7 +12878,7 @@ var useOutlinedInputStyles$1 = makeStyles$1(function (theme) { return ({
12709
12878
  },
12710
12879
  notchedOutline: {},
12711
12880
  }); });
12712
- var useStyles$i = makeStyles$1(function (theme) { return ({
12881
+ var useStyles$m = makeStyles$1(function (theme) { return ({
12713
12882
  root: function (props) { return ({
12714
12883
  //SWAPTheme調整
12715
12884
  width: props.width ? props.width : "100%",
@@ -12754,7 +12923,7 @@ var Dropdown = function (props) {
12754
12923
  width: width,
12755
12924
  height: height,
12756
12925
  };
12757
- var classes = useStyles$i(styleProps);
12926
+ var classes = useStyles$m(styleProps);
12758
12927
  var outlinedInputClasses = useOutlinedInputStyles$1();
12759
12928
  return (React__default.createElement(FormControl, { variant: "outlined", style: formControlStyle, classes: { root: classes.root } },
12760
12929
  React__default.createElement(MaterialSelect, __assign({}, other, { classes: {
@@ -12763,7 +12932,7 @@ var Dropdown = function (props) {
12763
12932
  React__default.createElement(FormHelperText, { style: helperTextStyle }, helperText)));
12764
12933
  };
12765
12934
 
12766
- var useStyles$j = makeStyles$1(function (theme) { return ({
12935
+ var useStyles$n = makeStyles$1(function (theme) { return ({
12767
12936
  root: function (props) { return ({
12768
12937
  width: props.width
12769
12938
  ? props.width
@@ -12810,7 +12979,7 @@ var RadioList = function (props) {
12810
12979
  height: height,
12811
12980
  line: line,
12812
12981
  };
12813
- var classes = useStyles$j(styleProps);
12982
+ var classes = useStyles$n(styleProps);
12814
12983
  var _a = useState(0), lineHeight = _a[0], setLineHeight = _a[1];
12815
12984
  var ref = useRef(null);
12816
12985
  useEffect(function () {
@@ -12856,7 +13025,7 @@ var RadioList = function (props) {
12856
13025
  !multiline && !line ? (React__default.createElement(Typography, { variant: "body2_loose", color: "black800" }, subtitle)) : null));
12857
13026
  };
12858
13027
 
12859
- var useStyles$k = makeStyles$1(function (theme) { return ({
13028
+ var useStyles$o = makeStyles$1(function (theme) { return ({
12860
13029
  root: function (props) { return ({
12861
13030
  width: props.width
12862
13031
  ? props.width
@@ -12903,7 +13072,7 @@ var CheckBoxList = function (props) {
12903
13072
  height: height,
12904
13073
  line: line,
12905
13074
  };
12906
- var classes = useStyles$k(styleProps);
13075
+ var classes = useStyles$o(styleProps);
12907
13076
  var _a = useState(0), lineHeight = _a[0], setLineHeight = _a[1];
12908
13077
  var ref = useRef(null);
12909
13078
  useEffect(function () {
@@ -12949,7 +13118,7 @@ var CheckBoxList = function (props) {
12949
13118
  !multiline && !line ? (React__default.createElement(Typography, { variant: "body2_loose", color: "black800" }, subtitle)) : null));
12950
13119
  };
12951
13120
 
12952
- var useStyles$l = makeStyles$1(function (theme) { return ({
13121
+ var useStyles$p = makeStyles$1(function (theme) { return ({
12953
13122
  root: function (props) { return ({
12954
13123
  cursor: "pointer",
12955
13124
  color: props.color,
@@ -13082,7 +13251,7 @@ var Link = function (props) {
13082
13251
  ? theme.black.black1000
13083
13252
  : theme.black.black1000,
13084
13253
  };
13085
- var classes = useStyles$l(styleProps);
13254
+ var classes = useStyles$p(styleProps);
13086
13255
  return (React__default.createElement(MaterialLink, __assign({ classes: {
13087
13256
  root: classes.root,
13088
13257
  focusVisible: classes.focusVisible,
@@ -13090,7 +13259,7 @@ var Link = function (props) {
13090
13259
  }, tabIndex: 0 }, other)));
13091
13260
  };
13092
13261
 
13093
- var useStyles$m = makeStyles$1(function (theme) { return ({
13262
+ var useStyles$q = makeStyles$1(function (theme) { return ({
13094
13263
  root: function (props) { return ({
13095
13264
  boxShadow: theme.boxShadow.xl,
13096
13265
  borderRadius: 12,
@@ -13110,13 +13279,13 @@ var Paper = function (props) {
13110
13279
  matchSM: matchSM,
13111
13280
  matchXS: matchXS,
13112
13281
  };
13113
- var classes = useStyles$m(styleProps);
13282
+ var classes = useStyles$q(styleProps);
13114
13283
  return (React__default.createElement(Paper$1$1, __assign({ variant: "outlined", classes: {
13115
13284
  root: classes.root,
13116
13285
  } }, other)));
13117
13286
  };
13118
13287
 
13119
- var useStyles$n = makeStyles$1(function (theme) { return ({
13288
+ var useStyles$r = makeStyles$1(function (theme) { return ({
13120
13289
  root: {
13121
13290
  width: 40,
13122
13291
  height: 24,
@@ -13182,7 +13351,7 @@ var useStyles$n = makeStyles$1(function (theme) { return ({
13182
13351
  var Switch = function (props) {
13183
13352
  var disabled = props.disabled, other = __rest(props, ["disabled"]);
13184
13353
  var styleProps = { disabled: disabled };
13185
- var classes = useStyles$n(styleProps);
13354
+ var classes = useStyles$r(styleProps);
13186
13355
  return (React__default.createElement("div", { className: classes.switchOutBlock, tabIndex: 0 },
13187
13356
  React__default.createElement(MaterialSwitch, __assign({ disabled: disabled, tabIndex: 0, disableRipple: true, classes: {
13188
13357
  root: classes.root,
@@ -13691,7 +13860,7 @@ var BreadcrumbItem = function (props) {
13691
13860
  } })));
13692
13861
  };
13693
13862
 
13694
- var useStyles$o = makeStyles$1(function (theme) { return ({
13863
+ var useStyles$s = makeStyles$1(function (theme) { return ({
13695
13864
  root: function (props) { return ({
13696
13865
  width: props.width ? props.width : 350,
13697
13866
  height: props.height ? props.height : "100%",
@@ -13716,7 +13885,7 @@ var useStyles$o = makeStyles$1(function (theme) { return ({
13716
13885
  var Card = function (props) {
13717
13886
  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"]);
13718
13887
  var useStylesProps = { width: width, height: height };
13719
- var classes = useStyles$o(useStylesProps);
13888
+ var classes = useStyles$s(useStylesProps);
13720
13889
  var theme = useTheme$1();
13721
13890
  return (React__default.createElement("div", __assign({ className: classes.root }, other),
13722
13891
  React__default.createElement("div", { className: classes.body, style: bodyStyle }, !loading ? (children) : (React__default.createElement("div", { style: { width: "100%", height: "100%" } },