@sinco/react 1.0.10-rc.21 → 1.0.10-rc.23

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -10934,7 +10934,7 @@ const SincoTheme = createTheme(Object.assign({}, themeOptions, {
10934
10934
  typography: {
10935
10935
  body3: {
10936
10936
  fontFamily: "Roboto",
10937
- fontWeight: 300,
10937
+ fontWeight: 310,
10938
10938
  fontSize: 12,
10939
10939
  letterSpacing: 0.17,
10940
10940
  lineHeight: 1.2,
@@ -15898,74 +15898,75 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("p
15898
15898
  default_1 = Close.default = _default;
15899
15899
 
15900
15900
  const stylesDrawerContainer = {
15901
- display: 'flex',
15902
- flexDirection: 'column',
15903
- alignContent: 'flex-start',
15904
- justifyContent: 'space-between',
15905
- width: '530px',
15906
- height: '100%',
15907
- overflow: 'hidden'
15901
+ display: "flex",
15902
+ flexDirection: "column",
15903
+ alignContent: "flex-start",
15904
+ justifyContent: "space-between",
15905
+ width: "530px",
15906
+ height: "100%",
15907
+ overflow: "hidden"
15908
15908
  };
15909
15909
  const stylesEncabezado = {
15910
- display: 'flex',
15911
- alignContent: 'center',
15912
- justifyContent: 'space-between',
15913
- backgroundColor: 'secondary.light',
15914
- py: '12px',
15915
- px: '8px'
15910
+ display: "flex",
15911
+ alignContent: "center",
15912
+ justifyContent: "space-between",
15913
+ backgroundColor: "primary.main",
15914
+ py: "12px",
15915
+ px: "8px"
15916
15916
  };
15917
15917
  const stylesContenido = {
15918
- display: 'flex',
15919
- overflow: 'auto',
15920
- alignItems: 'flex-start',
15921
- flexDirection: 'column',
15922
- height: '-webkit-fill-available',
15923
- py: '12px',
15924
- px: '8px'
15918
+ display: "flex",
15919
+ overflow: "auto",
15920
+ alignItems: "flex-start",
15921
+ flexDirection: "column",
15922
+ height: "-webkit-fill-available",
15923
+ py: "12px",
15924
+ px: "8px"
15925
15925
  };
15926
15926
  const stylesAcciones = {
15927
- display: 'flex',
15928
- alignContent: 'center',
15929
- justifyContent: 'flex-end',
15930
- borderTop: '1px solid rgba(16, 24, 64, 0.23)',
15931
- backgroundColor: '#F1F0EE',
15932
- mt: '4px',
15933
- gap: '8px',
15934
- py: '12px',
15935
- px: '8px'
15927
+ display: "flex",
15928
+ alignContent: "center",
15929
+ justifyContent: "flex-start",
15930
+ borderTop: "1px solid rgba(16, 24, 64, 0.23)",
15931
+ backgroundColor: "#F1F0EE",
15932
+ mt: "4px",
15933
+ py: "12px",
15934
+ px: "8px"
15936
15935
  };
15937
15936
  const DrawerComponent = ({
15938
15937
  open,
15939
15938
  onClose,
15939
+ anchor,
15940
15940
  titulo,
15941
15941
  children,
15942
- acciones,
15943
- anchor
15942
+ acciones
15944
15943
  }) => {
15945
15944
  const [showActions, setShowActions] = useState(false);
15945
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
15946
+ const [drawerAbierto, setDrawerAbierto] = useState(false);
15946
15947
  const mostrarAcciones = () => {
15947
15948
  setShowActions(true);
15948
15949
  };
15950
+ const toggleDrawer = () => {
15951
+ setDrawerAbierto(!drawerAbierto);
15952
+ onClose();
15953
+ };
15949
15954
  return jsx(Drawer$1, {
15950
15955
  anchor: anchor,
15951
15956
  open: open,
15952
- onClose: onClose,
15953
- PaperProps: {
15954
- style: {
15955
- borderRadius: '8px 0px 0px 0px'
15956
- }
15957
- },
15957
+ onClose: toggleDrawer,
15958
15958
  children: jsxs(Box$2, {
15959
15959
  sx: stylesDrawerContainer,
15960
15960
  children: [jsxs(Box$2, {
15961
15961
  sx: stylesEncabezado,
15962
+ gap: 2,
15962
15963
  children: [jsx(Typography$1, {
15963
15964
  variant: "h6",
15964
- color: "text.primary",
15965
+ component: "h6",
15965
15966
  children: titulo
15966
15967
  }), jsx(Box$2, {
15967
15968
  children: jsx(IconButton$1, {
15968
- onClick: onClose,
15969
+ onClick: toggleDrawer,
15969
15970
  size: "small",
15970
15971
  children: jsx(default_1, {
15971
15972
  fontSize: "small"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinco/react",
3
- "version": "1.0.10-rc.21",
3
+ "version": "1.0.10-rc.23",
4
4
  "description": "package for the configuration of mui react sinco",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -1,7 +1,8 @@
1
- import React, { ReactNode } from 'react';
2
- export type Anchor = 'left' | 'right';
1
+ import React from "react";
2
+ import { ReactNode } from 'react';
3
+ export type Anchor = "left" | "right";
3
4
  export interface DrawerComponentProps {
4
- titulo: string;
5
+ titulo: ReactNode;
5
6
  children: ReactNode;
6
7
  acciones: ReactNode;
7
8
  open: boolean;
@@ -7,9 +7,4 @@ declare module "@mui/material/styles" {
7
7
  body3?: React.CSSProperties;
8
8
  }
9
9
  }
10
- declare module "@mui/material/Typography" {
11
- interface TypographyPropsVariantOverrides {
12
- body3: true;
13
- }
14
- }
15
10
  export declare const SincoTheme: import("@mui/material/styles").Theme;