@mailstep/design-system 0.7.74 → 0.7.75-beta.2
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
|
@@ -20,7 +20,7 @@ import styled, { x } from '@xstyled/styled-components';
|
|
|
20
20
|
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"])));
|
|
21
21
|
var StyledButton = styled(Button)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: none;\n\n @media (min-width: 1024px) {\n display: block;\n }\n"], ["\n display: none;\n\n @media (min-width: 1024px) {\n display: block;\n }\n"])));
|
|
22
22
|
var ControlButton = function (_a) {
|
|
23
|
-
var hide = _a.hide, node = _a.node, label = _a.label, appearance = _a.appearance, variant = _a.variant, disabled = _a.disabled, onClick = _a.onClick, onSelect = _a.onSelect, options = _a.options, hideChevron = _a.hideChevron, iconLeft = _a.iconLeft;
|
|
23
|
+
var hide = _a.hide, node = _a.node, label = _a.label, appearance = _a.appearance, variant = _a.variant, disabled = _a.disabled, onClick = _a.onClick, onSelect = _a.onSelect, options = _a.options, hideChevron = _a.hideChevron, iconLeft = _a.iconLeft, buttonProps = _a.buttonProps;
|
|
24
24
|
if (hide) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
@@ -30,7 +30,7 @@ var ControlButton = function (_a) {
|
|
|
30
30
|
return (_jsx(DropdownSelect, { label: label || '', appearance: appearance || 'secondary', variant: variant || 'default', options: options, showChevron: !hideChevron, onSelect: onSelect, disabled: disabled }));
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
return (_jsx(StyledButton, { type: "button", onClick: onClick, disabled: disabled, variant: variant || 'default', appearance: appearance || 'primary', iconLeft: iconLeft, children: label }));
|
|
33
|
+
return (_jsx(StyledButton, __assign({ type: "button", onClick: onClick, disabled: disabled, variant: variant || 'default', appearance: appearance || 'primary', iconLeft: iconLeft }, buttonProps, { children: label })));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
var ExtraControlButtons = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppearanceValue, VariantValue } from '../../Elements/Button/types';
|
|
1
|
+
import { Props as ButtonProps, AppearanceValue, VariantValue } from '../../Elements/Button/types';
|
|
2
2
|
|
|
3
3
|
export declare const rowClassSymbol: unique symbol;
|
|
4
4
|
type Option = {
|
|
@@ -288,6 +288,7 @@ export type ExtraControlButton = {
|
|
|
288
288
|
hideChevron?: boolean;
|
|
289
289
|
disabled?: boolean;
|
|
290
290
|
iconLeft?: string | React.ReactNode;
|
|
291
|
+
buttonProps?: Omit<ButtonProps, 'children' | 'onClick' | 'disabled' | 'appearance' | 'variant' | 'iconLeft' | 'as'>;
|
|
291
292
|
};
|
|
292
293
|
export type Group = {
|
|
293
294
|
name?: string;
|
package/ui/Blocks/Tabs/Tabs.js
CHANGED
|
@@ -9,7 +9,7 @@ var Tab = function (_a) {
|
|
|
9
9
|
var handleOnClick = useCallback(function () {
|
|
10
10
|
onTabSwitch(value);
|
|
11
11
|
}, [onTabSwitch, value]);
|
|
12
|
-
return (_jsx(StyledTabWrapper, { children: _jsxs(StyledTab, { onClick: !disabled ? handleOnClick : undefined, active: isActive, disabled: disabled, minWidth: minWidth, children: [icon && (_jsx(StyledImageBox, { children: _jsx(Icon, { icon: icon }) })), _jsx(Text, { children: label }), badgeCount === 0 ||
|
|
12
|
+
return (_jsx(StyledTabWrapper, { children: _jsxs(StyledTab, { onClick: !disabled ? handleOnClick : undefined, active: isActive, disabled: disabled, minWidth: minWidth, "data-testid": "tab-".concat(value), children: [icon && (_jsx(StyledImageBox, { children: _jsx(Icon, { icon: icon }) })), _jsx(Text, { children: label }), badgeCount === 0 ||
|
|
13
13
|
(badgeCount && badgeCount > 0 && (_jsx(RoundedWrap, { children: _jsx(Text, { variant: "medium", children: badgeCount }) })))] }) }));
|
|
14
14
|
};
|
|
15
15
|
export var Tabs = function (_a) {
|