@sinco/react 1.1.1-rc.9 → 1.1.2-rc.0

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
@@ -6717,16 +6717,16 @@ const palette = {
6717
6717
  contrastText: "#ffffff"
6718
6718
  },
6719
6719
  grey: {
6720
- 50: "#F7F7F8",
6721
- 100: "#EAEBEC",
6722
- 200: "#DCDEE0",
6723
- 300: "#CED1D4",
6724
- 400: "#C4C7CA",
6725
- 500: "#B9BDC1",
6726
- 600: "#B2B7BB",
6727
- 700: "#AAAEB3",
6728
- 800: "#A2A6AB",
6729
- 900: "#93989E",
6720
+ 50: "#FBFBFB",
6721
+ 100: "#F5F5F6",
6722
+ 200: "#EAEBEC",
6723
+ 300: "#DCDEEO",
6724
+ 400: "#CED1D4",
6725
+ 500: "#C4C7CA",
6726
+ 600: "#B9BDC1",
6727
+ 700: "#B2B7BB",
6728
+ 800: "#AAAEB3",
6729
+ 900: "#A2A6AB",
6730
6730
  A100: "#FFFFFF",
6731
6731
  A200: "#FFFFFF",
6732
6732
  A400: "#D4EAFF",
@@ -6746,7 +6746,7 @@ const palette = {
6746
6746
  focus: "#1018401f"
6747
6747
  },
6748
6748
  background: {
6749
- default: "#f5f5f5",
6749
+ default: "#F1F0EE",
6750
6750
  paper: "#fff"
6751
6751
  },
6752
6752
  common: {
@@ -6899,6 +6899,39 @@ const paletteAdpro = {
6899
6899
 
6900
6900
  var _palette$action;
6901
6901
  const components = {
6902
+ MuiSpeedDialIcon: {
6903
+ styleOverrides: {
6904
+ icon: {
6905
+ height: 24,
6906
+ width: 24
6907
+ }
6908
+ }
6909
+ },
6910
+ MuiSpeedDialAction: {
6911
+ styleOverrides: {
6912
+ fab: {
6913
+ height: 40,
6914
+ width: 40
6915
+ }
6916
+ }
6917
+ },
6918
+ MuiSpeedDial: {
6919
+ styleOverrides: {
6920
+ fab: {
6921
+ height: 56,
6922
+ width: 56
6923
+ }
6924
+ }
6925
+ },
6926
+ MuiAccordion: {
6927
+ styleOverrides: {
6928
+ root: {
6929
+ ".MuiButtonBase-root.MuiAccordionSummary-root": {
6930
+ minHeight: 44
6931
+ }
6932
+ }
6933
+ }
6934
+ },
6902
6935
  MuiTabs: {
6903
6936
  styleOverrides: {
6904
6937
  root: {
@@ -6909,16 +6942,10 @@ const components = {
6909
6942
  MuiTab: {
6910
6943
  styleOverrides: {
6911
6944
  labelIcon: {
6912
- paddingTop: 10,
6913
- paddingBottom: 10
6945
+ paddingBlock: 10
6914
6946
  },
6915
6947
  root: {
6916
- minHeight: "40px",
6917
- root: {
6918
- "& .MuiTabs-root": {
6919
- minHeight: "40px"
6920
- }
6921
- }
6948
+ minHeight: 40
6922
6949
  }
6923
6950
  }
6924
6951
  },
@@ -7019,13 +7046,6 @@ const components = {
7019
7046
  }
7020
7047
  }
7021
7048
  },
7022
- MuiToolbar: {
7023
- styleOverrides: {
7024
- root: {
7025
- height: "48px"
7026
- }
7027
- }
7028
- },
7029
7049
  MuiDrawer: {
7030
7050
  styleOverrides: {
7031
7051
  root: {
@@ -7087,13 +7107,16 @@ const components = {
7087
7107
  MuiToggleButton: {
7088
7108
  styleOverrides: {
7089
7109
  sizeSmall: {
7090
- height: 32
7110
+ height: 32,
7111
+ width: 32
7091
7112
  },
7092
7113
  sizeMedium: {
7093
- height: 38
7114
+ height: 38,
7115
+ width: 38
7094
7116
  },
7095
7117
  sizeLarge: {
7096
- height: 48
7118
+ height: 48,
7119
+ width: 48
7097
7120
  }
7098
7121
  }
7099
7122
  },
@@ -7107,7 +7130,7 @@ const components = {
7107
7130
  },
7108
7131
  icon: {
7109
7132
  color: (_palette$action = palette.action) == null ? void 0 : _palette$action.active,
7110
- opacity: "26%"
7133
+ opacity: "70%"
7111
7134
  },
7112
7135
  root: {
7113
7136
  fontFamily: 'Roboto',
@@ -7213,7 +7236,7 @@ const components = {
7213
7236
  styleOverrides: {
7214
7237
  circular: {
7215
7238
  boxShadow: "0px 1px 18px 0px rgba(24, 39, 75, 0.12), 0px 6px 10px 0px rgba(24, 39, 75, 0.14), 0px 3px 5px -1px rgba(24, 39, 75, 0.20)",
7216
- "&.MuiFab-sizeSmall": {
7239
+ "&.MuiFab-sizeSmall:not(.MuiSpeedDial-fab, .MuiSpeedDialAction-fab)": {
7217
7240
  height: 36,
7218
7241
  width: 36,
7219
7242
  ".MuiSvgIcon-fontSizeSmall": {
@@ -7303,10 +7326,10 @@ const components = {
7303
7326
  padding: 3
7304
7327
  },
7305
7328
  sizeMedium: {
7306
- padding: 12
7329
+ padding: 8
7307
7330
  },
7308
7331
  sizeLarge: {
7309
- padding: 17
7332
+ padding: 12
7310
7333
  }
7311
7334
  }
7312
7335
  },
@@ -7365,6 +7388,9 @@ const components = {
7365
7388
  "&.MuiAutocomplete-root .MuiOutlinedInput-root.MuiInputBase-sizeSmall": {
7366
7389
  paddingBlock: 3.5,
7367
7390
  paddingRight: 14,
7391
+ "& .MuiAutocomplete-endAdornment": {
7392
+ top: "calc(50% - 12px)"
7393
+ },
7368
7394
  ".MuiIconButton-sizeSmall .MuiAutocomplete-popupIndicator": {
7369
7395
  padding: 5
7370
7396
  }
@@ -7485,6 +7511,18 @@ const components = {
7485
7511
  MuiList: {
7486
7512
  defaultProps: {
7487
7513
  dense: true
7514
+ },
7515
+ styleOverrides: {
7516
+ padding: {
7517
+ ".MuiListItem-padding": {
7518
+ paddingBlock: 1
7519
+ }
7520
+ },
7521
+ dense: {
7522
+ ".MuiListItem-dense": {
7523
+ padding: "0.25px 12px 0.25px 16px"
7524
+ }
7525
+ }
7488
7526
  }
7489
7527
  },
7490
7528
  MuiListItemButton: {
@@ -7493,26 +7531,57 @@ const components = {
7493
7531
  padding: "4px 0px 4px 0px"
7494
7532
  },
7495
7533
  root: {
7496
- padding: "7.5px 0px 7.5px 0px"
7534
+ padding: "8.5px 16px"
7497
7535
  }
7498
7536
  }
7499
7537
  },
7500
- MuiMenuList: {
7501
- defaultProps: {
7502
- dense: false
7503
- },
7538
+ MuiMenuItem: {
7504
7539
  styleOverrides: {
7540
+ dense: {
7541
+ height: 28,
7542
+ minHeight: 28,
7543
+ ".MuiListItemText-root > .MuiTypography-root": {
7544
+ lineHeight: "14.3px",
7545
+ letterSpacing: 0.15
7546
+ }
7547
+ },
7505
7548
  root: {
7506
- ".MuiMenuItem-root": {
7507
- minHeight: 28
7549
+ padding: "7px 16px 7px 16px",
7550
+ ".MuiMenuList-root": {
7551
+ height: 34,
7552
+ minHeight: 34
7553
+ },
7554
+ ".MuiListItemText-root > .MuiTypography-root": {
7555
+ lineHeight: "20px",
7556
+ letterSpacing: 0.17
7557
+ },
7558
+ ".MuiListItemIcon-root": {
7559
+ minWidth: 32
7508
7560
  }
7509
7561
  }
7510
7562
  }
7511
7563
  },
7564
+ MuiTableBody: {
7565
+ styleOverrides: {
7566
+ root: {
7567
+ ".MuiTableCell-body.MuiTableCell-sizeMedium": {
7568
+ padding: "16px !important"
7569
+ }
7570
+ }
7571
+ }
7572
+ },
7573
+ MuiTableCell: {
7574
+ styleOverrides: {
7575
+ sizeMedium: {
7576
+ padding: 13
7577
+ }
7578
+ }
7579
+ },
7512
7580
  MuiTable: {
7513
7581
  defaultProps: {
7514
7582
  size: "small"
7515
- }
7583
+ },
7584
+ styleOverrides: {}
7516
7585
  }
7517
7586
  };
7518
7587
 
@@ -14371,6 +14440,8 @@ const borderStyles = {
14371
14440
  };
14372
14441
  const DrawerComponent = ({
14373
14442
  title,
14443
+ backgroundColor,
14444
+ color,
14374
14445
  children,
14375
14446
  actions,
14376
14447
  showActions,
@@ -14390,7 +14461,7 @@ const DrawerComponent = ({
14390
14461
  anchor: _anchor,
14391
14462
  open: open,
14392
14463
  onClose: onClose,
14393
- sx: {
14464
+ sx: Object.assign({
14394
14465
  '& .MuiBackdrop-root': {
14395
14466
  backgroundColor: '#F0f0f099 !important',
14396
14467
  backdropFilter: 'blur(4px)'
@@ -14398,7 +14469,7 @@ const DrawerComponent = ({
14398
14469
  '& .MuiDrawer-paper': Object.assign({
14399
14470
  width: width
14400
14471
  }, paperSx)
14401
- }
14472
+ }, sx)
14402
14473
  }, /*#__PURE__*/React__default.createElement(Stack$1, {
14403
14474
  height: "100%"
14404
14475
  }, /*#__PURE__*/React__default.createElement(Stack$1, {
@@ -14409,7 +14480,7 @@ const DrawerComponent = ({
14409
14480
  px: 1,
14410
14481
  bgcolor: "secondary.main"
14411
14482
  }, /*#__PURE__*/React__default.createElement(Typography$1, {
14412
- sx: Object.assign({}, sx),
14483
+ color: color,
14413
14484
  variant: "h6"
14414
14485
  }, title), /*#__PURE__*/React__default.createElement(IconButton$1, {
14415
14486
  onClick: onClose,
@@ -14417,6 +14488,9 @@ const DrawerComponent = ({
14417
14488
  }, /*#__PURE__*/React__default.createElement(Close, {
14418
14489
  fontSize: "small"
14419
14490
  }))), /*#__PURE__*/React__default.createElement(Stack$1, {
14491
+ sx: {
14492
+ backgroundColor: backgroundColor
14493
+ },
14420
14494
  py: 1.5,
14421
14495
  px: 1,
14422
14496
  overflow: "auto",
@@ -14425,7 +14499,6 @@ const DrawerComponent = ({
14425
14499
  }, children), stateActions && /*#__PURE__*/React__default.createElement(Stack$1, {
14426
14500
  alignItems: _anchorActions,
14427
14501
  gap: 1,
14428
- mt: 0.5,
14429
14502
  py: 1.5,
14430
14503
  px: 1,
14431
14504
  sx: {
@@ -14608,7 +14681,7 @@ function PageHeaderWraps({
14608
14681
  }
14609
14682
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, item);
14610
14683
  }
14611
- const PageHeader = ({
14684
+ const PageHeaderComponent = ({
14612
14685
  title,
14613
14686
  subtitle,
14614
14687
  actions,
@@ -14621,11 +14694,11 @@ const PageHeader = ({
14621
14694
  bgcolor: "background.paper",
14622
14695
  sx: {
14623
14696
  boxShadow: theme => theme.shadows[1],
14624
- zIndex: 1400
14697
+ zIndex: 1000
14625
14698
  }
14626
14699
  }, /*#__PURE__*/React__default.createElement(Stack$1, {
14627
14700
  px: 3,
14628
- py: 1,
14701
+ py: 1.25,
14629
14702
  justifyContent: "space-between",
14630
14703
  flexDirection: "row",
14631
14704
  alignItems: "center"
@@ -14633,19 +14706,15 @@ const PageHeader = ({
14633
14706
  gap: 1.5,
14634
14707
  flexDirection: "row",
14635
14708
  alignItems: "center"
14636
- }, buttonBack, /*#__PURE__*/React__default.createElement(Stack$1, null, /*#__PURE__*/React__default.createElement(Stack$1, null, /*#__PURE__*/React__default.createElement(PageHeaderWraps, {
14709
+ }, buttonBack, /*#__PURE__*/React__default.createElement(Stack$1, null, /*#__PURE__*/React__default.createElement(PageHeaderWraps, {
14637
14710
  color: "text.primary",
14638
14711
  item: title,
14639
14712
  variant: "h6"
14640
- })), subtitle && /*#__PURE__*/React__default.createElement(Stack$1, {
14641
- alignItems: "center",
14642
- flexDirection: "row",
14643
- gap: 2
14644
- }, /*#__PURE__*/React__default.createElement(PageHeaderWraps, {
14713
+ }), subtitle && /*#__PURE__*/React__default.createElement(PageHeaderWraps, {
14645
14714
  color: "text.secondary",
14646
14715
  item: subtitle,
14647
14716
  variant: "caption"
14648
- })))), actions && /*#__PURE__*/React__default.createElement(Stack$1, {
14717
+ }))), actions && /*#__PURE__*/React__default.createElement(Stack$1, {
14649
14718
  gap: 1,
14650
14719
  alignItems: "center",
14651
14720
  flexDirection: "row"
@@ -20132,6 +20201,9 @@ const DynamicColor = async src => {
20132
20201
  };
20133
20202
 
20134
20203
  const useDynamicColor = url => {
20204
+ const [primaryAdpro, setPrimaryAdpro] = useState(AdproSincoTheme.palette.primary);
20205
+ const [secondaryAdpro, setSecondaryAdpro] = useState(AdproSincoTheme.palette.secondary);
20206
+ const [backgroundAdpro, setBackgroundAdpro] = useState(AdproSincoTheme.palette.background);
20135
20207
  const [primary, setPrimary] = useState(SincoTheme.palette.primary);
20136
20208
  const [secondary, setSecondary] = useState(SincoTheme.palette.secondary);
20137
20209
  const [background, setBackground] = useState(SincoTheme.palette.background);
@@ -20145,15 +20217,21 @@ const useDynamicColor = url => {
20145
20217
  setPrimary(primaryColor);
20146
20218
  setSecondary(secondaryColor);
20147
20219
  setBackground(backgroundColor);
20220
+ setPrimaryAdpro(primaryColor);
20221
+ setSecondaryAdpro(secondaryColor);
20222
+ setBackgroundAdpro(backgroundColor);
20148
20223
  setLoading(true);
20149
20224
  });
20150
20225
  }, [url]);
20151
20226
  SincoTheme.palette.primary = primary;
20152
20227
  SincoTheme.palette.secondary = secondary;
20153
20228
  SincoTheme.palette.background = background;
20229
+ AdproSincoTheme.palette.primary = primaryAdpro;
20230
+ AdproSincoTheme.palette.secondary = secondaryAdpro;
20231
+ AdproSincoTheme.palette.background = backgroundAdpro;
20154
20232
  return {
20155
20233
  loading
20156
20234
  };
20157
20235
  };
20158
20236
 
20159
- export { AdproSincoTheme, DrawerComponent as Drawer, DrawerComponent, DynamicColor, EmptyState, EmptyStateImageUrls, FooterAction, PageHeader, PageHeaderWraps, SincoTheme, ToastNotification, useDynamicColor };
20237
+ export { AdproSincoTheme, DrawerComponent as Drawer, DrawerComponent, DynamicColor, EmptyState, EmptyStateImageUrls, FooterAction, PageHeaderComponent as PageHeader, PageHeaderComponent, PageHeaderWraps, SincoTheme, ToastNotification, useDynamicColor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinco/react",
3
- "version": "1.1.1-rc.9",
3
+ "version": "1.1.2-rc.0",
4
4
  "description": "package for the configuration of mui react sinco",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -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 };
@@ -12,4 +12,5 @@ export declare function PageHeaderWraps({ item, color, variant, }: {
12
12
  color: string;
13
13
  variant: Variant;
14
14
  }): JSX.Element;
15
- export declare const PageHeader: ({ title, subtitle, actions, buttonBack, fixed, }: PageheaderProperties) => JSX.Element;
15
+ export declare const PageHeaderComponent: ({ title, subtitle, actions, buttonBack, fixed, }: PageheaderProperties) => JSX.Element;
16
+ export { PageHeaderComponent as PageHeader };