@mailstep/design-system 0.7.74-beta.5 → 0.7.75-beta.1

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.7.74-beta.5",
3
+ "version": "0.7.75-beta.1",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -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) {
@@ -25,6 +25,6 @@ import { Spinner } from '../Spinner';
25
25
  import { StyledButton, LoadingIconWrapper, StyledIcon, StyledWrapper } from './styles';
26
26
  var Button = function (_a) {
27
27
  var isLoading = _a.isLoading, loadingText = _a.loadingText, icon = _a.icon, iconLeft = _a.iconLeft, iconRight = _a.iconRight, iconFillColor = _a.iconFillColor, iconStrokeColor = _a.iconStrokeColor, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'primary' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.fullWidth, fullWidth = _e === void 0 ? false : _e, height = _a.height, buttonRef = _a.buttonRef, onClick = _a.onClick, props = __rest(_a, ["isLoading", "loadingText", "icon", "iconLeft", "iconRight", "iconFillColor", "iconStrokeColor", "variant", "appearance", "disabled", "fullWidth", "height", "buttonRef", "onClick"]);
28
- return (_jsx(StyledButton, __assign({}, props, { onClick: !disabled && !isLoading ? onClick : undefined, "data-variant": variant, "data-appearance": appearance, disabled: disabled, iconPadding: !!icon && !props.children, ref: buttonRef, fullWidth: fullWidth, height: height, children: _jsxs(StyledWrapper, { children: [iconLeft && (typeof iconLeft === 'string' ? _jsx(StyledIcon, { "$addMarginRight": !!iconLeft, icon: iconLeft, fill: iconFillColor, stroke: iconStrokeColor }) : iconLeft), isLoading && (_jsxs(_Fragment, { children: [_jsx(LoadingIconWrapper, { "$addMarginRight": !!loadingText || !!props.children, children: _jsx(Spinner, { variant: "sm", appearance: "processing" }) }), loadingText] })), props.children ? (props.children) : (icon && (typeof icon === 'string' ? _jsx(StyledIcon, { icon: icon, fill: iconFillColor, stroke: iconStrokeColor }) : icon)), iconRight && (typeof iconRight === 'string' ? _jsx(StyledIcon, { "$addMarginLeft": !!iconRight, icon: iconRight, fill: iconFillColor, stroke: iconStrokeColor }) : iconRight)] }) })));
28
+ return (_jsx(StyledButton, __assign({}, props, { onClick: !disabled && !isLoading ? onClick : undefined, "data-variant": variant, "data-appearance": appearance, disabled: disabled, iconPadding: !!icon && !props.children, ref: buttonRef, fullWidth: fullWidth, height: height, children: _jsxs(StyledWrapper, { children: [iconLeft && (typeof iconLeft === 'string' ? _jsx(StyledIcon, { "$addMarginRight": !!iconLeft, icon: iconLeft, fill: iconFillColor, stroke: iconStrokeColor }) : iconLeft), isLoading && (_jsxs(_Fragment, { children: [_jsx(LoadingIconWrapper, { "$addMarginRight": !!loadingText || !!props.children, children: _jsx(Spinner, { variant: "sm", appearance: "processing" }) }), loadingText] })), props.children || (icon && (typeof icon === 'string' ? _jsx(StyledIcon, { icon: icon, fill: iconFillColor, stroke: iconStrokeColor }) : icon)), iconRight && (typeof iconRight === 'string' ? _jsx(StyledIcon, { "$addMarginLeft": !!iconRight, icon: iconRight, fill: iconFillColor, stroke: iconStrokeColor }) : iconRight)] }) })));
29
29
  };
30
30
  export default Button;