@sinco/react 1.0.15-rc.28 → 1.0.15-rc.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
@@ -2,7 +2,6 @@ import { createTheme } from '@mui/material/styles';
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
3
3
|
import { CheckCircleRounded, ErrorRounded, WarningRounded, InfoRounded, Close, KeyboardArrowDown, KeyboardArrowUp } from '@mui/icons-material';
|
4
4
|
import { Stack, Typography, Drawer, IconButton, AppBar, Toolbar, Box as Box$1, Divider, Button, LinearProgress, alpha } from '@mui/material';
|
5
|
-
import CloseIcon from '@mui/icons-material/Close';
|
6
5
|
|
7
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
8
7
|
|
@@ -2658,10 +2657,10 @@ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
2658
2657
|
|
2659
2658
|
const borderStyles = {
|
2660
2659
|
left: {
|
2661
|
-
borderTopRightRadius:
|
2660
|
+
borderTopRightRadius: "4px"
|
2662
2661
|
},
|
2663
2662
|
right: {
|
2664
|
-
borderTopLeftRadius:
|
2663
|
+
borderTopLeftRadius: "4px"
|
2665
2664
|
}
|
2666
2665
|
};
|
2667
2666
|
const DrawerComponent = ({
|
@@ -2669,7 +2668,7 @@ const DrawerComponent = ({
|
|
2669
2668
|
children,
|
2670
2669
|
actions,
|
2671
2670
|
showActions,
|
2672
|
-
anchor: _anchor =
|
2671
|
+
anchor: _anchor = "left",
|
2673
2672
|
width,
|
2674
2673
|
open,
|
2675
2674
|
onClose,
|
@@ -2685,11 +2684,11 @@ const DrawerComponent = ({
|
|
2685
2684
|
open: open,
|
2686
2685
|
onClose: onClose,
|
2687
2686
|
sx: {
|
2688
|
-
|
2689
|
-
backgroundColor:
|
2690
|
-
backdropFilter:
|
2687
|
+
"& .MuiBackdrop-root": {
|
2688
|
+
backgroundColor: "#F0f0f099 !important",
|
2689
|
+
backdropFilter: "blur(4px)"
|
2691
2690
|
},
|
2692
|
-
|
2691
|
+
"& .MuiDrawer-paper": Object.assign({
|
2693
2692
|
width: width
|
2694
2693
|
}, paperSx)
|
2695
2694
|
}
|
@@ -2708,7 +2707,7 @@ const DrawerComponent = ({
|
|
2708
2707
|
}, title), /*#__PURE__*/React.createElement(IconButton, {
|
2709
2708
|
onClick: onClose,
|
2710
2709
|
size: "small"
|
2711
|
-
}, /*#__PURE__*/React.createElement(
|
2710
|
+
}, /*#__PURE__*/React.createElement(Close, {
|
2712
2711
|
fontSize: "small"
|
2713
2712
|
}))), /*#__PURE__*/React.createElement(Stack, {
|
2714
2713
|
py: 1.5,
|
@@ -2747,57 +2746,6 @@ const FooterActionComponent = ({
|
|
2747
2746
|
}), /*#__PURE__*/React.createElement(Box$1, null, labelChangeCounter), renderRightContent));
|
2748
2747
|
};
|
2749
2748
|
|
2750
|
-
function PageHeaderWrapper({
|
2751
|
-
item,
|
2752
|
-
color,
|
2753
|
-
variant
|
2754
|
-
}) {
|
2755
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, item);
|
2756
|
-
}
|
2757
|
-
const PageHeaderComponent = ({
|
2758
|
-
title,
|
2759
|
-
subtitle,
|
2760
|
-
actions,
|
2761
|
-
buttonBack,
|
2762
|
-
fixed
|
2763
|
-
}) => {
|
2764
|
-
return /*#__PURE__*/React.createElement(Stack, {
|
2765
|
-
position: fixed ? "fixed" : "relative",
|
2766
|
-
width: fixed ? "100%" : "inherit",
|
2767
|
-
bgcolor: "background.paper",
|
2768
|
-
sx: {
|
2769
|
-
boxShadow: theme => theme.shadows[1],
|
2770
|
-
zIndex: 100
|
2771
|
-
}
|
2772
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
2773
|
-
px: 3,
|
2774
|
-
py: 1,
|
2775
|
-
justifyContent: "space-between",
|
2776
|
-
flexDirection: "row",
|
2777
|
-
alignItems: "center"
|
2778
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
2779
|
-
gap: 1.5,
|
2780
|
-
flexDirection: "row",
|
2781
|
-
alignItems: "center"
|
2782
|
-
}, buttonBack, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(PageHeaderWrapper, {
|
2783
|
-
color: "text.primary",
|
2784
|
-
item: title,
|
2785
|
-
variant: "h6"
|
2786
|
-
})), subtitle && /*#__PURE__*/React.createElement(Stack, {
|
2787
|
-
alignItems: "center",
|
2788
|
-
flexDirection: "row",
|
2789
|
-
gap: 2
|
2790
|
-
}, /*#__PURE__*/React.createElement(PageHeaderWrapper, {
|
2791
|
-
color: "text.secondary",
|
2792
|
-
item: subtitle,
|
2793
|
-
variant: "caption"
|
2794
|
-
})))), actions && /*#__PURE__*/React.createElement(Stack, {
|
2795
|
-
gap: 1,
|
2796
|
-
alignItems: "center",
|
2797
|
-
flexDirection: "row"
|
2798
|
-
}, actions)));
|
2799
|
-
};
|
2800
|
-
|
2801
2749
|
const useProgress = timeProgress => {
|
2802
2750
|
const [progress, setProgress] = useState(100);
|
2803
2751
|
useEffect(() => {
|
@@ -2860,15 +2808,15 @@ const ToastNotificationComponent = toast => {
|
|
2860
2808
|
// "&.color-error": {
|
2861
2809
|
// backgroundColor: "#FEEBEE",
|
2862
2810
|
// },
|
2863
|
-
|
2864
|
-
|
2865
|
-
|
2866
|
-
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2811
|
+
"&.color-info": {
|
2812
|
+
backgroundColor: "#E1F5FE"
|
2813
|
+
},
|
2814
|
+
"&.color-warning": {
|
2815
|
+
backgroundColor: "#FFF3E0"
|
2816
|
+
},
|
2817
|
+
"&.color-success": {
|
2818
|
+
backgroundColor: "#E8F5E9"
|
2819
|
+
}
|
2872
2820
|
},
|
2873
2821
|
className: `color-${toastColorConfig}`
|
2874
2822
|
}, /*#__PURE__*/React.createElement(Stack, {
|
@@ -2950,6 +2898,57 @@ const ToastNotificationComponent = toast => {
|
|
2950
2898
|
})));
|
2951
2899
|
};
|
2952
2900
|
|
2901
|
+
function PageHeaderWrapper({
|
2902
|
+
item,
|
2903
|
+
color,
|
2904
|
+
variant
|
2905
|
+
}) {
|
2906
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, item);
|
2907
|
+
}
|
2908
|
+
const PageHeaderComponent = ({
|
2909
|
+
title,
|
2910
|
+
subtitle,
|
2911
|
+
actions,
|
2912
|
+
buttonBack,
|
2913
|
+
fixed
|
2914
|
+
}) => {
|
2915
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
2916
|
+
position: fixed ? "fixed" : "relative",
|
2917
|
+
width: fixed ? "100%" : "inherit",
|
2918
|
+
bgcolor: "background.paper",
|
2919
|
+
sx: {
|
2920
|
+
boxShadow: theme => theme.shadows[1],
|
2921
|
+
zIndex: 100
|
2922
|
+
}
|
2923
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
2924
|
+
px: 3,
|
2925
|
+
py: 1,
|
2926
|
+
justifyContent: "space-between",
|
2927
|
+
flexDirection: "row",
|
2928
|
+
alignItems: "center"
|
2929
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
2930
|
+
gap: 1.5,
|
2931
|
+
flexDirection: "row",
|
2932
|
+
alignItems: "center"
|
2933
|
+
}, buttonBack, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(PageHeaderWrapper, {
|
2934
|
+
color: "text.primary",
|
2935
|
+
item: title,
|
2936
|
+
variant: "h6"
|
2937
|
+
})), subtitle && /*#__PURE__*/React.createElement(Stack, {
|
2938
|
+
alignItems: "center",
|
2939
|
+
flexDirection: "row",
|
2940
|
+
gap: 2
|
2941
|
+
}, /*#__PURE__*/React.createElement(PageHeaderWrapper, {
|
2942
|
+
color: "text.secondary",
|
2943
|
+
item: subtitle,
|
2944
|
+
variant: "caption"
|
2945
|
+
})))), actions && /*#__PURE__*/React.createElement(Stack, {
|
2946
|
+
gap: 1,
|
2947
|
+
alignItems: "center",
|
2948
|
+
flexDirection: "row"
|
2949
|
+
}, actions)));
|
2950
|
+
};
|
2951
|
+
|
2953
2952
|
var classof$3 = classofRaw$2;
|
2954
2953
|
|
2955
2954
|
var engineIsNode = typeof process != 'undefined' && classof$3(process) == 'process';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ReactNode } from
|
2
|
-
import { SxProps } from
|
3
|
-
export type DrawerPosition =
|
1
|
+
import { ReactNode } from "react";
|
2
|
+
import { SxProps } from "@mui/material";
|
3
|
+
export type DrawerPosition = "left" | "right";
|
4
4
|
export interface DrawerComponentProperties {
|
5
5
|
title: string;
|
6
6
|
children: ReactNode;
|
package/index.css
DELETED