@mailstep/design-system 0.8.24 → 0.8.25
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 +1 -1
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +9 -8
- package/ui/index.es.js +14258 -13632
- package/ui/index.umd.js +437 -437
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import Button from '../../../../Elements/Button/Button';
|
|
18
18
|
import DropdownSelect from '../../../../Elements/DropdownSelect';
|
|
19
|
-
import { ExtraControlButtonPosition } from '../../types';
|
|
20
19
|
import ButtonMore from '../ButtonMore/ButtonMore';
|
|
21
20
|
import styled, { x } from '@xstyled/styled-components';
|
|
22
21
|
export var Row = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n & > * {\n margin-right: 12px;\n }\n z-index: 2;\n"], ["\n display: flex;\n & > * {\n margin-right: 12px;\n }\n z-index: 2;\n"])));
|
|
@@ -35,12 +34,14 @@ var ControlButton = function (_a) {
|
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
36
|
var ExtraControlButtons = function (_a) {
|
|
38
|
-
var extraControlButtons = _a.extraControlButtons, isMobile = _a.isMobile,
|
|
39
|
-
var buttons =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
var extraControlButtons = _a.extraControlButtons, isMobile = _a.isMobile, targetPosition = _a.targetPosition;
|
|
38
|
+
var buttons = targetPosition
|
|
39
|
+
? (extraControlButtons || []).filter(function (_a) {
|
|
40
|
+
var position = _a.position, hide = _a.hide;
|
|
41
|
+
return position === targetPosition && !hide;
|
|
42
|
+
})
|
|
43
|
+
: extraControlButtons !== null && extraControlButtons !== void 0 ? extraControlButtons : [];
|
|
44
|
+
if (isMobile && (buttons === null || buttons === void 0 ? void 0 : buttons.length) > 0) {
|
|
44
45
|
var items = buttons.flatMap(function (_a) {
|
|
45
46
|
var onSelect = _a.onSelect, onClick = _a.onClick, options = _a.options, label = _a.label;
|
|
46
47
|
if (options && onSelect) {
|
|
@@ -60,7 +61,7 @@ var ExtraControlButtons = function (_a) {
|
|
|
60
61
|
return null;
|
|
61
62
|
return _jsx(ButtonMore, { items: items });
|
|
62
63
|
}
|
|
63
|
-
return (_jsx(Row, { children: buttons.map(function (button, idx) { return (_jsx(x.div, { children: _jsx(ControlButton, __assign({}, button)) }, idx)); }) }));
|
|
64
|
+
return (_jsx(Row, { children: buttons === null || buttons === void 0 ? void 0 : buttons.map(function (button, idx) { return (_jsx(x.div, { children: _jsx(ControlButton, __assign({}, button)) }, idx)); }) }));
|
|
64
65
|
};
|
|
65
66
|
export default ExtraControlButtons;
|
|
66
67
|
var templateObject_1;
|