@sinco/react 1.1.1-rc.5 → 1.1.1-rc.7
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 +79 -27
- package/package.json +1 -1
- package/src/lib/Components/Drawer.d.ts +3 -1
- package/src/lib/Hooks/useDynamicColor.d.ts +1 -1
package/index.js
CHANGED
@@ -6789,6 +6789,29 @@ const paletteAdpro = {
|
|
6789
6789
|
|
6790
6790
|
var _palette$action;
|
6791
6791
|
const components = {
|
6792
|
+
MuiTabs: {
|
6793
|
+
styleOverrides: {
|
6794
|
+
root: {
|
6795
|
+
minHeight: 40
|
6796
|
+
}
|
6797
|
+
}
|
6798
|
+
},
|
6799
|
+
MuiTab: {
|
6800
|
+
styleOverrides: {
|
6801
|
+
labelIcon: {
|
6802
|
+
paddingTop: 10,
|
6803
|
+
paddingBottom: 10
|
6804
|
+
},
|
6805
|
+
root: {
|
6806
|
+
minHeight: "40px",
|
6807
|
+
root: {
|
6808
|
+
"& .MuiTabs-root": {
|
6809
|
+
minHeight: "40px"
|
6810
|
+
}
|
6811
|
+
}
|
6812
|
+
}
|
6813
|
+
}
|
6814
|
+
},
|
6792
6815
|
MuiDataGrid: {
|
6793
6816
|
defaultProps: {
|
6794
6817
|
columnHeaderHeight: 35,
|
@@ -6974,7 +6997,7 @@ const components = {
|
|
6974
6997
|
},
|
6975
6998
|
icon: {
|
6976
6999
|
color: (_palette$action = palette.action) == null ? void 0 : _palette$action.active,
|
6977
|
-
opacity: "
|
7000
|
+
opacity: "70%"
|
6978
7001
|
},
|
6979
7002
|
root: {
|
6980
7003
|
fontFamily: 'Roboto',
|
@@ -7179,6 +7202,9 @@ const components = {
|
|
7179
7202
|
},
|
7180
7203
|
MuiFilledInput: {
|
7181
7204
|
styleOverrides: {
|
7205
|
+
root: {
|
7206
|
+
height: 48
|
7207
|
+
},
|
7182
7208
|
sizeSmall: {
|
7183
7209
|
height: 38
|
7184
7210
|
}
|
@@ -7200,7 +7226,8 @@ const components = {
|
|
7200
7226
|
paddingBlock: 14
|
7201
7227
|
},
|
7202
7228
|
".MuiFilledInput-input.MuiInputBase-inputSizeSmall": {
|
7203
|
-
|
7229
|
+
paddingTop: 16,
|
7230
|
+
paddingBottom: 2
|
7204
7231
|
},
|
7205
7232
|
".MuiFilledInput-input": {
|
7206
7233
|
paddingTop: 22,
|
@@ -7341,13 +7368,31 @@ const components = {
|
|
7341
7368
|
padding: "4px 0px 4px 0px"
|
7342
7369
|
},
|
7343
7370
|
root: {
|
7344
|
-
padding: "7.5px
|
7371
|
+
padding: "7.5px 16px 7.5px 16px"
|
7345
7372
|
}
|
7346
7373
|
}
|
7347
7374
|
},
|
7348
7375
|
MuiMenuItem: {
|
7349
|
-
|
7350
|
-
dense:
|
7376
|
+
styleOverrides: {
|
7377
|
+
dense: {
|
7378
|
+
height: 28,
|
7379
|
+
minHeight: 28,
|
7380
|
+
".MuiListItemText-root > .MuiTypography-root": {
|
7381
|
+
lineHeight: "14.3px",
|
7382
|
+
letterSpacing: 0.15
|
7383
|
+
}
|
7384
|
+
},
|
7385
|
+
root: {
|
7386
|
+
padding: "7px 16px 7px 16px",
|
7387
|
+
".MuiMenuList-root": {
|
7388
|
+
height: 34,
|
7389
|
+
minHeight: 34
|
7390
|
+
},
|
7391
|
+
".MuiListItemText-root > .MuiTypography-root": {
|
7392
|
+
lineHeight: "20px",
|
7393
|
+
letterSpacing: 0.17
|
7394
|
+
}
|
7395
|
+
}
|
7351
7396
|
}
|
7352
7397
|
},
|
7353
7398
|
MuiTable: {
|
@@ -14306,6 +14351,8 @@ const borderStyles = {
|
|
14306
14351
|
};
|
14307
14352
|
const DrawerComponent = ({
|
14308
14353
|
title,
|
14354
|
+
backgroundColor,
|
14355
|
+
color,
|
14309
14356
|
children,
|
14310
14357
|
actions,
|
14311
14358
|
showActions,
|
@@ -14325,7 +14372,7 @@ const DrawerComponent = ({
|
|
14325
14372
|
anchor: _anchor,
|
14326
14373
|
open: open,
|
14327
14374
|
onClose: onClose,
|
14328
|
-
sx: {
|
14375
|
+
sx: Object.assign({
|
14329
14376
|
'& .MuiBackdrop-root': {
|
14330
14377
|
backgroundColor: '#F0f0f099 !important',
|
14331
14378
|
backdropFilter: 'blur(4px)'
|
@@ -14333,7 +14380,7 @@ const DrawerComponent = ({
|
|
14333
14380
|
'& .MuiDrawer-paper': Object.assign({
|
14334
14381
|
width: width
|
14335
14382
|
}, paperSx)
|
14336
|
-
}
|
14383
|
+
}, sx)
|
14337
14384
|
}, /*#__PURE__*/React__default.createElement(Stack$1, {
|
14338
14385
|
height: "100%"
|
14339
14386
|
}, /*#__PURE__*/React__default.createElement(Stack$1, {
|
@@ -14344,7 +14391,7 @@ const DrawerComponent = ({
|
|
14344
14391
|
px: 1,
|
14345
14392
|
bgcolor: "secondary.main"
|
14346
14393
|
}, /*#__PURE__*/React__default.createElement(Typography$1, {
|
14347
|
-
|
14394
|
+
color: color,
|
14348
14395
|
variant: "h6"
|
14349
14396
|
}, title), /*#__PURE__*/React__default.createElement(IconButton$1, {
|
14350
14397
|
onClick: onClose,
|
@@ -14352,6 +14399,9 @@ const DrawerComponent = ({
|
|
14352
14399
|
}, /*#__PURE__*/React__default.createElement(Close, {
|
14353
14400
|
fontSize: "small"
|
14354
14401
|
}))), /*#__PURE__*/React__default.createElement(Stack$1, {
|
14402
|
+
sx: {
|
14403
|
+
backgroundColor: backgroundColor
|
14404
|
+
},
|
14355
14405
|
py: 1.5,
|
14356
14406
|
px: 1,
|
14357
14407
|
overflow: "auto",
|
@@ -14360,7 +14410,6 @@ const DrawerComponent = ({
|
|
14360
14410
|
}, children), stateActions && /*#__PURE__*/React__default.createElement(Stack$1, {
|
14361
14411
|
alignItems: _anchorActions,
|
14362
14412
|
gap: 1,
|
14363
|
-
mt: 0.5,
|
14364
14413
|
py: 1.5,
|
14365
14414
|
px: 1,
|
14366
14415
|
sx: {
|
@@ -20066,26 +20115,29 @@ const DynamicColor = async src => {
|
|
20066
20115
|
};
|
20067
20116
|
};
|
20068
20117
|
|
20069
|
-
const useDynamicColor = url => {
|
20070
|
-
const [primary, setPrimary] = useState(SincoTheme.palette.primary);
|
20071
|
-
const [secondary, setSecondary] = useState(SincoTheme.palette.secondary);
|
20072
|
-
const [background, setBackground] = useState(SincoTheme.palette.background);
|
20118
|
+
const useDynamicColor = (url, theme) => {
|
20073
20119
|
const [loading, setLoading] = useState(false);
|
20074
20120
|
useEffect(() => {
|
20075
|
-
|
20076
|
-
|
20077
|
-
|
20078
|
-
|
20079
|
-
|
20080
|
-
|
20081
|
-
|
20082
|
-
|
20083
|
-
|
20084
|
-
|
20085
|
-
|
20086
|
-
|
20087
|
-
|
20088
|
-
|
20121
|
+
const fetchDynamicColor = () => {
|
20122
|
+
const dynamicColorPromise = DynamicColor(url);
|
20123
|
+
dynamicColorPromise.then(({
|
20124
|
+
primaryColor,
|
20125
|
+
secondaryColor,
|
20126
|
+
backgroundColor
|
20127
|
+
}) => {
|
20128
|
+
const updatedTheme = Object.assign({}, theme, {
|
20129
|
+
palette: Object.assign({}, theme.palette, {
|
20130
|
+
primary: primaryColor,
|
20131
|
+
secondary: secondaryColor,
|
20132
|
+
background: backgroundColor
|
20133
|
+
})
|
20134
|
+
});
|
20135
|
+
theme.setTheme(updatedTheme);
|
20136
|
+
setLoading(true);
|
20137
|
+
});
|
20138
|
+
};
|
20139
|
+
fetchDynamicColor();
|
20140
|
+
}, [url, theme]);
|
20089
20141
|
return {
|
20090
20142
|
loading
|
20091
20143
|
};
|
package/package.json
CHANGED
@@ -12,6 +12,8 @@ export interface DrawerComponentProperties {
|
|
12
12
|
open: boolean;
|
13
13
|
onClose: () => void;
|
14
14
|
sx?: SxProps;
|
15
|
+
backgroundColor?: string;
|
16
|
+
color?: string;
|
15
17
|
}
|
16
|
-
export declare const DrawerComponent: ({ title, children, actions, showActions, anchor, anchorActions, width, open, onClose, sx, }: DrawerComponentProperties) => JSX.Element;
|
18
|
+
export declare const DrawerComponent: ({ title, backgroundColor, color, children, actions, showActions, anchor, anchorActions, width, open, onClose, sx, }: DrawerComponentProperties) => JSX.Element;
|
17
19
|
export { DrawerComponent as Drawer };
|