componentes-sinco 1.0.1-rc.8 → 1.0.1-rc.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 CHANGED
@@ -57,8 +57,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
57
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
58
 
59
59
  // src/index.ts
60
- var index_exports = {};
61
- __export(index_exports, {
60
+ var src_exports = {};
61
+ __export(src_exports, {
62
62
  ADCSincoTheme: () => ADCSincoTheme,
63
63
  AdproSincoTheme: () => AdproSincoTheme,
64
64
  FooterAction: () => FooterAction,
@@ -88,7 +88,7 @@ __export(index_exports, {
88
88
  useMultiSelectHandlers: () => useMultiSelectHandlers,
89
89
  useProgress: () => useProgress
90
90
  });
91
- module.exports = __toCommonJS(index_exports);
91
+ module.exports = __toCommonJS(src_exports);
92
92
 
93
93
  // src/Components/Drawer/SCDrawer.tsx
94
94
  var import_react5 = __toESM(require("react"), 1);
@@ -0,0 +1,361 @@
1
+ import * as React$1 from 'react';
2
+ import React__default, { ComponentType } from 'react';
3
+ import * as Muicon from '@mui/icons-material';
4
+ import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
5
+ import * as _mui_material from '@mui/material';
6
+ import * as _mui_material_styles from '@mui/material/styles';
7
+
8
+ type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error";
9
+ type ReplyTextPalette = "primary" | "secondary" | "disabled";
10
+ type ReplyVariants = "outlined" | "filled" | "standard";
11
+ type RepplyButtonVariants = "text" | "contained" | "outlined";
12
+
13
+ declare function capitalize(text: string): string;
14
+
15
+ interface ArrayElement {
16
+ type?: 'textField' | 'textArea';
17
+ title?: string;
18
+ iconTitle?: keyof typeof Muicon;
19
+ infoTitle?: {
20
+ text?: string;
21
+ component?: "tooltip" | "popover";
22
+ };
23
+ label?: string;
24
+ placeholder?: string;
25
+ infoElement?: {
26
+ text?: string;
27
+ component?: "tooltip" | "popover";
28
+ };
29
+ iconInputStart?: string;
30
+ iconInputEnd?: string;
31
+ maxLength?: number;
32
+ component?: React.ReactNode;
33
+ variant?: ReplyVariants;
34
+ format?: 'int' | 'text' | 'password' | 'decimal';
35
+ disabled?: boolean;
36
+ required?: boolean;
37
+ size?: 'small' | 'medium';
38
+ width?: string;
39
+ rows?: number;
40
+ color?: ReplyPalette$1;
41
+ background?: string;
42
+ state?: any | React.Dispatch<React.SetStateAction<string>>;
43
+ value?: string;
44
+ onChange?: () => {};
45
+ onBlur?: () => {};
46
+ onKeyDown?: () => {};
47
+ }
48
+ interface DrawerProps {
49
+ title?: string;
50
+ arrayElements?: ArrayElement[];
51
+ actions?: {
52
+ text: string;
53
+ fn: () => void;
54
+ disabled?: boolean;
55
+ }[];
56
+ buttonDrawer?: {
57
+ icon?: keyof typeof Muicon;
58
+ text?: string;
59
+ color?: ReplyPalette$1;
60
+ variant?: 'text' | 'outlined' | 'contained';
61
+ iconPosition?: 'left' | 'right' | undefined;
62
+ };
63
+ colorTitle?: ReplyTextPalette | ReplyPalette$1 | string;
64
+ anchor?: "left" | "right";
65
+ width?: string;
66
+ open?: boolean;
67
+ }
68
+
69
+ type ToastType = 'success' | 'error' | 'warning' | 'info';
70
+ interface ToastBaseProperties {
71
+ type?: ToastType;
72
+ title: string;
73
+ subtitle?: string;
74
+ time?: number;
75
+ listITems?: string[];
76
+ seeMore?: boolean;
77
+ actions?: {
78
+ text: string;
79
+ fn: () => void;
80
+ disabled?: boolean;
81
+ }[];
82
+ }
83
+
84
+ declare const SCToastNotification: (toast: ToastBaseProperties) => React__default.JSX.Element;
85
+
86
+ declare const useProgress: (timeProgress: number, lote?: number) => {
87
+ progress: number;
88
+ };
89
+ declare const ToastProgress: (timeProgress: number) => {
90
+ progressToast: number;
91
+ };
92
+
93
+ declare const SCDrawer: ({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, }: DrawerProps) => React__default.JSX.Element;
94
+
95
+ interface MultiSelectProps<T> {
96
+ textButton?: string;
97
+ button?: {
98
+ icon?: string;
99
+ text?: string;
100
+ color?: ReplyPalette$1;
101
+ variant?: RepplyButtonVariants;
102
+ iconPosition?: 'left' | 'right';
103
+ size?: "small" | "medium" | "large";
104
+ };
105
+ topPanel?: React.ReactNode;
106
+ dense?: boolean;
107
+ open: boolean;
108
+ selectAll?: boolean;
109
+ items: T[];
110
+ getItemLabel: (item: T) => string;
111
+ actions?: {
112
+ text: string;
113
+ fn: () => void;
114
+ disabled?: boolean;
115
+ }[];
116
+ }
117
+
118
+ declare function useMultiSelectHandlers<T>(): {
119
+ anchorEl: HTMLButtonElement | null;
120
+ open: boolean;
121
+ selectedItems: T[];
122
+ filterValue: string;
123
+ setSelectedItems: React$1.Dispatch<React$1.SetStateAction<T[]>>;
124
+ handleOpen: (e: React.MouseEvent<HTMLButtonElement>) => void;
125
+ handleClose: () => void;
126
+ handleFilterChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
127
+ handleCheckboxToggle: (item: T) => void;
128
+ setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
129
+ };
130
+
131
+ declare function getIconMultiSelect(name: string): _mui_material_OverridableComponent.OverridableComponent<_mui_material.SvgIconTypeMap<{}, "svg">> & {
132
+ muiName: string;
133
+ };
134
+
135
+ declare function useFilteredItems<T>(items: T[], filterValue: string, getItemLabel: (item: T) => string, selectedItems: T[]): {
136
+ filteredItems: T[];
137
+ sortedItems: T[];
138
+ };
139
+
140
+ declare function SCMultiSelect<T>({ textButton, button, items, topPanel, actions, dense, open, selectAll, getItemLabel }: MultiSelectProps<T>): React__default.JSX.Element;
141
+
142
+ interface SCTextAreaProps {
143
+ title?: string;
144
+ iconTitle?: keyof typeof Muicon;
145
+ infoTitle?: {
146
+ text?: string;
147
+ component?: "tooltip" | "popover";
148
+ };
149
+ colorTitle?: ReplyTextPalette;
150
+ placeholder?: string;
151
+ label?: string;
152
+ width?: string;
153
+ required?: boolean;
154
+ background?: string;
155
+ variant?: ReplyVariants;
156
+ disabled?: boolean;
157
+ rows?: number;
158
+ maxLength?: number;
159
+ value: string;
160
+ state: React.Dispatch<React.SetStateAction<string>>;
161
+ onBlur?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
162
+ }
163
+
164
+ declare function getIcon(name?: string): ComponentType | null;
165
+
166
+ declare const SCTextArea: ({ title, iconTitle, infoTitle, label, placeholder, maxLength, variant, disabled, required, width, rows, colorTitle, background, state, value, onBlur, }: SCTextAreaProps) => React__default.JSX.Element;
167
+
168
+ interface SCTextFieldProps {
169
+ title?: string;
170
+ iconTitle?: string;
171
+ infoTitle?: {
172
+ text?: string;
173
+ component?: "tooltip" | "popover";
174
+ };
175
+ label?: string;
176
+ placeholder?: string;
177
+ color?: ReplyPalette$1;
178
+ width?: string;
179
+ background?: string;
180
+ format?: string;
181
+ inputAddorment?: {
182
+ start: string;
183
+ end: string;
184
+ };
185
+ iconInputStart?: string;
186
+ iconInputEnd?: string;
187
+ infoElement?: {
188
+ text?: string;
189
+ component?: "tooltip" | "popover";
190
+ };
191
+ size?: "small" | "medium";
192
+ variant?: "outlined" | "filled" | "standard";
193
+ value: string;
194
+ maxLength?: number;
195
+ disabled?: boolean;
196
+ required?: boolean;
197
+ state: React.Dispatch<React.SetStateAction<string>>;
198
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
199
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
200
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
201
+ }
202
+
203
+ declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, infoElement, iconInputStart, iconInputEnd, maxLength, variant, format, disabled, required, size, width, color, background, state, value, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React__default.JSX.Element;
204
+
205
+ type ReplyPalette = "primary" | "secondary" | "warning" | "info" | "success" | "error" | "inherit";
206
+
207
+ /***************************************************************************/
208
+
209
+ interface SCDialogProps {
210
+ title?: string;
211
+ iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
212
+ subtitle?: string;
213
+ content?: any;
214
+ actions?: {
215
+ text: string;
216
+ fn: () => void;
217
+ disabled?: boolean;
218
+ }[];
219
+ buttonDialog?: {
220
+ icon?: string;
221
+ text?: string;
222
+ color?: ReplyPalette;
223
+ tooltip?: string;
224
+ variant?: 'text' | 'outlined' | 'contained';
225
+ iconPosition?: 'left' | 'right' | undefined;
226
+ };
227
+ disableClose?: boolean;
228
+ dividers?: boolean;
229
+ widthContent?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
230
+ heightContent?: string;
231
+ background?: string;
232
+ setShow?: React__default.Dispatch<React__default.SetStateAction<boolean>>;
233
+ show?: boolean | any;
234
+ }
235
+ declare const SCDialog: ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }: SCDialogProps) => React__default.JSX.Element;
236
+
237
+ /***************************************************************************/
238
+
239
+ interface Option$1 {
240
+ name?: string;
241
+ iconLeft?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
242
+ iconRight?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
243
+ divider?: boolean;
244
+ page: React__default.ReactNode | React__default.ReactElement;
245
+ }
246
+ interface SCMenuProps {
247
+ header?: any;
248
+ options: Option$1[];
249
+ defaultOption?: string;
250
+ disable?: boolean;
251
+ widthMenu?: string;
252
+ heightMenu?: string;
253
+ widthPage?: string;
254
+ }
255
+ declare const SCMenu: ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }: SCMenuProps) => React__default.JSX.Element;
256
+
257
+ /***************************************************************************/
258
+
259
+ interface Option {
260
+ name?: string;
261
+ badge?: string | number | null | undefined;
262
+ icon?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
263
+ disabled?: boolean;
264
+ page: React__default.ReactNode | React__default.ReactElement;
265
+ }
266
+ interface SCTabsProps {
267
+ options: Option[];
268
+ defaultOption?: string;
269
+ background?: string;
270
+ iconPosition?: "top" | "bottom" | "start" | "end";
271
+ colorTab?: "secondary" | "primary";
272
+ orientation?: "horizontal" | "vertical";
273
+ variant?: "standard" | "fullWidth" | "scrollable";
274
+ scrollButtons?: boolean;
275
+ children?: any;
276
+ }
277
+ declare const SCTabs: ({ options, defaultOption, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }: SCTabsProps) => React__default.JSX.Element;
278
+
279
+ interface FooterActionsProperties {
280
+ label?: React.ReactNode;
281
+ leftContent?: React.ReactNode;
282
+ rightContent?: React.ReactNode;
283
+ variant?: 'standard' | 'float';
284
+ }
285
+
286
+ declare const FooterAction: ({ leftContent, rightContent, label, variant, }: FooterActionsProperties) => React__default.JSX.Element;
287
+
288
+ interface PageheaderProperties {
289
+ title: string | React.ReactNode;
290
+ subtitle?: string | React.ReactNode;
291
+ actions?: React.ReactNode;
292
+ buttonBack?: React.ReactNode;
293
+ fixed?: boolean;
294
+ shadow?: boolean;
295
+ }
296
+
297
+ declare const PageHeader: ({ title, subtitle, actions, buttonBack, fixed, shadow, }: PageheaderProperties) => React__default.JSX.Element;
298
+
299
+ declare const modalStateConfig: {
300
+ info: {
301
+ color: string;
302
+ defaultDescription: string;
303
+ icon: React__default.JSX.Element;
304
+ };
305
+ delete: {
306
+ color: string;
307
+ defaultDescription: string;
308
+ icon: React__default.JSX.Element;
309
+ };
310
+ warning: {
311
+ color: string;
312
+ defaultDescription: string;
313
+ icon: React__default.JSX.Element;
314
+ };
315
+ };
316
+
317
+ type ModalStates = 'info' | 'delete' | 'warning';
318
+ interface ModalProps {
319
+ title: string;
320
+ description?: string;
321
+ textButton?: string;
322
+ buttonVariant?: RepplyButtonVariants;
323
+ iconPosition?: 'left' | 'right';
324
+ buttonColor?: ReplyPalette$1;
325
+ state: ModalStates;
326
+ open: boolean;
327
+ action?: {
328
+ text: string;
329
+ fn: () => void;
330
+ disabled?: boolean;
331
+ }[];
332
+ buttonModal?: {
333
+ icon?: string;
334
+ text?: string;
335
+ color?: ReplyPalette$1;
336
+ variant?: 'text' | 'outlined' | 'contained';
337
+ iconPosition?: 'left' | 'right';
338
+ size?: "small" | "medium" | "large";
339
+ };
340
+ }
341
+
342
+ declare const getIconComponent: (iconName?: string) => React.ElementType;
343
+ declare const getModalColor: (state: string) => string;
344
+ declare const getButtonColor: (state: string) => 'inherit' | 'info' | 'error' | 'warning';
345
+
346
+ declare const SCModal: ({ buttonModal, state, open, title, description, action, }: ModalProps) => React__default.JSX.Element;
347
+
348
+ /***************************************************************************/
349
+
350
+ interface SCCalendarSwipeableProps {
351
+ background?: string;
352
+ setState: React__default.Dispatch<React__default.SetStateAction<string>>;
353
+ state: string | any;
354
+ }
355
+ declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
356
+
357
+ declare const SincoTheme: _mui_material_styles.Theme;
358
+ declare let AdproSincoTheme: _mui_material_styles.Theme;
359
+ declare let ADCSincoTheme: _mui_material_styles.Theme;
360
+
361
+ export { ADCSincoTheme, AdproSincoTheme, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCCalendarSwipeable, SCDialog, SCDrawer, SCMenu, SCModal, SCMultiSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };