@megafon/ui-lk-vas 1.0.0-alpha.8 → 1.0.0
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/es/components/BottomBar/BottomBar.js +2 -2
- package/dist/es/components/Cards/CardSmall/CardSmall.js +1 -2
- package/dist/es/components/Cards/components/_CardCell/CardCell.js +5 -4
- package/dist/es/components/Charts/Chart/Chart.js +2 -2
- package/dist/es/components/Header/components/_HeaderButton/HeaderButton.css +1 -1
- package/dist/es/components/Header/components/_HeaderButton/HeaderButton.js +7 -13
- package/dist/es/components/Header/components/_HeaderLkSelect/HeaderLkSelect.js +1 -3
- package/dist/es/components/Table/components/TableTd/TableTd.css +1 -1
- package/dist/es/components/Table/components/TableTd/TableTd.d.ts +2 -0
- package/dist/es/components/Table/components/TableTd/TableTd.js +4 -1
- package/dist/es/components/Table/components/TableTh/TableTh.css +1 -1
- package/dist/es/components/Table/components/TableTh/TableTh.d.ts +7 -1
- package/dist/es/components/Table/components/TableTh/TableTh.js +29 -6
- package/dist/es/components/Table/components/TableTooltip/TableTooltip.d.ts +2 -1
- package/dist/es/components/Table/components/TableTooltip/TableTooltip.js +2 -1
- package/dist/lib/components/BottomBar/BottomBar.js +2 -2
- package/dist/lib/components/Cards/CardSmall/CardSmall.js +1 -2
- package/dist/lib/components/Cards/components/_CardCell/CardCell.js +5 -4
- package/dist/lib/components/Charts/Chart/Chart.js +2 -2
- package/dist/lib/components/Header/components/_HeaderButton/HeaderButton.css +1 -1
- package/dist/lib/components/Header/components/_HeaderButton/HeaderButton.js +7 -13
- package/dist/lib/components/Header/components/_HeaderLkSelect/HeaderLkSelect.js +1 -3
- package/dist/lib/components/Table/components/TableTd/TableTd.css +1 -1
- package/dist/lib/components/Table/components/TableTd/TableTd.d.ts +2 -0
- package/dist/lib/components/Table/components/TableTd/TableTd.js +4 -1
- package/dist/lib/components/Table/components/TableTh/TableTh.css +1 -1
- package/dist/lib/components/Table/components/TableTh/TableTh.d.ts +7 -1
- package/dist/lib/components/Table/components/TableTh/TableTh.js +29 -6
- package/dist/lib/components/Table/components/TableTooltip/TableTooltip.d.ts +2 -1
- package/dist/lib/components/Table/components/TableTooltip/TableTooltip.js +2 -1
- package/package.json +5 -5
|
@@ -5,9 +5,9 @@ import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
|
5
5
|
import "./BottomBar.css";
|
|
6
6
|
var ArrowBackIcon = function ArrowBackIcon(props) {
|
|
7
7
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
8
|
-
viewBox: "0 0
|
|
8
|
+
viewBox: "0 0 20 20"
|
|
9
9
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
-
d: "
|
|
10
|
+
d: "M7.733 6.32a1 1 0 00-1.413-.053L3.488 8.892a1.503 1.503 0 000 2.216l2.832 2.625a1 1 0 001.36-1.466L6.312 11H16a1 1 0 000-2H6.313l1.366-1.267a1 1 0 00.054-1.413z"
|
|
11
11
|
}));
|
|
12
12
|
};
|
|
13
13
|
var cn = cnCreate('mfui-9-lkvas-bottom-bar');
|
|
@@ -9,8 +9,7 @@ var CancelIcon = function CancelIcon(props) {
|
|
|
9
9
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10
10
|
viewBox: "0 0 20 20"
|
|
11
11
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
-
|
|
13
|
-
d: "M10 8.8L6.2 5 5 6.2 8.8 10 5 13.8 6.2 15l3.8-3.8 3.8 3.8 1.2-1.2-3.8-3.8L15 6.2 13.8 5 10 8.8z"
|
|
12
|
+
d: "M5.762 5.76a1 1 0 011.415 0l2.795 2.79 2.788-2.785a1.001 1.001 0 011.415 1.414l-2.788 2.785 2.789 2.787a1 1 0 01-1.414 1.414l-2.79-2.787-2.796 2.794A1 1 0 115.76 12.76l2.796-2.794-2.795-2.792a1 1 0 010-1.414z"
|
|
14
13
|
}));
|
|
15
14
|
};
|
|
16
15
|
var cn = cnCreate('mfui-9-lkvas-card-small');
|
|
@@ -8,22 +8,23 @@ var EditIcon = function EditIcon(props) {
|
|
|
8
8
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
9
9
|
viewBox: "0 0 20 20"
|
|
10
10
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
d: "
|
|
11
|
+
d: "M3 16.005a1 1 0 11.001 1.999A1 1 0 013 16.005zm12.646-8.213l-7.92 7.918a1.001 1.001 0 01-.706.293H4.499a.501.501 0 01-.5-.5v-2.52a1 1 0 01.292-.706l7.896-7.894 3.46 3.41zm-1.371-5.496a1.002 1.002 0 011.415 0l2.02 2.02a1 1 0 010 1.414l-1.357 1.355-3.46-3.409 1.382-1.38z"
|
|
12
12
|
}));
|
|
13
13
|
};
|
|
14
14
|
var SettingsIcon = function SettingsIcon(props) {
|
|
15
15
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
16
16
|
viewBox: "0 0 20 20"
|
|
17
17
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
18
|
-
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
clipRule: "evenodd",
|
|
20
|
+
d: "M6.622 2.182a1.434 1.434 0 011.296.09l.344.2a3.487 3.487 0 003.514.005l.322-.187a1.434 1.434 0 011.304-.085 8.474 8.474 0 011.688 1c.368.281.555.717.556 1.15v.4l.007.234a3.532 3.532 0 001.742 2.813l.314.183c.377.22.658.604.714 1.066.04.336.061.678.061 1.026l-.014.492c-.01.162-.023.324-.041.483a1.44 1.44 0 01-.714 1.074l-.345.2a3.486 3.486 0 00-1.725 3.014v.46c0 .432-.186.867-.555 1.148a8.477 8.477 0 01-1.644.98 1.434 1.434 0 01-1.31-.082l-.35-.204a3.486 3.486 0 00-3.516-.005l-.392.229a1.435 1.435 0 01-1.303.085 8.485 8.485 0 01-1.604-.935c-.378-.28-.57-.72-.57-1.159v-.498a3.531 3.531 0 00-1.75-3.047l-.399-.233a1.44 1.44 0 01-.715-1.082 8.75 8.75 0 01-.037-.456l-.013-.464c0-.33.02-.654.056-.972a1.44 1.44 0 01.714-1.074l.418-.243a3.485 3.485 0 001.718-2.782l.007-.232v-.479c0-.438.193-.879.57-1.159a8.478 8.478 0 011.652-.954zm3.364 4.886a3 3 0 100 6 3 3 0 000-6z"
|
|
19
21
|
}));
|
|
20
22
|
};
|
|
21
23
|
var CancelIcon = function CancelIcon(props) {
|
|
22
24
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
23
25
|
viewBox: "0 0 20 20"
|
|
24
26
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
25
|
-
|
|
26
|
-
d: "M10 8.8L6.2 5 5 6.2 8.8 10 5 13.8 6.2 15l3.8-3.8 3.8 3.8 1.2-1.2-3.8-3.8L15 6.2 13.8 5 10 8.8z"
|
|
27
|
+
d: "M5.762 5.76a1 1 0 011.415 0l2.795 2.79 2.788-2.785a1.001 1.001 0 011.415 1.414l-2.788 2.785 2.789 2.787a1 1 0 01-1.414 1.414l-2.79-2.787-2.796 2.794A1 1 0 115.76 12.76l2.796-2.794-2.795-2.792a1 1 0 010-1.414z"
|
|
27
28
|
}));
|
|
28
29
|
};
|
|
29
30
|
var cn = cnCreate('mfui-9-lkvas-card-cell');
|
|
@@ -12,9 +12,9 @@ var DownloadIcon = function DownloadIcon(props) {
|
|
|
12
12
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
13
|
viewBox: "0 0 32 32"
|
|
14
14
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
15
|
-
d: "
|
|
15
|
+
d: "M26.4 14.507a1.6 1.6 0 011.601 1.6c0 1.5-.318 2.984-.93 4.363a11.295 11.295 0 01-2.625 3.67 12.08 12.08 0 01-3.888 2.427 12.67 12.67 0 01-9.115 0 12.083 12.083 0 01-3.888-2.427 11.295 11.295 0 01-2.625-3.67A10.75 10.75 0 014 16.107a1.6 1.6 0 113.2 0c0 1.048.22 2.09.653 3.065a8.097 8.097 0 001.884 2.63 8.881 8.881 0 002.86 1.78 9.453 9.453 0 003.403.631 9.45 9.45 0 003.402-.63 8.883 8.883 0 002.86-1.782 8.096 8.096 0 001.883-2.629 7.55 7.55 0 00.655-3.065 1.6 1.6 0 011.6-1.6z"
|
|
16
16
|
}), /*#__PURE__*/React.createElement("path", {
|
|
17
|
-
d: "
|
|
17
|
+
d: "M16 6.418a1.6 1.6 0 011.6 1.6v5.813l2.062-2.085a1.6 1.6 0 012.275 2.25l-4.231 4.278-.183.167a2.4 2.4 0 01-3.047 0l-.183-.167-4.23-4.278a1.6 1.6 0 112.275-2.25L14.4 13.83V8.018a1.6 1.6 0 011.6-1.6z"
|
|
18
18
|
}));
|
|
19
19
|
};
|
|
20
20
|
var cn = cnCreate('mfui-9-lkvas-chart');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:52px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;display:inline-block;font-weight:400;height:40px;max-width:100%;min-width:100%;outline:none;overflow:hidden;padding:0;text-align:left;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-lkvas-button_color_green{background-color:var(--brandGreen);color:var(--stcWhite)}@media (pointer:fine){.mfui-9-lkvas-button_color_green:hover{background-color:var(--buttonHoverGreen)}}.mfui-9-lkvas-button_color_green:active{background-color:var(--brandGreen)}.mfui-9-lkvas-button_color_green-soft{background-color:var(--brandGreen20)}@media (pointer:fine){.mfui-9-lkvas-button_color_green-soft:hover{background-color:var(--buttonHoverGreenSoft)}}.mfui-9-lkvas-button_color_green-soft:active{background-color:var(--brandGreen20)}.mfui-9-lkvas-button__inner{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:inherit;padding:0 8px;width:100%}.mfui-9-lkvas-button__support-svg{-ms-flex-negative:0;flex-shrink:0;height:32px;width:32px;fill:currentColor}.mfui-9-lkvas-button__profile-svg{-ms-flex-negative:0;flex-shrink:0;height:20px;width:20px;fill:currentColor}.mfui-9-lkvas-button__text{margin:0 4px 0 8px;overflow:hidden}.mfui-9-lkvas-button_has-icon .mfui-9-lkvas-button__text{margin-left:4px}.mfui-9-lkvas-button__title{font-size:15px;font-weight:500;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__subtitle{font-size:12px;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__arrow{-ms-flex-negative:0;background-color:var(--stcWhite);border-radius:50%;flex-shrink:0;height:24px;-webkit-transition:rotate .3s;transition:rotate .3s;width:24px}.mfui-9-lkvas-button_opened .mfui-9-lkvas-button__arrow{rotate:-180deg}.mfui-9-lkvas-button__arrow-svg{height:100%;width:100%;fill:var(--
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:52px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;display:inline-block;font-weight:400;height:40px;max-width:100%;min-width:100%;outline:none;overflow:hidden;padding:0;text-align:left;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-lkvas-button_color_green{background-color:var(--brandGreen);color:var(--stcWhite)}@media (pointer:fine){.mfui-9-lkvas-button_color_green:hover{background-color:var(--buttonHoverGreen)}}.mfui-9-lkvas-button_color_green:active{background-color:var(--brandGreen)}.mfui-9-lkvas-button_color_green-soft{background-color:var(--brandGreen20)}@media (pointer:fine){.mfui-9-lkvas-button_color_green-soft:hover{background-color:var(--buttonHoverGreenSoft)}}.mfui-9-lkvas-button_color_green-soft:active{background-color:var(--brandGreen20)}.mfui-9-lkvas-button__inner{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:inherit;padding:0 8px;width:100%}.mfui-9-lkvas-button__support-svg{-ms-flex-negative:0;flex-shrink:0;height:32px;width:32px;fill:currentColor}.mfui-9-lkvas-button__profile-svg{-ms-flex-negative:0;flex-shrink:0;height:20px;width:20px;fill:currentColor}.mfui-9-lkvas-button__text{margin:0 4px 0 8px;overflow:hidden}.mfui-9-lkvas-button_has-icon .mfui-9-lkvas-button__text{margin-left:4px}.mfui-9-lkvas-button__title{font-size:15px;font-weight:500;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__subtitle{font-size:12px;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__arrow{-ms-flex-negative:0;background-color:var(--stcWhite);border-radius:50%;flex-shrink:0;height:24px;-webkit-transition:rotate .3s;transition:rotate .3s;width:24px}.mfui-9-lkvas-button_opened .mfui-9-lkvas-button__arrow{rotate:-180deg}.mfui-9-lkvas-button__arrow-svg{height:100%;width:100%;fill:var(--stcBlack)}
|
|
@@ -6,31 +6,25 @@ var ProfileIcon = function ProfileIcon(props) {
|
|
|
6
6
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
7
|
viewBox: "0 0 20 20"
|
|
8
8
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
9
|
-
d: "
|
|
9
|
+
d: "M15.034 9c.552 0 1.004.45.963 1-.334 4.5-2.892 8-5.997 8-3.106 0-5.664-3.5-5.997-8-.041-.55.41-1 .962-1h10.069zM10 2a3.008 3.008 0 013.017 3c0 1.657-1.35 3-3.017 3a3.008 3.008 0 01-3.017-3c0-1.657 1.35-3 3.017-3z"
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
12
|
var SupportIcon = function SupportIcon(props) {
|
|
13
13
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
14
|
viewBox: "0 0 32 32"
|
|
15
15
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
22
|
-
cx: 19.5,
|
|
23
|
-
cy: 16.5,
|
|
24
|
-
r: 1.5
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M15.992 5c3.588 0 6.514 1.616 6.681 3.644a2.699 2.699 0 011.32 2.325v1.257h1.34l.273.014A2.685 2.685 0 0128 14.922v3.976c0 1.396-1.05 2.545-2.395 2.683l-.272.013H23.98v1.347c0 2.242-1.799 4.059-4.017 4.059h-4.537c-1.105 0-2-.906-2-2.022a2.01 2.01 0 012-2.022h1.333c1.104 0 2 .905 2 2.022 0 .236-.042.463-.116.674h1.32c1.482 0 2.683-1.214 2.684-2.711v-5c0-.067.013-.132.031-.194v-2.064c-.741-.346-1.303-1.1-1.43-1.982-.119-.812-.308-1.546-.556-2.154-1.208.682-2.867 1.105-4.699 1.105-1.875 0-3.57-.442-4.785-1.153-.258.637-.45 1.417-.566 2.283-.113.84-.64 1.558-1.34 1.897v5.915H6.667l-.272-.013C5.05 21.443 4 20.294 4 18.898v-3.976a2.685 2.685 0 012.395-2.682l.272-.014h1.325v-1.257A2.7 2.7 0 019.31 8.644C9.476 6.616 12.404 5 15.992 5z"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M13.328 16.207a1.34 1.34 0 011.334 1.347 1.34 1.34 0 01-1.334 1.346 1.34 1.34 0 01-1.333-1.346 1.34 1.34 0 011.333-1.347zm5.335 0a1.34 1.34 0 011.333 1.347 1.34 1.34 0 01-1.333 1.346 1.34 1.34 0 01-1.334-1.346 1.34 1.34 0 011.334-1.347z"
|
|
25
21
|
}));
|
|
26
22
|
};
|
|
27
23
|
var ArrowIcon = function ArrowIcon(props) {
|
|
28
24
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
29
25
|
viewBox: "0 0 20 20"
|
|
30
26
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
31
|
-
d: "
|
|
32
|
-
fillRule: "evenodd",
|
|
33
|
-
clipRule: "evenodd"
|
|
27
|
+
d: "M10.465 11.798a.609.609 0 01-.907 0L7.187 9.25c-.41-.44-.1-1.25.476-1.25h4.679c.575 0 .879.811.47 1.25l-2.347 2.548z"
|
|
34
28
|
}));
|
|
35
29
|
};
|
|
36
30
|
var cn = cnCreate('mfui-9-lkvas-button');
|
|
@@ -9,9 +9,7 @@ var ArrowIcon = function ArrowIcon(props) {
|
|
|
9
9
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10
10
|
viewBox: "0 0 20 20"
|
|
11
11
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
-
d: "
|
|
13
|
-
fillRule: "evenodd",
|
|
14
|
-
clipRule: "evenodd"
|
|
12
|
+
d: "M10.465 11.798a.609.609 0 01-.907 0L7.187 9.25c-.41-.44-.1-1.25.476-1.25h4.679c.575 0 .879.811.47 1.25l-2.347 2.548z"
|
|
15
13
|
}));
|
|
16
14
|
};
|
|
17
15
|
var cn = cnCreate('mfui-9-lkvas-lk-select');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-td{background-color:var(--base);font-size:15px;font-weight:400;line-height:24px;padding:12px}.mfui-9-lkvas-table-td_pinned:first-child{left:0;position:sticky}.mfui-9-lkvas-table-td_pinned:first-child:not(.mfui-9-lkvas-table-td_scroll_start,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-td_pinned:last-child{position:sticky;right:0}.mfui-9-lkvas-table-td_pinned:last-child:not(.mfui-9-lkvas-table-td_scroll_end,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-td{background-color:var(--base);font-size:15px;font-weight:400;line-height:24px;padding:12px}.mfui-9-lkvas-table-td_pinned:first-child{left:0;position:sticky}.mfui-9-lkvas-table-td_pinned:first-child:not(.mfui-9-lkvas-table-td_scroll_start,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-td_pinned:last-child{position:sticky;right:0}.mfui-9-lkvas-table-td_pinned:last-child:not(.mfui-9-lkvas-table-td_scroll_end,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}.mfui-9-lkvas-table-td_active{background-color:var(--spbSky0)}
|
|
@@ -7,6 +7,8 @@ export interface ITableTdProps {
|
|
|
7
7
|
colSpan?: number;
|
|
8
8
|
/** Фиксация ячейки во время горизонтальной прокрутки (только для первой и последней ячейки в строке) */
|
|
9
9
|
pinned?: boolean;
|
|
10
|
+
/** Сделать активной отсортированную ячейку */
|
|
11
|
+
isSortActive?: boolean;
|
|
10
12
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
11
13
|
dataAttrs?: {
|
|
12
14
|
root?: Record<string, string>;
|
|
@@ -8,6 +8,8 @@ var TableTd = function TableTd(_ref) {
|
|
|
8
8
|
var className = _ref.className,
|
|
9
9
|
colSpan = _ref.colSpan,
|
|
10
10
|
pinned = _ref.pinned,
|
|
11
|
+
_ref$isSortActive = _ref.isSortActive,
|
|
12
|
+
isSortActive = _ref$isSortActive === void 0 ? false : _ref$isSortActive,
|
|
11
13
|
dataAttrs = _ref.dataAttrs,
|
|
12
14
|
children = _ref.children;
|
|
13
15
|
var _React$useContext = React.useContext(TableContext),
|
|
@@ -15,7 +17,8 @@ var TableTd = function TableTd(_ref) {
|
|
|
15
17
|
return /*#__PURE__*/React.createElement("td", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
16
18
|
className: cn({
|
|
17
19
|
pinned: pinned,
|
|
18
|
-
scroll: pinned && scrollPosition.horizontal
|
|
20
|
+
scroll: pinned && scrollPosition.horizontal,
|
|
21
|
+
active: isSortActive
|
|
19
22
|
}, [className]),
|
|
20
23
|
colSpan: colSpan
|
|
21
24
|
}), children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-th{background-color:var(--spbSky0);color:var(--spbSky3);font-size:15px;font-weight:500;line-height:24px;padding:16px 12px;text-align:left}.mfui-9-lkvas-table-th:first-child{border-radius:12px 0 0 12px}.mfui-9-lkvas-table-th:last-child{border-radius:0 12px 12px 0}.mfui-9-lkvas-table-th__inner{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;gap:4px;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-lkvas-table-th_pinned:first-child{left:0;position:sticky;z-index:1}.mfui-9-lkvas-table-th_pinned:first-child:not(.mfui-9-lkvas-table-th_scroll_start,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-th_pinned:last-child{position:sticky;right:0;z-index:1}.mfui-9-lkvas-table-th_pinned:last-child:not(.mfui-9-lkvas-table-th_scroll_end,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}.mfui-9-lkvas-table-th__sorting{display:-webkit-box;display:-ms-flexbox;display:flex;left:100%;position:absolute;top:50%;translate:4px -50%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-lkvas-table-th__sorting-down,.mfui-9-lkvas-table-th__sorting-up{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;cursor:pointer;height:20px;justify-content:center;width:20px}.mfui-9-lkvas-table-th__sorting-down:after,.mfui-9-lkvas-table-th__sorting-up:after{border-left:3px solid transparent;border-right:3px solid transparent;content:"";height:0;width:0}.mfui-9-lkvas-table-th__sorting-up{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-9-lkvas-table-th__sorting-up:after{border-bottom:4px solid var(--spbSky3)}.mfui-9-lkvas-table-th__sorting-up:hover:after{border-bottom-color:var(--content)}.mfui-9-lkvas-table-th__sorting-down{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-9-lkvas-table-th__sorting-down:after{border-top:4px solid var(--spbSky3);content:""}.mfui-9-lkvas-table-th__sorting-down:hover:after{border-top-color:var(--content)}.mfui-9-lkvas-table-th__notice-icon{cursor:pointer;display:block;height:24px;width:24px;fill:var(--spbSky3)}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-th{background-color:var(--spbSky0);color:var(--spbSky3);font-size:15px;font-weight:500;line-height:24px;padding:16px 12px;text-align:left}.mfui-9-lkvas-table-th:first-child{border-radius:12px 0 0 12px}.mfui-9-lkvas-table-th:last-child{border-radius:0 12px 12px 0}.mfui-9-lkvas-table-th__inner{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;gap:4px;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-lkvas-table-th_pinned:first-child{left:0;position:sticky;z-index:1}.mfui-9-lkvas-table-th_pinned:first-child:not(.mfui-9-lkvas-table-th_scroll_start,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-th_pinned:last-child{position:sticky;right:0;z-index:1}.mfui-9-lkvas-table-th_pinned:last-child:not(.mfui-9-lkvas-table-th_scroll_end,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}.mfui-9-lkvas-table-th__sorting{display:-webkit-box;display:-ms-flexbox;display:flex;left:100%;position:absolute;top:50%;translate:4px -50%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-lkvas-table-th__sorting-down,.mfui-9-lkvas-table-th__sorting-up{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;cursor:pointer;height:20px;justify-content:center;width:20px}.mfui-9-lkvas-table-th__sorting-down:after,.mfui-9-lkvas-table-th__sorting-up:after{border-left:3px solid transparent;border-right:3px solid transparent;content:"";height:0;width:0}.mfui-9-lkvas-table-th__sorting-up{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-9-lkvas-table-th__sorting-up:after{border-bottom:4px solid var(--spbSky3)}.mfui-9-lkvas-table-th__sorting-up:hover:after,.mfui-9-lkvas-table-th__sorting-up_current:after{border-bottom-color:var(--content)}.mfui-9-lkvas-table-th__sorting-down{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-9-lkvas-table-th__sorting-down:after{border-top:4px solid var(--spbSky3);content:""}.mfui-9-lkvas-table-th__sorting-down:hover:after,.mfui-9-lkvas-table-th__sorting-down_current:after{border-top-color:var(--content)}.mfui-9-lkvas-table-th__notice-icon{cursor:pointer;display:block;height:24px;width:24px;fill:var(--spbSky3)}.mfui-9-lkvas-table-th_active{background-color:var(--spbSky1)}
|
|
@@ -5,11 +5,13 @@ interface ITooltip {
|
|
|
5
5
|
/** Заголовок тултипа */
|
|
6
6
|
title: string;
|
|
7
7
|
/** Текст тултипа */
|
|
8
|
-
text
|
|
8
|
+
text?: string;
|
|
9
9
|
/** Текст кнопки тултипа */
|
|
10
10
|
buttonText?: string;
|
|
11
11
|
/** Отобразить кнопку закрытия тултипа */
|
|
12
12
|
hasCloseButton?: boolean;
|
|
13
|
+
/** Дополнительный контент */
|
|
14
|
+
additionalContent?: React.ReactNode;
|
|
13
15
|
/** Обработчик клика по кнопке тултипа */
|
|
14
16
|
onButtonClick?: (e: React.SyntheticEvent<EventTarget, Event>) => void;
|
|
15
17
|
/** Обработчик клика по кнопке закрытия тултипа */
|
|
@@ -22,6 +24,10 @@ export interface ITableThProps {
|
|
|
22
24
|
pinned?: boolean;
|
|
23
25
|
/** Показать элементы сортировки */
|
|
24
26
|
showSorting?: boolean;
|
|
27
|
+
/** Сделать активной отсортированную ячейку */
|
|
28
|
+
isSortActive?: boolean;
|
|
29
|
+
/** Текущий тип сортировки */
|
|
30
|
+
currentSortType?: SortType;
|
|
25
31
|
/** Минимальная ширина ячейки */
|
|
26
32
|
minWidth?: string;
|
|
27
33
|
/** Ширина ячейки */
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.array.index-of.js";
|
|
4
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
5
|
+
var t = {};
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
7
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
2
12
|
import * as React from 'react';
|
|
3
13
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
4
14
|
import TableContext from "../../contexts/TableContext";
|
|
@@ -8,7 +18,9 @@ var InfoIcon = function InfoIcon(props) {
|
|
|
8
18
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
9
19
|
viewBox: "0 0 32 32"
|
|
10
20
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
clipRule: "evenodd",
|
|
23
|
+
d: "M16 4c6.627 0 12 5.373 12 12s-5.373 12-12 12S4 22.627 4 16 9.373 4 16 4zm0 9.25c-.78 0-1.412.633-1.412 1.412v7.059a1.412 1.412 0 102.824 0v-7.059c0-.78-.632-1.412-1.412-1.412zm-.144-4.477a1.412 1.412 0 100 2.824 1.412 1.412 0 000-2.824z"
|
|
12
24
|
}));
|
|
13
25
|
};
|
|
14
26
|
var cn = cnCreate('mfui-9-lkvas-table-th');
|
|
@@ -17,6 +29,10 @@ var TableTh = function TableTh(_ref) {
|
|
|
17
29
|
pinned = _ref.pinned,
|
|
18
30
|
_ref$showSorting = _ref.showSorting,
|
|
19
31
|
showSorting = _ref$showSorting === void 0 ? false : _ref$showSorting,
|
|
32
|
+
_ref$isSortActive = _ref.isSortActive,
|
|
33
|
+
isSortActive = _ref$isSortActive === void 0 ? false : _ref$isSortActive,
|
|
34
|
+
_ref$currentSortType = _ref.currentSortType,
|
|
35
|
+
currentSortType = _ref$currentSortType === void 0 ? 'up' : _ref$currentSortType,
|
|
20
36
|
minWidth = _ref.minWidth,
|
|
21
37
|
width = _ref.width,
|
|
22
38
|
infoTooltip = _ref.infoTooltip,
|
|
@@ -37,11 +53,15 @@ var TableTh = function TableTh(_ref) {
|
|
|
37
53
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
54
|
className: cn('sorting')
|
|
39
55
|
}, /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.sortingUp), {
|
|
40
|
-
className: cn('sorting-up'
|
|
56
|
+
className: cn('sorting-up', {
|
|
57
|
+
current: isSortActive && currentSortType === 'up'
|
|
58
|
+
}),
|
|
41
59
|
onClick: handleSort('up'),
|
|
42
60
|
role: "presentation"
|
|
43
61
|
})), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.sortingDown), {
|
|
44
|
-
className: cn('sorting-down'
|
|
62
|
+
className: cn('sorting-down', {
|
|
63
|
+
current: isSortActive && currentSortType === 'down'
|
|
64
|
+
}),
|
|
45
65
|
onClick: handleSort('down'),
|
|
46
66
|
role: "presentation"
|
|
47
67
|
})));
|
|
@@ -50,16 +70,19 @@ var TableTh = function TableTh(_ref) {
|
|
|
50
70
|
if (!infoTooltip) {
|
|
51
71
|
return null;
|
|
52
72
|
}
|
|
53
|
-
|
|
73
|
+
var additionalContent = infoTooltip.additionalContent,
|
|
74
|
+
restProps = __rest(infoTooltip, ["additionalContent"]);
|
|
75
|
+
return /*#__PURE__*/React.createElement(TableTooltip, _extends({}, restProps, {
|
|
54
76
|
trigger: /*#__PURE__*/React.createElement(InfoIcon, {
|
|
55
77
|
className: cn('notice-icon')
|
|
56
78
|
})
|
|
57
|
-
}));
|
|
79
|
+
}), !!additionalContent && additionalContent);
|
|
58
80
|
};
|
|
59
81
|
return /*#__PURE__*/React.createElement("th", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
60
82
|
className: cn({
|
|
61
83
|
pinned: pinned,
|
|
62
|
-
scroll: pinned && scrollPosition.horizontal
|
|
84
|
+
scroll: pinned && scrollPosition.horizontal,
|
|
85
|
+
active: isSortActive
|
|
63
86
|
}, [className]),
|
|
64
87
|
style: {
|
|
65
88
|
minWidth: minWidth,
|
|
@@ -8,7 +8,7 @@ export interface ITableTooltipProps {
|
|
|
8
8
|
/** Заголовок */
|
|
9
9
|
title: string;
|
|
10
10
|
/** Текст */
|
|
11
|
-
text
|
|
11
|
+
text?: string;
|
|
12
12
|
/** Текст кнопки */
|
|
13
13
|
buttonText?: string;
|
|
14
14
|
/** Отобразить кнопку закрытия */
|
|
@@ -18,6 +18,7 @@ export interface ITableTooltipProps {
|
|
|
18
18
|
root?: string;
|
|
19
19
|
tooltip?: string;
|
|
20
20
|
};
|
|
21
|
+
children?: React.ReactNode;
|
|
21
22
|
/** Обработчик клика по кнопке */
|
|
22
23
|
onButtonClick?: (e: React.SyntheticEvent<EventTarget, Event>) => void;
|
|
23
24
|
/** Обработчик клика по кнопке закрытия */
|
|
@@ -11,6 +11,7 @@ var TableTooltip = function TableTooltip(_ref) {
|
|
|
11
11
|
buttonText = _ref.buttonText,
|
|
12
12
|
hasCloseButton = _ref.hasCloseButton,
|
|
13
13
|
classes = _ref.classes,
|
|
14
|
+
children = _ref.children,
|
|
14
15
|
onButtonClick = _ref.onButtonClick,
|
|
15
16
|
onCloseButtonClick = _ref.onCloseButtonClick;
|
|
16
17
|
var triggerRef = React.useRef(null);
|
|
@@ -33,6 +34,6 @@ var TableTooltip = function TableTooltip(_ref) {
|
|
|
33
34
|
triggerEvent: "click",
|
|
34
35
|
colorTheme: "blue",
|
|
35
36
|
offset: "small"
|
|
36
|
-
}));
|
|
37
|
+
}, children));
|
|
37
38
|
};
|
|
38
39
|
export default TableTooltip;
|
|
@@ -14,9 +14,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
15
|
var ArrowBackIcon = function ArrowBackIcon(props) {
|
|
16
16
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
17
|
-
viewBox: "0 0
|
|
17
|
+
viewBox: "0 0 20 20"
|
|
18
18
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
-
d: "
|
|
19
|
+
d: "M7.733 6.32a1 1 0 00-1.413-.053L3.488 8.892a1.503 1.503 0 000 2.216l2.832 2.625a1 1 0 001.36-1.466L6.312 11H16a1 1 0 000-2H6.313l1.366-1.267a1 1 0 00.054-1.413z"
|
|
20
20
|
}));
|
|
21
21
|
};
|
|
22
22
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-bottom-bar');
|
|
@@ -18,8 +18,7 @@ var CancelIcon = function CancelIcon(props) {
|
|
|
18
18
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
19
19
|
viewBox: "0 0 20 20"
|
|
20
20
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
21
|
-
|
|
22
|
-
d: "M10 8.8L6.2 5 5 6.2 8.8 10 5 13.8 6.2 15l3.8-3.8 3.8 3.8 1.2-1.2-3.8-3.8L15 6.2 13.8 5 10 8.8z"
|
|
21
|
+
d: "M5.762 5.76a1 1 0 011.415 0l2.795 2.79 2.788-2.785a1.001 1.001 0 011.415 1.414l-2.788 2.785 2.789 2.787a1 1 0 01-1.414 1.414l-2.79-2.787-2.796 2.794A1 1 0 115.76 12.76l2.796-2.794-2.795-2.792a1 1 0 010-1.414z"
|
|
23
22
|
}));
|
|
24
23
|
};
|
|
25
24
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-card-small');
|
|
@@ -17,22 +17,23 @@ var EditIcon = function EditIcon(props) {
|
|
|
17
17
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
18
18
|
viewBox: "0 0 20 20"
|
|
19
19
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
20
|
-
d: "
|
|
20
|
+
d: "M3 16.005a1 1 0 11.001 1.999A1 1 0 013 16.005zm12.646-8.213l-7.92 7.918a1.001 1.001 0 01-.706.293H4.499a.501.501 0 01-.5-.5v-2.52a1 1 0 01.292-.706l7.896-7.894 3.46 3.41zm-1.371-5.496a1.002 1.002 0 011.415 0l2.02 2.02a1 1 0 010 1.414l-1.357 1.355-3.46-3.409 1.382-1.38z"
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
23
|
var SettingsIcon = function SettingsIcon(props) {
|
|
24
24
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
25
25
|
viewBox: "0 0 20 20"
|
|
26
26
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
27
|
-
|
|
27
|
+
fillRule: "evenodd",
|
|
28
|
+
clipRule: "evenodd",
|
|
29
|
+
d: "M6.622 2.182a1.434 1.434 0 011.296.09l.344.2a3.487 3.487 0 003.514.005l.322-.187a1.434 1.434 0 011.304-.085 8.474 8.474 0 011.688 1c.368.281.555.717.556 1.15v.4l.007.234a3.532 3.532 0 001.742 2.813l.314.183c.377.22.658.604.714 1.066.04.336.061.678.061 1.026l-.014.492c-.01.162-.023.324-.041.483a1.44 1.44 0 01-.714 1.074l-.345.2a3.486 3.486 0 00-1.725 3.014v.46c0 .432-.186.867-.555 1.148a8.477 8.477 0 01-1.644.98 1.434 1.434 0 01-1.31-.082l-.35-.204a3.486 3.486 0 00-3.516-.005l-.392.229a1.435 1.435 0 01-1.303.085 8.485 8.485 0 01-1.604-.935c-.378-.28-.57-.72-.57-1.159v-.498a3.531 3.531 0 00-1.75-3.047l-.399-.233a1.44 1.44 0 01-.715-1.082 8.75 8.75 0 01-.037-.456l-.013-.464c0-.33.02-.654.056-.972a1.44 1.44 0 01.714-1.074l.418-.243a3.485 3.485 0 001.718-2.782l.007-.232v-.479c0-.438.193-.879.57-1.159a8.478 8.478 0 011.652-.954zm3.364 4.886a3 3 0 100 6 3 3 0 000-6z"
|
|
28
30
|
}));
|
|
29
31
|
};
|
|
30
32
|
var CancelIcon = function CancelIcon(props) {
|
|
31
33
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
32
34
|
viewBox: "0 0 20 20"
|
|
33
35
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
34
|
-
|
|
35
|
-
d: "M10 8.8L6.2 5 5 6.2 8.8 10 5 13.8 6.2 15l3.8-3.8 3.8 3.8 1.2-1.2-3.8-3.8L15 6.2 13.8 5 10 8.8z"
|
|
36
|
+
d: "M5.762 5.76a1 1 0 011.415 0l2.795 2.79 2.788-2.785a1.001 1.001 0 011.415 1.414l-2.788 2.785 2.789 2.787a1 1 0 01-1.414 1.414l-2.79-2.787-2.796 2.794A1 1 0 115.76 12.76l2.796-2.794-2.795-2.792a1 1 0 010-1.414z"
|
|
36
37
|
}));
|
|
37
38
|
};
|
|
38
39
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-card-cell');
|
|
@@ -21,9 +21,9 @@ var DownloadIcon = function DownloadIcon(props) {
|
|
|
21
21
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
22
22
|
viewBox: "0 0 32 32"
|
|
23
23
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
24
|
-
d: "
|
|
24
|
+
d: "M26.4 14.507a1.6 1.6 0 011.601 1.6c0 1.5-.318 2.984-.93 4.363a11.295 11.295 0 01-2.625 3.67 12.08 12.08 0 01-3.888 2.427 12.67 12.67 0 01-9.115 0 12.083 12.083 0 01-3.888-2.427 11.295 11.295 0 01-2.625-3.67A10.75 10.75 0 014 16.107a1.6 1.6 0 113.2 0c0 1.048.22 2.09.653 3.065a8.097 8.097 0 001.884 2.63 8.881 8.881 0 002.86 1.78 9.453 9.453 0 003.403.631 9.45 9.45 0 003.402-.63 8.883 8.883 0 002.86-1.782 8.096 8.096 0 001.883-2.629 7.55 7.55 0 00.655-3.065 1.6 1.6 0 011.6-1.6z"
|
|
25
25
|
}), /*#__PURE__*/React.createElement("path", {
|
|
26
|
-
d: "
|
|
26
|
+
d: "M16 6.418a1.6 1.6 0 011.6 1.6v5.813l2.062-2.085a1.6 1.6 0 012.275 2.25l-4.231 4.278-.183.167a2.4 2.4 0 01-3.047 0l-.183-.167-4.23-4.278a1.6 1.6 0 112.275-2.25L14.4 13.83V8.018a1.6 1.6 0 011.6-1.6z"
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
29
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-chart');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:52px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;display:inline-block;font-weight:400;height:40px;max-width:100%;min-width:100%;outline:none;overflow:hidden;padding:0;text-align:left;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-lkvas-button_color_green{background-color:var(--brandGreen);color:var(--stcWhite)}@media (pointer:fine){.mfui-9-lkvas-button_color_green:hover{background-color:var(--buttonHoverGreen)}}.mfui-9-lkvas-button_color_green:active{background-color:var(--brandGreen)}.mfui-9-lkvas-button_color_green-soft{background-color:var(--brandGreen20)}@media (pointer:fine){.mfui-9-lkvas-button_color_green-soft:hover{background-color:var(--buttonHoverGreenSoft)}}.mfui-9-lkvas-button_color_green-soft:active{background-color:var(--brandGreen20)}.mfui-9-lkvas-button__inner{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:inherit;padding:0 8px;width:100%}.mfui-9-lkvas-button__support-svg{-ms-flex-negative:0;flex-shrink:0;height:32px;width:32px;fill:currentColor}.mfui-9-lkvas-button__profile-svg{-ms-flex-negative:0;flex-shrink:0;height:20px;width:20px;fill:currentColor}.mfui-9-lkvas-button__text{margin:0 4px 0 8px;overflow:hidden}.mfui-9-lkvas-button_has-icon .mfui-9-lkvas-button__text{margin-left:4px}.mfui-9-lkvas-button__title{font-size:15px;font-weight:500;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__subtitle{font-size:12px;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__arrow{-ms-flex-negative:0;background-color:var(--stcWhite);border-radius:50%;flex-shrink:0;height:24px;-webkit-transition:rotate .3s;transition:rotate .3s;width:24px}.mfui-9-lkvas-button_opened .mfui-9-lkvas-button__arrow{rotate:-180deg}.mfui-9-lkvas-button__arrow-svg{height:100%;width:100%;fill:var(--
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:52px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;display:inline-block;font-weight:400;height:40px;max-width:100%;min-width:100%;outline:none;overflow:hidden;padding:0;text-align:left;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-lkvas-button_color_green{background-color:var(--brandGreen);color:var(--stcWhite)}@media (pointer:fine){.mfui-9-lkvas-button_color_green:hover{background-color:var(--buttonHoverGreen)}}.mfui-9-lkvas-button_color_green:active{background-color:var(--brandGreen)}.mfui-9-lkvas-button_color_green-soft{background-color:var(--brandGreen20)}@media (pointer:fine){.mfui-9-lkvas-button_color_green-soft:hover{background-color:var(--buttonHoverGreenSoft)}}.mfui-9-lkvas-button_color_green-soft:active{background-color:var(--brandGreen20)}.mfui-9-lkvas-button__inner{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;height:inherit;padding:0 8px;width:100%}.mfui-9-lkvas-button__support-svg{-ms-flex-negative:0;flex-shrink:0;height:32px;width:32px;fill:currentColor}.mfui-9-lkvas-button__profile-svg{-ms-flex-negative:0;flex-shrink:0;height:20px;width:20px;fill:currentColor}.mfui-9-lkvas-button__text{margin:0 4px 0 8px;overflow:hidden}.mfui-9-lkvas-button_has-icon .mfui-9-lkvas-button__text{margin-left:4px}.mfui-9-lkvas-button__title{font-size:15px;font-weight:500;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__subtitle{font-size:12px;line-height:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-9-lkvas-button__arrow{-ms-flex-negative:0;background-color:var(--stcWhite);border-radius:50%;flex-shrink:0;height:24px;-webkit-transition:rotate .3s;transition:rotate .3s;width:24px}.mfui-9-lkvas-button_opened .mfui-9-lkvas-button__arrow{rotate:-180deg}.mfui-9-lkvas-button__arrow-svg{height:100%;width:100%;fill:var(--stcBlack)}
|
|
@@ -15,31 +15,25 @@ var ProfileIcon = function ProfileIcon(props) {
|
|
|
15
15
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
16
16
|
viewBox: "0 0 20 20"
|
|
17
17
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
18
|
-
d: "
|
|
18
|
+
d: "M15.034 9c.552 0 1.004.45.963 1-.334 4.5-2.892 8-5.997 8-3.106 0-5.664-3.5-5.997-8-.041-.55.41-1 .962-1h10.069zM10 2a3.008 3.008 0 013.017 3c0 1.657-1.35 3-3.017 3a3.008 3.008 0 01-3.017-3c0-1.657 1.35-3 3.017-3z"
|
|
19
19
|
}));
|
|
20
20
|
};
|
|
21
21
|
var SupportIcon = function SupportIcon(props) {
|
|
22
22
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
23
23
|
viewBox: "0 0 32 32"
|
|
24
24
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
31
|
-
cx: 19.5,
|
|
32
|
-
cy: 16.5,
|
|
33
|
-
r: 1.5
|
|
25
|
+
fillRule: "evenodd",
|
|
26
|
+
clipRule: "evenodd",
|
|
27
|
+
d: "M15.992 5c3.588 0 6.514 1.616 6.681 3.644a2.699 2.699 0 011.32 2.325v1.257h1.34l.273.014A2.685 2.685 0 0128 14.922v3.976c0 1.396-1.05 2.545-2.395 2.683l-.272.013H23.98v1.347c0 2.242-1.799 4.059-4.017 4.059h-4.537c-1.105 0-2-.906-2-2.022a2.01 2.01 0 012-2.022h1.333c1.104 0 2 .905 2 2.022 0 .236-.042.463-.116.674h1.32c1.482 0 2.683-1.214 2.684-2.711v-5c0-.067.013-.132.031-.194v-2.064c-.741-.346-1.303-1.1-1.43-1.982-.119-.812-.308-1.546-.556-2.154-1.208.682-2.867 1.105-4.699 1.105-1.875 0-3.57-.442-4.785-1.153-.258.637-.45 1.417-.566 2.283-.113.84-.64 1.558-1.34 1.897v5.915H6.667l-.272-.013C5.05 21.443 4 20.294 4 18.898v-3.976a2.685 2.685 0 012.395-2.682l.272-.014h1.325v-1.257A2.7 2.7 0 019.31 8.644C9.476 6.616 12.404 5 15.992 5z"
|
|
28
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
29
|
+
d: "M13.328 16.207a1.34 1.34 0 011.334 1.347 1.34 1.34 0 01-1.334 1.346 1.34 1.34 0 01-1.333-1.346 1.34 1.34 0 011.333-1.347zm5.335 0a1.34 1.34 0 011.333 1.347 1.34 1.34 0 01-1.333 1.346 1.34 1.34 0 01-1.334-1.346 1.34 1.34 0 011.334-1.347z"
|
|
34
30
|
}));
|
|
35
31
|
};
|
|
36
32
|
var ArrowIcon = function ArrowIcon(props) {
|
|
37
33
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
38
34
|
viewBox: "0 0 20 20"
|
|
39
35
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
40
|
-
d: "
|
|
41
|
-
fillRule: "evenodd",
|
|
42
|
-
clipRule: "evenodd"
|
|
36
|
+
d: "M10.465 11.798a.609.609 0 01-.907 0L7.187 9.25c-.41-.44-.1-1.25.476-1.25h4.679c.575 0 .879.811.47 1.25l-2.347 2.548z"
|
|
43
37
|
}));
|
|
44
38
|
};
|
|
45
39
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-button');
|
|
@@ -18,9 +18,7 @@ var ArrowIcon = function ArrowIcon(props) {
|
|
|
18
18
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
19
19
|
viewBox: "0 0 20 20"
|
|
20
20
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
21
|
-
d: "
|
|
22
|
-
fillRule: "evenodd",
|
|
23
|
-
clipRule: "evenodd"
|
|
21
|
+
d: "M10.465 11.798a.609.609 0 01-.907 0L7.187 9.25c-.41-.44-.1-1.25.476-1.25h4.679c.575 0 .879.811.47 1.25l-2.347 2.548z"
|
|
24
22
|
}));
|
|
25
23
|
};
|
|
26
24
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-lk-select');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-td{background-color:var(--base);font-size:15px;font-weight:400;line-height:24px;padding:12px}.mfui-9-lkvas-table-td_pinned:first-child{left:0;position:sticky}.mfui-9-lkvas-table-td_pinned:first-child:not(.mfui-9-lkvas-table-td_scroll_start,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-td_pinned:last-child{position:sticky;right:0}.mfui-9-lkvas-table-td_pinned:last-child:not(.mfui-9-lkvas-table-td_scroll_end,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-td{background-color:var(--base);font-size:15px;font-weight:400;line-height:24px;padding:12px}.mfui-9-lkvas-table-td_pinned:first-child{left:0;position:sticky}.mfui-9-lkvas-table-td_pinned:first-child:not(.mfui-9-lkvas-table-td_scroll_start,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-td_pinned:last-child{position:sticky;right:0}.mfui-9-lkvas-table-td_pinned:last-child:not(.mfui-9-lkvas-table-td_scroll_end,.mfui-9-lkvas-table-td_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}.mfui-9-lkvas-table-td_active{background-color:var(--spbSky0)}
|
|
@@ -7,6 +7,8 @@ export interface ITableTdProps {
|
|
|
7
7
|
colSpan?: number;
|
|
8
8
|
/** Фиксация ячейки во время горизонтальной прокрутки (только для первой и последней ячейки в строке) */
|
|
9
9
|
pinned?: boolean;
|
|
10
|
+
/** Сделать активной отсортированную ячейку */
|
|
11
|
+
isSortActive?: boolean;
|
|
10
12
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
11
13
|
dataAttrs?: {
|
|
12
14
|
root?: Record<string, string>;
|
|
@@ -17,6 +17,8 @@ var TableTd = function TableTd(_ref) {
|
|
|
17
17
|
var className = _ref.className,
|
|
18
18
|
colSpan = _ref.colSpan,
|
|
19
19
|
pinned = _ref.pinned,
|
|
20
|
+
_ref$isSortActive = _ref.isSortActive,
|
|
21
|
+
isSortActive = _ref$isSortActive === void 0 ? false : _ref$isSortActive,
|
|
20
22
|
dataAttrs = _ref.dataAttrs,
|
|
21
23
|
children = _ref.children;
|
|
22
24
|
var _React$useContext = React.useContext(_TableContext["default"]),
|
|
@@ -24,7 +26,8 @@ var TableTd = function TableTd(_ref) {
|
|
|
24
26
|
return /*#__PURE__*/React.createElement("td", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
25
27
|
className: cn({
|
|
26
28
|
pinned: pinned,
|
|
27
|
-
scroll: pinned && scrollPosition.horizontal
|
|
29
|
+
scroll: pinned && scrollPosition.horizontal,
|
|
30
|
+
active: isSortActive
|
|
28
31
|
}, [className]),
|
|
29
32
|
colSpan: colSpan
|
|
30
33
|
}), children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-th{background-color:var(--spbSky0);color:var(--spbSky3);font-size:15px;font-weight:500;line-height:24px;padding:16px 12px;text-align:left}.mfui-9-lkvas-table-th:first-child{border-radius:12px 0 0 12px}.mfui-9-lkvas-table-th:last-child{border-radius:0 12px 12px 0}.mfui-9-lkvas-table-th__inner{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;gap:4px;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-lkvas-table-th_pinned:first-child{left:0;position:sticky;z-index:1}.mfui-9-lkvas-table-th_pinned:first-child:not(.mfui-9-lkvas-table-th_scroll_start,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-th_pinned:last-child{position:sticky;right:0;z-index:1}.mfui-9-lkvas-table-th_pinned:last-child:not(.mfui-9-lkvas-table-th_scroll_end,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}.mfui-9-lkvas-table-th__sorting{display:-webkit-box;display:-ms-flexbox;display:flex;left:100%;position:absolute;top:50%;translate:4px -50%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-lkvas-table-th__sorting-down,.mfui-9-lkvas-table-th__sorting-up{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;cursor:pointer;height:20px;justify-content:center;width:20px}.mfui-9-lkvas-table-th__sorting-down:after,.mfui-9-lkvas-table-th__sorting-up:after{border-left:3px solid transparent;border-right:3px solid transparent;content:"";height:0;width:0}.mfui-9-lkvas-table-th__sorting-up{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-9-lkvas-table-th__sorting-up:after{border-bottom:4px solid var(--spbSky3)}.mfui-9-lkvas-table-th__sorting-up:hover:after{border-bottom-color:var(--content)}.mfui-9-lkvas-table-th__sorting-down{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-9-lkvas-table-th__sorting-down:after{border-top:4px solid var(--spbSky3);content:""}.mfui-9-lkvas-table-th__sorting-down:hover:after{border-top-color:var(--content)}.mfui-9-lkvas-table-th__notice-icon{cursor:pointer;display:block;height:24px;width:24px;fill:var(--spbSky3)}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-lkvas-table-th{background-color:var(--spbSky0);color:var(--spbSky3);font-size:15px;font-weight:500;line-height:24px;padding:16px 12px;text-align:left}.mfui-9-lkvas-table-th:first-child{border-radius:12px 0 0 12px}.mfui-9-lkvas-table-th:last-child{border-radius:0 12px 12px 0}.mfui-9-lkvas-table-th__inner{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;gap:4px;position:relative;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-lkvas-table-th_pinned:first-child{left:0;position:sticky;z-index:1}.mfui-9-lkvas-table-th_pinned:first-child:not(.mfui-9-lkvas-table-th_scroll_start,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(90deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";position:absolute;right:-18px;top:0;width:18px}.mfui-9-lkvas-table-th_pinned:last-child{position:sticky;right:0;z-index:1}.mfui-9-lkvas-table-th_pinned:last-child:not(.mfui-9-lkvas-table-th_scroll_end,.mfui-9-lkvas-table-th_scroll_none):after{background:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.04)),color-stop(49.5%,rgba(0,0,0,.01)),to(hsla(0,0%,100%,0)));background:linear-gradient(270deg,rgba(0,0,0,.04),rgba(0,0,0,.01) 49.5%,hsla(0,0%,100%,0));bottom:0;content:"";left:-18px;position:absolute;top:0;width:18px}.mfui-9-lkvas-table-th__sorting{display:-webkit-box;display:-ms-flexbox;display:flex;left:100%;position:absolute;top:50%;translate:4px -50%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-lkvas-table-th__sorting-down,.mfui-9-lkvas-table-th__sorting-up{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;cursor:pointer;height:20px;justify-content:center;width:20px}.mfui-9-lkvas-table-th__sorting-down:after,.mfui-9-lkvas-table-th__sorting-up:after{border-left:3px solid transparent;border-right:3px solid transparent;content:"";height:0;width:0}.mfui-9-lkvas-table-th__sorting-up{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-9-lkvas-table-th__sorting-up:after{border-bottom:4px solid var(--spbSky3)}.mfui-9-lkvas-table-th__sorting-up:hover:after,.mfui-9-lkvas-table-th__sorting-up_current:after{border-bottom-color:var(--content)}.mfui-9-lkvas-table-th__sorting-down{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-9-lkvas-table-th__sorting-down:after{border-top:4px solid var(--spbSky3);content:""}.mfui-9-lkvas-table-th__sorting-down:hover:after,.mfui-9-lkvas-table-th__sorting-down_current:after{border-top-color:var(--content)}.mfui-9-lkvas-table-th__notice-icon{cursor:pointer;display:block;height:24px;width:24px;fill:var(--spbSky3)}.mfui-9-lkvas-table-th_active{background-color:var(--spbSky1)}
|
|
@@ -5,11 +5,13 @@ interface ITooltip {
|
|
|
5
5
|
/** Заголовок тултипа */
|
|
6
6
|
title: string;
|
|
7
7
|
/** Текст тултипа */
|
|
8
|
-
text
|
|
8
|
+
text?: string;
|
|
9
9
|
/** Текст кнопки тултипа */
|
|
10
10
|
buttonText?: string;
|
|
11
11
|
/** Отобразить кнопку закрытия тултипа */
|
|
12
12
|
hasCloseButton?: boolean;
|
|
13
|
+
/** Дополнительный контент */
|
|
14
|
+
additionalContent?: React.ReactNode;
|
|
13
15
|
/** Обработчик клика по кнопке тултипа */
|
|
14
16
|
onButtonClick?: (e: React.SyntheticEvent<EventTarget, Event>) => void;
|
|
15
17
|
/** Обработчик клика по кнопке закрытия тултипа */
|
|
@@ -22,6 +24,10 @@ export interface ITableThProps {
|
|
|
22
24
|
pinned?: boolean;
|
|
23
25
|
/** Показать элементы сортировки */
|
|
24
26
|
showSorting?: boolean;
|
|
27
|
+
/** Сделать активной отсортированную ячейку */
|
|
28
|
+
isSortActive?: boolean;
|
|
29
|
+
/** Текущий тип сортировки */
|
|
30
|
+
currentSortType?: SortType;
|
|
25
31
|
/** Минимальная ширина ячейки */
|
|
26
32
|
minWidth?: string;
|
|
27
33
|
/** Ширина ячейки */
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
require("core-js/modules/es.symbol.js");
|
|
10
|
+
require("core-js/modules/es.array.index-of.js");
|
|
9
11
|
var React = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _uiHelpers = require("@megafon/ui-helpers");
|
|
11
13
|
var _TableContext = _interopRequireDefault(require("../../contexts/TableContext"));
|
|
@@ -13,11 +15,21 @@ var _TableTooltip = _interopRequireDefault(require("../TableTooltip/TableTooltip
|
|
|
13
15
|
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); }
|
|
14
16
|
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; }
|
|
15
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
16
26
|
var InfoIcon = function InfoIcon(props) {
|
|
17
27
|
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
18
28
|
viewBox: "0 0 32 32"
|
|
19
29
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
20
|
-
|
|
30
|
+
fillRule: "evenodd",
|
|
31
|
+
clipRule: "evenodd",
|
|
32
|
+
d: "M16 4c6.627 0 12 5.373 12 12s-5.373 12-12 12S4 22.627 4 16 9.373 4 16 4zm0 9.25c-.78 0-1.412.633-1.412 1.412v7.059a1.412 1.412 0 102.824 0v-7.059c0-.78-.632-1.412-1.412-1.412zm-.144-4.477a1.412 1.412 0 100 2.824 1.412 1.412 0 000-2.824z"
|
|
21
33
|
}));
|
|
22
34
|
};
|
|
23
35
|
var cn = (0, _uiHelpers.cnCreate)('mfui-9-lkvas-table-th');
|
|
@@ -26,6 +38,10 @@ var TableTh = function TableTh(_ref) {
|
|
|
26
38
|
pinned = _ref.pinned,
|
|
27
39
|
_ref$showSorting = _ref.showSorting,
|
|
28
40
|
showSorting = _ref$showSorting === void 0 ? false : _ref$showSorting,
|
|
41
|
+
_ref$isSortActive = _ref.isSortActive,
|
|
42
|
+
isSortActive = _ref$isSortActive === void 0 ? false : _ref$isSortActive,
|
|
43
|
+
_ref$currentSortType = _ref.currentSortType,
|
|
44
|
+
currentSortType = _ref$currentSortType === void 0 ? 'up' : _ref$currentSortType,
|
|
29
45
|
minWidth = _ref.minWidth,
|
|
30
46
|
width = _ref.width,
|
|
31
47
|
infoTooltip = _ref.infoTooltip,
|
|
@@ -46,11 +62,15 @@ var TableTh = function TableTh(_ref) {
|
|
|
46
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
63
|
className: cn('sorting')
|
|
48
64
|
}, /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.sortingUp), {
|
|
49
|
-
className: cn('sorting-up'
|
|
65
|
+
className: cn('sorting-up', {
|
|
66
|
+
current: isSortActive && currentSortType === 'up'
|
|
67
|
+
}),
|
|
50
68
|
onClick: handleSort('up'),
|
|
51
69
|
role: "presentation"
|
|
52
70
|
})), /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.sortingDown), {
|
|
53
|
-
className: cn('sorting-down'
|
|
71
|
+
className: cn('sorting-down', {
|
|
72
|
+
current: isSortActive && currentSortType === 'down'
|
|
73
|
+
}),
|
|
54
74
|
onClick: handleSort('down'),
|
|
55
75
|
role: "presentation"
|
|
56
76
|
})));
|
|
@@ -59,16 +79,19 @@ var TableTh = function TableTh(_ref) {
|
|
|
59
79
|
if (!infoTooltip) {
|
|
60
80
|
return null;
|
|
61
81
|
}
|
|
62
|
-
|
|
82
|
+
var additionalContent = infoTooltip.additionalContent,
|
|
83
|
+
restProps = __rest(infoTooltip, ["additionalContent"]);
|
|
84
|
+
return /*#__PURE__*/React.createElement(_TableTooltip["default"], (0, _extends2["default"])({}, restProps, {
|
|
63
85
|
trigger: /*#__PURE__*/React.createElement(InfoIcon, {
|
|
64
86
|
className: cn('notice-icon')
|
|
65
87
|
})
|
|
66
|
-
}));
|
|
88
|
+
}), !!additionalContent && additionalContent);
|
|
67
89
|
};
|
|
68
90
|
return /*#__PURE__*/React.createElement("th", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
69
91
|
className: cn({
|
|
70
92
|
pinned: pinned,
|
|
71
|
-
scroll: pinned && scrollPosition.horizontal
|
|
93
|
+
scroll: pinned && scrollPosition.horizontal,
|
|
94
|
+
active: isSortActive
|
|
72
95
|
}, [className]),
|
|
73
96
|
style: {
|
|
74
97
|
minWidth: minWidth,
|
|
@@ -8,7 +8,7 @@ export interface ITableTooltipProps {
|
|
|
8
8
|
/** Заголовок */
|
|
9
9
|
title: string;
|
|
10
10
|
/** Текст */
|
|
11
|
-
text
|
|
11
|
+
text?: string;
|
|
12
12
|
/** Текст кнопки */
|
|
13
13
|
buttonText?: string;
|
|
14
14
|
/** Отобразить кнопку закрытия */
|
|
@@ -18,6 +18,7 @@ export interface ITableTooltipProps {
|
|
|
18
18
|
root?: string;
|
|
19
19
|
tooltip?: string;
|
|
20
20
|
};
|
|
21
|
+
children?: React.ReactNode;
|
|
21
22
|
/** Обработчик клика по кнопке */
|
|
22
23
|
onButtonClick?: (e: React.SyntheticEvent<EventTarget, Event>) => void;
|
|
23
24
|
/** Обработчик клика по кнопке закрытия */
|
|
@@ -19,6 +19,7 @@ var TableTooltip = function TableTooltip(_ref) {
|
|
|
19
19
|
buttonText = _ref.buttonText,
|
|
20
20
|
hasCloseButton = _ref.hasCloseButton,
|
|
21
21
|
classes = _ref.classes,
|
|
22
|
+
children = _ref.children,
|
|
22
23
|
onButtonClick = _ref.onButtonClick,
|
|
23
24
|
onCloseButtonClick = _ref.onCloseButtonClick;
|
|
24
25
|
var triggerRef = React.useRef(null);
|
|
@@ -41,6 +42,6 @@ var TableTooltip = function TableTooltip(_ref) {
|
|
|
41
42
|
triggerEvent: "click",
|
|
42
43
|
colorTheme: "blue",
|
|
43
44
|
offset: "small"
|
|
44
|
-
}));
|
|
45
|
+
}, children));
|
|
45
46
|
};
|
|
46
47
|
var _default = exports["default"] = TableTooltip;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-lk-vas",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"typescript": "^5.3.3"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@megafon/ui-core": "^9.0.0
|
|
81
|
-
"@megafon/ui-helpers": "^5.0.0
|
|
82
|
-
"@megafon/ui-icons": "^4.0.0
|
|
80
|
+
"@megafon/ui-core": "^9.0.0",
|
|
81
|
+
"@megafon/ui-helpers": "^5.0.0",
|
|
82
|
+
"@megafon/ui-icons": "^4.0.0",
|
|
83
83
|
"chart.js": "4.0.1",
|
|
84
84
|
"lodash.throttle": "^4.1.1"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "7bc0de9281b32fa6cda0c6d6e2b48bec67be30b7"
|
|
87
87
|
}
|