@mailstep/design-system 0.5.0-beta.31 → 0.5.0-beta.33

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.31",
3
+ "version": "0.5.0-beta.33",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -17,7 +17,7 @@ import ColumnFilterCell from './ColumnFilterCell';
17
17
  import { Row, Cell } from './Table';
18
18
  import { getActionCellSizeProps, getFilterName } from '../utils';
19
19
  import { useToggleAllCheckbox } from '../hooks/useToggleAllCheckbox';
20
- import Toggle from '../../../Elements/Toggle/Toggle';
20
+ import Checkbox from '../../../Forms/Checkbox';
21
21
  var FilterRow = function (_a) {
22
22
  var _b, _c;
23
23
  var columns = _a.columns, groups = _a.groups, actionColumn = _a.actionColumn, onChange = _a.onChange, _d = _a.filterValues, filterValues = _d === void 0 ? {} : _d, displayColumnsWidth = _a.displayColumnsWidth, filters = _a.filters, handleUxChange = _a.handleUxChange, rowsData = _a.rowsData, uxState = _a.uxState;
@@ -29,6 +29,6 @@ var FilterRow = function (_a) {
29
29
  var displayCheckbox = (actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.checkAllPosition) === 'top' && (((_b = actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.actionOptions) === null || _b === void 0 ? void 0 : _b.length) || (actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.forceCheckboxes));
30
30
  var displayRowNumberLabel = actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.addRowNumbers;
31
31
  var rowsNumberLabel = (_c = actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.addRowNumbersLabel) !== null && _c !== void 0 ? _c : '#';
32
- return (_jsxs(Row, { className: "filterRow", children: [displayCheckbox && (_jsx(Cell, { className: "cell", style: actionColumnStyle, children: _jsx(Toggle, { checked: allChecked, onChange: toggleCheckbox, label: "" }, "check-all") })), displayRowNumberLabel && (_jsx(Cell, { className: "cell", style: actionColumnStyle, children: _jsx("div", { children: rowsNumberLabel }) })), !!(!displayCheckbox && !displayRowNumberLabel && actionColumn) && (_jsx(Cell, { className: "cell", style: actionColumnStyle }, 'actions')), columns.map(function (column, index) { return (_jsx(ColumnFilterCell, { column: column, onChange: handleOnChange, value: get([getFilterName(column), 'value'], filterValues), displayColumnWidth: displayColumnsWidth[column.name], filters: filters, group: groups === null || groups === void 0 ? void 0 : groups[index] }, index)); })] }));
32
+ return (_jsxs(Row, { className: "filterRow", children: [displayCheckbox && (_jsx(Cell, { className: "cell", style: actionColumnStyle, children: _jsx(Checkbox, { checked: allChecked, onChange: toggleCheckbox, label: "" }, "check-all") })), displayRowNumberLabel && (_jsx(Cell, { className: "cell", style: actionColumnStyle, children: _jsx("div", { children: rowsNumberLabel }) })), !!(!displayCheckbox && !displayRowNumberLabel && actionColumn) && (_jsx(Cell, { className: "cell", style: actionColumnStyle }, 'actions')), columns.map(function (column, index) { return (_jsx(ColumnFilterCell, { column: column, onChange: handleOnChange, value: get([getFilterName(column), 'value'], filterValues), displayColumnWidth: displayColumnsWidth[column.name], filters: filters, group: groups === null || groups === void 0 ? void 0 : groups[index] }, index)); })] }));
33
33
  };
34
34
  export default FilterRow;
@@ -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;