desk-kit 2.1.2 → 2.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/components/document/DocumentItem.js +1 -1
- package/dist/components/document/Documents.js +12 -4
- package/dist/components/draganddropanimation/DragAndDropAnimation.js +57 -0
- package/dist/components/header/index.js +3 -1
- package/dist/style.css +66 -1
- package/dist/styles/global.css +63 -1
- package/package.json +2 -1
|
@@ -198,7 +198,7 @@ var DocumentItem = function DocumentItem(props) {
|
|
|
198
198
|
}
|
|
199
199
|
}, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
200
200
|
src: iconSrc,
|
|
201
|
-
alt:
|
|
201
|
+
alt: "Icono del tipo de documento",
|
|
202
202
|
width: 100,
|
|
203
203
|
height: 117
|
|
204
204
|
})), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
@@ -20,9 +20,11 @@ var _WifiOff = _interopRequireDefault(require("@mui/icons-material/WifiOff"));
|
|
|
20
20
|
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
|
21
21
|
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
22
22
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
23
|
+
var _DragAndDropAnimation = _interopRequireDefault(require("../draganddropanimation/DragAndDropAnimation"));
|
|
23
24
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
24
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
26
28
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
27
29
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
30
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
@@ -138,14 +140,18 @@ var Documents = function Documents(props) {
|
|
|
138
140
|
title: title,
|
|
139
141
|
subheader: subheader,
|
|
140
142
|
action: /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
141
|
-
variant: "
|
|
143
|
+
variant: "outlined",
|
|
142
144
|
color: "primary",
|
|
143
145
|
startIcon: /*#__PURE__*/_react["default"].createElement(_AttachFile["default"], null),
|
|
144
146
|
onClick: openFileDialog
|
|
145
147
|
}, "A\xF1adir documento")
|
|
146
|
-
}), /*#__PURE__*/_react["default"].createElement(_CardContent["default"],
|
|
148
|
+
}), /*#__PURE__*/_react["default"].createElement(_CardContent["default"], _extends({}, getRootProps(), {
|
|
149
|
+
style: {
|
|
150
|
+
position: "relative"
|
|
151
|
+
}
|
|
152
|
+
}), /*#__PURE__*/_react["default"].createElement("input", getInputProps()), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
153
|
className: "row"
|
|
148
|
-
},
|
|
154
|
+
}, loadingFile && /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
155
|
className: "col col-12 col-md-6 col-lg-4"
|
|
150
156
|
}, /*#__PURE__*/_react["default"].createElement(_DocumentItem.DocumentItemLoading, null)), documents.map(function (item) {
|
|
151
157
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -181,7 +187,9 @@ var Documents = function Documents(props) {
|
|
|
181
187
|
onClick: function onClick() {
|
|
182
188
|
return fetchDocuments();
|
|
183
189
|
}
|
|
184
|
-
}, "Reintentar")))
|
|
190
|
+
}, "Reintentar"))), /*#__PURE__*/_react["default"].createElement(_DragAndDropAnimation["default"], {
|
|
191
|
+
isDragging: isDragging
|
|
192
|
+
}))), /*#__PURE__*/_react["default"].createElement(_ModalAction["default"], {
|
|
185
193
|
data: {
|
|
186
194
|
title: "Confirmación",
|
|
187
195
|
confirmText: "Eliminar",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _Receipt = _interopRequireDefault(require("@mui/icons-material/Receipt"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
12
|
+
var _CloudUpload = _interopRequireDefault(require("@mui/icons-material/CloudUpload"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
var DragAndDropAnimation = function DragAndDropAnimation(props) {
|
|
15
|
+
var _props$isDragging = props.isDragging,
|
|
16
|
+
isDragging = _props$isDragging === void 0 ? false : _props$isDragging,
|
|
17
|
+
_props$title = props.title,
|
|
18
|
+
title = _props$title === void 0 ? "Facturas" : _props$title;
|
|
19
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
|
+
className: (0, _classnames["default"])('draganddropanimation', {
|
|
21
|
+
dragging_animation: isDragging
|
|
22
|
+
})
|
|
23
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: "content_animation"
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
+
className: "icon_animation"
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement(_CloudUpload["default"], {
|
|
28
|
+
sx: {
|
|
29
|
+
fontSize: 70,
|
|
30
|
+
color: "var(--primary-color)"
|
|
31
|
+
}
|
|
32
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
|
+
className: "box_animation"
|
|
34
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
35
|
+
sx: {
|
|
36
|
+
color: "white",
|
|
37
|
+
fontWeight: 500
|
|
38
|
+
},
|
|
39
|
+
variant: "subtitle2"
|
|
40
|
+
}, "Suelta el archivo para subirlo a"), /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
41
|
+
direction: "row",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
spacing: 1
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement(_Receipt["default"], {
|
|
45
|
+
sx: {
|
|
46
|
+
fontSize: 26,
|
|
47
|
+
color: "white"
|
|
48
|
+
}
|
|
49
|
+
}), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
50
|
+
sx: {
|
|
51
|
+
color: "white",
|
|
52
|
+
fontWeight: 500
|
|
53
|
+
},
|
|
54
|
+
variant: "subtitle2"
|
|
55
|
+
}, title)))));
|
|
56
|
+
};
|
|
57
|
+
var _default = exports["default"] = DragAndDropAnimation;
|
|
@@ -263,8 +263,10 @@ var Header = function Header(props) {
|
|
|
263
263
|
href: "/"
|
|
264
264
|
}, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
265
265
|
src: prefersDarkMode ? "/images/desk_mode_dark.png" : "/images/logo_desk.png",
|
|
266
|
+
alt: "Logotipo",
|
|
266
267
|
width: 210,
|
|
267
|
-
height: 70
|
|
268
|
+
height: 70,
|
|
269
|
+
fetchPriority: "high"
|
|
268
270
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
269
271
|
className: "sections"
|
|
270
272
|
}, /*#__PURE__*/_react["default"].createElement(_Breadcrumbs["default"], {
|
package/dist/style.css
CHANGED
|
@@ -860,4 +860,69 @@ header .search input {
|
|
|
860
860
|
|
|
861
861
|
.table-footer-content.end td:last-child{
|
|
862
862
|
border:0px 0px 0px 10px;
|
|
863
|
-
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.draganddropanimation {
|
|
866
|
+
display: none;
|
|
867
|
+
position: absolute;
|
|
868
|
+
left: 0px;
|
|
869
|
+
right: 0px;
|
|
870
|
+
top: 0px;
|
|
871
|
+
bottom: 0px;
|
|
872
|
+
background-color: rgba(171, 204, 254, 0.5);
|
|
873
|
+
z-index: 10000;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
.draganddropanimation.dragging_animation {
|
|
877
|
+
display: block;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.draganddropanimation .content_animation {
|
|
881
|
+
position: absolute;
|
|
882
|
+
left: 25px;
|
|
883
|
+
right: 25px;
|
|
884
|
+
top: 25px;
|
|
885
|
+
bottom: 25px;
|
|
886
|
+
display: flex;
|
|
887
|
+
border: 2px dashed #0568fd;
|
|
888
|
+
border: 2px dashed var(--primary-color);
|
|
889
|
+
border-radius: 10px;
|
|
890
|
+
gap: 10px;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.draganddropanimation .box_animation {
|
|
894
|
+
position: absolute;
|
|
895
|
+
bottom: 30px;
|
|
896
|
+
left: 50%;
|
|
897
|
+
transform: translateX(-50%);
|
|
898
|
+
display: flex;
|
|
899
|
+
flex-direction: column;
|
|
900
|
+
align-items: center;
|
|
901
|
+
justify-content: center;
|
|
902
|
+
width: 250px;
|
|
903
|
+
height: 70px;
|
|
904
|
+
border-radius: 50px;
|
|
905
|
+
background-color: #0568fd;
|
|
906
|
+
background-color: var(--primary-color);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/*el icono debe salta de su posicion actual hacia arriba lo vamos a colocar justo arrib del boxcentrado*/
|
|
910
|
+
|
|
911
|
+
.draganddropanimation .icon_animation {
|
|
912
|
+
animation: jump 1s infinite;
|
|
913
|
+
position: absolute;
|
|
914
|
+
bottom: 100px;
|
|
915
|
+
left: calc(50% - 35px);
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
@keyframes jump {
|
|
919
|
+
0% {
|
|
920
|
+
transform: translateY(0);
|
|
921
|
+
}
|
|
922
|
+
50% {
|
|
923
|
+
transform: translateY(-10px);
|
|
924
|
+
}
|
|
925
|
+
100% {
|
|
926
|
+
transform: translateY(0);
|
|
927
|
+
}
|
|
928
|
+
}
|
package/dist/styles/global.css
CHANGED
|
@@ -780,4 +780,66 @@ header .search input {
|
|
|
780
780
|
}
|
|
781
781
|
.table-footer-content.end td:last-child{
|
|
782
782
|
border:0px 0px 0px 10px;
|
|
783
|
-
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.draganddropanimation {
|
|
786
|
+
display: none;
|
|
787
|
+
position: absolute;
|
|
788
|
+
left: 0px;
|
|
789
|
+
right: 0px;
|
|
790
|
+
top: 0px;
|
|
791
|
+
bottom: 0px;
|
|
792
|
+
background-color: rgba(171, 204, 254, 0.5);
|
|
793
|
+
z-index: 10000;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.draganddropanimation.dragging_animation {
|
|
797
|
+
display: block;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.draganddropanimation .content_animation {
|
|
801
|
+
position: absolute;
|
|
802
|
+
left: 25px;
|
|
803
|
+
right: 25px;
|
|
804
|
+
top: 25px;
|
|
805
|
+
bottom: 25px;
|
|
806
|
+
display: flex;
|
|
807
|
+
border: 2px dashed var(--primary-color);
|
|
808
|
+
border-radius: 10px;
|
|
809
|
+
gap: 10px;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.draganddropanimation .box_animation {
|
|
813
|
+
position: absolute;
|
|
814
|
+
bottom: 30px;
|
|
815
|
+
left: 50%;
|
|
816
|
+
transform: translateX(-50%);
|
|
817
|
+
display: flex;
|
|
818
|
+
flex-direction: column;
|
|
819
|
+
align-items: center;
|
|
820
|
+
justify-content: center;
|
|
821
|
+
width: 250px;
|
|
822
|
+
height: 70px;
|
|
823
|
+
border-radius: 50px;
|
|
824
|
+
background-color: var(--primary-color);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/*el icono debe salta de su posicion actual hacia arriba lo vamos a colocar justo arrib del boxcentrado*/
|
|
828
|
+
.draganddropanimation .icon_animation {
|
|
829
|
+
animation: jump 1s infinite;
|
|
830
|
+
position: absolute;
|
|
831
|
+
bottom: 100px;
|
|
832
|
+
left: calc(50% - 35px);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
@keyframes jump {
|
|
836
|
+
0% {
|
|
837
|
+
transform: translateY(0);
|
|
838
|
+
}
|
|
839
|
+
50% {
|
|
840
|
+
transform: translateY(-10px);
|
|
841
|
+
}
|
|
842
|
+
100% {
|
|
843
|
+
transform: translateY(0);
|
|
844
|
+
}
|
|
845
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desk-kit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.js",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@mui/system": "^7.0.2",
|
|
35
35
|
"axios": "^1.8.4",
|
|
36
36
|
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
37
|
+
"classnames": "^2.5.1",
|
|
37
38
|
"core-js": "^3.41.0",
|
|
38
39
|
"next": "^15.3.0",
|
|
39
40
|
"next-intl": "^3.26.0",
|