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.cjs +36 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +36 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2375,7 +2375,7 @@ function SCSelect({
|
|
|
2375
2375
|
width = "100%",
|
|
2376
2376
|
size = "small",
|
|
2377
2377
|
variant = "outlined",
|
|
2378
|
-
background
|
|
2378
|
+
background,
|
|
2379
2379
|
required,
|
|
2380
2380
|
disabled,
|
|
2381
2381
|
setState,
|
|
@@ -2430,7 +2430,8 @@ function SCSelect({
|
|
|
2430
2430
|
{
|
|
2431
2431
|
fullWidth: true,
|
|
2432
2432
|
size: size ? size : "medium",
|
|
2433
|
-
variant
|
|
2433
|
+
variant,
|
|
2434
|
+
sx: { background: background ? background : "transparent" }
|
|
2434
2435
|
},
|
|
2435
2436
|
/* @__PURE__ */ import_react18.default.createElement(
|
|
2436
2437
|
import_material12.InputLabel,
|
|
@@ -2449,6 +2450,7 @@ function SCSelect({
|
|
|
2449
2450
|
variant,
|
|
2450
2451
|
disabled: disabled || false,
|
|
2451
2452
|
error,
|
|
2453
|
+
sx: { height: "32px" },
|
|
2452
2454
|
MenuProps: {
|
|
2453
2455
|
sx: {
|
|
2454
2456
|
zIndex: 1400
|
|
@@ -3088,16 +3090,18 @@ var SCDateRange = ({
|
|
|
3088
3090
|
},
|
|
3089
3091
|
sx: {
|
|
3090
3092
|
flex: 1,
|
|
3091
|
-
"& .
|
|
3092
|
-
|
|
3093
|
+
"& .MuiPickersOutlinedInput-root": {
|
|
3094
|
+
height: "32px",
|
|
3095
|
+
backgroundColor: background != null ? background : "transparent"
|
|
3096
|
+
},
|
|
3097
|
+
"& .MuiPickersInputBase-sectionsContainer": {
|
|
3098
|
+
height: "32px",
|
|
3099
|
+
padding: "0px 8px",
|
|
3100
|
+
alignItems: "center"
|
|
3093
3101
|
},
|
|
3094
3102
|
"& .MuiInputLabel-asterisk": {
|
|
3095
3103
|
color: "error.main"
|
|
3096
|
-
}
|
|
3097
|
-
"& .MuiPickersOutlinedInput-sectionsContainer": {
|
|
3098
|
-
padding: "6px 0px"
|
|
3099
|
-
},
|
|
3100
|
-
background: background != null ? background : "transparent"
|
|
3104
|
+
}
|
|
3101
3105
|
}
|
|
3102
3106
|
};
|
|
3103
3107
|
}
|
|
@@ -3736,14 +3740,14 @@ var clampEventToVisibleRange = (event2, currentDate, startHour, endHour) => {
|
|
|
3736
3740
|
|
|
3737
3741
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
3738
3742
|
import_dayjs5.default.extend(import_localeData.default);
|
|
3739
|
-
var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover }) => {
|
|
3743
|
+
var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover, seeDays = false }) => {
|
|
3740
3744
|
const noEvents = events.length === 0;
|
|
3741
3745
|
const days = getMonthDays(currentDate);
|
|
3742
3746
|
const weekDays = Array.from({ length: 7 }, (_, i) => (0, import_dayjs5.default)().day(i));
|
|
3743
3747
|
const [openDrawer, setOpenDrawer] = import_react32.default.useState(false);
|
|
3744
3748
|
const [selectedDay, setSelectedDay] = import_react32.default.useState(null);
|
|
3745
3749
|
const [selectedEvents, setSelectedEvents] = import_react32.default.useState([]);
|
|
3746
|
-
return /* @__PURE__ */ import_react32.default.createElement(import_react32.default.Fragment, null, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react32.default.createElement(import_material21.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) :
|
|
3750
|
+
return /* @__PURE__ */ import_react32.default.createElement(import_react32.default.Fragment, null, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react32.default.createElement(import_material21.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ import_react32.default.createElement(
|
|
3747
3751
|
EmptyState,
|
|
3748
3752
|
{
|
|
3749
3753
|
containerHeight: "calc(100vh - 130px)",
|
|
@@ -3751,7 +3755,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3751
3755
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3752
3756
|
icon: /* @__PURE__ */ import_react32.default.createElement(LogoCalendario, null)
|
|
3753
3757
|
}
|
|
3754
|
-
) : /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
|
|
3758
|
+
) : seeDays == true ? /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
|
|
3755
3759
|
const dayEvents = filterEventsForDay(events, day);
|
|
3756
3760
|
const isCurrentMonth = day.month() === currentDate.month();
|
|
3757
3761
|
return /* @__PURE__ */ import_react32.default.createElement(
|
|
@@ -3842,7 +3846,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3842
3846
|
)
|
|
3843
3847
|
)
|
|
3844
3848
|
);
|
|
3845
|
-
})))), selectedDay && /* @__PURE__ */ import_react32.default.createElement(
|
|
3849
|
+
})) : null)), selectedDay && /* @__PURE__ */ import_react32.default.createElement(
|
|
3846
3850
|
SCDrawer,
|
|
3847
3851
|
{
|
|
3848
3852
|
width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
|
|
@@ -3883,7 +3887,8 @@ var WeekView = ({
|
|
|
3883
3887
|
onEventClick,
|
|
3884
3888
|
onEventHover,
|
|
3885
3889
|
startHour = 0,
|
|
3886
|
-
endHour = 23
|
|
3890
|
+
endHour = 23,
|
|
3891
|
+
seeDays = false
|
|
3887
3892
|
}) => {
|
|
3888
3893
|
const noEvents = events.length === 0;
|
|
3889
3894
|
const todayString = (0, import_dayjs6.default)().format("YYYY-MM-DD");
|
|
@@ -3927,7 +3932,7 @@ var WeekView = ({
|
|
|
3927
3932
|
/* @__PURE__ */ import_react33.default.createElement(import_material22.Typography, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3928
3933
|
/* @__PURE__ */ import_react33.default.createElement(import_material22.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3929
3934
|
);
|
|
3930
|
-
})), isLoading ? /* @__PURE__ */ import_react33.default.createElement(import_material22.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react33.default.createElement(import_material22.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading &&
|
|
3935
|
+
})), isLoading ? /* @__PURE__ */ import_react33.default.createElement(import_material22.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react33.default.createElement(import_material22.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && seeDays == false ? /* @__PURE__ */ import_react33.default.createElement(
|
|
3931
3936
|
EmptyState,
|
|
3932
3937
|
{
|
|
3933
3938
|
containerHeight: "calc(100vh - 130px)",
|
|
@@ -4020,12 +4025,13 @@ var DayView = ({
|
|
|
4020
4025
|
onEventClick,
|
|
4021
4026
|
onEventHover,
|
|
4022
4027
|
startHour = CALENDAR_CONSTANTS.DEFAULT_START_HOUR,
|
|
4023
|
-
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR
|
|
4028
|
+
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
|
|
4029
|
+
seeDays
|
|
4024
4030
|
}) => {
|
|
4025
4031
|
const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
|
|
4026
4032
|
const dayEvents = filterEventsForDay(events, currentDate);
|
|
4027
4033
|
const noEvents = events.length === 0;
|
|
4028
|
-
return /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Typography, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ import_react34.default.createElement(import_material23.Typography, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react34.default.createElement(import_material23.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) :
|
|
4034
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Typography, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ import_react34.default.createElement(import_material23.Typography, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react34.default.createElement(import_material23.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ import_react34.default.createElement(
|
|
4029
4035
|
EmptyState,
|
|
4030
4036
|
{
|
|
4031
4037
|
containerHeight: "calc(100vh - 140px)",
|
|
@@ -4140,7 +4146,8 @@ var Calendar = ({
|
|
|
4140
4146
|
toolbar,
|
|
4141
4147
|
isLoading = false,
|
|
4142
4148
|
startHour = CALENDAR_CONSTANTS.DEFAULT_START_HOUR,
|
|
4143
|
-
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR
|
|
4149
|
+
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
|
|
4150
|
+
seeDays = false
|
|
4144
4151
|
}) => {
|
|
4145
4152
|
const [view, setView] = (0, import_react36.useState)(initialView);
|
|
4146
4153
|
const { currentDate, navigateDate } = useCalendarNavigation((0, import_dayjs9.default)(), onDateChange);
|
|
@@ -4189,7 +4196,8 @@ var Calendar = ({
|
|
|
4189
4196
|
onDayClick,
|
|
4190
4197
|
onMoreClick,
|
|
4191
4198
|
onEventClick,
|
|
4192
|
-
onEventHover
|
|
4199
|
+
onEventHover,
|
|
4200
|
+
seeDays
|
|
4193
4201
|
}
|
|
4194
4202
|
), view === "week" && /* @__PURE__ */ import_react36.default.createElement(
|
|
4195
4203
|
WeekView,
|
|
@@ -4201,7 +4209,8 @@ var Calendar = ({
|
|
|
4201
4209
|
onEventClick,
|
|
4202
4210
|
onEventHover,
|
|
4203
4211
|
startHour,
|
|
4204
|
-
endHour
|
|
4212
|
+
endHour,
|
|
4213
|
+
seeDays
|
|
4205
4214
|
}
|
|
4206
4215
|
), view === "day" && /* @__PURE__ */ import_react36.default.createElement(
|
|
4207
4216
|
DayView,
|
|
@@ -4211,7 +4220,8 @@ var Calendar = ({
|
|
|
4211
4220
|
onEventClick,
|
|
4212
4221
|
onEventHover,
|
|
4213
4222
|
startHour,
|
|
4214
|
-
endHour
|
|
4223
|
+
endHour,
|
|
4224
|
+
seeDays
|
|
4215
4225
|
}
|
|
4216
4226
|
)));
|
|
4217
4227
|
};
|
|
@@ -4386,6 +4396,7 @@ function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
|
|
|
4386
4396
|
// src/Components/MultiSelect/MultiSelect.tsx
|
|
4387
4397
|
function MultiSelect({
|
|
4388
4398
|
textButton,
|
|
4399
|
+
background,
|
|
4389
4400
|
button,
|
|
4390
4401
|
items,
|
|
4391
4402
|
topPanel,
|
|
@@ -4455,6 +4466,7 @@ function MultiSelect({
|
|
|
4455
4466
|
/* @__PURE__ */ import_react41.default.createElement(import_material27.Stack, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ import_react41.default.createElement(import_material27.Stack, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ import_react41.default.createElement(import_material27.FormControl, { fullWidth: true, size: "small" }, /* @__PURE__ */ import_react41.default.createElement(
|
|
4456
4467
|
import_material27.TextField,
|
|
4457
4468
|
{
|
|
4469
|
+
sx: { background: background ? background : "transparent" },
|
|
4458
4470
|
"data-testid": "multiselect-input",
|
|
4459
4471
|
fullWidth: true,
|
|
4460
4472
|
size: "small",
|
|
@@ -4729,7 +4741,7 @@ var SCActivityCalendar = ({
|
|
|
4729
4741
|
padding: "0px 16px"
|
|
4730
4742
|
},
|
|
4731
4743
|
fontSize: "12px !important",
|
|
4732
|
-
height: "
|
|
4744
|
+
height: "324px !important",
|
|
4733
4745
|
background: background ? background : "white",
|
|
4734
4746
|
"& .MuiDayCalendar-header": { justifyContent: "space-between" },
|
|
4735
4747
|
"& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
|
|
@@ -4739,7 +4751,7 @@ var SCActivityCalendar = ({
|
|
|
4739
4751
|
},
|
|
4740
4752
|
onChange: (newValue) => setFecha(newValue)
|
|
4741
4753
|
}
|
|
4742
|
-
), /* @__PURE__ */ import_react45.default.createElement(import_Grid6.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react45.default.createElement(import_material31.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react45.default.createElement(import_KeyboardDoubleArrowUp.default, { color: "action" }))))), /* @__PURE__ */ import_react45.default.createElement(import_material31.IconButton, { onClick: handleClickPopoverFiltro, sx: { position: "fixed", right: "calc(100% - 96%)", top: openCalendar == false ? "220px" : "
|
|
4754
|
+
), /* @__PURE__ */ import_react45.default.createElement(import_Grid6.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react45.default.createElement(import_material31.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react45.default.createElement(import_KeyboardDoubleArrowUp.default, { color: "action" }))))), /* @__PURE__ */ import_react45.default.createElement(import_material31.IconButton, { onClick: handleClickPopoverFiltro, sx: { position: "fixed", right: "calc(100% - 96%)", top: openCalendar == false ? "220px" : "444px" } }, /* @__PURE__ */ import_react45.default.createElement(import_FilterList.default, { color: "action" })), /* @__PURE__ */ import_react45.default.createElement(
|
|
4743
4755
|
import_material31.Popover,
|
|
4744
4756
|
{
|
|
4745
4757
|
open: openPopoverFiltro,
|
|
@@ -5015,7 +5027,7 @@ var SCCalendarSwipeable = ({
|
|
|
5015
5027
|
padding: "0px 16px"
|
|
5016
5028
|
},
|
|
5017
5029
|
fontSize: "12px !important",
|
|
5018
|
-
height: "
|
|
5030
|
+
height: "324px !important",
|
|
5019
5031
|
background: background ? background : "white",
|
|
5020
5032
|
"& .MuiDayCalendar-header": { justifyContent: "space-between" },
|
|
5021
5033
|
"& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
|