componentes-sinco 1.2.1 → 1.2.3

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.d.cts CHANGED
@@ -97,6 +97,7 @@ interface CalendarProps {
97
97
  isLoading?: boolean;
98
98
  startHour?: number;
99
99
  endHour?: number;
100
+ seeDays?: boolean;
100
101
  }
101
102
 
102
103
  declare const Calendar: React__default.FC<CalendarProps>;
@@ -336,6 +337,7 @@ declare const SCModal: ({ buttonModal, state, open, setOpen, title, description,
336
337
 
337
338
  interface MultiSelectProps<T> {
338
339
  textButton?: string;
340
+ background?: string;
339
341
  button?: {
340
342
  icon?: string;
341
343
  text?: string;
@@ -379,7 +381,7 @@ declare function useFilteredItems<T>(items: T[], filterValue: string, getItemLab
379
381
  sortedItems: T[];
380
382
  };
381
383
 
382
- declare function MultiSelect<T>({ textButton, button, items, topPanel, actions, dense, open, selectAll, getItemLabel }: MultiSelectProps<T>): React__default.JSX.Element;
384
+ declare function MultiSelect<T>({ textButton, background, button, items, topPanel, actions, dense, open, selectAll, getItemLabel }: MultiSelectProps<T>): React__default.JSX.Element;
383
385
 
384
386
  interface PageheaderProperties {
385
387
  title: string | React.ReactNode;
@@ -454,7 +456,7 @@ declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, i
454
456
  interface SCAccordionProps {
455
457
  title?: string;
456
458
  actions?: React__default.ReactNode;
457
- children?: React__default.ReactNode;
459
+ children?: any;
458
460
  }
459
461
  declare const SCAccordion: ({ title, actions, children, }: SCAccordionProps) => React__default.JSX.Element;
460
462
 
package/dist/index.d.ts CHANGED
@@ -97,6 +97,7 @@ interface CalendarProps {
97
97
  isLoading?: boolean;
98
98
  startHour?: number;
99
99
  endHour?: number;
100
+ seeDays?: boolean;
100
101
  }
101
102
 
102
103
  declare const Calendar: React__default.FC<CalendarProps>;
@@ -336,6 +337,7 @@ declare const SCModal: ({ buttonModal, state, open, setOpen, title, description,
336
337
 
337
338
  interface MultiSelectProps<T> {
338
339
  textButton?: string;
340
+ background?: string;
339
341
  button?: {
340
342
  icon?: string;
341
343
  text?: string;
@@ -379,7 +381,7 @@ declare function useFilteredItems<T>(items: T[], filterValue: string, getItemLab
379
381
  sortedItems: T[];
380
382
  };
381
383
 
382
- declare function MultiSelect<T>({ textButton, button, items, topPanel, actions, dense, open, selectAll, getItemLabel }: MultiSelectProps<T>): React__default.JSX.Element;
384
+ declare function MultiSelect<T>({ textButton, background, button, items, topPanel, actions, dense, open, selectAll, getItemLabel }: MultiSelectProps<T>): React__default.JSX.Element;
383
385
 
384
386
  interface PageheaderProperties {
385
387
  title: string | React.ReactNode;
@@ -454,7 +456,7 @@ declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, i
454
456
  interface SCAccordionProps {
455
457
  title?: string;
456
458
  actions?: React__default.ReactNode;
457
- children?: React__default.ReactNode;
459
+ children?: any;
458
460
  }
459
461
  declare const SCAccordion: ({ title, actions, children, }: SCAccordionProps) => React__default.JSX.Element;
460
462
 
package/dist/index.js CHANGED
@@ -2289,7 +2289,7 @@ function SCSelect({
2289
2289
  width = "100%",
2290
2290
  size = "small",
2291
2291
  variant = "outlined",
2292
- background = "white",
2292
+ background,
2293
2293
  required,
2294
2294
  disabled,
2295
2295
  setState,
@@ -2344,7 +2344,8 @@ function SCSelect({
2344
2344
  {
2345
2345
  fullWidth: true,
2346
2346
  size: size ? size : "medium",
2347
- variant
2347
+ variant,
2348
+ sx: { background: background ? background : "transparent" }
2348
2349
  },
2349
2350
  /* @__PURE__ */ React14.createElement(
2350
2351
  InputLabel2,
@@ -2363,6 +2364,7 @@ function SCSelect({
2363
2364
  variant,
2364
2365
  disabled: disabled || false,
2365
2366
  error,
2367
+ sx: { height: "32px" },
2366
2368
  MenuProps: {
2367
2369
  sx: {
2368
2370
  zIndex: 1400
@@ -3002,16 +3004,18 @@ var SCDateRange = ({
3002
3004
  },
3003
3005
  sx: {
3004
3006
  flex: 1,
3005
- "& .MuiOutlinedInput-root": {
3006
- backgroundColor: background === "transparent" ? "transparent" : background
3007
+ "& .MuiPickersOutlinedInput-root": {
3008
+ height: "32px",
3009
+ backgroundColor: background != null ? background : "transparent"
3010
+ },
3011
+ "& .MuiPickersInputBase-sectionsContainer": {
3012
+ height: "32px",
3013
+ padding: "0px 8px",
3014
+ alignItems: "center"
3007
3015
  },
3008
3016
  "& .MuiInputLabel-asterisk": {
3009
3017
  color: "error.main"
3010
- },
3011
- "& .MuiPickersOutlinedInput-sectionsContainer": {
3012
- padding: "6px 0px"
3013
- },
3014
- background: background != null ? background : "transparent"
3018
+ }
3015
3019
  }
3016
3020
  };
3017
3021
  }
@@ -3650,14 +3654,14 @@ var clampEventToVisibleRange = (event2, currentDate, startHour, endHour) => {
3650
3654
 
3651
3655
  // src/Components/Calendario/Views/MonthView.tsx
3652
3656
  dayjs5.extend(localeData);
3653
- var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover }) => {
3657
+ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover, seeDays = false }) => {
3654
3658
  const noEvents = events.length === 0;
3655
3659
  const days = getMonthDays(currentDate);
3656
3660
  const weekDays = Array.from({ length: 7 }, (_, i) => dayjs5().day(i));
3657
3661
  const [openDrawer, setOpenDrawer] = React28.useState(false);
3658
3662
  const [selectedDay, setSelectedDay] = React28.useState(null);
3659
3663
  const [selectedEvents, setSelectedEvents] = React28.useState([]);
3660
- 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(
3664
+ 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" })) : seeDays == false ? /* @__PURE__ */ React28.createElement(
3661
3665
  EmptyState,
3662
3666
  {
3663
3667
  containerHeight: "calc(100vh - 130px)",
@@ -3665,7 +3669,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3665
3669
  subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3666
3670
  icon: /* @__PURE__ */ React28.createElement(LogoCalendario, null)
3667
3671
  }
3668
- ) : /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
3672
+ ) : seeDays == true ? /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
3669
3673
  const dayEvents = filterEventsForDay(events, day);
3670
3674
  const isCurrentMonth = day.month() === currentDate.month();
3671
3675
  return /* @__PURE__ */ React28.createElement(
@@ -3756,7 +3760,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3756
3760
  )
3757
3761
  )
3758
3762
  );
3759
- })))), selectedDay && /* @__PURE__ */ React28.createElement(
3763
+ })) : null)), selectedDay && /* @__PURE__ */ React28.createElement(
3760
3764
  SCDrawer,
3761
3765
  {
3762
3766
  width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
@@ -3797,7 +3801,8 @@ var WeekView = ({
3797
3801
  onEventClick,
3798
3802
  onEventHover,
3799
3803
  startHour = 0,
3800
- endHour = 23
3804
+ endHour = 23,
3805
+ seeDays = false
3801
3806
  }) => {
3802
3807
  const noEvents = events.length === 0;
3803
3808
  const todayString = dayjs6().format("YYYY-MM-DD");
@@ -3841,7 +3846,7 @@ var WeekView = ({
3841
3846
  /* @__PURE__ */ React29.createElement(Typography15, { variant: "h6", color: "text.primary" }, day.format("D")),
3842
3847
  /* @__PURE__ */ React29.createElement(Typography15, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
3843
3848
  );
3844
- })), isLoading ? /* @__PURE__ */ React29.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React29.createElement(
3849
+ })), isLoading ? /* @__PURE__ */ React29.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && seeDays == false ? /* @__PURE__ */ React29.createElement(
3845
3850
  EmptyState,
3846
3851
  {
3847
3852
  containerHeight: "calc(100vh - 130px)",
@@ -3934,12 +3939,13 @@ var DayView = ({
3934
3939
  onEventClick,
3935
3940
  onEventHover,
3936
3941
  startHour = CALENDAR_CONSTANTS.DEFAULT_START_HOUR,
3937
- endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR
3942
+ endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
3943
+ seeDays
3938
3944
  }) => {
3939
3945
  const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
3940
3946
  const dayEvents = filterEventsForDay(events, currentDate);
3941
3947
  const noEvents = events.length === 0;
3942
- return /* @__PURE__ */ React30.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React30.createElement(Box18, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React30.createElement(Box18, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React30.createElement(Typography16, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React30.createElement(Typography16, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React30.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React30.createElement(CircularProgress4, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ React30.createElement(
3948
+ return /* @__PURE__ */ React30.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React30.createElement(Box18, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React30.createElement(Box18, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React30.createElement(Typography16, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React30.createElement(Typography16, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React30.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React30.createElement(CircularProgress4, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ React30.createElement(
3943
3949
  EmptyState,
3944
3950
  {
3945
3951
  containerHeight: "calc(100vh - 140px)",
@@ -4054,7 +4060,8 @@ var Calendar = ({
4054
4060
  toolbar,
4055
4061
  isLoading = false,
4056
4062
  startHour = CALENDAR_CONSTANTS.DEFAULT_START_HOUR,
4057
- endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR
4063
+ endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
4064
+ seeDays = false
4058
4065
  }) => {
4059
4066
  const [view, setView] = useState14(initialView);
4060
4067
  const { currentDate, navigateDate } = useCalendarNavigation(dayjs9(), onDateChange);
@@ -4103,7 +4110,8 @@ var Calendar = ({
4103
4110
  onDayClick,
4104
4111
  onMoreClick,
4105
4112
  onEventClick,
4106
- onEventHover
4113
+ onEventHover,
4114
+ seeDays
4107
4115
  }
4108
4116
  ), view === "week" && /* @__PURE__ */ React31.createElement(
4109
4117
  WeekView,
@@ -4115,7 +4123,8 @@ var Calendar = ({
4115
4123
  onEventClick,
4116
4124
  onEventHover,
4117
4125
  startHour,
4118
- endHour
4126
+ endHour,
4127
+ seeDays
4119
4128
  }
4120
4129
  ), view === "day" && /* @__PURE__ */ React31.createElement(
4121
4130
  DayView,
@@ -4125,7 +4134,8 @@ var Calendar = ({
4125
4134
  onEventClick,
4126
4135
  onEventHover,
4127
4136
  startHour,
4128
- endHour
4137
+ endHour,
4138
+ seeDays
4129
4139
  }
4130
4140
  )));
4131
4141
  };
@@ -4300,6 +4310,7 @@ function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
4300
4310
  // src/Components/MultiSelect/MultiSelect.tsx
4301
4311
  function MultiSelect({
4302
4312
  textButton,
4313
+ background,
4303
4314
  button,
4304
4315
  items,
4305
4316
  topPanel,
@@ -4369,6 +4380,7 @@ function MultiSelect({
4369
4380
  /* @__PURE__ */ React34.createElement(Stack12, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React34.createElement(Stack12, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React34.createElement(FormControl3, { fullWidth: true, size: "small" }, /* @__PURE__ */ React34.createElement(
4370
4381
  TextField4,
4371
4382
  {
4383
+ sx: { background: background ? background : "transparent" },
4372
4384
  "data-testid": "multiselect-input",
4373
4385
  fullWidth: true,
4374
4386
  size: "small",
@@ -4643,7 +4655,7 @@ var SCActivityCalendar = ({
4643
4655
  padding: "0px 16px"
4644
4656
  },
4645
4657
  fontSize: "12px !important",
4646
- height: "260px !important",
4658
+ height: "324px !important",
4647
4659
  background: background ? background : "white",
4648
4660
  "& .MuiDayCalendar-header": { justifyContent: "space-between" },
4649
4661
  "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
@@ -4653,7 +4665,7 @@ var SCActivityCalendar = ({
4653
4665
  },
4654
4666
  onChange: (newValue) => setFecha(newValue)
4655
4667
  }
4656
- ), /* @__PURE__ */ React38.createElement(Grid9, { container: true, justifyContent: "center" }, /* @__PURE__ */ React38.createElement(IconButton13, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React38.createElement(KeyboardDoubleArrowUpIcon, { color: "action" }))))), /* @__PURE__ */ React38.createElement(IconButton13, { onClick: handleClickPopoverFiltro, sx: { position: "fixed", right: "calc(100% - 96%)", top: openCalendar == false ? "220px" : "380px" } }, /* @__PURE__ */ React38.createElement(FilterListIcon, { color: "action" })), /* @__PURE__ */ React38.createElement(
4668
+ ), /* @__PURE__ */ React38.createElement(Grid9, { container: true, justifyContent: "center" }, /* @__PURE__ */ React38.createElement(IconButton13, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React38.createElement(KeyboardDoubleArrowUpIcon, { color: "action" }))))), /* @__PURE__ */ React38.createElement(IconButton13, { onClick: handleClickPopoverFiltro, sx: { position: "fixed", right: "calc(100% - 96%)", top: openCalendar == false ? "220px" : "444px" } }, /* @__PURE__ */ React38.createElement(FilterListIcon, { color: "action" })), /* @__PURE__ */ React38.createElement(
4657
4669
  Popover6,
4658
4670
  {
4659
4671
  open: openPopoverFiltro,
@@ -4929,7 +4941,7 @@ var SCCalendarSwipeable = ({
4929
4941
  padding: "0px 16px"
4930
4942
  },
4931
4943
  fontSize: "12px !important",
4932
- height: "260px !important",
4944
+ height: "324px !important",
4933
4945
  background: background ? background : "white",
4934
4946
  "& .MuiDayCalendar-header": { justifyContent: "space-between" },
4935
4947
  "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },