componentes-sinco 1.0.39 → 1.0.40

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
@@ -666,8 +666,19 @@ interface AttachmentMobileProps<T> {
666
666
 
667
667
  declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, children, onChange, sx }: AttachmentMobileProps<any>) => React__default.JSX.Element;
668
668
 
669
+ interface SCSnackBarProps {
670
+ type?: 'success' | 'error' | 'warning' | 'info';
671
+ close?: boolean;
672
+ openState: boolean;
673
+ setOpenState: any;
674
+ mensaje: string;
675
+ duration?: number;
676
+ position?: 'Center' | 'Left-Up' | 'Left-Down' | 'Right-Up' | 'Right-Down';
677
+ }
678
+ declare const SCSnackBar: ({ type, close, openState, setOpenState, mensaje, duration, position }: SCSnackBarProps) => React__default.JSX.Element;
679
+
669
680
  declare const SincoTheme: _mui_material_styles.Theme;
670
681
  declare let AdproSincoTheme: _mui_material_styles.Theme;
671
682
  declare let ADCSincoTheme: _mui_material_styles.Theme;
672
683
 
673
- export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
684
+ export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
package/dist/index.d.ts CHANGED
@@ -666,8 +666,19 @@ interface AttachmentMobileProps<T> {
666
666
 
667
667
  declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, children, onChange, sx }: AttachmentMobileProps<any>) => React__default.JSX.Element;
668
668
 
669
+ interface SCSnackBarProps {
670
+ type?: 'success' | 'error' | 'warning' | 'info';
671
+ close?: boolean;
672
+ openState: boolean;
673
+ setOpenState: any;
674
+ mensaje: string;
675
+ duration?: number;
676
+ position?: 'Center' | 'Left-Up' | 'Left-Down' | 'Right-Up' | 'Right-Down';
677
+ }
678
+ declare const SCSnackBar: ({ type, close, openState, setOpenState, mensaje, duration, position }: SCSnackBarProps) => React__default.JSX.Element;
679
+
669
680
  declare const SincoTheme: _mui_material_styles.Theme;
670
681
  declare let AdproSincoTheme: _mui_material_styles.Theme;
671
682
  declare let ADCSincoTheme: _mui_material_styles.Theme;
672
683
 
673
- export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
684
+ export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
package/dist/index.js CHANGED
@@ -5268,11 +5268,55 @@ var AttachmentMobile = ({
5268
5268
  ));
5269
5269
  };
5270
5270
 
5271
+ // src/Components/SCSnackbar.tsx
5272
+ import React45 from "react";
5273
+ import MuiAlert from "@mui/material/Alert";
5274
+ import "dayjs/locale/es";
5275
+ import Button18 from "@mui/material/Button";
5276
+ import Snackbar from "@mui/material/Snackbar";
5277
+ var SCSnackBar = ({
5278
+ type = "success",
5279
+ close = true,
5280
+ openState,
5281
+ setOpenState,
5282
+ mensaje,
5283
+ duration = 3e3,
5284
+ position = "Center"
5285
+ }) => {
5286
+ const posicionVertical = position == "Center" ? "bottom" : position.split("-")[1] == "Up" ? "top" : "bottom";
5287
+ const posicionHorizontal = position == "Center" ? "center" : position.split("-")[0] == "Left" ? "left" : "right";
5288
+ const handleClick = () => {
5289
+ setOpenState(true);
5290
+ };
5291
+ const handleClose = (event2, reason) => {
5292
+ if (reason === "clickaway") {
5293
+ return;
5294
+ }
5295
+ setOpenState(false);
5296
+ };
5297
+ return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(Button18, { onClick: handleClick }, "Open Snackbar"), /* @__PURE__ */ React45.createElement(
5298
+ Snackbar,
5299
+ __spreadValues({
5300
+ anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
5301
+ open: openState,
5302
+ autoHideDuration: duration
5303
+ }, close ? { onClose: handleClose } : {}),
5304
+ /* @__PURE__ */ React45.createElement(
5305
+ MuiAlert,
5306
+ __spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
5307
+ severity: type,
5308
+ sx: { backgroundColor: type == "success" ? "success.50" : type == "error" ? "#F9E8E8" : type == "warning" ? "#FFF0E0" : "#E6F3F8" }
5309
+ }),
5310
+ mensaje
5311
+ )
5312
+ ));
5313
+ };
5314
+
5271
5315
  // src/Theme/index.ts
5272
5316
  import { createTheme } from "@mui/material/styles";
5273
5317
 
5274
5318
  // src/Theme/components.ts
5275
- import React45 from "react";
5319
+ import React46 from "react";
5276
5320
  import {
5277
5321
  InfoRounded as InfoRounded2,
5278
5322
  CheckCircleRounded as CheckCircleRounded2,
@@ -5975,10 +6019,10 @@ var components = {
5975
6019
  MuiAlert: {
5976
6020
  defaultProps: {
5977
6021
  iconMapping: {
5978
- success: React45.createElement(CheckCircleRounded2),
5979
- error: React45.createElement(ErrorRounded2),
5980
- warning: React45.createElement(WarningRounded2),
5981
- info: React45.createElement(InfoRounded2)
6022
+ success: React46.createElement(CheckCircleRounded2),
6023
+ error: React46.createElement(ErrorRounded2),
6024
+ warning: React46.createElement(WarningRounded2),
6025
+ info: React46.createElement(InfoRounded2)
5982
6026
  }
5983
6027
  },
5984
6028
  variants: [
@@ -7042,6 +7086,7 @@ export {
7042
7086
  SCMenu,
7043
7087
  SCModal,
7044
7088
  SCSelect,
7089
+ SCSnackBar,
7045
7090
  SCTabs,
7046
7091
  SCTextArea,
7047
7092
  SCTextField,