componentes-sinco 1.1.3 → 1.1.4
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 +85 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -7
- package/dist/index.d.ts +24 -7
- package/dist/index.js +83 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -92,6 +92,7 @@ __export(index_exports, {
|
|
|
92
92
|
MultiSelect: () => MultiSelect,
|
|
93
93
|
PageHeader: () => PageHeader,
|
|
94
94
|
SCActivityCalendar: () => SCActivityCalendar,
|
|
95
|
+
SCAppBar: () => SCAppBar,
|
|
95
96
|
SCAutocomplete: () => SCAutocomplete,
|
|
96
97
|
SCCalendarSwipeable: () => SCCalendarSwipeable,
|
|
97
98
|
SCCard: () => SCCard,
|
|
@@ -5388,12 +5389,89 @@ var SCSnackBar = ({
|
|
|
5388
5389
|
));
|
|
5389
5390
|
};
|
|
5390
5391
|
|
|
5392
|
+
// src/Components/SCAppBar.tsx
|
|
5393
|
+
var import_react54 = __toESM(require("react"), 1);
|
|
5394
|
+
var import_material37 = require("@mui/material");
|
|
5395
|
+
var import_Grid10 = __toESM(require("@mui/material/Grid"), 1);
|
|
5396
|
+
var import_es5 = require("dayjs/locale/es");
|
|
5397
|
+
var import_Menu = __toESM(require("@mui/icons-material/Menu"), 1);
|
|
5398
|
+
var import_ArrowBack = __toESM(require("@mui/icons-material/ArrowBack"), 1);
|
|
5399
|
+
var import_icons_material14 = require("@mui/icons-material");
|
|
5400
|
+
var SCAppBar = ({
|
|
5401
|
+
background = "linear-gradient(180deg, #BBE9FC, #FFFFFF)",
|
|
5402
|
+
contenidoExtra,
|
|
5403
|
+
options,
|
|
5404
|
+
fnVolver,
|
|
5405
|
+
visibleVolver = true,
|
|
5406
|
+
visibleConexion = true,
|
|
5407
|
+
visibleMenu = true
|
|
5408
|
+
}) => {
|
|
5409
|
+
const [isOnline, setIsOnline] = (0, import_react54.useState)(window.navigator.onLine);
|
|
5410
|
+
const [anchorEl, setAnchorEl] = (0, import_react54.useState)(null);
|
|
5411
|
+
const openMenu = Boolean(anchorEl);
|
|
5412
|
+
const handleMenuClick = (event2) => {
|
|
5413
|
+
setAnchorEl(event2.currentTarget);
|
|
5414
|
+
};
|
|
5415
|
+
const handleMenuClose = () => {
|
|
5416
|
+
setAnchorEl(null);
|
|
5417
|
+
};
|
|
5418
|
+
(0, import_react54.useEffect)(() => {
|
|
5419
|
+
const handleOnline = () => {
|
|
5420
|
+
console.log("tiene internet");
|
|
5421
|
+
setIsOnline(true);
|
|
5422
|
+
};
|
|
5423
|
+
const handleOffline = () => {
|
|
5424
|
+
console.log(" no tiene internet");
|
|
5425
|
+
setIsOnline(false);
|
|
5426
|
+
};
|
|
5427
|
+
window.addEventListener("online", handleOnline);
|
|
5428
|
+
window.addEventListener("offline", handleOffline);
|
|
5429
|
+
return () => {
|
|
5430
|
+
window.removeEventListener("online", handleOnline);
|
|
5431
|
+
window.removeEventListener("offline", handleOffline);
|
|
5432
|
+
};
|
|
5433
|
+
}, []);
|
|
5434
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { sx: { display: "flex", flexDirection: "column", background } }, /* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { size: 12, sx: { display: "flex", flexDirection: "row", alignItems: "center", padding: "0px 16px", justifyContent: "space-between" } }, visibleVolver && /* @__PURE__ */ import_react54.default.createElement(import_material37.IconButton, { size: "medium", onClick: fnVolver }, /* @__PURE__ */ import_react54.default.createElement(import_ArrowBack.default, { color: "action" })), /* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, visibleConexion && /* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, isOnline ? /* @__PURE__ */ import_react54.default.createElement(import_icons_material14.Wifi, { color: "action", sx: { marginRight: "8px" } }) : /* @__PURE__ */ import_react54.default.createElement(import_icons_material14.WifiOff, { color: "action", sx: { marginRight: "8px" } }), /* @__PURE__ */ import_react54.default.createElement(
|
|
5435
|
+
import_material37.Badge,
|
|
5436
|
+
{
|
|
5437
|
+
anchorOrigin: {
|
|
5438
|
+
vertical: "top",
|
|
5439
|
+
horizontal: "left"
|
|
5440
|
+
},
|
|
5441
|
+
variant: "dot",
|
|
5442
|
+
sx: {
|
|
5443
|
+
position: "relative",
|
|
5444
|
+
top: "-3px",
|
|
5445
|
+
left: "-4px"
|
|
5446
|
+
},
|
|
5447
|
+
color: isOnline ? "success" : "error"
|
|
5448
|
+
}
|
|
5449
|
+
), /* @__PURE__ */ import_react54.default.createElement(import_material37.Typography, { variant: "caption", color: "text.secondary" }, isOnline ? "Online" : "Offline")), visibleMenu && /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(import_material37.IconButton, { size: "medium", onClick: handleMenuClick }, /* @__PURE__ */ import_react54.default.createElement(import_Menu.default, { color: "action" })), /* @__PURE__ */ import_react54.default.createElement(
|
|
5450
|
+
import_material37.Menu,
|
|
5451
|
+
{
|
|
5452
|
+
anchorEl,
|
|
5453
|
+
open: openMenu,
|
|
5454
|
+
onClose: handleMenuClose,
|
|
5455
|
+
anchorOrigin: {
|
|
5456
|
+
vertical: "bottom",
|
|
5457
|
+
horizontal: "right"
|
|
5458
|
+
},
|
|
5459
|
+
transformOrigin: {
|
|
5460
|
+
vertical: "top",
|
|
5461
|
+
horizontal: "right"
|
|
5462
|
+
},
|
|
5463
|
+
sx: { zIndex: "2000" }
|
|
5464
|
+
},
|
|
5465
|
+
options.map((option, index) => /* @__PURE__ */ import_react54.default.createElement(import_material37.MenuItem, { onClick: option.fn, disabled: option.disabled, key: index }, /* @__PURE__ */ import_react54.default.createElement(import_material37.Typography, { variant: "body2" }, option.name)))
|
|
5466
|
+
)))), /* @__PURE__ */ import_react54.default.createElement(import_material37.Box, { sx: { padding: "0px 16px" } }, contenidoExtra)));
|
|
5467
|
+
};
|
|
5468
|
+
|
|
5391
5469
|
// src/Theme/index.ts
|
|
5392
5470
|
var import_styles3 = require("@mui/material/styles");
|
|
5393
5471
|
|
|
5394
5472
|
// src/Theme/components.ts
|
|
5395
|
-
var
|
|
5396
|
-
var
|
|
5473
|
+
var import_react55 = __toESM(require("react"), 1);
|
|
5474
|
+
var import_icons_material15 = require("@mui/icons-material");
|
|
5397
5475
|
var components = {
|
|
5398
5476
|
MuiSelect: {
|
|
5399
5477
|
styleOverrides: {
|
|
@@ -6090,10 +6168,10 @@ var components = {
|
|
|
6090
6168
|
MuiAlert: {
|
|
6091
6169
|
defaultProps: {
|
|
6092
6170
|
iconMapping: {
|
|
6093
|
-
success:
|
|
6094
|
-
error:
|
|
6095
|
-
warning:
|
|
6096
|
-
info:
|
|
6171
|
+
success: import_react55.default.createElement(import_icons_material15.CheckCircleRounded),
|
|
6172
|
+
error: import_react55.default.createElement(import_icons_material15.ErrorRounded),
|
|
6173
|
+
warning: import_react55.default.createElement(import_icons_material15.WarningRounded),
|
|
6174
|
+
info: import_react55.default.createElement(import_icons_material15.InfoRounded)
|
|
6097
6175
|
}
|
|
6098
6176
|
},
|
|
6099
6177
|
variants: [
|
|
@@ -7146,6 +7224,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
7146
7224
|
MultiSelect,
|
|
7147
7225
|
PageHeader,
|
|
7148
7226
|
SCActivityCalendar,
|
|
7227
|
+
SCAppBar,
|
|
7149
7228
|
SCAutocomplete,
|
|
7150
7229
|
SCCalendarSwipeable,
|
|
7151
7230
|
SCCard,
|