oolib 2.27.13 → 2.27.14

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.
@@ -78,7 +78,7 @@ var ActionMenu = function (_a) {
78
78
  }, []);
79
79
  var _k = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _k.fixPos, applyFixedPos = _k.applyFixedPos, removeFixedPos = _k.removeFixedPos, trackerRef = _k.trackerRef;
80
80
  return (react_1.default.createElement(styled_1.StyledActionMenu, { ref: actionMenuRef },
81
- react_1.default.createElement(ButtonComp, __assign({}, buttonSize, { icon: icon, iconSize: iconSize, invert: invert, stopPropagation: true, onClick: function (e) {
81
+ react_1.default.createElement(ButtonComp, __assign({}, buttonSize, { icon: icon, iconSize: iconSize, invert: invert, stopPropagation: true, preventDefault: true, onClick: function (e) {
82
82
  setShowActions(!showActions);
83
83
  }, active: showActions })),
84
84
  popOutOfOverflowHiddenParent &&
@@ -49,7 +49,7 @@ var DisplayIcon = function (_a) {
49
49
  };
50
50
  var ButtonStyledWrapper = function (_a) {
51
51
  var props = _a.props, variant = _a.variant;
52
- var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize, _iconColor = props.iconColor, stopPropagation = props.stopPropagation, forceHover = props.forceHover //used by multi-option button
52
+ var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize, _iconColor = props.iconColor, stopPropagation = props.stopPropagation, preventDefault = props.preventDefault, forceHover = props.forceHover //used by multi-option button
53
53
  ;
54
54
  /**
55
55
  * WHY WE ARE HAVING TO DO STOP PROPAGATION IN THIS TWISTED WAY:
@@ -94,9 +94,11 @@ var ButtonStyledWrapper = function (_a) {
94
94
  var iconColor = !disabled ? _iconColor : themes_1.colors.greyColor40;
95
95
  return (react_1.default.createElement(index_styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, invert: invert, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? "submit" : "button", onClick: function (e) {
96
96
  stopPropagation && e.stopPropagation();
97
+ preventDefault && e.preventDefault(); // if the button is used inside a <Link> then, clicking the button will trigger off the link. I thought stopPopagation would stop that from happening. But it doesnt. e.preventDefault however works.
97
98
  debouncedOnClick && debouncedOnClick(e);
98
99
  }, onMouseDown: function (e) {
99
100
  stopPropagation && e.stopPropagation();
101
+ preventDefault && e.preventDefault();
100
102
  debouncedMouseDown && debouncedMouseDown(e);
101
103
  }, composition: composition, width: width, color: color, forceHover: forceHover },
102
104
  icon && react_1.default.createElement(DisplayIcon, { icon: icon, color: iconColor, size: calcIconSize() }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.27.13",
3
+ "version": "2.27.14",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",