componentes-sinco 1.0.1-rc.5 → 1.0.1-rc.6
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 +5 -4
- package/dist/index.d.mts +361 -0
- package/dist/index.js +5 -4
- package/dist/index.mjs +3450 -0
- package/package.json +8 -2
package/dist/index.cjs
CHANGED
|
@@ -1099,7 +1099,8 @@ var import_material6 = require("@mui/material");
|
|
|
1099
1099
|
var import_Grid23 = __toESM(require("@mui/material/Grid2"), 1);
|
|
1100
1100
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"), 1);
|
|
1101
1101
|
var Muicon3 = __toESM(require("@mui/icons-material"), 1);
|
|
1102
|
-
var SCDialog = ({ title, iconTitle, subtitle, content, actions
|
|
1102
|
+
var SCDialog = ({ title, iconTitle, subtitle, content, actions = [{ text: "Cerrar", fn: () => {
|
|
1103
|
+
} }], buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }) => {
|
|
1103
1104
|
let i = 0;
|
|
1104
1105
|
let iconTitleValidation = "";
|
|
1105
1106
|
let IconTitle;
|
|
@@ -1138,7 +1139,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
1138
1139
|
setShow(false);
|
|
1139
1140
|
}
|
|
1140
1141
|
};
|
|
1141
|
-
|
|
1142
|
+
actions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
1142
1143
|
content = content != null ? content : { component: /* @__PURE__ */ import_react9.default.createElement(import_material6.Box, null, " Aqui va el contenido ") };
|
|
1143
1144
|
return /* @__PURE__ */ import_react9.default.createElement("div", null, buttonDialog ? /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ import_react9.default.createElement(import_material6.Tooltip, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react9.default.createElement(import_material6.Button, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" || !(buttonDialog == null ? void 0 : buttonDialog.iconPosition) ? /* @__PURE__ */ import_react9.default.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ import_react9.default.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ import_react9.default.createElement(import_material6.IconButton, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ import_react9.default.createElement(import_material6.SvgIcon, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ import_react9.default.createElement(import_material6.Modal, { open: open || false, onClose: handleClose }, /* @__PURE__ */ import_react9.default.createElement(
|
|
1144
1145
|
import_material6.Dialog,
|
|
@@ -1176,12 +1177,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
1176
1177
|
}
|
|
1177
1178
|
) : content.component
|
|
1178
1179
|
),
|
|
1179
|
-
|
|
1180
|
+
actions != void 0 && actions.length > 0 ? /* @__PURE__ */ import_react9.default.createElement(import_material6.DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px" } }, actions.map((boton) => /* @__PURE__ */ import_react9.default.createElement(
|
|
1180
1181
|
import_material6.Button,
|
|
1181
1182
|
{
|
|
1182
1183
|
key: i = i + 1,
|
|
1183
1184
|
autoFocus: true,
|
|
1184
|
-
variant: i == 1 ||
|
|
1185
|
+
variant: i == 1 || actions.length < 2 ? "contained" : "text",
|
|
1185
1186
|
color: "primary",
|
|
1186
1187
|
size: "small",
|
|
1187
1188
|
onClick: boton.fn,
|
package/dist/index.d.mts
ADDED
|
@@ -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 };
|
package/dist/index.js
CHANGED
|
@@ -1041,7 +1041,8 @@ import { Button as Button4, Typography as Typography5, Modal, Dialog, DialogActi
|
|
|
1041
1041
|
import Grid4 from "@mui/material/Grid2";
|
|
1042
1042
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
1043
1043
|
import * as Muicon3 from "@mui/icons-material";
|
|
1044
|
-
var SCDialog = ({ title, iconTitle, subtitle, content, actions
|
|
1044
|
+
var SCDialog = ({ title, iconTitle, subtitle, content, actions = [{ text: "Cerrar", fn: () => {
|
|
1045
|
+
} }], buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }) => {
|
|
1045
1046
|
let i = 0;
|
|
1046
1047
|
let iconTitleValidation = "";
|
|
1047
1048
|
let IconTitle;
|
|
@@ -1080,7 +1081,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
1080
1081
|
setShow(false);
|
|
1081
1082
|
}
|
|
1082
1083
|
};
|
|
1083
|
-
|
|
1084
|
+
actions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
1084
1085
|
content = content != null ? content : { component: /* @__PURE__ */ React6.createElement(Box5, null, " Aqui va el contenido ") };
|
|
1085
1086
|
return /* @__PURE__ */ React6.createElement("div", null, buttonDialog ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React6.createElement(Tooltip3, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React6.createElement(Button4, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" || !(buttonDialog == null ? void 0 : buttonDialog.iconPosition) ? /* @__PURE__ */ React6.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React6.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React6.createElement(IconButton4, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React6.createElement(SvgIcon3, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React6.createElement(Modal, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React6.createElement(
|
|
1086
1087
|
Dialog,
|
|
@@ -1118,12 +1119,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
1118
1119
|
}
|
|
1119
1120
|
) : content.component
|
|
1120
1121
|
),
|
|
1121
|
-
|
|
1122
|
+
actions != void 0 && actions.length > 0 ? /* @__PURE__ */ React6.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px" } }, actions.map((boton) => /* @__PURE__ */ React6.createElement(
|
|
1122
1123
|
Button4,
|
|
1123
1124
|
{
|
|
1124
1125
|
key: i = i + 1,
|
|
1125
1126
|
autoFocus: true,
|
|
1126
|
-
variant: i == 1 ||
|
|
1127
|
+
variant: i == 1 || actions.length < 2 ? "contained" : "text",
|
|
1127
1128
|
color: "primary",
|
|
1128
1129
|
size: "small",
|
|
1129
1130
|
onClick: boton.fn,
|