@mailstep/design-system 0.5.0-beta.32 → 0.5.0-beta.34

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.5.0-beta.32",
3
+ "version": "0.5.0-beta.34",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -7,9 +7,10 @@ import { useCallback, useMemo, useRef, useState } from 'react';
7
7
  import styled from '@xstyled/styled-components';
8
8
  import DropdownMenu from '../../../../Elements/DropdownMenu';
9
9
  import Popover from '../../../Popover';
10
- var StyledDropdownMenu = styled(DropdownMenu)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-width: 160px;\n width: max-content;\n"], ["\n min-width: 160px;\n width: max-content;\n"])));
11
- export var StyledButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 56px;\n height: 56px;\n border-radius: 50%;\n border: none;\n background-color: red1;\n display: flex;\n z-index: 1;\n justify-content: center;\n align-items: center;\n position: fixed;\n bottom: 65px;\n right: 24px;\n\n :hover {\n cursor: pointer;\n }\n"], ["\n width: 56px;\n height: 56px;\n border-radius: 50%;\n border: none;\n background-color: red1;\n display: flex;\n z-index: 1;\n justify-content: center;\n align-items: center;\n position: fixed;\n bottom: 65px;\n right: 24px;\n\n :hover {\n cursor: pointer;\n }\n"])));
12
- export var StyledCross = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n .line {\n border: 1px solid white;\n display: flex;\n width: 16px;\n background-color: white;\n transition: 0.3s;\n }\n > :nth-child(1) {\n transform: ", ";\n }\n > :nth-child(2) {\n transform: ", ";\n }\n"], ["\n .line {\n border: 1px solid white;\n display: flex;\n width: 16px;\n background-color: white;\n transition: 0.3s;\n }\n > :nth-child(1) {\n transform: ", ";\n }\n > :nth-child(2) {\n transform: ", ";\n }\n"])), function (_a) {
10
+ var FloatingWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n position: absolute;\n bottom: 20px;\n right: 24px;\n @media (min-width: 1024px) {\n display: none;\n }\n"], ["\n display: block;\n position: absolute;\n bottom: 20px;\n right: 24px;\n @media (min-width: 1024px) {\n display: none;\n }\n"])));
11
+ var StyledDropdownMenu = styled(DropdownMenu)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n min-width: 160px;\n width: max-content;\n"], ["\n min-width: 160px;\n width: max-content;\n"])));
12
+ export var StyledButton = styled.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 56px;\n height: 56px;\n border-radius: 50%;\n border: none;\n background-color: red1;\n display: flex;\n z-index: 1;\n justify-content: center;\n align-items: center;\n position: fixed;\n bottom: 65px;\n right: 24px;\n\n :hover {\n cursor: pointer;\n }\n"], ["\n width: 56px;\n height: 56px;\n border-radius: 50%;\n border: none;\n background-color: red1;\n display: flex;\n z-index: 1;\n justify-content: center;\n align-items: center;\n position: fixed;\n bottom: 65px;\n right: 24px;\n\n :hover {\n cursor: pointer;\n }\n"])));
13
+ export var StyledCross = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n .line {\n border: 1px solid white;\n display: flex;\n width: 16px;\n background-color: white;\n transition: 0.3s;\n }\n > :nth-child(1) {\n transform: ", ";\n }\n > :nth-child(2) {\n transform: ", ";\n }\n"], ["\n .line {\n border: 1px solid white;\n display: flex;\n width: 16px;\n background-color: white;\n transition: 0.3s;\n }\n > :nth-child(1) {\n transform: ", ";\n }\n > :nth-child(2) {\n transform: ", ";\n }\n"])), function (_a) {
13
14
  var isOpen = _a.isOpen;
14
15
  return (isOpen ? 'rotate(135deg) translate(1px, 0)' : 'none');
15
16
  }, function (_a) {
@@ -39,7 +40,7 @@ var FloatingButton = function (_a) {
39
40
  name: item.name,
40
41
  }); });
41
42
  }, [handleSelectItem, options]);
42
- return (_jsxs(StyledButton, { ref: ref, onClick: handleOnClick, children: [_jsxs(StyledCross, { isOpen: showDropdownMenu, children: [_jsx("span", { className: "line" }), _jsx("span", { className: "line" })] }), showDropdownMenu && (_jsx(Popover, { parentRef: ref, onClose: onClose, placement: "left-end", children: _jsx(StyledDropdownMenu, { showMenu: true, items: items }) }))] }));
43
+ return (_jsx(FloatingWrapper, { children: _jsxs(StyledButton, { ref: ref, onClick: handleOnClick, children: [_jsxs(StyledCross, { isOpen: showDropdownMenu, children: [_jsx("span", { className: "line" }), _jsx("span", { className: "line" })] }), showDropdownMenu && (_jsx(Popover, { parentRef: ref, onClose: onClose, placement: "left-end", children: _jsx(StyledDropdownMenu, { showMenu: true, items: items }) }))] }) }));
43
44
  };
44
45
  export default FloatingButton;
45
- var templateObject_1, templateObject_2, templateObject_3;
46
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -15,13 +15,12 @@ var LABEL_VALUE = '_label_';
15
15
  var filterRowsOption = function (option) { return option.value !== LABEL_VALUE; };
16
16
  var TablePagination = function (_a) {
17
17
  var gridActions = _a.gridActions, gridSelectors = _a.gridSelectors;
18
- var setRowsPerPage = gridActions.setRowsPerPage, setPage = gridActions.setPage;
18
+ var setRowsPerPage = gridActions.setRowsPerPage;
19
19
  var onSetRowsPerPage = useCallback(function (option) {
20
20
  if (option && 'value' in option) {
21
21
  setRowsPerPage === null || setRowsPerPage === void 0 ? void 0 : setRowsPerPage(Number(option.value));
22
- setPage === null || setPage === void 0 ? void 0 : setPage(gridSelectors.page);
23
22
  }
24
- }, [gridSelectors.page, setPage, setRowsPerPage]);
23
+ }, [setRowsPerPage]);
25
24
  var rowsPerPageOptions = useMemo(function () {
26
25
  return rowsPerPageOptionValues.map(function (value) { return ({ value: value, label: value }); });
27
26
  }, []);