componentes-sinco 1.1.9 → 1.1.11

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
@@ -748,7 +748,7 @@ var Attachment = ({
748
748
 
749
749
  // src/Components/Drawer/SCDrawer.tsx
750
750
  import React16 from "react";
751
- import { Drawer, Stack as Stack6, SwipeableDrawer, Box as Box11 } from "@mui/material";
751
+ import { Drawer, Stack as Stack6, SwipeableDrawer, Box as Box11, Button as Button8 } from "@mui/material";
752
752
  import Grid6 from "@mui/material/Grid";
753
753
 
754
754
  // src/Components/Drawer/Helpers/Utils.tsx
@@ -2225,7 +2225,7 @@ var DrawerActions = ({ actions, anchor }) => {
2225
2225
  sx: { borderTop: 1, borderColor: "#1018403B", zIndex: 1500 },
2226
2226
  container: true,
2227
2227
  gap: 2,
2228
- padding: "8px 12px",
2228
+ padding: "8px 16px",
2229
2229
  height: "42px",
2230
2230
  alignItems: "center",
2231
2231
  flexWrap: "nowrap",
@@ -2386,6 +2386,11 @@ function SCDrawer({
2386
2386
  onOpen: toggleDrawer(true),
2387
2387
  anchor: "bottom",
2388
2388
  swipeAreaWidth: drawerBleeding,
2389
+ transitionDuration: { enter: 500, exit: 400 },
2390
+ ModalProps: {
2391
+ BackdropProps: { timeout: 400 }
2392
+ },
2393
+ hysteresis: 0.2,
2389
2394
  sx: {
2390
2395
  zIndex: 1400,
2391
2396
  "& .MuiDrawer-paper": {
@@ -2394,6 +2399,11 @@ function SCDrawer({
2394
2399
  boxSizing: "border-box",
2395
2400
  borderRadius: "4px 4px 0px 0px"
2396
2401
  }
2402
+ },
2403
+ slotProps: {
2404
+ backdrop: {
2405
+ sx: { backgroundColor: "#00000038" }
2406
+ }
2397
2407
  }
2398
2408
  },
2399
2409
  /* @__PURE__ */ React16.createElement(
@@ -2418,7 +2428,33 @@ function SCDrawer({
2418
2428
  onClose: handleDrawerClose,
2419
2429
  anchor
2420
2430
  }
2421
- ), /* @__PURE__ */ React16.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ React16.createElement(DrawerActions, { actions: drawerActions, anchor }))
2431
+ ), /* @__PURE__ */ React16.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ React16.createElement(
2432
+ Grid6,
2433
+ {
2434
+ sx: { zIndex: 1500 },
2435
+ container: true,
2436
+ gap: 2,
2437
+ padding: "8px 16px 40px 16px",
2438
+ height: "86px",
2439
+ alignItems: "center",
2440
+ flexWrap: "nowrap",
2441
+ justifyContent: Array.isArray(drawerActions) && drawerActions.length > 1 ? "space-between" : "flex-end",
2442
+ flexDirection: "row-reverse"
2443
+ },
2444
+ Array.isArray(drawerActions) && drawerActions.map((btn, index) => /* @__PURE__ */ React16.createElement(
2445
+ Button8,
2446
+ {
2447
+ key: index,
2448
+ variant: index === 0 || drawerActions.length < 2 ? "contained" : "text",
2449
+ color: "primary",
2450
+ onClick: btn.fn,
2451
+ disabled: btn.disabled || false,
2452
+ size: "small",
2453
+ fullWidth: anchor === "bottom" ? true : false
2454
+ },
2455
+ btn.text
2456
+ ))
2457
+ ))
2422
2458
  ));
2423
2459
  }
2424
2460
 
@@ -2453,7 +2489,7 @@ var FooterAction = ({
2453
2489
 
2454
2490
  // src/Components/MultiSelect/MultiSelect.tsx
2455
2491
  import React18, { useEffect as useEffect11, useMemo as useMemo4 } from "react";
2456
- import { Button as Button8, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem3, Popover as Popover3, Stack as Stack7, TextField as TextField4 } from "@mui/material";
2492
+ import { Button as Button9, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem3, Popover as Popover3, Stack as Stack7, TextField as TextField4 } from "@mui/material";
2457
2493
  import { SearchOutlined } from "@mui/icons-material";
2458
2494
 
2459
2495
  // src/Components/MultiSelect/helpers/useHandlers.tsx
@@ -2533,7 +2569,7 @@ function MultiSelect({
2533
2569
  selectAll = false,
2534
2570
  getItemLabel
2535
2571
  }) {
2536
- var _a, _b;
2572
+ var _a, _b, _c;
2537
2573
  const {
2538
2574
  anchorEl,
2539
2575
  open: openMultiselect,
@@ -2570,7 +2606,7 @@ function MultiSelect({
2570
2606
  } }
2571
2607
  ];
2572
2608
  return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
2573
- Button8,
2609
+ Button9,
2574
2610
  {
2575
2611
  "test-id": "multiselect-button",
2576
2612
  color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
@@ -2580,7 +2616,7 @@ function MultiSelect({
2580
2616
  startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React18.createElement(Icon, null) : null,
2581
2617
  endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React18.createElement(Icon, null) : null
2582
2618
  },
2583
- capitalize(textButton != null ? textButton : "MultiSelect")
2619
+ capitalize((_c = button == null ? void 0 : button.text) != null ? _c : "")
2584
2620
  ), /* @__PURE__ */ React18.createElement(
2585
2621
  Popover3,
2586
2622
  {
@@ -2624,7 +2660,7 @@ function MultiSelect({
2624
2660
  )) : /* @__PURE__ */ React18.createElement(MenuItem3, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React18.createElement(Stack7, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
2625
2661
  var _a2;
2626
2662
  return /* @__PURE__ */ React18.createElement(
2627
- Button8,
2663
+ Button9,
2628
2664
  {
2629
2665
  key: index,
2630
2666
  variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
@@ -2716,7 +2752,7 @@ var SCCalendarSwipeable = ({
2716
2752
  // 0 = domingo, 1 = lunes
2717
2753
  })
2718
2754
  });
2719
- return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React20.createElement(Box13, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React20.createElement(Box13, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React20.createElement(Grid7, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React20.createElement(Grid7, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React20.createElement(Box13, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React20.createElement(Typography11, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React20.createElement(
2755
+ return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React20.createElement(Box13, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React20.createElement(Box13, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ React20.createElement(Grid7, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React20.createElement(Grid7, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React20.createElement(Box13, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React20.createElement(Typography11, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React20.createElement(
2720
2756
  Box13,
2721
2757
  {
2722
2758
  onClick: () => setFecha(dia),
@@ -2740,7 +2776,22 @@ var SCCalendarSwipeable = ({
2740
2776
  openTo: "day",
2741
2777
  value: fecha,
2742
2778
  slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
2743
- sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
2779
+ sx: {
2780
+ "& .MuiDateCalendar-root": {
2781
+ width: "100%",
2782
+ maxWidth: "unset",
2783
+ margin: 0,
2784
+ padding: "0px 16px"
2785
+ },
2786
+ fontSize: "12px !important",
2787
+ height: "260px !important",
2788
+ background: background ? background : "white",
2789
+ "& .MuiDayCalendar-header": { justifyContent: "space-between" },
2790
+ "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
2791
+ "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" },
2792
+ "& .MuiPickersDay-root": { fontSize: "12px !important" },
2793
+ "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" }
2794
+ },
2744
2795
  onChange: (newValue) => setFecha(newValue)
2745
2796
  }
2746
2797
  ), /* @__PURE__ */ React20.createElement(Grid7, { container: true, justifyContent: "center" }, /* @__PURE__ */ React20.createElement(IconButton9, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React20.createElement(KeyboardDoubleArrowUpIcon, null))))));
@@ -2753,7 +2804,7 @@ import { LicenseInfo as LicenseInfo2 } from "@mui/x-license";
2753
2804
  import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
2754
2805
  import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
2755
2806
  import { useTheme } from "@mui/material/styles";
2756
- function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) {
2807
+ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) {
2757
2808
  LicenseInfo2.setLicenseKey(
2758
2809
  "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
2759
2810
  );
@@ -2985,6 +3036,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2985
3036
  return /* @__PURE__ */ React21.createElement(React21.Fragment, null, data && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React21.createElement(
2986
3037
  DataGridPro,
2987
3038
  {
3039
+ getRowId,
2988
3040
  apiRef,
2989
3041
  rowHeight: styleRowHeight,
2990
3042
  rows: arrayRows,
@@ -3132,7 +3184,7 @@ var SCDataGrid = React21.memo(SCDataGridInitial, (prevProps, nextProps) => {
3132
3184
 
3133
3185
  // src/Components/EmptyState/EmptyState.tsx
3134
3186
  import React26 from "react";
3135
- import { Button as Button10, Stack as Stack9, Typography as Typography12 } from "@mui/material";
3187
+ import { Button as Button11, Stack as Stack9, Typography as Typography12 } from "@mui/material";
3136
3188
 
3137
3189
  // src/assets/ImgEmptyState/create.tsx
3138
3190
  import React22 from "react";
@@ -3213,7 +3265,7 @@ var EmptyState = ({
3213
3265
  actions.map((action, index) => {
3214
3266
  var _a, _b, _c, _d;
3215
3267
  return /* @__PURE__ */ React26.createElement(
3216
- Button10,
3268
+ Button11,
3217
3269
  {
3218
3270
  key: index,
3219
3271
  color: (_a = action.color) != null ? _a : "primary",
@@ -3232,7 +3284,7 @@ var EmptyState = ({
3232
3284
 
3233
3285
  // src/Components/SCDialog.tsx
3234
3286
  import React27, { useEffect as useEffect14, useState as useState14 } from "react";
3235
- import { Button as Button11, Typography as Typography13, Modal as Modal2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton10, Tooltip as Tooltip4, Box as Box14, SvgIcon as SvgIcon5 } from "@mui/material";
3287
+ import { Button as Button12, Typography as Typography13, Modal as Modal2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton10, Tooltip as Tooltip4, Box as Box14, SvgIcon as SvgIcon5 } from "@mui/material";
3236
3288
  import Grid8 from "@mui/material/Grid";
3237
3289
  import ToggleButton from "@mui/material/ToggleButton";
3238
3290
  import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
@@ -3297,7 +3349,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3297
3349
  };
3298
3350
  const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
3299
3351
  content = content != null ? content : { component: /* @__PURE__ */ React27.createElement(Box14, null, " Aqui va el contenido ") };
3300
- return /* @__PURE__ */ React27.createElement("div", null, buttonDialog ? /* @__PURE__ */ React27.createElement(React27.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React27.createElement(Tooltip4, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React27.createElement(Button11, { 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__ */ React27.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React27.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React27.createElement(IconButton10, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React27.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React27.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React27.createElement(
3352
+ return /* @__PURE__ */ React27.createElement("div", null, buttonDialog ? /* @__PURE__ */ React27.createElement(React27.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React27.createElement(Tooltip4, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React27.createElement(Button12, { 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__ */ React27.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React27.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React27.createElement(IconButton10, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React27.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React27.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React27.createElement(
3301
3353
  Dialog,
3302
3354
  {
3303
3355
  fullScreen: typeView === "mobile" ? true : false,
@@ -3312,7 +3364,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3312
3364
  }
3313
3365
  }
3314
3366
  },
3315
- title && /* @__PURE__ */ React27.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React27.createElement(Grid8, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ React27.createElement(Grid8, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React27.createElement(Box14, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React27.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React27.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React27.createElement(Grid8, { sx: { width: "98%" } }, /* @__PURE__ */ React27.createElement(Typography13, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")), disableClose != true ? /* @__PURE__ */ React27.createElement(IconButton10, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React27.createElement(CloseIcon2, { color: "action" })) : "")),
3367
+ title && /* @__PURE__ */ React27.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React27.createElement(Grid8, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, typeView == "web" ? /* @__PURE__ */ React27.createElement(Grid8, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React27.createElement(Box14, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React27.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React27.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React27.createElement(Grid8, { sx: { width: "98%" } }, /* @__PURE__ */ React27.createElement(Typography13, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")) : /* @__PURE__ */ React27.createElement(Grid8, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }), disableClose != true ? /* @__PURE__ */ React27.createElement(IconButton10, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React27.createElement(CloseIcon2, { color: "action" })) : ""), typeView == "mobile" ? /* @__PURE__ */ React27.createElement(Grid8, { sx: { display: "flex", flexDirection: "column", padding: "12px 0px 4px 0px" }, gap: 1.5 }, /* @__PURE__ */ React27.createElement(Typography13, { color: "text.primary", variant: "h5" }, title ? title : ""), subtitle ? subtitle : "") : ""),
3316
3368
  /* @__PURE__ */ React27.createElement(
3317
3369
  DialogContent,
3318
3370
  {
@@ -3353,7 +3405,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3353
3405
  ) : content.component
3354
3406
  ),
3355
3407
  dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */ React27.createElement(DialogActions, { sx: { zIndex: 1200, gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, typeView !== "mobile" ? /* @__PURE__ */ React27.createElement(React27.Fragment, null, dialogActions.length >= 3 ? /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(
3356
- Button11,
3408
+ Button12,
3357
3409
  {
3358
3410
  variant: "text",
3359
3411
  color: dialogActions[0].color || "primary",
@@ -3365,7 +3417,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3365
3417
  dialogActions[0].text
3366
3418
  ), /* @__PURE__ */ React27.createElement(Box14, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
3367
3419
  return /* @__PURE__ */ React27.createElement(
3368
- Button11,
3420
+ Button12,
3369
3421
  {
3370
3422
  key: index + 1,
3371
3423
  variant: index === dialogActions.length - 2 ? "contained" : "text",
@@ -3379,7 +3431,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3379
3431
  );
3380
3432
  }))) : dialogActions.map((boton, index) => {
3381
3433
  return /* @__PURE__ */ React27.createElement(
3382
- Button11,
3434
+ Button12,
3383
3435
  {
3384
3436
  key: index,
3385
3437
  variant: index === dialogActions.length - 1 ? "contained" : "text",
@@ -3393,7 +3445,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3393
3445
  );
3394
3446
  })) : /* @__PURE__ */ React27.createElement(Box14, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ React27.createElement(ToggleButtonGroup, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
3395
3447
  var _a;
3396
- return /* @__PURE__ */ React27.createElement(ToggleButton, { fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ React27.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }));
3448
+ return /* @__PURE__ */ React27.createElement(ToggleButton, { disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ React27.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }));
3397
3449
  })))) : "" : ""
3398
3450
  )));
3399
3451
  };
@@ -3425,14 +3477,14 @@ var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" })
3425
3477
  }
3426
3478
  }
3427
3479
  });
3428
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(List, { sx: { width: "100%", maxWidth: 360, bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => {
3480
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(List, { sx: { width: "100%", bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => {
3429
3481
  var _a, _b;
3430
3482
  return /* @__PURE__ */ React28.createElement(React28.Fragment, { key: index }, /* @__PURE__ */ React28.createElement(
3431
3483
  ListItemButton,
3432
3484
  {
3433
3485
  disabled: option.disable,
3434
3486
  onClick: option.fn,
3435
- sx: { gap: 1 }
3487
+ sx: { gap: 1, padding: iconLeftType == "Icon" ? "8px 8px" : "8px 8px 8px 0px" }
3436
3488
  },
3437
3489
  option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */ React28.createElement(ListItemIcon4, { sx: { minWidth: "0px !important" } }, /* @__PURE__ */ React28.createElement(SvgIcon6, { fontSize: "small", sx: { color: option.iconLeftColor || "action" }, component: option.iconLeft })) : /* @__PURE__ */ React28.createElement(Avatar, { sx: { width: 25, height: 25, fontSize: "11px", bgcolor: option.iconLeftColor ? `${option.iconLeftColor}.main` : "default" } }, ((_a = option.iconLeft) == null ? void 0 : _a.type) != void 0 ? /* @__PURE__ */ React28.createElement(SvgIcon6, { fontSize: "small", component: option.iconLeft }) : option.iconLeft) : "",
3438
3490
  /* @__PURE__ */ React28.createElement(
@@ -3532,7 +3584,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
3532
3584
 
3533
3585
  // src/Components/Menu/Menu.tsx
3534
3586
  import React30, { useCallback as useCallback4, useState as useState17 } from "react";
3535
- import { Button as Button13, Menu } from "@mui/material";
3587
+ import { Button as Button14, Menu } from "@mui/material";
3536
3588
  var BasicMenu = ({
3537
3589
  open,
3538
3590
  onClose,
@@ -3569,7 +3621,7 @@ var BasicMenu = ({
3569
3621
  }
3570
3622
  }, [onClose, setMenuOpen]);
3571
3623
  return /* @__PURE__ */ React30.createElement("div", null, /* @__PURE__ */ React30.createElement(
3572
- Button13,
3624
+ Button14,
3573
3625
  {
3574
3626
  id: "basic-button",
3575
3627
  "aria-controls": actualOpen ? "basic-menu" : void 0,
@@ -4652,7 +4704,7 @@ var SCTime = ({
4652
4704
 
4653
4705
  // src/Components/SCCard.tsx
4654
4706
  import React41 from "react";
4655
- import { Button as Button15, Box as Box26, SvgIcon as SvgIcon9 } from "@mui/material";
4707
+ import { Button as Button16, Box as Box26, SvgIcon as SvgIcon9 } from "@mui/material";
4656
4708
  import IconButton14 from "@mui/material/IconButton";
4657
4709
  import Card from "@mui/material/Card";
4658
4710
  import CardHeader from "@mui/material/CardHeader";
@@ -4687,7 +4739,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
4687
4739
  CardHeader,
4688
4740
  {
4689
4741
  avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React41.createElement(Box26, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React41.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React41.createElement(SvgIcon9, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
4690
- action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React41.createElement(Button15, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton14, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
4742
+ action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React41.createElement(Button16, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton14, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
4691
4743
  title,
4692
4744
  subheader: subtitle,
4693
4745
  sx: {
@@ -4713,8 +4765,8 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
4713
4765
  height: "194",
4714
4766
  image
4715
4767
  }
4716
- ), content && /* @__PURE__ */ React41.createElement(CardContent, { 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(Button15, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton14, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React41.createElement(
4717
- Button15,
4768
+ ), content && /* @__PURE__ */ React41.createElement(CardContent, { 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(Button16, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React41.createElement(IconButton14, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React41.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React41.createElement(
4769
+ Button16,
4718
4770
  {
4719
4771
  key: index,
4720
4772
  size: "small",
@@ -4783,7 +4835,7 @@ var SCActivityCalendar = ({
4783
4835
  // 0 = domingo, 1 = lunes
4784
4836
  })
4785
4837
  });
4786
- return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(LocalizationProvider4, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React42.createElement(Box27, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React42.createElement(Box27, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React42.createElement(Grid11, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React42.createElement(Grid11, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React42.createElement(Box27, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React42.createElement(Typography25, { sx: { fontSize: "12px !important", color: "#10184099" } }, format2(dia, "EEEE", { locale: es2 }).charAt(0).toUpperCase())), /* @__PURE__ */ React42.createElement(
4838
+ return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(LocalizationProvider4, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React42.createElement(Box27, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React42.createElement(Box27, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ React42.createElement(Grid11, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React42.createElement(Grid11, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React42.createElement(Box27, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React42.createElement(Typography25, { sx: { fontSize: "12px !important", color: "#10184099" } }, format2(dia, "EEEE", { locale: es2 }).charAt(0).toUpperCase())), /* @__PURE__ */ React42.createElement(
4787
4839
  Box27,
4788
4840
  {
4789
4841
  onClick: () => setFecha(dia),
@@ -4804,10 +4856,25 @@ var SCActivityCalendar = ({
4804
4856
  openTo: "day",
4805
4857
  value: fecha,
4806
4858
  slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
4807
- sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
4859
+ sx: {
4860
+ "& .MuiDateCalendar-root": {
4861
+ width: "100%",
4862
+ maxWidth: "unset",
4863
+ margin: 0,
4864
+ padding: "0px 16px"
4865
+ },
4866
+ fontSize: "12px !important",
4867
+ height: "260px !important",
4868
+ background: background ? background : "white",
4869
+ "& .MuiDayCalendar-header": { justifyContent: "space-between" },
4870
+ "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
4871
+ "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" },
4872
+ "& .MuiPickersDay-root": { fontSize: "12px !important" },
4873
+ "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" }
4874
+ },
4808
4875
  onChange: (newValue) => setFecha(newValue)
4809
4876
  }
4810
- ), /* @__PURE__ */ React42.createElement(Grid11, { container: true, justifyContent: "center" }, /* @__PURE__ */ React42.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React42.createElement(KeyboardDoubleArrowUpIcon2, { color: "action" }))))), /* @__PURE__ */ React42.createElement(Box27, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 300px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React42.createElement(
4877
+ ), /* @__PURE__ */ React42.createElement(Grid11, { container: true, justifyContent: "center" }, /* @__PURE__ */ React42.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React42.createElement(KeyboardDoubleArrowUpIcon2, { color: "action" }))))), /* @__PURE__ */ React42.createElement(Box27, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 260px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React42.createElement(
4811
4878
  Box27,
4812
4879
  {
4813
4880
  key: dayIndex
@@ -4866,7 +4933,7 @@ import Webcam from "react-webcam";
4866
4933
 
4867
4934
  // src/Components/Adjuntar/mobile/components/button.tsx
4868
4935
  import React43, { useMemo as useMemo5 } from "react";
4869
- import { Button as Button17 } from "@mui/material";
4936
+ import { Button as Button18 } from "@mui/material";
4870
4937
 
4871
4938
  // src/Components/Adjuntar/mobile/components/Utils.tsx
4872
4939
  import * as MuiIcons4 from "@mui/icons-material";
@@ -4897,7 +4964,7 @@ var AttachmentButton = ({ buttonAttachment, open, setOpen }) => {
4897
4964
  );
4898
4965
  if (!buttonAttachment) return null;
4899
4966
  return /* @__PURE__ */ React43.createElement(React43.Fragment, null, buttonAttachment && /* @__PURE__ */ React43.createElement(
4900
- Button17,
4967
+ Button18,
4901
4968
  {
4902
4969
  "data-testid": "test-buttonModal",
4903
4970
  color: (_a = buttonAttachment == null ? void 0 : buttonAttachment.color) != null ? _a : "primary",
@@ -4918,6 +4985,7 @@ import { Box as Box28 } from "@mui/system";
4918
4985
  import { CloseOutlined, DeleteOutline as DeleteOutline2, FolderOpenOutlined, PhotoCameraOutlined, UploadFileOutlined as UploadFileOutlined2 } from "@mui/icons-material";
4919
4986
  import PhotoCameraIcon from "@mui/icons-material/PhotoCamera";
4920
4987
  import CancelOutlinedIcon from "@mui/icons-material/CancelOutlined";
4988
+ import ImageOutlinedIcon from "@mui/icons-material/ImageOutlined";
4921
4989
  var AttachmentMobile = ({
4922
4990
  buttonAttachment,
4923
4991
  maxSize = 400,
@@ -5083,7 +5151,7 @@ var AttachmentMobile = ({
5083
5151
  }
5084
5152
  });
5085
5153
  const AttachtmentActions = [
5086
- { icon: /* @__PURE__ */ React44.createElement(FolderOpenOutlined, { type: "file", color: "primary" }), color: "primary", label: "Galer\xEDa", onClick: () => {
5154
+ { icon: /* @__PURE__ */ React44.createElement(ImageOutlinedIcon, { type: "file", color: "primary" }), color: "primary", label: "Galer\xEDa", onClick: () => {
5087
5155
  var _a;
5088
5156
  return (_a = inputRef.current) == null ? void 0 : _a.click();
5089
5157
  } },
@@ -5108,14 +5176,22 @@ var AttachmentMobile = ({
5108
5176
  )), /* @__PURE__ */ React44.createElement(CssBaseline, null), /* @__PURE__ */ React44.createElement(
5109
5177
  SwipeableDrawer2,
5110
5178
  {
5179
+ slotProps: {
5180
+ backdrop: {
5181
+ sx: { backgroundColor: "#00000038" }
5182
+ }
5183
+ },
5111
5184
  ModalProps: {
5112
5185
  sx: {
5113
5186
  zIndex: 1400,
5114
5187
  "& .MuiPaper-root": {
5115
5188
  borderRadius: "16px 16px 0 0"
5116
5189
  }
5117
- }
5190
+ },
5191
+ BackdropProps: { timeout: 400 }
5118
5192
  },
5193
+ transitionDuration: { enter: 500, exit: 400 },
5194
+ hysteresis: 0.2,
5119
5195
  anchor: "bottom",
5120
5196
  swipeAreaWidth: 56,
5121
5197
  open,
@@ -5123,7 +5199,7 @@ var AttachmentMobile = ({
5123
5199
  onOpen: toggleAttachment(true)
5124
5200
  },
5125
5201
  toast && /* @__PURE__ */ React44.createElement(SCToastNotification, __spreadValues({}, toast)),
5126
- /* @__PURE__ */ React44.createElement(Box28, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, gap: 2 }, /* @__PURE__ */ React44.createElement(Box28, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", gap: 1, p: 1 }, /* @__PURE__ */ React44.createElement(Typography26, { variant: "h6", color: "text.primary" }, "Agregar adjuntos"), /* @__PURE__ */ React44.createElement(IconButton16, { size: "medium", onClick: toggleAttachment(false) }, /* @__PURE__ */ React44.createElement(CloseOutlined, { color: "action" }))), /* @__PURE__ */ React44.createElement(
5202
+ /* @__PURE__ */ React44.createElement(Box28, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, gap: 2 }, /* @__PURE__ */ React44.createElement(Box28, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", gap: 1, p: 1 }, /* @__PURE__ */ React44.createElement(Typography26, { variant: "h6", color: "text.primary" }, "Agrega adjuntos"), /* @__PURE__ */ React44.createElement(IconButton16, { size: "medium", onClick: toggleAttachment(false) }, /* @__PURE__ */ React44.createElement(CloseOutlined, { color: "action" }))), /* @__PURE__ */ React44.createElement(
5127
5203
  "input",
5128
5204
  {
5129
5205
  type: "file",
@@ -5132,22 +5208,21 @@ var AttachmentMobile = ({
5132
5208
  ref: inputRef,
5133
5209
  onChange: handleUpload
5134
5210
  }
5135
- ), /* @__PURE__ */ React44.createElement(Box28, { display: "flex", justifyContent: "space-around", alignItems: "center", width: "100%", gap: 2 }, AttachtmentActions.map((option, index) => /* @__PURE__ */ React44.createElement(
5211
+ ), /* @__PURE__ */ React44.createElement(Box28, { display: "flex", justifyContent: "space-around", alignItems: "center", width: "100%", gap: 2, sx: { padding: "0px 0px 52px 0px !important" } }, AttachtmentActions.map((option, index) => /* @__PURE__ */ React44.createElement(
5136
5212
  Box28,
5137
5213
  {
5138
5214
  display: "flex",
5139
5215
  flexDirection: "column",
5140
5216
  alignItems: "center",
5141
- width: 100,
5217
+ width: "100%",
5142
5218
  height: 80,
5143
5219
  borderRadius: 1,
5144
- bgcolor: "grey.100",
5220
+ bgcolor: "grey.50",
5145
5221
  border: "1px solid",
5146
- borderColor: "grey.50",
5147
- boxShadow: 1,
5222
+ borderColor: "grey.100",
5148
5223
  justifyContent: "center",
5149
5224
  p: 1,
5150
- gap: 1,
5225
+ gap: 0.5,
5151
5226
  onClick: option.onClick,
5152
5227
  sx: {
5153
5228
  cursor: "pointer"
@@ -5163,7 +5238,7 @@ var AttachmentMobile = ({
5163
5238
  },
5164
5239
  option.icon
5165
5240
  ),
5166
- /* @__PURE__ */ React44.createElement(Typography26, { variant: "body2", color: "text.primary" }, option.label)
5241
+ /* @__PURE__ */ React44.createElement(Typography26, { variant: "body2", color: "text.secondary" }, option.label)
5167
5242
  ))))
5168
5243
  ), abrirCamara && /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(CancelOutlinedIcon, { onClick: closeCam, sx: { borderRadius: "50px", height: "35px", width: "35px", zIndex: 1700, background: "white", position: "absolute", left: `calc(100% - 50px)`, bottom: `calc(100% - 50px)` } }), /* @__PURE__ */ React44.createElement(Stack14, { className: "camras" }, /* @__PURE__ */ React44.createElement(
5169
5244
  Webcam,
@@ -5395,11 +5470,77 @@ var SCAppBar = ({
5395
5470
  )))), /* @__PURE__ */ React46.createElement(Box29, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
5396
5471
  };
5397
5472
 
5473
+ // src/Components/SCDatePicker.tsx
5474
+ import React47 from "react";
5475
+ import { DatePicker } from "@mui/x-date-pickers/DatePicker";
5476
+ import "dayjs/locale/es";
5477
+ import dayjs11 from "dayjs";
5478
+ import "dayjs/locale/es";
5479
+ import { LocalizationProvider as LocalizationProvider5 } from "@mui/x-date-pickers/LocalizationProvider";
5480
+ import { AdapterDayjs as AdapterDayjs3 } from "@mui/x-date-pickers/AdapterDayjs";
5481
+ import InsertInvitationOutlinedIcon from "@mui/icons-material/InsertInvitationOutlined";
5482
+ var SCDatePicker = ({ label, required, disabled, background, state, setState, width }) => {
5483
+ return /* @__PURE__ */ React47.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3, adapterLocale: "es" }, /* @__PURE__ */ React47.createElement(
5484
+ DatePicker,
5485
+ {
5486
+ disabled,
5487
+ label: label || "Fecha",
5488
+ value: state,
5489
+ onChange: (value) => {
5490
+ if (value && dayjs11.isDayjs(value) && value.isValid()) {
5491
+ const minDate = dayjs11("2015-01-01");
5492
+ const maxDate = dayjs11().add(3, "month");
5493
+ if (value.isBefore(minDate, "day")) {
5494
+ alert("La fecha no puede ser anterior al 01/01/2015");
5495
+ return;
5496
+ }
5497
+ if (value.isAfter(maxDate, "day")) {
5498
+ alert("La fecha no puede ser posterior a 3 meses desde hoy");
5499
+ return;
5500
+ }
5501
+ setState(value);
5502
+ }
5503
+ },
5504
+ minDate: dayjs11("2015-01-01"),
5505
+ maxDate: dayjs11().add(3, "month"),
5506
+ sx: {
5507
+ minWidth: 140,
5508
+ padding: "13px 0px",
5509
+ width: width || "100%",
5510
+ "& .MuiPickersInputBase-sectionsContainer": {
5511
+ padding: "8px 0px"
5512
+ },
5513
+ background: background || "transparent"
5514
+ },
5515
+ slotProps: {
5516
+ popper: {
5517
+ sx: {
5518
+ zIndex: 2e3
5519
+ }
5520
+ },
5521
+ textField: {
5522
+ required: required || false,
5523
+ InputLabelProps: {
5524
+ sx: {
5525
+ "&.MuiInputLabel-shrink": {
5526
+ transform: "translate(10px, 5px) scale(0.9) !important"
5527
+ }
5528
+ }
5529
+ }
5530
+ }
5531
+ },
5532
+ slots: {
5533
+ openPickerIcon: InsertInvitationOutlinedIcon
5534
+ }
5535
+ }
5536
+ ));
5537
+ };
5538
+
5398
5539
  // src/Theme/index.ts
5399
5540
  import { createTheme } from "@mui/material/styles";
5400
5541
 
5401
5542
  // src/Theme/components.ts
5402
- import React47 from "react";
5543
+ import React48 from "react";
5403
5544
  import {
5404
5545
  InfoRounded as InfoRounded2,
5405
5546
  CheckCircleRounded as CheckCircleRounded2,
@@ -5761,6 +5902,7 @@ var components = {
5761
5902
  })
5762
5903
  }
5763
5904
  },
5905
+ //este hace claro el fondo
5764
5906
  MuiBackdrop: {
5765
5907
  styleOverrides: {
5766
5908
  root: {
@@ -6102,10 +6244,10 @@ var components = {
6102
6244
  MuiAlert: {
6103
6245
  defaultProps: {
6104
6246
  iconMapping: {
6105
- success: React47.createElement(CheckCircleRounded2),
6106
- error: React47.createElement(ErrorRounded2),
6107
- warning: React47.createElement(WarningRounded2),
6108
- info: React47.createElement(InfoRounded2)
6247
+ success: React48.createElement(CheckCircleRounded2),
6248
+ error: React48.createElement(ErrorRounded2),
6249
+ warning: React48.createElement(WarningRounded2),
6250
+ info: React48.createElement(InfoRounded2)
6109
6251
  }
6110
6252
  },
6111
6253
  variants: [
@@ -7163,6 +7305,7 @@ export {
7163
7305
  SCCard,
7164
7306
  SCDataGrid,
7165
7307
  SCDataGridInitial,
7308
+ SCDatePicker,
7166
7309
  SCDateRange,
7167
7310
  SCDialog,
7168
7311
  SCDrawer,