componentes-sinco 1.0.25 → 1.0.26

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
@@ -1,35 +1,11 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ComponentType, ReactNode } from 'react';
3
- import * as _mui_material from '@mui/material';
4
- import { SxProps } from '@mui/material';
5
3
  import * as Muicon from '@mui/icons-material';
6
4
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
5
+ import * as _mui_material from '@mui/material';
7
6
  import dayjs, { Dayjs } from 'dayjs';
8
7
  import * as _mui_material_styles from '@mui/material/styles';
9
8
 
10
- interface UploadedFile {
11
- name: string;
12
- size: number;
13
- type: string;
14
- progress: number;
15
- uploadError?: boolean;
16
- }
17
- interface AdjuntarProps<T> {
18
- sx?: SxProps;
19
- files?: T[];
20
- error?: boolean;
21
- compact?: boolean;
22
- maxSize?: number;
23
- fileAccepted?: string;
24
- onChange?: (archivos: File[]) => void;
25
- onLoading?: boolean;
26
- downloadAction?: (name: string) => void;
27
- deleteAction?: (name: string) => Promise<void> | void;
28
- initialFiles?: UploadedFile[];
29
- }
30
-
31
- declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, }: AdjuntarProps<any>) => React__default.JSX.Element;
32
-
33
9
  type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error" | any;
34
10
  type ReplyTextPalette = "primary" | "secondary" | "disabled";
35
11
  type ReplyVariants = "outlined" | "filled" | "standard";
@@ -104,8 +80,6 @@ interface DrawerProps<T> {
104
80
  anchor?: "left" | "right";
105
81
  width?: string;
106
82
  open?: boolean;
107
- setOpen?: any;
108
- chipFilters?: any[];
109
83
  }
110
84
 
111
85
  type ToastType = 'success' | 'error' | 'warning' | 'info';
@@ -132,7 +106,7 @@ declare const ToastProgress: (timeProgress: number) => {
132
106
  progressToast: number;
133
107
  };
134
108
 
135
- declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, }: DrawerProps<T>): React__default.JSX.Element;
109
+ declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, }: DrawerProps<T>): React__default.JSX.Element;
136
110
 
137
111
  interface FooterActionsProperties {
138
112
  label?: React.ReactNode;
@@ -190,9 +164,7 @@ declare const getIconComponent: (iconName?: string) => React.ElementType;
190
164
  declare const getModalColor: (state: string) => string;
191
165
  declare const getButtonColor: (state: string) => 'inherit' | 'info' | 'error' | 'warning';
192
166
 
193
- declare const SCModal: ({ buttonModal, state, open, setOpen, title, description, action, }: ModalProps & {
194
- setOpen?: React__default.Dispatch<React__default.SetStateAction<boolean>> | undefined;
195
- }) => React__default.JSX.Element;
167
+ declare const SCModal: ({ buttonModal, state, open, title, description, action, }: ModalProps) => React__default.JSX.Element;
196
168
 
197
169
  interface MultiSelectProps<T> {
198
170
  textButton?: string;
@@ -345,25 +317,18 @@ interface SCCalendarSwipeableProps {
345
317
  }
346
318
  declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
347
319
 
348
- interface SCDataGridInitialProps<T> {
349
- data: T[];
320
+ interface SCDataGridInitialProps {
321
+ data: any;
350
322
  columns: any;
323
+ groupColumns?: any;
351
324
  rowsTable?: number;
352
325
  checkboxSelection?: boolean;
353
326
  width?: string | number;
354
327
  maxHeight?: number;
355
328
  density?: "compact" | "standard" | "comfortable";
356
- groupColumns?: (item: any) => {
357
- textGroup1?: string;
358
- valueGroup1?: string;
359
- textGroup2?: string;
360
- valueGroup2?: string;
361
- headerNameFirstColumn?: string;
362
- fieldFirstColumn?: string;
363
- };
364
329
  }
365
- declare function SCDataGridInitial<T>({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps<T>): React__default.JSX.Element;
366
- declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
330
+ declare const SCDataGridInitial: ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element;
331
+ declare const SCDataGrid: React__default.MemoExoticComponent<({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element>;
367
332
 
368
333
  type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
369
334
  type EmptyStateSize = 'small' | 'large';
@@ -459,9 +424,10 @@ interface SCSelectProps<T> {
459
424
  width?: string;
460
425
  size?: "small" | "medium";
461
426
  variant?: "outlined" | "filled" | "standard";
462
- background?: string;
427
+ deleteType?: "button" | "icon";
463
428
  required?: boolean;
464
429
  disabled?: boolean;
430
+ background?: string;
465
431
  fnAplicar?: () => void | React__default.ReactNode;
466
432
  setState: React__default.Dispatch<React__default.SetStateAction<any>>;
467
433
  state: {
@@ -469,7 +435,7 @@ interface SCSelectProps<T> {
469
435
  textValue: string;
470
436
  };
471
437
  }
472
- declare function SCSelect<T>({ label, data, getItemValue, width, size, variant, background, required, disabled, setState, state, }: SCSelectProps<T>): React__default.JSX.Element;
438
+ declare function SCSelect<T>({ label, data, getItemValue, width, size, variant, deleteType, required, disabled, background, fnAplicar, setState, state, }: SCSelectProps<T>): React__default.JSX.Element;
473
439
 
474
440
  interface Option {
475
441
  name?: string;
@@ -497,7 +463,7 @@ interface CalendarEvent {
497
463
  title: string;
498
464
  start: dayjs.Dayjs;
499
465
  end: dayjs.Dayjs;
500
- state: 'En progreso' | 'Finalizada' | 'Vencida' | 'Asignada' | 'Aplazada' | 'Generada';
466
+ state: 'EnProgreso' | 'Finalizado' | 'Vencida' | 'Asignada';
501
467
  }
502
468
  interface CalendarProps {
503
469
  events: CalendarEvent[];
@@ -505,50 +471,14 @@ interface CalendarProps {
505
471
  toolbar?: React.ReactNode;
506
472
  onDayClick?: (date: dayjs.Dayjs) => void;
507
473
  onMoreClick?: (date: dayjs.Dayjs, events: CalendarEvent[]) => void;
508
- onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
509
474
  onViewChange?: (view: CalendarView) => void;
510
- onEventHover?: (event: CalendarEvent) => React.ReactNode;
511
- onNavigate?: (action: 'TODAY' | 'PREV' | 'NEXT') => void;
512
- isLoading?: boolean;
513
- startHour?: number;
514
- endHour?: number;
475
+ onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
515
476
  }
516
477
 
517
478
  declare const Calendar: React__default.FC<CalendarProps>;
518
479
 
519
- interface SCTimeProps {
520
- label?: string;
521
- required?: boolean;
522
- disabled?: boolean;
523
- background?: string;
524
- timeStep?: number;
525
- state: Dayjs | null;
526
- setState: (value: Dayjs | null) => void;
527
- }
528
- declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
529
-
530
- interface SCCardProps {
531
- title?: string;
532
- subtitle?: string;
533
- iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
534
- actionsTitle?: any;
535
- image?: any;
536
- content?: any;
537
- actions?: {
538
- text?: string;
539
- fn: () => void;
540
- disabled?: boolean;
541
- }[];
542
- expand?: {
543
- type?: 'icon' | 'text';
544
- position?: 'top' | 'bottom';
545
- content?: string;
546
- };
547
- }
548
- declare const SCCard: ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }: SCCardProps) => React__default.JSX.Element;
549
-
550
480
  declare const SincoTheme: _mui_material_styles.Theme;
551
481
  declare let AdproSincoTheme: _mui_material_styles.Theme;
552
482
  declare let ADCSincoTheme: _mui_material_styles.Theme;
553
483
 
554
- export { ADCSincoTheme, AdproSincoTheme, Attachment, 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 };
484
+ 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, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
package/dist/index.d.ts CHANGED
@@ -1,35 +1,11 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ComponentType, ReactNode } from 'react';
3
- import * as _mui_material from '@mui/material';
4
- import { SxProps } from '@mui/material';
5
3
  import * as Muicon from '@mui/icons-material';
6
4
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
5
+ import * as _mui_material from '@mui/material';
7
6
  import dayjs, { Dayjs } from 'dayjs';
8
7
  import * as _mui_material_styles from '@mui/material/styles';
9
8
 
10
- interface UploadedFile {
11
- name: string;
12
- size: number;
13
- type: string;
14
- progress: number;
15
- uploadError?: boolean;
16
- }
17
- interface AdjuntarProps<T> {
18
- sx?: SxProps;
19
- files?: T[];
20
- error?: boolean;
21
- compact?: boolean;
22
- maxSize?: number;
23
- fileAccepted?: string;
24
- onChange?: (archivos: File[]) => void;
25
- onLoading?: boolean;
26
- downloadAction?: (name: string) => void;
27
- deleteAction?: (name: string) => Promise<void> | void;
28
- initialFiles?: UploadedFile[];
29
- }
30
-
31
- declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, }: AdjuntarProps<any>) => React__default.JSX.Element;
32
-
33
9
  type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error" | any;
34
10
  type ReplyTextPalette = "primary" | "secondary" | "disabled";
35
11
  type ReplyVariants = "outlined" | "filled" | "standard";
@@ -104,8 +80,6 @@ interface DrawerProps<T> {
104
80
  anchor?: "left" | "right";
105
81
  width?: string;
106
82
  open?: boolean;
107
- setOpen?: any;
108
- chipFilters?: any[];
109
83
  }
110
84
 
111
85
  type ToastType = 'success' | 'error' | 'warning' | 'info';
@@ -132,7 +106,7 @@ declare const ToastProgress: (timeProgress: number) => {
132
106
  progressToast: number;
133
107
  };
134
108
 
135
- declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, }: DrawerProps<T>): React__default.JSX.Element;
109
+ declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, }: DrawerProps<T>): React__default.JSX.Element;
136
110
 
137
111
  interface FooterActionsProperties {
138
112
  label?: React.ReactNode;
@@ -190,9 +164,7 @@ declare const getIconComponent: (iconName?: string) => React.ElementType;
190
164
  declare const getModalColor: (state: string) => string;
191
165
  declare const getButtonColor: (state: string) => 'inherit' | 'info' | 'error' | 'warning';
192
166
 
193
- declare const SCModal: ({ buttonModal, state, open, setOpen, title, description, action, }: ModalProps & {
194
- setOpen?: React__default.Dispatch<React__default.SetStateAction<boolean>> | undefined;
195
- }) => React__default.JSX.Element;
167
+ declare const SCModal: ({ buttonModal, state, open, title, description, action, }: ModalProps) => React__default.JSX.Element;
196
168
 
197
169
  interface MultiSelectProps<T> {
198
170
  textButton?: string;
@@ -345,25 +317,18 @@ interface SCCalendarSwipeableProps {
345
317
  }
346
318
  declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
347
319
 
348
- interface SCDataGridInitialProps<T> {
349
- data: T[];
320
+ interface SCDataGridInitialProps {
321
+ data: any;
350
322
  columns: any;
323
+ groupColumns?: any;
351
324
  rowsTable?: number;
352
325
  checkboxSelection?: boolean;
353
326
  width?: string | number;
354
327
  maxHeight?: number;
355
328
  density?: "compact" | "standard" | "comfortable";
356
- groupColumns?: (item: any) => {
357
- textGroup1?: string;
358
- valueGroup1?: string;
359
- textGroup2?: string;
360
- valueGroup2?: string;
361
- headerNameFirstColumn?: string;
362
- fieldFirstColumn?: string;
363
- };
364
329
  }
365
- declare function SCDataGridInitial<T>({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps<T>): React__default.JSX.Element;
366
- declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
330
+ declare const SCDataGridInitial: ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element;
331
+ declare const SCDataGrid: React__default.MemoExoticComponent<({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element>;
367
332
 
368
333
  type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
369
334
  type EmptyStateSize = 'small' | 'large';
@@ -459,9 +424,10 @@ interface SCSelectProps<T> {
459
424
  width?: string;
460
425
  size?: "small" | "medium";
461
426
  variant?: "outlined" | "filled" | "standard";
462
- background?: string;
427
+ deleteType?: "button" | "icon";
463
428
  required?: boolean;
464
429
  disabled?: boolean;
430
+ background?: string;
465
431
  fnAplicar?: () => void | React__default.ReactNode;
466
432
  setState: React__default.Dispatch<React__default.SetStateAction<any>>;
467
433
  state: {
@@ -469,7 +435,7 @@ interface SCSelectProps<T> {
469
435
  textValue: string;
470
436
  };
471
437
  }
472
- declare function SCSelect<T>({ label, data, getItemValue, width, size, variant, background, required, disabled, setState, state, }: SCSelectProps<T>): React__default.JSX.Element;
438
+ declare function SCSelect<T>({ label, data, getItemValue, width, size, variant, deleteType, required, disabled, background, fnAplicar, setState, state, }: SCSelectProps<T>): React__default.JSX.Element;
473
439
 
474
440
  interface Option {
475
441
  name?: string;
@@ -497,7 +463,7 @@ interface CalendarEvent {
497
463
  title: string;
498
464
  start: dayjs.Dayjs;
499
465
  end: dayjs.Dayjs;
500
- state: 'En progreso' | 'Finalizada' | 'Vencida' | 'Asignada' | 'Aplazada' | 'Generada';
466
+ state: 'EnProgreso' | 'Finalizado' | 'Vencida' | 'Asignada';
501
467
  }
502
468
  interface CalendarProps {
503
469
  events: CalendarEvent[];
@@ -505,50 +471,14 @@ interface CalendarProps {
505
471
  toolbar?: React.ReactNode;
506
472
  onDayClick?: (date: dayjs.Dayjs) => void;
507
473
  onMoreClick?: (date: dayjs.Dayjs, events: CalendarEvent[]) => void;
508
- onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
509
474
  onViewChange?: (view: CalendarView) => void;
510
- onEventHover?: (event: CalendarEvent) => React.ReactNode;
511
- onNavigate?: (action: 'TODAY' | 'PREV' | 'NEXT') => void;
512
- isLoading?: boolean;
513
- startHour?: number;
514
- endHour?: number;
475
+ onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
515
476
  }
516
477
 
517
478
  declare const Calendar: React__default.FC<CalendarProps>;
518
479
 
519
- interface SCTimeProps {
520
- label?: string;
521
- required?: boolean;
522
- disabled?: boolean;
523
- background?: string;
524
- timeStep?: number;
525
- state: Dayjs | null;
526
- setState: (value: Dayjs | null) => void;
527
- }
528
- declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
529
-
530
- interface SCCardProps {
531
- title?: string;
532
- subtitle?: string;
533
- iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
534
- actionsTitle?: any;
535
- image?: any;
536
- content?: any;
537
- actions?: {
538
- text?: string;
539
- fn: () => void;
540
- disabled?: boolean;
541
- }[];
542
- expand?: {
543
- type?: 'icon' | 'text';
544
- position?: 'top' | 'bottom';
545
- content?: string;
546
- };
547
- }
548
- declare const SCCard: ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }: SCCardProps) => React__default.JSX.Element;
549
-
550
480
  declare const SincoTheme: _mui_material_styles.Theme;
551
481
  declare let AdproSincoTheme: _mui_material_styles.Theme;
552
482
  declare let ADCSincoTheme: _mui_material_styles.Theme;
553
483
 
554
- export { ADCSincoTheme, AdproSincoTheme, Attachment, 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 };
484
+ 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, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };