@megafon/ui-lk-vas 0.10.7 → 0.10.9
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/package.json +5 -5
- package/dist/es/components/BottomBar/BottomBar.css +0 -1
- package/dist/es/components/BottomBar/BottomBar.d.ts +0 -28
- package/dist/es/components/BottomBar/BottomBar.js +0 -48
- package/dist/es/components/Cards/CardBig/CardBig.css +0 -1
- package/dist/es/components/Cards/CardBig/CardBig.d.ts +0 -13
- package/dist/es/components/Cards/CardBig/CardBig.js +0 -31
- package/dist/es/components/Cards/CardSmall/CardSmall.css +0 -1
- package/dist/es/components/Cards/CardSmall/CardSmall.d.ts +0 -36
- package/dist/es/components/Cards/CardSmall/CardSmall.js +0 -68
- package/dist/es/components/Cards/components/_CardCell/CardCell.css +0 -1
- package/dist/es/components/Cards/components/_CardCell/CardCell.d.ts +0 -41
- package/dist/es/components/Cards/components/_CardCell/CardCell.js +0 -110
- package/dist/es/components/Charts/Chart/Chart.css +0 -1
- package/dist/es/components/Charts/Chart/Chart.d.ts +0 -5
- package/dist/es/components/Charts/Chart/Chart.js +0 -104
- package/dist/es/components/Charts/Chart/components/_ChartBar/ChartBar.css +0 -1
- package/dist/es/components/Charts/Chart/components/_ChartBar/ChartBar.d.ts +0 -9
- package/dist/es/components/Charts/Chart/components/_ChartBar/ChartBar.js +0 -110
- package/dist/es/components/Charts/Chart/components/_ChartBase/ChartBase.d.ts +0 -12
- package/dist/es/components/Charts/Chart/components/_ChartBase/ChartBase.js +0 -41
- package/dist/es/components/Charts/Chart/components/_ChartBase/helpers.d.ts +0 -2
- package/dist/es/components/Charts/Chart/components/_ChartBase/helpers.js +0 -49
- package/dist/es/components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut.css +0 -1
- package/dist/es/components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut.d.ts +0 -9
- package/dist/es/components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut.js +0 -65
- package/dist/es/components/Charts/Chart/components/_ChartLegend/ChartLegend.css +0 -1
- package/dist/es/components/Charts/Chart/components/_ChartLegend/ChartLegend.d.ts +0 -12
- package/dist/es/components/Charts/Chart/components/_ChartLegend/ChartLegend.js +0 -29
- package/dist/es/components/Charts/Chart/components/_ChartLine/ChartLine.css +0 -1
- package/dist/es/components/Charts/Chart/components/_ChartLine/ChartLine.d.ts +0 -9
- package/dist/es/components/Charts/Chart/components/_ChartLine/ChartLine.js +0 -112
- package/dist/es/components/Charts/Chart/components/chartColors.d.ts +0 -16
- package/dist/es/components/Charts/Chart/components/chartColors.js +0 -42
- package/dist/es/components/Charts/Chart/img/chart.png +0 -0
- package/dist/es/components/Charts/Chart/types.d.ts +0 -40
- package/dist/es/components/Charts/Chart/types.js +0 -1
- package/dist/es/components/Header/Header.css +0 -1
- package/dist/es/components/Header/Header.d.ts +0 -33
- package/dist/es/components/Header/Header.js +0 -48
- package/dist/es/components/Header/components/_HeaderAccount/HeaderAccount.css +0 -1
- package/dist/es/components/Header/components/_HeaderAccount/HeaderAccount.d.ts +0 -21
- package/dist/es/components/Header/components/_HeaderAccount/HeaderAccount.js +0 -43
- package/dist/es/components/Header/components/_HeaderButton/HeaderButton.css +0 -1
- package/dist/es/components/Header/components/_HeaderButton/HeaderButton.d.ts +0 -20
- package/dist/es/components/Header/components/_HeaderButton/HeaderButton.js +0 -82
- package/dist/es/components/Header/components/_HeaderFavorites/HeaderFavorites.css +0 -1
- package/dist/es/components/Header/components/_HeaderFavorites/HeaderFavorites.d.ts +0 -19
- package/dist/es/components/Header/components/_HeaderFavorites/HeaderFavorites.js +0 -40
- package/dist/es/components/Header/components/_HeaderFinance/HeaderFinance.css +0 -1
- package/dist/es/components/Header/components/_HeaderFinance/HeaderFinance.d.ts +0 -28
- package/dist/es/components/Header/components/_HeaderFinance/HeaderFinance.js +0 -23
- package/dist/es/components/Header/components/_HeaderLkSelect/HeaderLkSelect.css +0 -1
- package/dist/es/components/Header/components/_HeaderLkSelect/HeaderLkSelect.d.ts +0 -19
- package/dist/es/components/Header/components/_HeaderLkSelect/HeaderLkSelect.js +0 -51
- package/dist/es/components/Header/components/_HeaderLogo/HeaderLogo.css +0 -1
- package/dist/es/components/Header/components/_HeaderLogo/HeaderLogo.d.ts +0 -18
- package/dist/es/components/Header/components/_HeaderLogo/HeaderLogo.js +0 -59
- package/dist/es/components/Header/components/_HeaderSupport/HeaderSupport.d.ts +0 -19
- package/dist/es/components/Header/components/_HeaderSupport/HeaderSupport.js +0 -38
- package/dist/es/components/Layout/Layout.css +0 -1
- package/dist/es/components/Layout/Layout.d.ts +0 -10
- package/dist/es/components/Layout/Layout.js +0 -23
- package/dist/es/components/NavBar/NavBar.css +0 -1
- package/dist/es/components/NavBar/NavBar.d.ts +0 -23
- package/dist/es/components/NavBar/NavBar.js +0 -31
- package/dist/es/components/NavBar/components/_NavBarItem/NavBarItem.css +0 -1
- package/dist/es/components/NavBar/components/_NavBarItem/NavBarItem.d.ts +0 -22
- package/dist/es/components/NavBar/components/_NavBarItem/NavBarItem.js +0 -37
- package/dist/es/components/Table/Table.css +0 -1
- package/dist/es/components/Table/Table.d.ts +0 -15
- package/dist/es/components/Table/Table.js +0 -76
- package/dist/es/components/Table/components/TableBody/TableBody.d.ts +0 -11
- package/dist/es/components/Table/components/TableBody/TableBody.js +0 -13
- package/dist/es/components/Table/components/TableHead/TableHead.d.ts +0 -11
- package/dist/es/components/Table/components/TableHead/TableHead.js +0 -13
- package/dist/es/components/Table/components/TableSettings/TableSettings.css +0 -1
- package/dist/es/components/Table/components/TableSettings/TableSettings.d.ts +0 -23
- package/dist/es/components/Table/components/TableSettings/TableSettings.js +0 -50
- package/dist/es/components/Table/components/TableTd/TableTd.css +0 -1
- package/dist/es/components/Table/components/TableTd/TableTd.d.ts +0 -18
- package/dist/es/components/Table/components/TableTd/TableTd.js +0 -26
- package/dist/es/components/Table/components/TableTh/TableTh.css +0 -1
- package/dist/es/components/Table/components/TableTh/TableTh.d.ts +0 -45
- package/dist/es/components/Table/components/TableTh/TableTh.js +0 -81
- package/dist/es/components/Table/components/TableTooltip/TableTooltip.css +0 -1
- package/dist/es/components/Table/components/TableTooltip/TableTooltip.d.ts +0 -27
- package/dist/es/components/Table/components/TableTooltip/TableTooltip.js +0 -38
- package/dist/es/components/Table/components/TableTr/TableTr.css +0 -1
- package/dist/es/components/Table/components/TableTr/TableTr.d.ts +0 -12
- package/dist/es/components/Table/components/TableTr/TableTr.js +0 -14
- package/dist/es/components/Table/contexts/TableContext.d.ts +0 -6
- package/dist/es/components/Table/contexts/TableContext.js +0 -8
- package/dist/es/components/Table/helpers.d.ts +0 -2
- package/dist/es/components/Table/helpers.js +0 -12
- package/dist/es/components/Table/types.d.ts +0 -5
- package/dist/es/components/Table/types.js +0 -1
- package/dist/es/components/_Dropdown/Dropdown.css +0 -1
- package/dist/es/components/_Dropdown/Dropdown.d.ts +0 -12
- package/dist/es/components/_Dropdown/Dropdown.js +0 -54
- package/dist/es/components/_DropdownInfo/DropdownInfo.css +0 -1
- package/dist/es/components/_DropdownInfo/DropdownInfo.d.ts +0 -9
- package/dist/es/components/_DropdownInfo/DropdownInfo.js +0 -22
- package/dist/es/components/_DropdownItem/DropdownItem.css +0 -1
- package/dist/es/components/_DropdownItem/DropdownItem.d.ts +0 -34
- package/dist/es/components/_DropdownItem/DropdownItem.js +0 -39
- package/dist/es/helpers/setRelAttribute.d.ts +0 -3
- package/dist/es/helpers/setRelAttribute.js +0 -9
- package/dist/es/hooks/useCssVariable.d.ts +0 -2
- package/dist/es/hooks/useCssVariable.js +0 -22
- package/dist/es/index.d.ts +0 -33
- package/dist/es/index.js +0 -33
- package/dist/es/styles/constants.css +0 -0
- package/dist/lib/components/BottomBar/BottomBar.css +0 -1
- package/dist/lib/components/BottomBar/BottomBar.d.ts +0 -28
- package/dist/lib/components/BottomBar/BottomBar.js +0 -57
- package/dist/lib/components/Cards/CardBig/CardBig.css +0 -1
- package/dist/lib/components/Cards/CardBig/CardBig.d.ts +0 -13
- package/dist/lib/components/Cards/CardBig/CardBig.js +0 -40
- package/dist/lib/components/Cards/CardSmall/CardSmall.css +0 -1
- package/dist/lib/components/Cards/CardSmall/CardSmall.d.ts +0 -36
- package/dist/lib/components/Cards/CardSmall/CardSmall.js +0 -77
- package/dist/lib/components/Cards/components/_CardCell/CardCell.css +0 -1
- package/dist/lib/components/Cards/components/_CardCell/CardCell.d.ts +0 -41
- package/dist/lib/components/Cards/components/_CardCell/CardCell.js +0 -119
- package/dist/lib/components/Charts/Chart/Chart.css +0 -1
- package/dist/lib/components/Charts/Chart/Chart.d.ts +0 -5
- package/dist/lib/components/Charts/Chart/Chart.js +0 -113
- package/dist/lib/components/Charts/Chart/components/_ChartBar/ChartBar.css +0 -1
- package/dist/lib/components/Charts/Chart/components/_ChartBar/ChartBar.d.ts +0 -9
- package/dist/lib/components/Charts/Chart/components/_ChartBar/ChartBar.js +0 -119
- package/dist/lib/components/Charts/Chart/components/_ChartBase/ChartBase.d.ts +0 -12
- package/dist/lib/components/Charts/Chart/components/_ChartBase/ChartBase.js +0 -51
- package/dist/lib/components/Charts/Chart/components/_ChartBase/helpers.d.ts +0 -2
- package/dist/lib/components/Charts/Chart/components/_ChartBase/helpers.js +0 -55
- package/dist/lib/components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut.css +0 -1
- package/dist/lib/components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut.d.ts +0 -9
- package/dist/lib/components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut.js +0 -74
- package/dist/lib/components/Charts/Chart/components/_ChartLegend/ChartLegend.css +0 -1
- package/dist/lib/components/Charts/Chart/components/_ChartLegend/ChartLegend.d.ts +0 -12
- package/dist/lib/components/Charts/Chart/components/_ChartLegend/ChartLegend.js +0 -37
- package/dist/lib/components/Charts/Chart/components/_ChartLine/ChartLine.css +0 -1
- package/dist/lib/components/Charts/Chart/components/_ChartLine/ChartLine.d.ts +0 -9
- package/dist/lib/components/Charts/Chart/components/_ChartLine/ChartLine.js +0 -121
- package/dist/lib/components/Charts/Chart/components/chartColors.d.ts +0 -16
- package/dist/lib/components/Charts/Chart/components/chartColors.js +0 -48
- package/dist/lib/components/Charts/Chart/img/chart.png +0 -0
- package/dist/lib/components/Charts/Chart/types.d.ts +0 -40
- package/dist/lib/components/Charts/Chart/types.js +0 -5
- package/dist/lib/components/Header/Header.css +0 -1
- package/dist/lib/components/Header/Header.d.ts +0 -33
- package/dist/lib/components/Header/Header.js +0 -57
- package/dist/lib/components/Header/components/_HeaderAccount/HeaderAccount.css +0 -1
- package/dist/lib/components/Header/components/_HeaderAccount/HeaderAccount.d.ts +0 -21
- package/dist/lib/components/Header/components/_HeaderAccount/HeaderAccount.js +0 -52
- package/dist/lib/components/Header/components/_HeaderButton/HeaderButton.css +0 -1
- package/dist/lib/components/Header/components/_HeaderButton/HeaderButton.d.ts +0 -20
- package/dist/lib/components/Header/components/_HeaderButton/HeaderButton.js +0 -91
- package/dist/lib/components/Header/components/_HeaderFavorites/HeaderFavorites.css +0 -1
- package/dist/lib/components/Header/components/_HeaderFavorites/HeaderFavorites.d.ts +0 -19
- package/dist/lib/components/Header/components/_HeaderFavorites/HeaderFavorites.js +0 -49
- package/dist/lib/components/Header/components/_HeaderFinance/HeaderFinance.css +0 -1
- package/dist/lib/components/Header/components/_HeaderFinance/HeaderFinance.d.ts +0 -28
- package/dist/lib/components/Header/components/_HeaderFinance/HeaderFinance.js +0 -32
- package/dist/lib/components/Header/components/_HeaderLkSelect/HeaderLkSelect.css +0 -1
- package/dist/lib/components/Header/components/_HeaderLkSelect/HeaderLkSelect.d.ts +0 -19
- package/dist/lib/components/Header/components/_HeaderLkSelect/HeaderLkSelect.js +0 -60
- package/dist/lib/components/Header/components/_HeaderLogo/HeaderLogo.css +0 -1
- package/dist/lib/components/Header/components/_HeaderLogo/HeaderLogo.d.ts +0 -18
- package/dist/lib/components/Header/components/_HeaderLogo/HeaderLogo.js +0 -68
- package/dist/lib/components/Header/components/_HeaderSupport/HeaderSupport.d.ts +0 -19
- package/dist/lib/components/Header/components/_HeaderSupport/HeaderSupport.js +0 -48
- package/dist/lib/components/Layout/Layout.css +0 -1
- package/dist/lib/components/Layout/Layout.d.ts +0 -10
- package/dist/lib/components/Layout/Layout.js +0 -31
- package/dist/lib/components/NavBar/NavBar.css +0 -1
- package/dist/lib/components/NavBar/NavBar.d.ts +0 -23
- package/dist/lib/components/NavBar/NavBar.js +0 -40
- package/dist/lib/components/NavBar/components/_NavBarItem/NavBarItem.css +0 -1
- package/dist/lib/components/NavBar/components/_NavBarItem/NavBarItem.d.ts +0 -22
- package/dist/lib/components/NavBar/components/_NavBarItem/NavBarItem.js +0 -45
- package/dist/lib/components/Table/Table.css +0 -1
- package/dist/lib/components/Table/Table.d.ts +0 -15
- package/dist/lib/components/Table/Table.js +0 -85
- package/dist/lib/components/Table/components/TableBody/TableBody.d.ts +0 -11
- package/dist/lib/components/Table/components/TableBody/TableBody.js +0 -23
- package/dist/lib/components/Table/components/TableHead/TableHead.d.ts +0 -11
- package/dist/lib/components/Table/components/TableHead/TableHead.js +0 -23
- package/dist/lib/components/Table/components/TableSettings/TableSettings.css +0 -1
- package/dist/lib/components/Table/components/TableSettings/TableSettings.d.ts +0 -23
- package/dist/lib/components/Table/components/TableSettings/TableSettings.js +0 -59
- package/dist/lib/components/Table/components/TableTd/TableTd.css +0 -1
- package/dist/lib/components/Table/components/TableTd/TableTd.d.ts +0 -18
- package/dist/lib/components/Table/components/TableTd/TableTd.js +0 -35
- package/dist/lib/components/Table/components/TableTh/TableTh.css +0 -1
- package/dist/lib/components/Table/components/TableTh/TableTh.d.ts +0 -45
- package/dist/lib/components/Table/components/TableTh/TableTh.js +0 -90
- package/dist/lib/components/Table/components/TableTooltip/TableTooltip.css +0 -1
- package/dist/lib/components/Table/components/TableTooltip/TableTooltip.d.ts +0 -27
- package/dist/lib/components/Table/components/TableTooltip/TableTooltip.js +0 -46
- package/dist/lib/components/Table/components/TableTr/TableTr.css +0 -1
- package/dist/lib/components/Table/components/TableTr/TableTr.d.ts +0 -12
- package/dist/lib/components/Table/components/TableTr/TableTr.js +0 -23
- package/dist/lib/components/Table/contexts/TableContext.d.ts +0 -6
- package/dist/lib/components/Table/contexts/TableContext.js +0 -14
- package/dist/lib/components/Table/helpers.d.ts +0 -2
- package/dist/lib/components/Table/helpers.js +0 -18
- package/dist/lib/components/Table/types.d.ts +0 -5
- package/dist/lib/components/Table/types.js +0 -5
- package/dist/lib/components/_Dropdown/Dropdown.css +0 -1
- package/dist/lib/components/_Dropdown/Dropdown.d.ts +0 -12
- package/dist/lib/components/_Dropdown/Dropdown.js +0 -63
- package/dist/lib/components/_DropdownInfo/DropdownInfo.css +0 -1
- package/dist/lib/components/_DropdownInfo/DropdownInfo.d.ts +0 -9
- package/dist/lib/components/_DropdownInfo/DropdownInfo.js +0 -30
- package/dist/lib/components/_DropdownItem/DropdownItem.css +0 -1
- package/dist/lib/components/_DropdownItem/DropdownItem.d.ts +0 -34
- package/dist/lib/components/_DropdownItem/DropdownItem.js +0 -48
- package/dist/lib/helpers/setRelAttribute.d.ts +0 -3
- package/dist/lib/helpers/setRelAttribute.js +0 -15
- package/dist/lib/hooks/useCssVariable.d.ts +0 -2
- package/dist/lib/hooks/useCssVariable.js +0 -29
- package/dist/lib/index.d.ts +0 -33
- package/dist/lib/index.js +0 -237
- package/dist/lib/styles/constants.css +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-lk-vas",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9",
|
|
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": "^8.
|
|
81
|
-
"@megafon/ui-helpers": "^4.1.
|
|
82
|
-
"@megafon/ui-icons": "^3.15.
|
|
80
|
+
"@megafon/ui-core": "^8.17.1",
|
|
81
|
+
"@megafon/ui-helpers": "^4.1.1",
|
|
82
|
+
"@megafon/ui-icons": "^3.15.1",
|
|
83
83
|
"chart.js": "4.0.1",
|
|
84
84
|
"lodash.throttle": "^4.1.1"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "5f66656d4b0cb6566d13800b71d7dcbb11b47c62"
|
|
87
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-bottom-bar{background-color:var(--base);border-top:1px solid var(--spbSky1);bottom:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:32px;height:96px;left:264px;padding:12px 40px 31px 32px;position:fixed;right:12px;z-index:100}.mfui-lkvas-bottom-bar__back-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);cursor:pointer;display:block;font:inherit;outline:none;padding:0;text-align:center;text-decoration:none}.mfui-lkvas-bottom-bar__back-button:hover{text-decoration:none}.mfui-lkvas-bottom-bar__back-button-inner{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;font-weight:500;gap:12px;line-height:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-lkvas-bottom-bar__arrow-back{display:block;height:20px;width:40px;fill:var(--content)}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import './BottomBar.scss';
|
|
3
|
-
export interface IBottomBar {
|
|
4
|
-
/** Дополнительный класс корневого элемента */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Поведение кнопки */
|
|
7
|
-
actionButtonType?: 'button' | 'reset' | 'submit';
|
|
8
|
-
/** Название кнопки действия */
|
|
9
|
-
actionButtonTitle: string;
|
|
10
|
-
/** Показать кнопку действия в состоянии загрузки */
|
|
11
|
-
showActionButtonLoader?: boolean;
|
|
12
|
-
/** Отключение кнопки действия */
|
|
13
|
-
disableActionButton?: boolean;
|
|
14
|
-
/** Обработчик клика кнопки действия */
|
|
15
|
-
onActionButtonClick: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
16
|
-
/** Название кнопки возврата */
|
|
17
|
-
backButtonTitle?: string;
|
|
18
|
-
/** Обработчик клика кнопки возврата */
|
|
19
|
-
onBackButtonClick: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
20
|
-
/** Дополнительные data атрибуты к внутренним элементам */
|
|
21
|
-
dataAttrs?: {
|
|
22
|
-
root?: Record<string, string>;
|
|
23
|
-
actionButton?: Record<string, string>;
|
|
24
|
-
backButton?: Record<string, string>;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
declare const BottomBar: React.FC<IBottomBar>;
|
|
28
|
-
export default BottomBar;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Button } from '@megafon/ui-core';
|
|
4
|
-
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
|
-
import "./BottomBar.css";
|
|
6
|
-
var ArrowBackIcon = function ArrowBackIcon(props) {
|
|
7
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
8
|
-
viewBox: "0 0 40 20"
|
|
9
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
-
d: "M36 11H7.8l5.6 5.6L12 18l-8-8 8-8 1.4 1.4L7.8 9H36z"
|
|
11
|
-
}));
|
|
12
|
-
};
|
|
13
|
-
var cn = cnCreate('mfui-lkvas-bottom-bar');
|
|
14
|
-
var BottomBar = function BottomBar(_ref) {
|
|
15
|
-
var className = _ref.className,
|
|
16
|
-
_ref$actionButtonType = _ref.actionButtonType,
|
|
17
|
-
actionButtonType = _ref$actionButtonType === void 0 ? 'button' : _ref$actionButtonType,
|
|
18
|
-
actionButtonTitle = _ref.actionButtonTitle,
|
|
19
|
-
_ref$backButtonTitle = _ref.backButtonTitle,
|
|
20
|
-
backButtonTitle = _ref$backButtonTitle === void 0 ? 'Назад' : _ref$backButtonTitle,
|
|
21
|
-
_ref$showActionButton = _ref.showActionButtonLoader,
|
|
22
|
-
showActionButtonLoader = _ref$showActionButton === void 0 ? false : _ref$showActionButton,
|
|
23
|
-
_ref$disableActionBut = _ref.disableActionButton,
|
|
24
|
-
disableActionButton = _ref$disableActionBut === void 0 ? false : _ref$disableActionBut,
|
|
25
|
-
onActionButtonClick = _ref.onActionButtonClick,
|
|
26
|
-
onBackButtonClick = _ref.onBackButtonClick,
|
|
27
|
-
dataAttrs = _ref.dataAttrs;
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
29
|
-
className: cn([className])
|
|
30
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("button", _extends({
|
|
31
|
-
className: cn('back-button', [className]),
|
|
32
|
-
type: "button",
|
|
33
|
-
onClick: onBackButtonClick
|
|
34
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.backButton)), /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: cn('back-button-inner')
|
|
36
|
-
}, /*#__PURE__*/React.createElement(ArrowBackIcon, {
|
|
37
|
-
className: cn('arrow-back')
|
|
38
|
-
}), backButtonTitle)), /*#__PURE__*/React.createElement(Button, {
|
|
39
|
-
actionType: actionButtonType,
|
|
40
|
-
showLoader: showActionButtonLoader,
|
|
41
|
-
disabled: disableActionButton,
|
|
42
|
-
dataAttrs: {
|
|
43
|
-
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.actionButton
|
|
44
|
-
},
|
|
45
|
-
onClick: onActionButtonClick
|
|
46
|
-
}, actionButtonTitle));
|
|
47
|
-
};
|
|
48
|
-
export default BottomBar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-card-big{background-color:var(--base);border:1px solid var(--spbSky2);border-radius:12px;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;grid-template-rows:1fr;overflow:hidden;width:100%}.mfui-lkvas-card-big__item{padding:16px 12px}.mfui-lkvas-card-big__item:first-child{padding-left:24px;padding-right:24px}.mfui-lkvas-card-big__item:nth-child(2){padding-left:24px}.mfui-lkvas-card-big__item:last-child{padding-right:24px}.mfui-lkvas-card-big_multiline{grid-template-rows:repeat(2,-webkit-min-content);grid-template-rows:repeat(2,min-content)}.mfui-lkvas-card-big_multiline .mfui-lkvas-card-big__item:nth-child(2){padding-left:24px;padding-right:24px}.mfui-lkvas-card-big_multiline .mfui-lkvas-card-big__item:nth-child(3),.mfui-lkvas-card-big_multiline .mfui-lkvas-card-big__item:nth-child(4){padding-left:24px}.mfui-lkvas-card-big_multiline .mfui-lkvas-card-big__item:nth-last-child(2){padding-right:24px}.mfui-lkvas-card-big_multiline .mfui-lkvas-card-big__item:nth-child(2n){padding-top:6px}.mfui-lkvas-card-big_multiline .mfui-lkvas-card-big__item:nth-child(odd){padding-bottom:6px}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type CardCellType } from '../components/_CardCell/CardCell';
|
|
3
|
-
import './CardBig.scss';
|
|
4
|
-
export interface ICardBig {
|
|
5
|
-
/** Дополнительный класс корневого элемента */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Массив элементов */
|
|
8
|
-
items: CardCellType[];
|
|
9
|
-
/** Расположение элементов в 2 строки. Элементы размещаются последовательно по каждому столбцу, начиная с первого. */
|
|
10
|
-
isTwoLine?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const CardSmall: React.FC<ICardBig>;
|
|
13
|
-
export default CardSmall;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import "core-js/modules/es.array.map.js";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { cnCreate } from '@megafon/ui-helpers';
|
|
5
|
-
import CardCell from "../components/_CardCell/CardCell";
|
|
6
|
-
import "./CardBig.css";
|
|
7
|
-
var cn = cnCreate('mfui-lkvas-card-big');
|
|
8
|
-
var CardSmall = function CardSmall(_ref) {
|
|
9
|
-
var className = _ref.className,
|
|
10
|
-
_ref$items = _ref.items,
|
|
11
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
12
|
-
_ref$isTwoLine = _ref.isTwoLine,
|
|
13
|
-
isTwoLine = _ref$isTwoLine === void 0 ? false : _ref$isTwoLine;
|
|
14
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
-
className: cn({
|
|
16
|
-
multiline: isTwoLine
|
|
17
|
-
}, [className])
|
|
18
|
-
}, items.map(function (item, index) {
|
|
19
|
-
var isFirstItem = index === 0;
|
|
20
|
-
var isSecondItem = index === 1;
|
|
21
|
-
var isFirstColumn = isFirstItem || isTwoLine && isSecondItem;
|
|
22
|
-
return /*#__PURE__*/React.createElement(CardCell, _extends({
|
|
23
|
-
key: index,
|
|
24
|
-
className: cn('item')
|
|
25
|
-
}, item, {
|
|
26
|
-
isFirstCell: isFirstItem,
|
|
27
|
-
hasBackgroundFill: isFirstColumn
|
|
28
|
-
}));
|
|
29
|
-
}));
|
|
30
|
-
};
|
|
31
|
-
export default CardSmall;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-card-small{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;background-color:var(--base);border:1px solid var(--spbSky2);border-radius:12px;-webkit-box-sizing:border-box;box-sizing:border-box;justify-content:space-between;padding:16px;width:233px}.mfui-lkvas-card-small_adaptive{max-width:100%;width:100%}.mfui-lkvas-card-small__close-button{background-color:var(--spbSky0);border:none;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;height:28px;min-width:28px;padding:4px;position:absolute;right:8px;top:8px;width:28px}.mfui-lkvas-card-small__close-icon{height:100%;width:100%;fill:var(--spbSky3)}.mfui-lkvas-card-small__buttons,.mfui-lkvas-card-small__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-lkvas-card-small__item:first-child{padding-right:28px}.mfui-lkvas-card-small__buttons{border-top:1px solid var(--spbSky1);margin-top:16px;padding-top:16px}.mfui-lkvas-card-small__button{background-color:transparent;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--systemBlue);cursor:pointer;font:inherit;padding:0;text-decoration:none}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type CardCellType } from '../components/_CardCell/CardCell';
|
|
3
|
-
import './CardSmall.scss';
|
|
4
|
-
export type ButtonType = {
|
|
5
|
-
/** Название */
|
|
6
|
-
title: string;
|
|
7
|
-
/** Ссылка */
|
|
8
|
-
href?: string;
|
|
9
|
-
/** Атрибут ссылки target */
|
|
10
|
-
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
11
|
-
/** Атрибут ссылки rel */
|
|
12
|
-
rel?: string;
|
|
13
|
-
/** Обработчик клика */
|
|
14
|
-
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
15
|
-
};
|
|
16
|
-
export type CardSmallCellType = Pick<CardCellType, 'title' | 'titleColor' | 'subtitle'>;
|
|
17
|
-
export interface ICardSmall {
|
|
18
|
-
/** Дополнительный класс корневого элемента */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Массив элементов */
|
|
21
|
-
items: CardSmallCellType[];
|
|
22
|
-
/** Кнопки действий */
|
|
23
|
-
actionButtons: ButtonType[];
|
|
24
|
-
/** Обработчик клика по кнопке-крестику "Закрыть" */
|
|
25
|
-
onCloseButtonClick?: () => void;
|
|
26
|
-
/** Растягивать компонент на всю ширину */
|
|
27
|
-
isAdaptive?: boolean;
|
|
28
|
-
/** Дополнительные data атрибуты к внутренним элементам */
|
|
29
|
-
dataAttrs?: {
|
|
30
|
-
root?: Record<string, string>;
|
|
31
|
-
actionButton?: Record<string, string>;
|
|
32
|
-
closeButton?: Record<string, string>;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
declare const CardSmall: React.FC<ICardSmall>;
|
|
36
|
-
export default CardSmall;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import "core-js/modules/es.array.map.js";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
|
-
import { setRelAttribute } from "../../../helpers/setRelAttribute";
|
|
6
|
-
import CardCell from "../components/_CardCell/CardCell";
|
|
7
|
-
import "./CardSmall.css";
|
|
8
|
-
var CancelIcon = function CancelIcon(props) {
|
|
9
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10
|
-
viewBox: "0 0 20 20"
|
|
11
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
-
className: "CancelIcon__st0",
|
|
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"
|
|
14
|
-
}));
|
|
15
|
-
};
|
|
16
|
-
var cn = cnCreate('mfui-lkvas-card-small');
|
|
17
|
-
var CardSmall = function CardSmall(_ref) {
|
|
18
|
-
var className = _ref.className,
|
|
19
|
-
_ref$actionButtons = _ref.actionButtons,
|
|
20
|
-
actionButtons = _ref$actionButtons === void 0 ? [] : _ref$actionButtons,
|
|
21
|
-
onCloseButtonClick = _ref.onCloseButtonClick,
|
|
22
|
-
_ref$items = _ref.items,
|
|
23
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
24
|
-
_ref$isAdaptive = _ref.isAdaptive,
|
|
25
|
-
isAdaptive = _ref$isAdaptive === void 0 ? false : _ref$isAdaptive,
|
|
26
|
-
dataAttrs = _ref.dataAttrs;
|
|
27
|
-
var hasCloseButton = !!onCloseButtonClick;
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
29
|
-
className: cn({
|
|
30
|
-
adaptive: isAdaptive
|
|
31
|
-
}, [className])
|
|
32
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), hasCloseButton && /*#__PURE__*/React.createElement("button", _extends({
|
|
33
|
-
className: cn('close-button')
|
|
34
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.closeButton), {
|
|
35
|
-
type: "button",
|
|
36
|
-
onClick: onCloseButtonClick
|
|
37
|
-
}), /*#__PURE__*/React.createElement(CancelIcon, {
|
|
38
|
-
className: cn('close-icon')
|
|
39
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
className: cn('items')
|
|
41
|
-
}, items.map(function (item, index) {
|
|
42
|
-
var isFirstItem = index === 0;
|
|
43
|
-
return /*#__PURE__*/React.createElement(CardCell, _extends({
|
|
44
|
-
key: index,
|
|
45
|
-
className: cn('item')
|
|
46
|
-
}, item, {
|
|
47
|
-
isFirstCell: isFirstItem
|
|
48
|
-
}));
|
|
49
|
-
})), !!(actionButtons === null || actionButtons === void 0 ? void 0 : actionButtons.length) && /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: cn('buttons')
|
|
51
|
-
}, actionButtons.map(function (_ref2, index) {
|
|
52
|
-
var title = _ref2.title,
|
|
53
|
-
href = _ref2.href,
|
|
54
|
-
target = _ref2.target,
|
|
55
|
-
rel = _ref2.rel,
|
|
56
|
-
onClick = _ref2.onClick;
|
|
57
|
-
var ElementType = href ? 'a' : 'button';
|
|
58
|
-
return /*#__PURE__*/React.createElement(ElementType, _extends({
|
|
59
|
-
key: title + index,
|
|
60
|
-
className: cn('button')
|
|
61
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.actionButton, index + 1), {
|
|
62
|
-
href: href,
|
|
63
|
-
rel: setRelAttribute(rel, target),
|
|
64
|
-
onClick: onClick
|
|
65
|
-
}), title);
|
|
66
|
-
})));
|
|
67
|
-
};
|
|
68
|
-
export default CardSmall;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-card-cell{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:left;-ms-flex-pack:left;-webkit-box-sizing:border-box;box-sizing:border-box;justify-content:left;width:100%}.mfui-lkvas-card-cell__text-box{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.mfui-lkvas-card-cell__actions-box,.mfui-lkvas-card-cell__switcher-box{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:9px 0}.mfui-lkvas-card-cell__switcher-box,.mfui-lkvas-card-cell__text-box{color:var(--spbSky3);font-size:12px;font-weight:400;line-height:18px}.mfui-lkvas-card-cell__actions-box{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end}.mfui-lkvas-card-cell__text-box-title{color:var(--content);font-size:15px;font-weight:400;line-height:24px;margin-top:4px}.mfui-lkvas-card-cell__text-box-title_color_green{color:var(--brandGreen)}.mfui-lkvas-card-cell__text-box_highlight,.mfui-lkvas-card-cell__text-box_highlight .mfui-lkvas-card-cell__text-box-title{font-weight:500}.mfui-lkvas-card-cell__actions-box-button{background-color:var(--spbSky0);border:none;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:pointer;font:inherit;height:28px;min-width:28px;padding:4px;width:28px}.mfui-lkvas-card-cell__actions-box-icon{height:100%;width:100%;fill:var(--content)}.mfui-lkvas-card-cell__actions-box-icon_type_cancel{fill:var(--spbSky3)}.mfui-lkvas-card-cell_fill{background-color:var(--spbSky0)}.mfui-lkvas-card-cell_align_center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mfui-lkvas-card-cell_align_right{-webkit-box-pack:right;-ms-flex-pack:right;justify-content:right}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Switcher } from '@megafon/ui-core';
|
|
3
|
-
import './CardCell.scss';
|
|
4
|
-
type SwitcherPropsType = React.ComponentProps<typeof Switcher>;
|
|
5
|
-
export type ActionItemIconType = 'settings' | 'edit' | 'cancel';
|
|
6
|
-
export type ActionItemType = {
|
|
7
|
-
/** Тип иконки */
|
|
8
|
-
iconType: ActionItemIconType;
|
|
9
|
-
/** Обработчик клика */
|
|
10
|
-
onClick: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
11
|
-
};
|
|
12
|
-
export type CardCellType = {
|
|
13
|
-
/** Тип */
|
|
14
|
-
type?: 'default' | 'switcher' | 'actions';
|
|
15
|
-
/** Заголовок */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** Цвет заголовка */
|
|
18
|
-
titleColor?: 'default' | 'green';
|
|
19
|
-
/** Дополнительный текст */
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
/** Параметры переключателя (Switcher ui-core) */
|
|
22
|
-
switcherProps?: SwitcherPropsType;
|
|
23
|
-
/** Текст переключателя */
|
|
24
|
-
switcherText?: string;
|
|
25
|
-
/** Элементы действий */
|
|
26
|
-
actionsItems?: ActionItemType[];
|
|
27
|
-
/** Горизонтальное выравнивание для 'switcher' | 'actions' */
|
|
28
|
-
align?: 'left' | 'center' | 'right';
|
|
29
|
-
};
|
|
30
|
-
interface ICardCell extends CardCellType {
|
|
31
|
-
className?: string;
|
|
32
|
-
isFirstCell?: boolean;
|
|
33
|
-
hasBackgroundFill?: boolean;
|
|
34
|
-
dataAttrs?: {
|
|
35
|
-
default?: Record<string, string>;
|
|
36
|
-
switcher?: Record<string, string>;
|
|
37
|
-
actions?: Record<string, string>;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
declare const CardCell: React.FC<ICardCell>;
|
|
41
|
-
export default CardCell;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import "core-js/modules/es.array.map.js";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Switcher } from '@megafon/ui-core';
|
|
5
|
-
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
|
-
import "./CardCell.css";
|
|
7
|
-
var EditIcon = function EditIcon(props) {
|
|
8
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
9
|
-
viewBox: "0 0 20 20"
|
|
10
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
d: "M17.1 2.9c-1.2-1.2-3.2-1.2-4.5 0L3.5 12 2 17l1 1 5-1.5 9.1-9.1c.6-.6.9-1.4.9-2.3s-.3-1.6-.9-2.2zM7.5 15.5l-4.3 1.3-.1-.1 1.3-4.3L11 5.8l3 3-6.5 6.7zm8.9-8.8l-1.5 1.5-3-3 1.5-1.5c.8-.8 2.2-.8 3 0 .4.3.6.9.6 1.4 0 .6-.2 1.2-.6 1.6z"
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
14
|
-
var SettingsIcon = function SettingsIcon(props) {
|
|
15
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
16
|
-
viewBox: "0 0 20 20"
|
|
17
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
18
|
-
d: "M10 13a3 3 0 113-3 3 3 0 01-3 3zm0-5a2 2 0 102 2 2 2 0 00-2-2zm1.37 10H8.63L8 16.89a1.3 1.3 0 00-1.54-.64l-1.19.37-1.9-1.94.37-1.19a1.3 1.3 0 00-.64-1.54L2 11.37V8.62L3.1 8a1.3 1.3 0 00.64-1.5l-.37-1.19 1.94-1.94 1.19.37A1.3 1.3 0 008 3.1L8.63 2h2.75L12 3.1a1.31 1.31 0 001.54.64l1.19-.37 1.94 1.94-.41 1.19A1.3 1.3 0 0016.9 8l1.1.58v2.75l-1.1.58a1.3 1.3 0 00-.64 1.54l.37 1.19-1.94 1.94-1.19-.37a1.31 1.31 0 00-1.54.64zm-2.14-1h1.54l.3-.57a2.3 2.3 0 012.73-1.13l.61.19 1.09-1.09-.19-.61a2.3 2.3 0 011.13-2.73l.57-.3V9.23l-.57-.3A2.3 2.3 0 0115.3 6.2l.19-.61-1.08-1.09-.61.19a2.3 2.3 0 01-2.73-1.13l-.3-.56H9.23l-.3.57a2.3 2.3 0 01-2.72 1.12l-.62-.19-1.08 1.09.19.61a2.3 2.3 0 01-1.13 2.73l-.57.3v1.54l.57.3a2.3 2.3 0 011.13 2.72l-.19.61 1.09 1.09.61-.19a2.3 2.3 0 012.73 1.13z"
|
|
19
|
-
}));
|
|
20
|
-
};
|
|
21
|
-
var CancelIcon = function CancelIcon(props) {
|
|
22
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
23
|
-
viewBox: "0 0 20 20"
|
|
24
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
25
|
-
className: "CancelIcon__st0",
|
|
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
|
-
}));
|
|
28
|
-
};
|
|
29
|
-
var cn = cnCreate('mfui-lkvas-card-cell');
|
|
30
|
-
var CardCell = function CardCell(_ref) {
|
|
31
|
-
var className = _ref.className,
|
|
32
|
-
_ref$type = _ref.type,
|
|
33
|
-
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
34
|
-
title = _ref.title,
|
|
35
|
-
_ref$titleColor = _ref.titleColor,
|
|
36
|
-
titleColor = _ref$titleColor === void 0 ? 'default' : _ref$titleColor,
|
|
37
|
-
subtitle = _ref.subtitle,
|
|
38
|
-
switcherProps = _ref.switcherProps,
|
|
39
|
-
switcherText = _ref.switcherText,
|
|
40
|
-
actionsItems = _ref.actionsItems,
|
|
41
|
-
_ref$align = _ref.align,
|
|
42
|
-
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
43
|
-
isFirstCell = _ref.isFirstCell,
|
|
44
|
-
_ref$hasBackgroundFil = _ref.hasBackgroundFill,
|
|
45
|
-
hasBackgroundFill = _ref$hasBackgroundFil === void 0 ? false : _ref$hasBackgroundFil,
|
|
46
|
-
dataAttrs = _ref.dataAttrs;
|
|
47
|
-
var currentAlign = type !== 'default' ? align : 'left';
|
|
48
|
-
var getActionIcon = function getActionIcon(iconType) {
|
|
49
|
-
switch (iconType) {
|
|
50
|
-
case 'settings':
|
|
51
|
-
return SettingsIcon;
|
|
52
|
-
case 'edit':
|
|
53
|
-
return EditIcon;
|
|
54
|
-
default:
|
|
55
|
-
return CancelIcon;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var renderActionsContent = function renderActionsContent() {
|
|
59
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
60
|
-
className: cn('actions-box')
|
|
61
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.actions)), !!(actionsItems === null || actionsItems === void 0 ? void 0 : actionsItems.length) && actionsItems.map(function (_ref2, index) {
|
|
62
|
-
var iconType = _ref2.iconType,
|
|
63
|
-
onClick = _ref2.onClick;
|
|
64
|
-
var CurrentIcon = getActionIcon(iconType);
|
|
65
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
66
|
-
key: iconType + index,
|
|
67
|
-
className: cn('actions-box-button'),
|
|
68
|
-
type: "button",
|
|
69
|
-
onClick: onClick
|
|
70
|
-
}, /*#__PURE__*/React.createElement(CurrentIcon, {
|
|
71
|
-
className: cn('actions-box-icon', {
|
|
72
|
-
type: iconType
|
|
73
|
-
})
|
|
74
|
-
}));
|
|
75
|
-
}));
|
|
76
|
-
};
|
|
77
|
-
var renderTextContent = function renderTextContent() {
|
|
78
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
79
|
-
className: cn('text-box', {
|
|
80
|
-
highlight: isFirstCell
|
|
81
|
-
})
|
|
82
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs["default"])), /*#__PURE__*/React.createElement("div", null, subtitle), /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: cn('text-box-title', {
|
|
84
|
-
color: titleColor
|
|
85
|
-
})
|
|
86
|
-
}, title));
|
|
87
|
-
};
|
|
88
|
-
var renderSwitcherContent = function renderSwitcherContent() {
|
|
89
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
90
|
-
className: cn('switcher-box')
|
|
91
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.switcher)), switcherText, /*#__PURE__*/React.createElement(Switcher, switcherProps));
|
|
92
|
-
};
|
|
93
|
-
var renderContent = function renderContent() {
|
|
94
|
-
switch (type) {
|
|
95
|
-
case 'switcher':
|
|
96
|
-
return renderSwitcherContent();
|
|
97
|
-
case 'actions':
|
|
98
|
-
return renderActionsContent();
|
|
99
|
-
default:
|
|
100
|
-
return renderTextContent();
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
-
className: cn({
|
|
105
|
-
align: currentAlign,
|
|
106
|
-
fill: hasBackgroundFill
|
|
107
|
-
}, [className])
|
|
108
|
-
}, renderContent());
|
|
109
|
-
};
|
|
110
|
-
export default CardCell;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-chart{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:var(--base);border-radius:12px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.1);box-shadow:0 2px 12px rgba(0,0,0,.1);-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;gap:24px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:24px 32px 32px}.mfui-lkvas-chart,.mfui-lkvas-chart__header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.mfui-lkvas-chart__header{display:grid;gap:20px;grid-template-columns:1fr auto minmax(-webkit-min-content,1fr);grid-template-columns:1fr auto minmax(min-content,1fr)}.mfui-lkvas-chart__title{font-size:18px;font-weight:500;grid-column-start:2;letter-spacing:.5px;line-height:24px;text-align:center}@media screen and (min-width:1280px){.mfui-lkvas-chart__title{font-size:20px;line-height:28px}}.mfui-lkvas-chart__button{grid-column-start:3;justify-self:end}.mfui-lkvas-chart__image{background-image:url(img/chart.png);background-repeat:no-repeat;background-size:cover;display:block;height:96px;width:96px}.mfui-lkvas-chart__empty-text{font-size:15px;font-weight:400;line-height:24px}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Button } from '@megafon/ui-core';
|
|
5
|
-
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
|
-
import useCssVariable from "../../../hooks/useCssVariable";
|
|
7
|
-
import ChartBar from "./components/_ChartBar/ChartBar";
|
|
8
|
-
import ChartDoughnut from "./components/_ChartDoughnut/ChartDoughnut";
|
|
9
|
-
import ChartLine from "./components/_ChartLine/ChartLine";
|
|
10
|
-
import "./Chart.css";
|
|
11
|
-
var DownloadIcon = function DownloadIcon(props) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
-
viewBox: "0 0 32 32"
|
|
14
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
15
|
-
d: "M15.04 5.99L14.97 17l-1.26-1.49-1.42 1.41L15.37 20h1.26l3.08-3.08-1.42-1.41-1.32 1.55.07-11.05-2-.02z"
|
|
16
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
17
|
-
d: "M8 17H6a10 10 0 0020 0h-2a8 8 0 01-16 0z"
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
20
|
-
var cn = cnCreate('mfui-lkvas-chart');
|
|
21
|
-
var Chart = function Chart(_ref) {
|
|
22
|
-
var className = _ref.className,
|
|
23
|
-
type = _ref.type,
|
|
24
|
-
title = _ref.title,
|
|
25
|
-
labels = _ref.labels,
|
|
26
|
-
datasets = _ref.datasets,
|
|
27
|
-
scales = _ref.scales,
|
|
28
|
-
downloadLink = _ref.downloadLink,
|
|
29
|
-
_ref$hideLegend = _ref.hideLegend,
|
|
30
|
-
hideLegend = _ref$hideLegend === void 0 ? false : _ref$hideLegend,
|
|
31
|
-
dataAttrs = _ref.dataAttrs;
|
|
32
|
-
var _React$useState = React.useState(),
|
|
33
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
34
|
-
bgColor = _React$useState2[0],
|
|
35
|
-
setBgColor = _React$useState2[1];
|
|
36
|
-
var rootRef = React.useRef(null);
|
|
37
|
-
var ticksColor = useCssVariable('--content');
|
|
38
|
-
var scaleColor = useCssVariable('--spbSky1');
|
|
39
|
-
var scalesColor = {
|
|
40
|
-
ticksColor: ticksColor,
|
|
41
|
-
scaleColor: scaleColor
|
|
42
|
-
};
|
|
43
|
-
var showChart = !!datasets.length && !!labels.length;
|
|
44
|
-
React.useEffect(function () {
|
|
45
|
-
if (type === 'doughnut' && rootRef.current) {
|
|
46
|
-
var rootNodeStyle = window.getComputedStyle(rootRef.current);
|
|
47
|
-
setBgColor(rootNodeStyle.getPropertyValue('background-color'));
|
|
48
|
-
}
|
|
49
|
-
}, [type]);
|
|
50
|
-
var renderChart = function renderChart() {
|
|
51
|
-
if (type === 'line') {
|
|
52
|
-
return /*#__PURE__*/React.createElement(ChartLine, {
|
|
53
|
-
type: type,
|
|
54
|
-
datasets: datasets,
|
|
55
|
-
labels: labels,
|
|
56
|
-
scales: scales,
|
|
57
|
-
hideLegend: hideLegend,
|
|
58
|
-
scalesColors: scalesColor
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
if (type === 'bar') {
|
|
62
|
-
return /*#__PURE__*/React.createElement(ChartBar, {
|
|
63
|
-
type: type,
|
|
64
|
-
datasets: datasets,
|
|
65
|
-
labels: labels,
|
|
66
|
-
scales: scales,
|
|
67
|
-
hideLegend: hideLegend,
|
|
68
|
-
scalesColors: scalesColor
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return /*#__PURE__*/React.createElement(ChartDoughnut, {
|
|
72
|
-
type: type,
|
|
73
|
-
datasets: datasets,
|
|
74
|
-
labels: labels,
|
|
75
|
-
hideLegend: hideLegend,
|
|
76
|
-
bgColor: bgColor
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
var emptyContent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: cn('image')
|
|
81
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
82
|
-
className: cn('empty-text')
|
|
83
|
-
}, "\u0414\u0430\u043D\u043D\u044B\u0445 \u043D\u0435\u0442"));
|
|
84
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
85
|
-
className: cn([className])
|
|
86
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
87
|
-
ref: rootRef
|
|
88
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: cn('header')
|
|
90
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: cn('title')
|
|
92
|
-
}, title), !!downloadLink && /*#__PURE__*/React.createElement(Button, {
|
|
93
|
-
className: cn('button'),
|
|
94
|
-
theme: "green",
|
|
95
|
-
type: "text",
|
|
96
|
-
href: downloadLink,
|
|
97
|
-
download: true,
|
|
98
|
-
icon: /*#__PURE__*/React.createElement(DownloadIcon, null),
|
|
99
|
-
dataAttrs: {
|
|
100
|
-
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.downloadButton
|
|
101
|
-
}
|
|
102
|
-
}, "\u0421\u043A\u0430\u0447\u0430\u0442\u044C")), showChart ? renderChart() : emptyContent);
|
|
103
|
-
};
|
|
104
|
-
export default Chart;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-chart-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.mfui-lkvas-chart-bar__chart{cursor:pointer;height:230px;width:100%}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IChart, IScalesColors } from '../../types';
|
|
3
|
-
import './ChartBar.scss';
|
|
4
|
-
interface IChartBar extends Pick<IChart, 'datasets' | 'labels' | 'hideLegend' | 'scales'> {
|
|
5
|
-
type: 'bar';
|
|
6
|
-
scalesColors: IScalesColors;
|
|
7
|
-
}
|
|
8
|
-
declare const ChartBar: React.FC<IChartBar>;
|
|
9
|
-
export default ChartBar;
|