componentes-sinco 1.0.8 → 1.0.9
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 +95 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +94 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -501,8 +501,28 @@ interface SCTimeProps {
|
|
|
501
501
|
}
|
|
502
502
|
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
|
|
503
503
|
|
|
504
|
+
interface SCCardProps {
|
|
505
|
+
title?: string;
|
|
506
|
+
subtitle?: string;
|
|
507
|
+
iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
|
|
508
|
+
actionsTitle?: any;
|
|
509
|
+
image?: any;
|
|
510
|
+
content?: any;
|
|
511
|
+
actions?: {
|
|
512
|
+
text?: string;
|
|
513
|
+
fn: () => void;
|
|
514
|
+
disabled?: boolean;
|
|
515
|
+
}[];
|
|
516
|
+
expand?: {
|
|
517
|
+
type?: 'icon' | 'text';
|
|
518
|
+
position?: 'top' | 'bottom';
|
|
519
|
+
content?: string;
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
declare const SCCard: ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }: SCCardProps) => React__default.JSX.Element;
|
|
523
|
+
|
|
504
524
|
declare const SincoTheme: _mui_material_styles.Theme;
|
|
505
525
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
506
526
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
507
527
|
|
|
508
|
-
export { ADCSincoTheme, AdproSincoTheme, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCAutocomplete, SCCalendarSwipeable, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
528
|
+
export { ADCSincoTheme, AdproSincoTheme, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.d.ts
CHANGED
|
@@ -501,8 +501,28 @@ interface SCTimeProps {
|
|
|
501
501
|
}
|
|
502
502
|
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
|
|
503
503
|
|
|
504
|
+
interface SCCardProps {
|
|
505
|
+
title?: string;
|
|
506
|
+
subtitle?: string;
|
|
507
|
+
iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
|
|
508
|
+
actionsTitle?: any;
|
|
509
|
+
image?: any;
|
|
510
|
+
content?: any;
|
|
511
|
+
actions?: {
|
|
512
|
+
text?: string;
|
|
513
|
+
fn: () => void;
|
|
514
|
+
disabled?: boolean;
|
|
515
|
+
}[];
|
|
516
|
+
expand?: {
|
|
517
|
+
type?: 'icon' | 'text';
|
|
518
|
+
position?: 'top' | 'bottom';
|
|
519
|
+
content?: string;
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
declare const SCCard: ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }: SCCardProps) => React__default.JSX.Element;
|
|
523
|
+
|
|
504
524
|
declare const SincoTheme: _mui_material_styles.Theme;
|
|
505
525
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
506
526
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
507
527
|
|
|
508
|
-
export { ADCSincoTheme, AdproSincoTheme, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCAutocomplete, SCCalendarSwipeable, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
528
|
+
export { ADCSincoTheme, AdproSincoTheme, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.js
CHANGED
|
@@ -2841,7 +2841,6 @@ var CalendarToolbar = ({
|
|
|
2841
2841
|
};
|
|
2842
2842
|
const getFormattedDate = () => {
|
|
2843
2843
|
const sunday = labelDate.day(0);
|
|
2844
|
-
const saturday = sunday.add(6, "day");
|
|
2845
2844
|
if (view === "month") {
|
|
2846
2845
|
const textMonth = labelDate.format("MMMM YYYY");
|
|
2847
2846
|
return textMonth.charAt(0).toUpperCase() + textMonth.slice(1);
|
|
@@ -2976,7 +2975,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2976
2975
|
onMouseEnter: handlePopoverOpen,
|
|
2977
2976
|
onMouseLeave: handlePopoverClose
|
|
2978
2977
|
},
|
|
2979
|
-
|
|
2978
|
+
event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
|
|
2980
2979
|
),
|
|
2981
2980
|
/* @__PURE__ */ React21.createElement(
|
|
2982
2981
|
Popover4,
|
|
@@ -2996,7 +2995,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2996
2995
|
onClose: handlePopoverClose,
|
|
2997
2996
|
disableRestoreFocus: true
|
|
2998
2997
|
},
|
|
2999
|
-
onHover ? onHover(event2) :
|
|
2998
|
+
onHover ? onHover(event2) : " "
|
|
3000
2999
|
)
|
|
3001
3000
|
)
|
|
3002
3001
|
);
|
|
@@ -3412,9 +3411,15 @@ var Calendar = ({
|
|
|
3412
3411
|
const handleNavigate = (action) => {
|
|
3413
3412
|
let newDate = currentDate;
|
|
3414
3413
|
const unit = view === "month" ? "month" : "day";
|
|
3415
|
-
if (action === "PREV")
|
|
3416
|
-
|
|
3417
|
-
|
|
3414
|
+
if (action === "PREV") {
|
|
3415
|
+
if (view === "day") newDate = currentDate.subtract(1, "day");
|
|
3416
|
+
if (view === "week") newDate = currentDate.subtract(1, "week");
|
|
3417
|
+
if (view === "month") newDate = currentDate.subtract(1, "month");
|
|
3418
|
+
} else if (action === "NEXT") {
|
|
3419
|
+
if (view === "day") newDate = currentDate.add(1, "day");
|
|
3420
|
+
if (view === "week") newDate = currentDate.add(1, "week");
|
|
3421
|
+
if (view === "month") newDate = currentDate.add(1, "month");
|
|
3422
|
+
} else if (action === "TODAY") newDate = dayjs7();
|
|
3418
3423
|
setCurrentDate(newDate);
|
|
3419
3424
|
};
|
|
3420
3425
|
return /* @__PURE__ */ React25.createElement(Box19, null, /* @__PURE__ */ React25.createElement(
|
|
@@ -3618,11 +3623,88 @@ var SCTime = ({
|
|
|
3618
3623
|
)));
|
|
3619
3624
|
};
|
|
3620
3625
|
|
|
3626
|
+
// src/Components/SCCard.tsx
|
|
3627
|
+
import React27 from "react";
|
|
3628
|
+
import { Button as Button11, Box as Box21, SvgIcon as SvgIcon8 } from "@mui/material";
|
|
3629
|
+
import IconButton11 from "@mui/material/IconButton";
|
|
3630
|
+
import Card from "@mui/material/Card";
|
|
3631
|
+
import CardHeader from "@mui/material/CardHeader";
|
|
3632
|
+
import CardMedia from "@mui/material/CardMedia";
|
|
3633
|
+
import CardContent from "@mui/material/CardContent";
|
|
3634
|
+
import CardActions from "@mui/material/CardActions";
|
|
3635
|
+
import Collapse from "@mui/material/Collapse";
|
|
3636
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
3637
|
+
import * as Muicon8 from "@mui/icons-material";
|
|
3638
|
+
var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
3639
|
+
let iconTitleValidation = "";
|
|
3640
|
+
let IconTitle;
|
|
3641
|
+
const [expanded, setExpanded] = React27.useState(false);
|
|
3642
|
+
if (iconTitle) {
|
|
3643
|
+
if (Muicon8[iconTitle] == void 0) {
|
|
3644
|
+
if (iconTitle && React27.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
3645
|
+
iconTitleValidation = "image";
|
|
3646
|
+
IconTitle = iconTitle;
|
|
3647
|
+
} else {
|
|
3648
|
+
iconTitleValidation = "icon";
|
|
3649
|
+
IconTitle = iconTitle;
|
|
3650
|
+
}
|
|
3651
|
+
} else {
|
|
3652
|
+
iconTitleValidation = "icon";
|
|
3653
|
+
IconTitle = Muicon8[iconTitle];
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
const handleExpandClick = () => {
|
|
3657
|
+
setExpanded(!expanded);
|
|
3658
|
+
};
|
|
3659
|
+
return /* @__PURE__ */ React27.createElement(Card, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ React27.createElement(
|
|
3660
|
+
CardHeader,
|
|
3661
|
+
{
|
|
3662
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React27.createElement(Box21, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React27.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React27.createElement(SvgIcon8, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
3663
|
+
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React27.createElement(Button11, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React27.createElement(IconButton11, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React27.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
|
|
3664
|
+
title,
|
|
3665
|
+
subheader: subtitle,
|
|
3666
|
+
sx: {
|
|
3667
|
+
"& .MuiCardHeader-title": {
|
|
3668
|
+
fontSize: "14px",
|
|
3669
|
+
color: "text.primary"
|
|
3670
|
+
},
|
|
3671
|
+
"& .MuiCardHeader-subheader": {
|
|
3672
|
+
fontSize: "13px",
|
|
3673
|
+
color: "text.secondary"
|
|
3674
|
+
},
|
|
3675
|
+
"& .MuiCardHeader-action": {
|
|
3676
|
+
height: "40px !important",
|
|
3677
|
+
display: "flex",
|
|
3678
|
+
alignItems: "center"
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3682
|
+
), image && /* @__PURE__ */ React27.createElement(
|
|
3683
|
+
CardMedia,
|
|
3684
|
+
{
|
|
3685
|
+
component: "img",
|
|
3686
|
+
height: "194",
|
|
3687
|
+
image
|
|
3688
|
+
}
|
|
3689
|
+
), content && /* @__PURE__ */ React27.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React27.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React27.createElement(Button11, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React27.createElement(IconButton11, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React27.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React27.createElement(
|
|
3690
|
+
Button11,
|
|
3691
|
+
{
|
|
3692
|
+
key: index,
|
|
3693
|
+
size: "small",
|
|
3694
|
+
color: action.color || "primary",
|
|
3695
|
+
variant: action.variant || "text",
|
|
3696
|
+
onClick: action.fn,
|
|
3697
|
+
disabled: action.disabled || false
|
|
3698
|
+
},
|
|
3699
|
+
action.text
|
|
3700
|
+
)) : ""), expand && /* @__PURE__ */ React27.createElement(Collapse, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React27.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
3701
|
+
};
|
|
3702
|
+
|
|
3621
3703
|
// src/Theme/index.ts
|
|
3622
3704
|
import { createTheme } from "@mui/material/styles";
|
|
3623
3705
|
|
|
3624
3706
|
// src/Theme/components.ts
|
|
3625
|
-
import
|
|
3707
|
+
import React28 from "react";
|
|
3626
3708
|
import {
|
|
3627
3709
|
InfoRounded as InfoRounded2,
|
|
3628
3710
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -4325,10 +4407,10 @@ var components = {
|
|
|
4325
4407
|
MuiAlert: {
|
|
4326
4408
|
defaultProps: {
|
|
4327
4409
|
iconMapping: {
|
|
4328
|
-
success:
|
|
4329
|
-
error:
|
|
4330
|
-
warning:
|
|
4331
|
-
info:
|
|
4410
|
+
success: React28.createElement(CheckCircleRounded2),
|
|
4411
|
+
error: React28.createElement(ErrorRounded2),
|
|
4412
|
+
warning: React28.createElement(WarningRounded2),
|
|
4413
|
+
info: React28.createElement(InfoRounded2)
|
|
4332
4414
|
}
|
|
4333
4415
|
},
|
|
4334
4416
|
variants: [
|
|
@@ -5376,6 +5458,7 @@ export {
|
|
|
5376
5458
|
PageHeader,
|
|
5377
5459
|
SCAutocomplete,
|
|
5378
5460
|
SCCalendarSwipeable,
|
|
5461
|
+
SCCard,
|
|
5379
5462
|
SCDataGrid,
|
|
5380
5463
|
SCDataGridInitial,
|
|
5381
5464
|
SCDateRange,
|