@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
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
|
-
import "./Dropdown.css";
|
|
6
|
-
var cn = cnCreate('mfui-lkvas-dropdown');
|
|
7
|
-
var Dropdown = function Dropdown(_ref) {
|
|
8
|
-
var className = _ref.className,
|
|
9
|
-
_ref$position = _ref.position,
|
|
10
|
-
position = _ref$position === void 0 ? 'right' : _ref$position,
|
|
11
|
-
renderTrigger = _ref.renderTrigger,
|
|
12
|
-
children = _ref.children,
|
|
13
|
-
dataAttrs = _ref.dataAttrs;
|
|
14
|
-
var _React$useState = React.useState(false),
|
|
15
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
16
|
-
isOpened = _React$useState2[0],
|
|
17
|
-
setIsOpened = _React$useState2[1];
|
|
18
|
-
var triggerRef = React.useRef(null);
|
|
19
|
-
var handleOutsideClick = React.useCallback(function (event) {
|
|
20
|
-
if (triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
21
|
-
setIsOpened(false);
|
|
22
|
-
}
|
|
23
|
-
}, []);
|
|
24
|
-
var handleTriggerClick = function handleTriggerClick() {
|
|
25
|
-
setIsOpened(function (state) {
|
|
26
|
-
return !state;
|
|
27
|
-
});
|
|
28
|
-
document.addEventListener('mouseup', handleOutsideClick);
|
|
29
|
-
};
|
|
30
|
-
React.useEffect(function () {
|
|
31
|
-
if (!isOpened) {
|
|
32
|
-
document.removeEventListener('mouseup', handleOutsideClick);
|
|
33
|
-
}
|
|
34
|
-
}, [handleOutsideClick, isOpened]);
|
|
35
|
-
React.useEffect(function () {
|
|
36
|
-
return function () {
|
|
37
|
-
return document.removeEventListener('mouseup', handleOutsideClick);
|
|
38
|
-
};
|
|
39
|
-
}, [handleOutsideClick]);
|
|
40
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
41
|
-
className: cn({
|
|
42
|
-
opened: isOpened,
|
|
43
|
-
position: position
|
|
44
|
-
}, [className])
|
|
45
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: cn('trigger'),
|
|
47
|
-
ref: triggerRef,
|
|
48
|
-
onClick: handleTriggerClick,
|
|
49
|
-
role: "presentation"
|
|
50
|
-
}, renderTrigger(isOpened)), /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: cn('modal')
|
|
52
|
-
}, children));
|
|
53
|
-
};
|
|
54
|
-
export default Dropdown;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-dropdown-info_top-border{border-top:1px solid var(--spbSky1);margin-top:8px;padding-top:8px}.mfui-lkvas-dropdown-info__inner{border-radius:12px;padding:12px 16px}.mfui-lkvas-dropdown-info__title{color:var(--spbSky3)}.mfui-lkvas-dropdown-info__subtitle{font-size:15px;font-weight:500;line-height:24px}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { cnCreate } from '@megafon/ui-helpers';
|
|
3
|
-
import "./DropdownInfo.css";
|
|
4
|
-
var cn = cnCreate('mfui-lkvas-dropdown-info');
|
|
5
|
-
var DropdownInfo = function DropdownInfo(_ref) {
|
|
6
|
-
var title = _ref.title,
|
|
7
|
-
subtitle = _ref.subtitle,
|
|
8
|
-
_ref$hasTopBorder = _ref.hasTopBorder,
|
|
9
|
-
hasTopBorder = _ref$hasTopBorder === void 0 ? false : _ref$hasTopBorder;
|
|
10
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
-
className: cn({
|
|
12
|
-
'top-border': hasTopBorder
|
|
13
|
-
})
|
|
14
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
15
|
-
className: cn('inner')
|
|
16
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: cn('title')
|
|
18
|
-
}, title), /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: cn('subtitle')
|
|
20
|
-
}, subtitle)));
|
|
21
|
-
};
|
|
22
|
-
export default DropdownInfo;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-lkvas-dropdown-item_top-border{border-top:1px solid var(--spbSky1);margin-top:16px;padding-top:16px}.mfui-lkvas-dropdown-item__inner{border-radius:12px;cursor:pointer;display:block;padding:12px 16px;text-decoration:none;-webkit-transition:background-color .3s;transition:background-color .3s}@media (pointer:fine){.mfui-lkvas-dropdown-item__inner:hover{background-color:var(--spbSky0);text-decoration:none}}.mfui-lkvas-dropdown-item_color_white .mfui-lkvas-dropdown-item__inner{color:var(--stcWhite)}@media (pointer:fine){.mfui-lkvas-dropdown-item_color_white .mfui-lkvas-dropdown-item__inner:hover{background-color:var(--stcWhite10)}}.mfui-lkvas-dropdown-item_color_black .mfui-lkvas-dropdown-item__inner{color:var(--content)}.mfui-lkvas-dropdown-item_color_green .mfui-lkvas-dropdown-item__inner{color:var(--brandGreen)}.mfui-lkvas-dropdown-item_color_red .mfui-lkvas-dropdown-item__inner{color:var(--fury)}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import './DropdownItem.scss';
|
|
3
|
-
export type ClickParamsType = {
|
|
4
|
-
/** id */
|
|
5
|
-
id: string | number;
|
|
6
|
-
/** Заголовок */
|
|
7
|
-
title: string;
|
|
8
|
-
};
|
|
9
|
-
export type ItemType = {
|
|
10
|
-
/** id */
|
|
11
|
-
id: string | number;
|
|
12
|
-
/** Заголовок */
|
|
13
|
-
title: string;
|
|
14
|
-
/** Ссылка */
|
|
15
|
-
href?: string;
|
|
16
|
-
/** Атрибут ссылки target */
|
|
17
|
-
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
18
|
-
/** Атрибут ссылки rel */
|
|
19
|
-
rel?: string;
|
|
20
|
-
/** Обработчик клика */
|
|
21
|
-
onClick?: (params: ClickParamsType) => void;
|
|
22
|
-
/** Функция рендера компонента-обертки */
|
|
23
|
-
renderWrapper?: (node: React.ReactNode) => React.ReactNode;
|
|
24
|
-
};
|
|
25
|
-
export interface IDropdownItemProps extends ItemType {
|
|
26
|
-
color?: 'green' | 'black' | 'red' | 'white';
|
|
27
|
-
hasTopBorder?: boolean;
|
|
28
|
-
dataAttrs?: {
|
|
29
|
-
root?: Record<string, string>;
|
|
30
|
-
inner?: Record<string, string>;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
declare const DropdownItem: React.FC<IDropdownItemProps>;
|
|
34
|
-
export default DropdownItem;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
4
|
-
import "./DropdownItem.css";
|
|
5
|
-
var cn = cnCreate('mfui-lkvas-dropdown-item');
|
|
6
|
-
var DropdownItem = function DropdownItem(_ref) {
|
|
7
|
-
var id = _ref.id,
|
|
8
|
-
title = _ref.title,
|
|
9
|
-
href = _ref.href,
|
|
10
|
-
target = _ref.target,
|
|
11
|
-
rel = _ref.rel,
|
|
12
|
-
_ref$color = _ref.color,
|
|
13
|
-
color = _ref$color === void 0 ? 'black' : _ref$color,
|
|
14
|
-
hasTopBorder = _ref.hasTopBorder,
|
|
15
|
-
onClick = _ref.onClick,
|
|
16
|
-
renderWrapper = _ref.renderWrapper,
|
|
17
|
-
dataAttrs = _ref.dataAttrs;
|
|
18
|
-
var Element = href ? 'a' : 'div';
|
|
19
|
-
var handleClick = function handleClick() {
|
|
20
|
-
onClick === null || onClick === void 0 ? void 0 : onClick({
|
|
21
|
-
id: id,
|
|
22
|
-
title: title
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
var innerElement = /*#__PURE__*/React.createElement(Element, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner), {
|
|
26
|
-
className: cn('inner'),
|
|
27
|
-
href: href,
|
|
28
|
-
target: target,
|
|
29
|
-
rel: rel,
|
|
30
|
-
onClick: handleClick
|
|
31
|
-
}), title);
|
|
32
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
33
|
-
className: cn({
|
|
34
|
-
color: color,
|
|
35
|
-
'top-border': hasTopBorder
|
|
36
|
-
})
|
|
37
|
-
}), renderWrapper ? renderWrapper(innerElement) : innerElement);
|
|
38
|
-
};
|
|
39
|
-
export default DropdownItem;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import "core-js/modules/es.string.trim.js";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
var useCssVariable = function useCssVariable(variableName) {
|
|
5
|
-
var _React$useState = React.useState(),
|
|
6
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
7
|
-
value = _React$useState2[0],
|
|
8
|
-
setValue = _React$useState2[1];
|
|
9
|
-
React.useEffect(function () {
|
|
10
|
-
if (typeof window === 'undefined') {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
var root = document.querySelector(':root');
|
|
14
|
-
if (root) {
|
|
15
|
-
var rootStyles = window.getComputedStyle(root);
|
|
16
|
-
var variableValue = rootStyles.getPropertyValue(variableName);
|
|
17
|
-
!!variableValue && setValue(variableValue.trim());
|
|
18
|
-
}
|
|
19
|
-
}, [variableName]);
|
|
20
|
-
return value;
|
|
21
|
-
};
|
|
22
|
-
export default useCssVariable;
|
package/dist/es/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export { default as BottomBar } from './components/BottomBar/BottomBar';
|
|
2
|
-
export { default as CardBig } from './components/Cards/CardBig/CardBig';
|
|
3
|
-
export { default as CardCell } from './components/Cards/components/_CardCell/CardCell';
|
|
4
|
-
export { default as CardSmall } from './components/Cards/CardSmall/CardSmall';
|
|
5
|
-
export { default as Chart } from './components/Charts/Chart/Chart';
|
|
6
|
-
export { default as ChartBar } from './components/Charts/Chart/components/_ChartBar/ChartBar';
|
|
7
|
-
export { default as ChartBase } from './components/Charts/Chart/components/_ChartBase/ChartBase';
|
|
8
|
-
export { default as chartColors } from './components/Charts/Chart/components/chartColors';
|
|
9
|
-
export { default as ChartDoughnut } from './components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut';
|
|
10
|
-
export { default as ChartLegend } from './components/Charts/Chart/components/_ChartLegend/ChartLegend';
|
|
11
|
-
export { default as ChartLine } from './components/Charts/Chart/components/_ChartLine/ChartLine';
|
|
12
|
-
export { default as Dropdown } from './components/_Dropdown/Dropdown';
|
|
13
|
-
export { default as DropdownInfo } from './components/_DropdownInfo/DropdownInfo';
|
|
14
|
-
export { default as DropdownItem } from './components/_DropdownItem/DropdownItem';
|
|
15
|
-
export { default as Header } from './components/Header/Header';
|
|
16
|
-
export { default as HeaderAccount } from './components/Header/components/_HeaderAccount/HeaderAccount';
|
|
17
|
-
export { default as HeaderButton } from './components/Header/components/_HeaderButton/HeaderButton';
|
|
18
|
-
export { default as HeaderFavorites } from './components/Header/components/_HeaderFavorites/HeaderFavorites';
|
|
19
|
-
export { default as HeaderFinance } from './components/Header/components/_HeaderFinance/HeaderFinance';
|
|
20
|
-
export { default as HeaderLkSelect } from './components/Header/components/_HeaderLkSelect/HeaderLkSelect';
|
|
21
|
-
export { default as HeaderLogo } from './components/Header/components/_HeaderLogo/HeaderLogo';
|
|
22
|
-
export { default as HeaderSupport } from './components/Header/components/_HeaderSupport/HeaderSupport';
|
|
23
|
-
export { default as Layout } from './components/Layout/Layout';
|
|
24
|
-
export { default as NavBar } from './components/NavBar/NavBar';
|
|
25
|
-
export { default as NavBarItem } from './components/NavBar/components/_NavBarItem/NavBarItem';
|
|
26
|
-
export { default as Table } from './components/Table/Table';
|
|
27
|
-
export { default as TableBody } from './components/Table/components/TableBody/TableBody';
|
|
28
|
-
export { default as TableHead } from './components/Table/components/TableHead/TableHead';
|
|
29
|
-
export { default as TableSettings } from './components/Table/components/TableSettings/TableSettings';
|
|
30
|
-
export { default as TableTd } from './components/Table/components/TableTd/TableTd';
|
|
31
|
-
export { default as TableTh } from './components/Table/components/TableTh/TableTh';
|
|
32
|
-
export { default as TableTooltip } from './components/Table/components/TableTooltip/TableTooltip';
|
|
33
|
-
export { default as TableTr } from './components/Table/components/TableTr/TableTr';
|
package/dist/es/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export { default as BottomBar } from "./components/BottomBar/BottomBar";
|
|
2
|
-
export { default as CardBig } from "./components/Cards/CardBig/CardBig";
|
|
3
|
-
export { default as CardCell } from "./components/Cards/components/_CardCell/CardCell";
|
|
4
|
-
export { default as CardSmall } from "./components/Cards/CardSmall/CardSmall";
|
|
5
|
-
export { default as Chart } from "./components/Charts/Chart/Chart";
|
|
6
|
-
export { default as ChartBar } from "./components/Charts/Chart/components/_ChartBar/ChartBar";
|
|
7
|
-
export { default as ChartBase } from "./components/Charts/Chart/components/_ChartBase/ChartBase";
|
|
8
|
-
export { default as chartColors } from "./components/Charts/Chart/components/chartColors";
|
|
9
|
-
export { default as ChartDoughnut } from "./components/Charts/Chart/components/_ChartDoughnut/ChartDoughnut";
|
|
10
|
-
export { default as ChartLegend } from "./components/Charts/Chart/components/_ChartLegend/ChartLegend";
|
|
11
|
-
export { default as ChartLine } from "./components/Charts/Chart/components/_ChartLine/ChartLine";
|
|
12
|
-
export { default as Dropdown } from "./components/_Dropdown/Dropdown";
|
|
13
|
-
export { default as DropdownInfo } from "./components/_DropdownInfo/DropdownInfo";
|
|
14
|
-
export { default as DropdownItem } from "./components/_DropdownItem/DropdownItem";
|
|
15
|
-
export { default as Header } from "./components/Header/Header";
|
|
16
|
-
export { default as HeaderAccount } from "./components/Header/components/_HeaderAccount/HeaderAccount";
|
|
17
|
-
export { default as HeaderButton } from "./components/Header/components/_HeaderButton/HeaderButton";
|
|
18
|
-
export { default as HeaderFavorites } from "./components/Header/components/_HeaderFavorites/HeaderFavorites";
|
|
19
|
-
export { default as HeaderFinance } from "./components/Header/components/_HeaderFinance/HeaderFinance";
|
|
20
|
-
export { default as HeaderLkSelect } from "./components/Header/components/_HeaderLkSelect/HeaderLkSelect";
|
|
21
|
-
export { default as HeaderLogo } from "./components/Header/components/_HeaderLogo/HeaderLogo";
|
|
22
|
-
export { default as HeaderSupport } from "./components/Header/components/_HeaderSupport/HeaderSupport";
|
|
23
|
-
export { default as Layout } from "./components/Layout/Layout";
|
|
24
|
-
export { default as NavBar } from "./components/NavBar/NavBar";
|
|
25
|
-
export { default as NavBarItem } from "./components/NavBar/components/_NavBarItem/NavBarItem";
|
|
26
|
-
export { default as Table } from "./components/Table/Table";
|
|
27
|
-
export { default as TableBody } from "./components/Table/components/TableBody/TableBody";
|
|
28
|
-
export { default as TableHead } from "./components/Table/components/TableHead/TableHead";
|
|
29
|
-
export { default as TableSettings } from "./components/Table/components/TableSettings/TableSettings";
|
|
30
|
-
export { default as TableTd } from "./components/Table/components/TableTd/TableTd";
|
|
31
|
-
export { default as TableTh } from "./components/Table/components/TableTh/TableTh";
|
|
32
|
-
export { default as TableTooltip } from "./components/Table/components/TableTooltip/TableTooltip";
|
|
33
|
-
export { default as TableTr } from "./components/Table/components/TableTr/TableTr";
|
|
File without changes
|
|
@@ -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,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _uiCore = require("@megafon/ui-core");
|
|
11
|
-
var _uiHelpers = require("@megafon/ui-helpers");
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
-
var ArrowBackIcon = function ArrowBackIcon(props) {
|
|
16
|
-
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
17
|
-
viewBox: "0 0 40 20"
|
|
18
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
-
d: "M36 11H7.8l5.6 5.6L12 18l-8-8 8-8 1.4 1.4L7.8 9H36z"
|
|
20
|
-
}));
|
|
21
|
-
};
|
|
22
|
-
var cn = (0, _uiHelpers.cnCreate)('mfui-lkvas-bottom-bar');
|
|
23
|
-
var BottomBar = function BottomBar(_ref) {
|
|
24
|
-
var className = _ref.className,
|
|
25
|
-
_ref$actionButtonType = _ref.actionButtonType,
|
|
26
|
-
actionButtonType = _ref$actionButtonType === void 0 ? 'button' : _ref$actionButtonType,
|
|
27
|
-
actionButtonTitle = _ref.actionButtonTitle,
|
|
28
|
-
_ref$backButtonTitle = _ref.backButtonTitle,
|
|
29
|
-
backButtonTitle = _ref$backButtonTitle === void 0 ? 'Назад' : _ref$backButtonTitle,
|
|
30
|
-
_ref$showActionButton = _ref.showActionButtonLoader,
|
|
31
|
-
showActionButtonLoader = _ref$showActionButton === void 0 ? false : _ref$showActionButton,
|
|
32
|
-
_ref$disableActionBut = _ref.disableActionButton,
|
|
33
|
-
disableActionButton = _ref$disableActionBut === void 0 ? false : _ref$disableActionBut,
|
|
34
|
-
onActionButtonClick = _ref.onActionButtonClick,
|
|
35
|
-
onBackButtonClick = _ref.onBackButtonClick,
|
|
36
|
-
dataAttrs = _ref.dataAttrs;
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
38
|
-
className: cn([className])
|
|
39
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("button", (0, _extends2["default"])({
|
|
40
|
-
className: cn('back-button', [className]),
|
|
41
|
-
type: "button",
|
|
42
|
-
onClick: onBackButtonClick
|
|
43
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.backButton)), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: cn('back-button-inner')
|
|
45
|
-
}, /*#__PURE__*/React.createElement(ArrowBackIcon, {
|
|
46
|
-
className: cn('arrow-back')
|
|
47
|
-
}), backButtonTitle)), /*#__PURE__*/React.createElement(_uiCore.Button, {
|
|
48
|
-
actionType: actionButtonType,
|
|
49
|
-
showLoader: showActionButtonLoader,
|
|
50
|
-
disabled: disableActionButton,
|
|
51
|
-
dataAttrs: {
|
|
52
|
-
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.actionButton
|
|
53
|
-
},
|
|
54
|
-
onClick: onActionButtonClick
|
|
55
|
-
}, actionButtonTitle));
|
|
56
|
-
};
|
|
57
|
-
var _default = exports["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,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
require("core-js/modules/es.array.map.js");
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _uiHelpers = require("@megafon/ui-helpers");
|
|
12
|
-
var _CardCell = _interopRequireDefault(require("../components/_CardCell/CardCell"));
|
|
13
|
-
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
|
-
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
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
-
var cn = (0, _uiHelpers.cnCreate)('mfui-lkvas-card-big');
|
|
17
|
-
var CardSmall = function CardSmall(_ref) {
|
|
18
|
-
var className = _ref.className,
|
|
19
|
-
_ref$items = _ref.items,
|
|
20
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
21
|
-
_ref$isTwoLine = _ref.isTwoLine,
|
|
22
|
-
isTwoLine = _ref$isTwoLine === void 0 ? false : _ref$isTwoLine;
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: cn({
|
|
25
|
-
multiline: isTwoLine
|
|
26
|
-
}, [className])
|
|
27
|
-
}, items.map(function (item, index) {
|
|
28
|
-
var isFirstItem = index === 0;
|
|
29
|
-
var isSecondItem = index === 1;
|
|
30
|
-
var isFirstColumn = isFirstItem || isTwoLine && isSecondItem;
|
|
31
|
-
return /*#__PURE__*/React.createElement(_CardCell["default"], (0, _extends2["default"])({
|
|
32
|
-
key: index,
|
|
33
|
-
className: cn('item')
|
|
34
|
-
}, item, {
|
|
35
|
-
isFirstCell: isFirstItem,
|
|
36
|
-
hasBackgroundFill: isFirstColumn
|
|
37
|
-
}));
|
|
38
|
-
}));
|
|
39
|
-
};
|
|
40
|
-
var _default = exports["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,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
require("core-js/modules/es.array.map.js");
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _uiHelpers = require("@megafon/ui-helpers");
|
|
12
|
-
var _setRelAttribute = require("../../../helpers/setRelAttribute");
|
|
13
|
-
var _CardCell = _interopRequireDefault(require("../components/_CardCell/CardCell"));
|
|
14
|
-
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); }
|
|
15
|
-
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; }
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
-
var CancelIcon = function CancelIcon(props) {
|
|
18
|
-
return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
|
|
19
|
-
viewBox: "0 0 20 20"
|
|
20
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
21
|
-
className: "CancelIcon__st0",
|
|
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"
|
|
23
|
-
}));
|
|
24
|
-
};
|
|
25
|
-
var cn = (0, _uiHelpers.cnCreate)('mfui-lkvas-card-small');
|
|
26
|
-
var CardSmall = function CardSmall(_ref) {
|
|
27
|
-
var className = _ref.className,
|
|
28
|
-
_ref$actionButtons = _ref.actionButtons,
|
|
29
|
-
actionButtons = _ref$actionButtons === void 0 ? [] : _ref$actionButtons,
|
|
30
|
-
onCloseButtonClick = _ref.onCloseButtonClick,
|
|
31
|
-
_ref$items = _ref.items,
|
|
32
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
33
|
-
_ref$isAdaptive = _ref.isAdaptive,
|
|
34
|
-
isAdaptive = _ref$isAdaptive === void 0 ? false : _ref$isAdaptive,
|
|
35
|
-
dataAttrs = _ref.dataAttrs;
|
|
36
|
-
var hasCloseButton = !!onCloseButtonClick;
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
38
|
-
className: cn({
|
|
39
|
-
adaptive: isAdaptive
|
|
40
|
-
}, [className])
|
|
41
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), hasCloseButton && /*#__PURE__*/React.createElement("button", (0, _extends2["default"])({
|
|
42
|
-
className: cn('close-button')
|
|
43
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.closeButton), {
|
|
44
|
-
type: "button",
|
|
45
|
-
onClick: onCloseButtonClick
|
|
46
|
-
}), /*#__PURE__*/React.createElement(CancelIcon, {
|
|
47
|
-
className: cn('close-icon')
|
|
48
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
49
|
-
className: cn('items')
|
|
50
|
-
}, items.map(function (item, index) {
|
|
51
|
-
var isFirstItem = index === 0;
|
|
52
|
-
return /*#__PURE__*/React.createElement(_CardCell["default"], (0, _extends2["default"])({
|
|
53
|
-
key: index,
|
|
54
|
-
className: cn('item')
|
|
55
|
-
}, item, {
|
|
56
|
-
isFirstCell: isFirstItem
|
|
57
|
-
}));
|
|
58
|
-
})), !!(actionButtons === null || actionButtons === void 0 ? void 0 : actionButtons.length) && /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: cn('buttons')
|
|
60
|
-
}, actionButtons.map(function (_ref2, index) {
|
|
61
|
-
var title = _ref2.title,
|
|
62
|
-
href = _ref2.href,
|
|
63
|
-
target = _ref2.target,
|
|
64
|
-
rel = _ref2.rel,
|
|
65
|
-
onClick = _ref2.onClick;
|
|
66
|
-
var ElementType = href ? 'a' : 'button';
|
|
67
|
-
return /*#__PURE__*/React.createElement(ElementType, (0, _extends2["default"])({
|
|
68
|
-
key: title + index,
|
|
69
|
-
className: cn('button')
|
|
70
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.actionButton, index + 1), {
|
|
71
|
-
href: href,
|
|
72
|
-
rel: (0, _setRelAttribute.setRelAttribute)(rel, target),
|
|
73
|
-
onClick: onClick
|
|
74
|
-
}), title);
|
|
75
|
-
})));
|
|
76
|
-
};
|
|
77
|
-
var _default = exports["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;
|