@mailstep/design-system 0.6.10 → 0.6.12
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/CommonGridContainer.js +1 -1
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +1 -1
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +1 -1
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +1 -1
- package/ui/Blocks/CommonGrid/components/DataRow.js +1 -1
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +3 -3
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +1 -1
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.d.ts +2 -1
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +2 -2
- package/ui/Blocks/CommonGrid/index.d.ts +0 -1
- package/ui/Blocks/CommonGrid/index.js +0 -1
- package/ui/Blocks/CommonGrid/styles.d.ts +1 -1
- package/ui/Blocks/CommonGrid/types.d.ts +3 -1
- package/ui/Blocks/LightBox/LightBox.js +1 -1
- package/ui/Blocks/Modal/Modal.js +1 -1
- package/ui/Elements/Button/Button.d.ts +1 -1
- package/ui/Elements/Button/Button.js +2 -2
- package/ui/Elements/Button/stories/Button.stories.d.ts +12 -10
- package/ui/Elements/Button/stories/Button.stories.js +61 -27
- package/ui/Elements/Button/styles.d.ts +5 -8
- package/ui/Elements/Button/styles.js +15 -31
- package/ui/Elements/Button/types.d.ts +7 -10
- package/ui/Elements/DropdownSelect/DropdownSelect.d.ts +3 -2
- package/ui/Elements/DropdownSelect/DropdownSelect.js +2 -2
- package/ui/Elements/Select/themes/selectStyles.js +2 -2
- package/ui/ThemeProvider/themes/default.js +1 -1
- package/ui/index.es.js +10192 -10255
- package/ui/index.umd.js +497 -526
- package/ui/Blocks/CommonGrid/StandardButtons.d.ts +0 -4
- package/ui/Blocks/CommonGrid/StandardButtons.js +0 -36
|
@@ -22,7 +22,7 @@ var ChevronWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTe
|
|
|
22
22
|
});
|
|
23
23
|
export var CustomSelectButton = styled.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: none;\n min-width: 160px;\n height: 38px;\n padding: 0;\n background-color: red1;\n color: white;\n font-size: 14px;\n line-height: 14px;\n font-weight: 600;\n border: none;\n border-radius: lg;\n outline: none;\n cursor: pointer;\n :disabled {\n border: slim;\n background-color: bgLightGray;\n border-color: lightGray5;\n color: gray3;\n opacity: 0.6;\n cursor: auto;\n }\n\n @media (min-width: 1024px) {\n display: block;\n\n :focus {\n outline: none;\n }\n }\n\n ", " {\n justify-content: space-between;\n padding-left: 14px;\n }\n\n ", " {\n margin-left: 20px;\n padding: 12px 14px;\n }\n"], ["\n display: none;\n min-width: 160px;\n height: 38px;\n padding: 0;\n background-color: red1;\n color: white;\n font-size: 14px;\n line-height: 14px;\n font-weight: 600;\n border: none;\n border-radius: lg;\n outline: none;\n cursor: pointer;\n :disabled {\n border: slim;\n background-color: bgLightGray;\n border-color: lightGray5;\n color: gray3;\n opacity: 0.6;\n cursor: auto;\n }\n\n @media (min-width: 1024px) {\n display: block;\n\n :focus {\n outline: none;\n }\n }\n\n ", " {\n justify-content: space-between;\n padding-left: 14px;\n }\n\n ", " {\n margin-left: 20px;\n padding: 12px 14px;\n }\n"])), ContentWrapper, ChevronWrapper);
|
|
24
24
|
var DropdownSelect = function (_a) {
|
|
25
|
-
var label = _a.label, appearance = _a.appearance, options = _a.options, showChevron = _a.showChevron, onSelect = _a.onSelect, disabled = _a.disabled, icon = _a.icon, ButtonComponent = _a.ButtonComponent;
|
|
25
|
+
var label = _a.label, appearance = _a.appearance, variant = _a.variant, options = _a.options, showChevron = _a.showChevron, onSelect = _a.onSelect, disabled = _a.disabled, icon = _a.icon, ButtonComponent = _a.ButtonComponent;
|
|
26
26
|
var _b = React.useState(false), showDropdownMenu = _b[0], setShowDropdownMenu = _b[1];
|
|
27
27
|
var onClose = useCallback(function () { return setShowDropdownMenu(false); }, []);
|
|
28
28
|
var toggleDropdownMenu = React.useCallback(function () {
|
|
@@ -41,7 +41,7 @@ var DropdownSelect = function (_a) {
|
|
|
41
41
|
}); });
|
|
42
42
|
var ComponentOfButton = ButtonComponent || Button;
|
|
43
43
|
var isCustomBtn = !!ButtonComponent;
|
|
44
|
-
return (_jsxs("div", { ref: ref, children: [_jsx(ComponentOfButton, { type: "button", appearance: appearance, onClick: toggleDropdownMenu, disabled: disabled, "data-cy": "createProductDropdownMenuBtn", children: _jsxs(ContentWrapper, { children: [icon && _jsx(CustomIconWrap, { children: icon }), _jsx("span", { children: label }), showChevron && (_jsx(ChevronWrapper, { "$hasBorder": isCustomBtn, children: _jsx(ArrowIcon, { icon: "chevronDown", size: isCustomBtn ? '100%' : '80%', fixedWidth: isCustomBtn }) }))] }) }), showDropdownMenu && (_jsx(Popover, { parentRef: ref, onClose: onClose, placement: "bottom-start", children: _jsx(StyledDropdownMenu, { showMenu: true, items: items, "$fixedWidth": isCustomBtn }) }))] }));
|
|
44
|
+
return (_jsxs("div", { ref: ref, children: [_jsx(ComponentOfButton, { type: "button", appearance: appearance || 'secondary', variant: variant || 'default', onClick: toggleDropdownMenu, disabled: disabled, "data-cy": "createProductDropdownMenuBtn", children: _jsxs(ContentWrapper, { children: [icon && _jsx(CustomIconWrap, { children: icon }), _jsx("span", { children: label }), showChevron && (_jsx(ChevronWrapper, { "$hasBorder": isCustomBtn, children: _jsx(ArrowIcon, { icon: "chevronDown", size: isCustomBtn ? '100%' : '80%', fixedWidth: isCustomBtn }) }))] }) }), showDropdownMenu && (_jsx(Popover, { parentRef: ref, onClose: onClose, placement: "bottom-start", children: _jsx(StyledDropdownMenu, { showMenu: true, items: items, "$fixedWidth": isCustomBtn }) }))] }));
|
|
45
45
|
};
|
|
46
46
|
export default DropdownSelect;
|
|
47
47
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -19,7 +19,7 @@ export var CustomStyles = {
|
|
|
19
19
|
return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid ? colors.primary : isFocused ? colors.inputTextColor : colors.inputBorderColor, backgroundColor: colors.whiteBackgroundColor, boxShadow: theme.focusBoxShadow, borderRadius: theme.borderRadius, '& input': {
|
|
20
20
|
fontWeight: theme.textWeightNormal,
|
|
21
21
|
fontFamily: theme.font,
|
|
22
|
-
}, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: colors.inputBorderHoverColor }), fontSize: '14px', minHeight: theme.height, minWidth:
|
|
22
|
+
}, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: colors.inputBorderHoverColor }), fontSize: '14px', minHeight: theme.height, minWidth: 'min-content', '.inputIcon': {
|
|
23
23
|
color: isDisabled ? colors.defaultControlColor : !!selectProps.value ? colors.inputTextColor : colors.defaultControlColor,
|
|
24
24
|
} });
|
|
25
25
|
},
|
|
@@ -89,7 +89,7 @@ export var CustomStyles = {
|
|
|
89
89
|
},
|
|
90
90
|
menu: function (styles, state) {
|
|
91
91
|
var theme = state.theme;
|
|
92
|
-
return __assign(__assign({}, styles), { boxShadow: '0 2px 20px 0 rgba(0, 0, 0, 0.10);', marginTop: '
|
|
92
|
+
return __assign(__assign({}, styles), { boxShadow: '0 2px 20px 0 rgba(0, 0, 0, 0.10);', marginTop: '4px', paddingTop: '0', borderRadius: '10px', zIndex: 3, minWidth: 'max-content', backgroundColor: theme.colors.whiteBackgroundColor });
|
|
93
93
|
},
|
|
94
94
|
menuList: function (styles, _a) {
|
|
95
95
|
var theme = _a.theme;
|