componentes-sinco 1.1.29 → 1.1.30

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/dist/index.js CHANGED
@@ -1258,7 +1258,7 @@ var CalendarToolbar = ({
1258
1258
 
1259
1259
  // src/Components/Calendario/Views/MonthView.tsx
1260
1260
  import React28 from "react";
1261
- import { Box as Box16, Typography as Typography14, IconButton as IconButton11, Paper, Tooltip as Tooltip6, Stack as Stack11, CircularProgress as CircularProgress2 } from "@mui/material";
1261
+ import { Box as Box16, Typography as Typography14, IconButton as IconButton11, Paper, Tooltip as Tooltip6, Stack as Stack11, CircularProgress as CircularProgress2, Button as Button11 } from "@mui/material";
1262
1262
  import AddIcon from "@mui/icons-material/Add";
1263
1263
  import dayjs5 from "dayjs";
1264
1264
  import localeData from "dayjs/plugin/localeData";
@@ -3432,7 +3432,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3432
3432
  const [openDrawer, setOpenDrawer] = React28.useState(false);
3433
3433
  const [selectedDay, setSelectedDay] = React28.useState(null);
3434
3434
  const [selectedEvents, setSelectedEvents] = React28.useState([]);
3435
- return /* @__PURE__ */ React28.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React28.createElement(Box16, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React28.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React28.createElement(Typography14, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React28.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React28.createElement(CircularProgress2, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React28.createElement(
3435
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React28.createElement(Box16, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React28.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React28.createElement(Typography14, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React28.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React28.createElement(CircularProgress2, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React28.createElement(
3436
3436
  EmptyState,
3437
3437
  {
3438
3438
  containerHeight: "calc(100vh - 130px)",
@@ -3515,30 +3515,47 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3515
3515
  sx: { "& .MuiButtonBase-root": { width: "100%" } }
3516
3516
  },
3517
3517
  /* @__PURE__ */ React28.createElement(
3518
- SCDrawer,
3518
+ Button11,
3519
3519
  {
3520
- width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
3521
- title: day.format("DD [de] MMMM YYYY"),
3522
- open: openDrawer,
3523
- buttonDrawer: { text: `+ ${dayEvents.length}` },
3524
- anchor: "right",
3525
- actions: false,
3526
- arrayElements: [{
3527
- component: /* @__PURE__ */ React28.createElement(
3528
- DayEventsList,
3529
- {
3530
- events: dayEvents,
3531
- day,
3532
- onEventClick,
3533
- onEventHover
3534
- }
3535
- )
3536
- }]
3537
- }
3520
+ size: "small",
3521
+ variant: "text",
3522
+ sx: { textTransform: "capitalize" },
3523
+ onClick: (e) => {
3524
+ e.stopPropagation();
3525
+ setSelectedDay(day);
3526
+ setSelectedEvents(dayEvents);
3527
+ setOpenDrawer(true);
3528
+ }
3529
+ },
3530
+ `+ ${dayEvents.length}`
3538
3531
  )
3539
3532
  )
3540
3533
  );
3541
- }))));
3534
+ })))), selectedDay && /* @__PURE__ */ React28.createElement(
3535
+ SCDrawer,
3536
+ {
3537
+ width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
3538
+ title: selectedDay.format("DD [de] MMMM YYYY"),
3539
+ open: openDrawer,
3540
+ setOpen: (value) => {
3541
+ setOpenDrawer(value);
3542
+ if (!value) setSelectedDay(null);
3543
+ },
3544
+ anchor: "right",
3545
+ actions: false,
3546
+ arrayElements: [{
3547
+ component: /* @__PURE__ */ React28.createElement(
3548
+ DayEventsList,
3549
+ {
3550
+ events: selectedEvents,
3551
+ day: selectedDay,
3552
+ onEventClick,
3553
+ onEventHover
3554
+ }
3555
+ )
3556
+ }]
3557
+ }
3558
+ ));
3542
3559
  };
3543
3560
 
3544
3561
  // src/Components/Calendario/Views/WeekView.tsx
@@ -3919,7 +3936,7 @@ var FooterAction = ({
3919
3936
 
3920
3937
  // src/Components/Menu/Menu.tsx
3921
3938
  import React33, { useCallback as useCallback4, useState as useState15 } from "react";
3922
- import { Button as Button11, Menu as Menu2 } from "@mui/material";
3939
+ import { Button as Button12, Menu as Menu2 } from "@mui/material";
3923
3940
  var BasicMenu = ({
3924
3941
  open,
3925
3942
  onClose,
@@ -3956,7 +3973,7 @@ var BasicMenu = ({
3956
3973
  }
3957
3974
  }, [onClose, setMenuOpen]);
3958
3975
  return /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement(
3959
- Button11,
3976
+ Button12,
3960
3977
  {
3961
3978
  id: "basic-button",
3962
3979
  "aria-controls": actualOpen ? "basic-menu" : void 0,
@@ -3987,7 +4004,7 @@ var BasicMenu = ({
3987
4004
 
3988
4005
  // src/Components/MultiSelect/MultiSelect.tsx
3989
4006
  import React34, { useEffect as useEffect13, useMemo as useMemo6 } from "react";
3990
- import { Button as Button12, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem5, Popover as Popover4, Stack as Stack12, TextField as TextField4 } from "@mui/material";
4007
+ import { Button as Button13, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem5, Popover as Popover4, Stack as Stack12, TextField as TextField4 } from "@mui/material";
3991
4008
  import { SearchOutlined } from "@mui/icons-material";
3992
4009
 
3993
4010
  // src/Components/MultiSelect/helpers/useHandlers.tsx
@@ -4104,7 +4121,7 @@ function MultiSelect({
4104
4121
  } }
4105
4122
  ];
4106
4123
  return /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(
4107
- Button12,
4124
+ Button13,
4108
4125
  {
4109
4126
  "test-id": "multiselect-button",
4110
4127
  color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
@@ -4158,7 +4175,7 @@ function MultiSelect({
4158
4175
  )) : /* @__PURE__ */ React34.createElement(MenuItem5, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React34.createElement(Stack12, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
4159
4176
  var _a2;
4160
4177
  return /* @__PURE__ */ React34.createElement(
4161
- Button12,
4178
+ Button13,
4162
4179
  {
4163
4180
  key: index,
4164
4181
  variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
@@ -4673,7 +4690,7 @@ var SCCalendarSwipeable = ({
4673
4690
 
4674
4691
  // src/Components/SCCard.tsx
4675
4692
  import React41 from "react";
4676
- import { Button as Button17, Box as Box25, SvgIcon as SvgIcon7 } from "@mui/material";
4693
+ import { Button as Button18, Box as Box25, SvgIcon as SvgIcon7 } from "@mui/material";
4677
4694
  import IconButton16 from "@mui/material/IconButton";
4678
4695
  import Card2 from "@mui/material/Card";
4679
4696
  import CardHeader from "@mui/material/CardHeader";
@@ -4708,7 +4725,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
4708
4725
  CardHeader,
4709
4726
  {
4710
4727
  avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React41.createElement(Box25, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React41.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React41.createElement(SvgIcon7, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
4711
- action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React41.createElement(Button17, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
4728
+ action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React41.createElement(Button18, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
4712
4729
  title,
4713
4730
  subheader: subtitle,
4714
4731
  sx: {
@@ -4734,8 +4751,8 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
4734
4751
  height: "194",
4735
4752
  image
4736
4753
  }
4737
- ), content && /* @__PURE__ */ React41.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React41.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React41.createElement(Button17, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React41.createElement(
4738
- Button17,
4754
+ ), content && /* @__PURE__ */ React41.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React41.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React41.createElement(Button18, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React41.createElement(
4755
+ Button18,
4739
4756
  {
4740
4757
  key: index,
4741
4758
  size: "small",
@@ -5248,7 +5265,7 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
5248
5265
 
5249
5266
  // src/Components/SCDialog.tsx
5250
5267
  import React44, { useEffect as useEffect20, useState as useState24 } from "react";
5251
- import { Button as Button18, Typography as Typography25, Modal as Modal5, Dialog as Dialog4, DialogActions as DialogActions4, DialogContent as DialogContent4, DialogTitle as DialogTitle4, IconButton as IconButton17, Tooltip as Tooltip8, Box as Box26, SvgIcon as SvgIcon8 } from "@mui/material";
5268
+ import { Button as Button19, Typography as Typography25, Modal as Modal5, Dialog as Dialog4, DialogActions as DialogActions4, DialogContent as DialogContent4, DialogTitle as DialogTitle4, IconButton as IconButton17, Tooltip as Tooltip8, Box as Box26, SvgIcon as SvgIcon8 } from "@mui/material";
5252
5269
  import Grid11 from "@mui/material/Grid";
5253
5270
  import ToggleButton from "@mui/material/ToggleButton";
5254
5271
  import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
@@ -5313,7 +5330,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
5313
5330
  };
5314
5331
  const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
5315
5332
  content = content != null ? content : { component: /* @__PURE__ */ React44.createElement(Box26, null, " Aqui va el contenido ") };
5316
- return /* @__PURE__ */ React44.createElement("div", null, buttonDialog ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React44.createElement(Tooltip8, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React44.createElement(Button18, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" ? /* @__PURE__ */ React44.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React44.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React44.createElement(IconButton17, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React44.createElement(SvgIcon8, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React44.createElement(Modal5, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React44.createElement(
5333
+ return /* @__PURE__ */ React44.createElement("div", null, buttonDialog ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React44.createElement(Tooltip8, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React44.createElement(Button19, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" ? /* @__PURE__ */ React44.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React44.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React44.createElement(IconButton17, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React44.createElement(SvgIcon8, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React44.createElement(Modal5, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React44.createElement(
5317
5334
  Dialog4,
5318
5335
  {
5319
5336
  fullScreen: typeView === "mobile" ? true : false,
@@ -5369,7 +5386,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
5369
5386
  ) : content.component
5370
5387
  ),
5371
5388
  dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */ React44.createElement(DialogActions4, { sx: { zIndex: 1200, gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, typeView !== "mobile" ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, dialogActions.length >= 3 ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(
5372
- Button18,
5389
+ Button19,
5373
5390
  {
5374
5391
  variant: "text",
5375
5392
  color: dialogActions[0].color || "primary",
@@ -5381,7 +5398,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
5381
5398
  dialogActions[0].text
5382
5399
  ), /* @__PURE__ */ React44.createElement(Box26, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
5383
5400
  return /* @__PURE__ */ React44.createElement(
5384
- Button18,
5401
+ Button19,
5385
5402
  {
5386
5403
  key: index + 1,
5387
5404
  variant: index === dialogActions.length - 2 ? "contained" : "text",
@@ -5395,7 +5412,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
5395
5412
  );
5396
5413
  }))) : dialogActions.map((boton, index) => {
5397
5414
  return /* @__PURE__ */ React44.createElement(
5398
- Button18,
5415
+ Button19,
5399
5416
  {
5400
5417
  key: index,
5401
5418
  variant: index === dialogActions.length - 1 ? "contained" : "text",