ecomlab-components-next 0.1.102 → 0.1.104
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/AuthorAvatar/AuthorAvatar.js +36 -0
- package/dist/components/AuthorAvatar/AuthorAvatar.scss +53 -0
- package/dist/components/Loader/SceletonChart/SceletonChart.js +57 -0
- package/dist/components/Loader/SceletonChart/SceletonChart.scss +20 -0
- package/dist/components/Loader/SceletonTable/SceletonTable.js +55 -0
- package/dist/components/Loader/SceletonTable/SceletonTable.scss +27 -0
- package/dist/components/Table/Paginator/Paginator.scss +1 -1
- package/dist/components/Table/Table/Table.js +1433 -1004
- package/dist/components/Table/Table/Table.scss +1230 -1300
- package/dist/components/Table/TableBox/TableBox.js +118 -42
- package/dist/components/Table/TableBox/TableBox.scss +40 -7
- package/dist/components/Table/TableBox/TableBox.stories.js +4 -241
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AuthorAvatar = AuthorAvatar;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
require("./AuthorAvatar.scss");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
function AuthorAvatar(_ref) {
|
|
13
|
+
var _author$;
|
|
14
|
+
var show_name = _ref.show_name,
|
|
15
|
+
author = _ref.author,
|
|
16
|
+
_ref$size = _ref.size,
|
|
17
|
+
size = _ref$size === void 0 ? 's' : _ref$size,
|
|
18
|
+
_ref$group = _ref.group,
|
|
19
|
+
group = _ref$group === void 0 ? false : _ref$group;
|
|
20
|
+
var current_className = size === 's' ? 'author-avatar' : size === 'xs' ? 'author-avatar-xs' : '';
|
|
21
|
+
var position_classname = group ? 'author-avatar__wrapper-left' : '';
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
className: 'author-avatar__wrapper' + ' ' + position_classname
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: current_className,
|
|
26
|
+
style: {
|
|
27
|
+
background: author !== null && author !== void 0 && author[1] ? author === null || author === void 0 ? void 0 : author[1] : ''
|
|
28
|
+
}
|
|
29
|
+
}, (author === null || author === void 0 || (_author$ = author[0]) === null || _author$ === void 0 || (_author$ = _author$.split(' ').map(function (str) {
|
|
30
|
+
return str[0];
|
|
31
|
+
}).reduce(function (acc, current) {
|
|
32
|
+
return acc += current;
|
|
33
|
+
}, '')) === null || _author$ === void 0 ? void 0 : _author$.toUpperCase()) || '-'), show_name && (author === null || author === void 0 ? void 0 : author[0]) && /*#__PURE__*/_react["default"].createElement("span", {
|
|
34
|
+
className: "author-avatar__name"
|
|
35
|
+
}, author === null || author === void 0 ? void 0 : author[0]));
|
|
36
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.author-avatar,
|
|
2
|
+
.author-avatar-m,
|
|
3
|
+
.author-avatar-xs,
|
|
4
|
+
.author-avatar_left {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
width: 32px;
|
|
9
|
+
height: 32px;
|
|
10
|
+
min-width: 32px;
|
|
11
|
+
background-color: #F79E6C;
|
|
12
|
+
border: 1px solid white;
|
|
13
|
+
color: #FFF !important;
|
|
14
|
+
text-align: center;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
font-size: 10px !important;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-weight: 500 !important;
|
|
19
|
+
line-height: 1.4;
|
|
20
|
+
|
|
21
|
+
&__wrapper {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__wrapper-left {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 8px;
|
|
31
|
+
|
|
32
|
+
&:nth-child(n+2) {
|
|
33
|
+
margin-left: - 8px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__name {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.author-avatar-m {
|
|
43
|
+
font-size: 20px;
|
|
44
|
+
width: 48px;
|
|
45
|
+
height: 48px;
|
|
46
|
+
min-width: 48px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.author-avatar-xs {
|
|
50
|
+
width: 24px;
|
|
51
|
+
height: 24px;
|
|
52
|
+
min-width: 24px;
|
|
53
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SceletonChart = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
|
|
10
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
11
|
+
require("./SceletonChart.scss");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
14
|
+
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."); }
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
17
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
var SceletonChart = exports.SceletonChart = function SceletonChart(_ref) {
|
|
20
|
+
var _ref$height = _ref.height,
|
|
21
|
+
height = _ref$height === void 0 ? '400' : _ref$height;
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
className: "sceleton-chart"
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
25
|
+
className: "sceleton-chart__content"
|
|
26
|
+
}, _toConsumableArray(Array(5)).map(function (el) {
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
28
|
+
variant: "rectangular",
|
|
29
|
+
width: 45,
|
|
30
|
+
height: height * 0.9
|
|
31
|
+
}), /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
32
|
+
variant: "rectangular",
|
|
33
|
+
width: 45,
|
|
34
|
+
height: height * 0.7
|
|
35
|
+
}), /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
36
|
+
variant: "rectangular",
|
|
37
|
+
width: 45,
|
|
38
|
+
height: height * 0.8
|
|
39
|
+
}), /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
40
|
+
variant: "rectangular",
|
|
41
|
+
width: 45,
|
|
42
|
+
height: height * 0.3
|
|
43
|
+
}), /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
44
|
+
variant: "rectangular",
|
|
45
|
+
width: 45,
|
|
46
|
+
height: height * 0.4
|
|
47
|
+
}), /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
48
|
+
variant: "rectangular",
|
|
49
|
+
width: 45,
|
|
50
|
+
height: height * 0.7
|
|
51
|
+
}), /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
52
|
+
variant: "rectangular",
|
|
53
|
+
width: 45,
|
|
54
|
+
height: height * 0.2
|
|
55
|
+
}));
|
|
56
|
+
})));
|
|
57
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.sceleton-chart {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
padding: 20px;
|
|
5
|
+
background: #EAEAEA;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
|
|
10
|
+
&__content {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: flex-end;
|
|
13
|
+
flex-direction: row !important;
|
|
14
|
+
gap: 20px;
|
|
15
|
+
|
|
16
|
+
span {
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SceletonTable = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
|
|
10
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
11
|
+
require("./SceletonTable.scss");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
14
|
+
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."); }
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
17
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
var SceletonTable = exports.SceletonTable = function SceletonTable(_ref) {
|
|
20
|
+
var _ref$height = _ref.height,
|
|
21
|
+
height = _ref$height === void 0 ? 400 : _ref$height;
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
className: "sceleton-table"
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
25
|
+
className: "sceleton-table__content"
|
|
26
|
+
}, _toConsumableArray(Array(50)).map(function (el, ind) {
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
28
|
+
key: ind,
|
|
29
|
+
variant: "text",
|
|
30
|
+
sx: {
|
|
31
|
+
fontSize: '27px'
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
})), /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
35
|
+
className: "sceleton-table__content"
|
|
36
|
+
}, _toConsumableArray(Array(50)).map(function (el, ind) {
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
38
|
+
key: ind,
|
|
39
|
+
variant: "text",
|
|
40
|
+
sx: {
|
|
41
|
+
fontSize: '27px'
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
})), /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
45
|
+
className: "sceleton-table__content"
|
|
46
|
+
}, _toConsumableArray(Array(50)).map(function (el, ind) {
|
|
47
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], {
|
|
48
|
+
key: ind,
|
|
49
|
+
variant: "text",
|
|
50
|
+
sx: {
|
|
51
|
+
fontSize: '27px'
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
})));
|
|
55
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.sceleton-table {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
padding: 20px;
|
|
6
|
+
background: #EAEAEA;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
|
|
12
|
+
&__content {
|
|
13
|
+
display: flex;
|
|
14
|
+
width: 100%;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
gap: 20px;
|
|
17
|
+
|
|
18
|
+
span {
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.table-paginator-box:has(.sceleton-table) {
|
|
26
|
+
width: 100% !important;
|
|
27
|
+
}
|