@sinco/react 1.0.14-rc.29 → 1.0.14-rc.30

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -9585,25 +9585,18 @@ const components = {
9585
9585
  },
9586
9586
  MuiCheckbox: {
9587
9587
  variants: [{
9588
- props: {
9589
- size: "xsmall"
9590
- },
9591
- style: {
9592
- padding: 2
9593
- }
9594
- }, {
9595
9588
  props: {
9596
9589
  size: "small"
9597
9590
  },
9598
9591
  style: {
9599
- padding: 4
9592
+ padding: 2
9600
9593
  }
9601
9594
  }, {
9602
9595
  props: {
9603
9596
  size: "medium"
9604
9597
  },
9605
9598
  style: {
9606
- padding: 11
9599
+ padding: 4
9607
9600
  }
9608
9601
  }],
9609
9602
  defaultProps: {
@@ -9611,20 +9604,12 @@ const components = {
9611
9604
  }
9612
9605
  },
9613
9606
  MuiChip: {
9614
- variants: [{
9615
- props: {
9616
- size: "xsmall"
9617
- },
9618
- style: {
9619
- height: 16
9620
- }
9621
- }],
9622
9607
  styleOverrides: {
9623
9608
  sizeSmall: {
9624
- height: 24
9609
+ height: 16
9625
9610
  },
9626
9611
  sizeMedium: {
9627
- height: 30
9612
+ height: 24
9628
9613
  },
9629
9614
  root: {
9630
9615
  height: "inherit",
@@ -9664,34 +9649,45 @@ const components = {
9664
9649
  },
9665
9650
  MuiButton: {
9666
9651
  styleOverrides: {
9667
- endIcon: {
9668
- marginLeft: 2
9669
- },
9670
- iconSizeSmall: {
9671
- height: 14,
9672
- width: 14
9673
- },
9674
- iconSizeMedium: {
9675
- height: 18,
9676
- width: 18
9677
- },
9678
- iconSizeLarge: {
9679
- height: 18,
9680
- width: 22
9681
- },
9682
9652
  sizeSmall: {
9683
- height: 26
9653
+ height: 26,
9654
+ ".MuiSvgIcon-fontSizeSmall": {
9655
+ height: 16,
9656
+ width: 16
9657
+ },
9658
+ ".MuiSvgIcon-fontSizeMedium": {
9659
+ height: 18,
9660
+ width: 18
9661
+ },
9662
+ ".MuiSvgIcon-fontSizeLarge": {
9663
+ height: 20,
9664
+ width: 20
9665
+ }
9684
9666
  },
9685
9667
  sizeMedium: {
9686
9668
  height: 32,
9669
+ ".MuiSvgIcon-fontSizeSmall": {
9670
+ height: 18,
9671
+ width: 18
9672
+ },
9687
9673
  ".MuiSvgIcon-fontSizeMedium": {
9688
9674
  height: 18,
9689
9675
  width: 18
9676
+ },
9677
+ ".MuiSvgIcon-fontSizeLarge": {
9678
+ height: 20,
9679
+ width: 20
9690
9680
  }
9691
9681
  },
9692
9682
  sizeLarge: {
9693
- height: 38,
9694
- fontSize: 14,
9683
+ ".MuiSvgIcon-fontSizeSmall": {
9684
+ height: 16,
9685
+ width: 16
9686
+ },
9687
+ ".MuiSvgIcon-fontSizeMedium": {
9688
+ height: 18,
9689
+ width: 18
9690
+ },
9695
9691
  ".MuiSvgIcon-fontSizeLarge": {
9696
9692
  height: 20,
9697
9693
  width: 20
@@ -17660,6 +17656,49 @@ const FooterActionComponent = ({
17660
17656
  }), /*#__PURE__*/React__default.createElement(Box$2, null, labelChangeCounter), renderRightContent));
17661
17657
  };
17662
17658
 
17659
+ const PageHeaderContent = styled$1(Stack$1)(() => ({
17660
+ backgroundColor: "#fff",
17661
+ boxShadow: "0px 1px 3px rgba(24, 39, 75, 0.12), 0px 1px 1px -1px rgba(24, 39, 75, 0.14), 0px 2px 1px -2px rgba(24, 39, 75, 0.2)",
17662
+ zIndex: 100,
17663
+ padding: "8px 24px",
17664
+ minHeight: 39
17665
+ }));
17666
+ const PageHeaderComponent = ({
17667
+ title,
17668
+ subtitle,
17669
+ actions,
17670
+ buttonBack,
17671
+ fixed
17672
+ }) => {
17673
+ return /*#__PURE__*/React__default.createElement(ThemeProvider, {
17674
+ theme: SincoTheme
17675
+ }, /*#__PURE__*/React__default.createElement(PageHeaderContent, {
17676
+ position: fixed === true ? "fixed" : "relative",
17677
+ sx: {
17678
+ width: fixed === true ? "-webkit-fill-available" : "inherit"
17679
+ }
17680
+ }, /*#__PURE__*/React__default.createElement(Stack$1, {
17681
+ width: "100%",
17682
+ justifyContent: "space-between",
17683
+ flexDirection: "row",
17684
+ alignItems: "center"
17685
+ }, /*#__PURE__*/React__default.createElement(Stack$1, {
17686
+ gap: 1.5,
17687
+ flexDirection: "row",
17688
+ alignItems: "center"
17689
+ }, buttonBack, /*#__PURE__*/React__default.createElement(Stack$1, null, /*#__PURE__*/React__default.createElement(Typography$1, {
17690
+ variant: "h6",
17691
+ color: "text.primary"
17692
+ }, title), /*#__PURE__*/React__default.createElement(Typography$1, {
17693
+ variant: "caption",
17694
+ color: "text.secondary"
17695
+ }, subtitle))), /*#__PURE__*/React__default.createElement(Stack$1, {
17696
+ gap: 1,
17697
+ alignItems: "center",
17698
+ flexDirection: "row"
17699
+ }, actions))));
17700
+ };
17701
+
17663
17702
  const useProgress = timeProgress => {
17664
17703
  const [progress, setProgress] = useState(100);
17665
17704
  useEffect(() => {
@@ -23299,4 +23338,4 @@ const useDynamicColor = url => {
23299
23338
  };
23300
23339
  };
23301
23340
 
23302
- export { DrawerComponent, DynamicColor, EmptyStateComponent, EmptyStateImageUrls, FooterActionComponent, SincoTheme, ToastNotificationComponent, useDynamicColor };
23341
+ export { DrawerComponent, DynamicColor, EmptyStateComponent, EmptyStateImageUrls, FooterActionComponent, PageHeaderComponent, PageHeaderContent, SincoTheme, ToastNotificationComponent, useDynamicColor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinco/react",
3
- "version": "1.0.14-rc.29",
3
+ "version": "1.0.14-rc.30",
4
4
  "description": "package for the configuration of mui react sinco",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -0,0 +1 @@
1
+ export declare const main: () => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface PageheaderProperties {
3
+ title?: string;
4
+ subtitle?: string;
5
+ actions?: React.ReactNode;
6
+ buttonBack?: React.ReactNode;
7
+ fixed?: boolean;
8
+ }
9
+ export declare const PageHeaderContent: import("@emotion/styled").StyledComponent<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
11
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
12
+ export declare const PageHeaderComponent: ({ title, subtitle, actions, buttonBack, fixed, }: PageheaderProperties) => JSX.Element;
13
+ export {};
@@ -1,5 +1,5 @@
1
1
  export * from './EmptyState';
2
2
  export * from './Drawer';
3
3
  export * from './FooterAction';
4
- export * from './ToastNotification';
5
- export * from './index';
4
+ export * from './PageHeader';
5
+ export * from './ToastNofitication';
@@ -1,12 +1,2 @@
1
1
  import { Components } from '@mui/material';
2
- declare module '@mui/material/Chip' {
3
- interface ChipPropsSizeOverrides {
4
- xsmall: true;
5
- }
6
- }
7
- declare module "@mui/material/Checkbox" {
8
- interface CheckboxPropsSizeOverrides {
9
- xsmall: true;
10
- }
11
- }
12
2
  export declare const components: Components;