ecomlab-components-next 0.1.101 → 0.1.103
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/Table/Paginator/Paginator.scss +1 -1
- package/dist/components/Table/Table/Table.js +1433 -1007
- package/dist/components/Table/Table/Table.scss +1230 -1300
- package/dist/components/Table/TableBox/TableBox.js +3 -2
- package/dist/components/Table/TableBox/TableBox.stories.js +4 -229
- 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
|
+
}
|